本文整理汇总了Python中CharGenCommon类的典型用法代码示例。如果您正苦于以下问题:Python CharGenCommon类的具体用法?Python CharGenCommon怎么用?Python CharGenCommon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CharGenCommon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: NextPress
def NextPress():
#class
ClassIndex = GemRB.GetVar ("Class")-1
Class = CommonTables.Classes.GetValue (ClassIndex, 5)
MyChar = GemRB.GetVar ("Slot")
GemRB.SetPlayerStat (MyChar, IE_CLASS, Class)
CharGenCommon.next()
示例2: NextPress
def NextPress():
# find the class from the class table
ClassName = GUICommon.GetClassRowName (GemRB.GetVar ("Class")-1, "index")
Class = CommonTables.Classes.GetValue (ClassName, "ID")
MyChar = GemRB.GetVar ("Slot")
GemRB.SetPlayerStat (MyChar, IE_CLASS, Class)
CharGenCommon.next()
示例3: NextPress
def NextPress():
global CharSoundWindow
CharSound = VoiceList.QueryText ()
MyChar = GemRB.GetVar ("Slot")
GemRB.SetPlayerSound(MyChar,CharSound)
CharGenCommon.next()
return
示例4: NextPress
def NextPress():
MyChar = GemRB.GetVar("Slot")
# GemRB.CreatePlayer ("charbase", MyChar | 0x8000 )
Gender = GemRB.GetVar("Gender")
GemRB.SetPlayerStat(MyChar, IE_SEX, Gender)
CharGenCommon.next()
return
示例5: setAccept
def setAccept():
#set my character up
MyChar = GemRB.GetVar ("Slot")
ClassName = GUICommon.GetClassRowName (MyChar)
#reputation
AllignID = GemRB.GetPlayerStat (MyChar, IE_ALIGNMENT)
TmpTable=GemRB.LoadTable ("repstart")
t = TmpTable.GetValue (AllignID,0) * 10
GemRB.SetPlayerStat (MyChar, IE_REPUTATION, t)
#lore, thac0, hp, and saves
GemRB.SetPlayerStat (MyChar, IE_MAXHITPOINTS, 0)
GemRB.SetPlayerStat (MyChar, IE_HITPOINTS, 0)
LUCommon.SetupSavingThrows (MyChar)
LUCommon.SetupThaco (MyChar)
LUCommon.SetupLore (MyChar)
LUCommon.SetupHP (MyChar)
#slot 1 is the protagonist
if MyChar == 1:
GemRB.GameSetReputation( t )
#gold
TmpTable=GemRB.LoadTable ("strtgold")
t = GemRB.Roll (TmpTable.GetValue (ClassName,"ROLLS"),TmpTable.GetValue(ClassName,"SIDES"), TmpTable.GetValue (ClassName,"MODIFIER") )
GemRB.SetPlayerStat (MyChar, IE_GOLD, t*TmpTable.GetValue (ClassName,"MULTIPLIER") )
#set the base number of attacks; effects will add the proficiency bonus
GemRB.SetPlayerStat (MyChar, IE_NUMBEROFATTACKS, 2)
#colors
GUICommon.SetColorStat (MyChar, IE_METAL_COLOR, 0x1B )
GUICommon.SetColorStat (MyChar, IE_LEATHER_COLOR, 0x16 )
GUICommon.SetColorStat (MyChar, IE_ARMOR_COLOR, 0x17 )
#does all the rest
LargePortrait = GemRB.GetToken ("LargePortrait")
SmallPortrait = GemRB.GetToken ("SmallPortrait")
GemRB.FillPlayerInfo (MyChar, LargePortrait, SmallPortrait)
#10 is a weapon slot (see slottype.2da row 10)
GemRB.CreateItem (MyChar, "staf01", 10, 1, 0, 0)
GemRB.SetEquippedQuickSlot (MyChar, 0)
#LETS PLAY!!
playmode = GemRB.GetVar ("PlayMode")
GUICommon.CloseOtherWindow(None)
if playmode >=0:
CharGenCommon.close()
if GemRB.GetVar("GUIEnhancements"):
GemRB.SaveCharacter ( GemRB.GetVar ("Slot"), "gembak" )
GemRB.EnterGame()
else:
#show the export window
GemRB.SetToken("NextScript","CharGen")
GemRB.SetNextScript ("ExportFile")
示例6: CancelPress
def CancelPress ():
if GameCheck.IsBG1():
CharGenCommon.jumpTo ("accept")
else:
if ExportWindow:
ExportWindow.Unload ()
GemRB.SetNextScript (GemRB.GetToken("NextScript"))
return
示例7: NextPress
def NextPress():
Name = NameField.QueryText()
#check length?
#seems like a good idea to store it here for the time being
MyChar = GemRB.GetVar ("Slot")
GemRB.SetPlayerName (MyChar, Name, 0)
CharGenCommon.next()
return
示例8: DonePress
def DonePress():
FileName = TextAreaControl.QueryText()
Slot = GemRB.GetVar("Slot")
GemRB.CreatePlayer(FileName, Slot| 0x8000, 1)
GemRB.SetToken("SmallPortrait", GemRB.GetPlayerPortrait (Slot, 1) )
GemRB.SetToken("LargePortrait", GemRB.GetPlayerPortrait (Slot, 0) )
CharGenCommon.jumpTo("appearance")
return
示例9: NextPress
def NextPress():
MyChar = GemRB.GetVar ("Slot")
GUICommon.SetColorStat (MyChar, IE_HAIR_COLOR, HairColor )
GUICommon.SetColorStat (MyChar, IE_SKIN_COLOR, SkinColor )
GUICommon.SetColorStat (MyChar, IE_MAJOR_COLOR, MajorColor)
GUICommon.SetColorStat (MyChar, IE_MINOR_COLOR, MinorColor )
CharGenCommon.next()
return
示例10: DonePress
def DonePress():
FileNameEditBox = ExportWindow.GetControl(7)
FileName = FileNameEditBox.QueryText()
Slot = GemRB.GetVar("Slot")
GemRB.SaveCharacter(Slot, FileName)
GUICommon.CloseOtherWindow(None)
CharGenCommon.close()
GemRB.SetNextScript("Start")
return
示例11: NextPress
def NextPress():
# find the class from the class table
ClassIndex = GemRB.GetVar ("Class") - 1
Class = CommonTables.Classes.GetValue (ClassIndex, 5)
#protect against barbarians
ClassName = CommonTables.Classes.GetRowName (CommonTables.Classes.FindValue (5, Class) )
MyChar = GemRB.GetVar ("Slot")
GemRB.SetPlayerStat (MyChar, IE_CLASS, Class)
CharGenCommon.next()
示例12: NextPress
def NextPress():
#class
ClassIndex = GemRB.GetVar ("Class")-1
Class = CommonTables.Classes.GetValue (ClassIndex, 5)
MyChar = GemRB.GetVar ("Slot")
GemRB.SetPlayerStat (MyChar, IE_CLASS, Class)
KitIndex = GemRB.GetVar ("Class Kit")
#the same as the unusable field
Kit = CommonTables.KitList.GetValue(KitIndex, 6)
GemRB.SetPlayerStat (MyChar, IE_KIT, Kit)
CharGenCommon.next()
示例13: CustomDone
def CustomDone():
global AppearanceWindow
Window = CustomWindow
Portrait = PortraitList1.QueryText()
GemRB.SetToken("LargePortrait", Portrait)
Portrait = PortraitList2.QueryText()
GemRB.SetToken("SmallPortrait", Portrait)
if Window:
Window.Unload()
CharGenCommon.next()
return
示例14: NextPress
def NextPress():
#class
Class = CommonTables.Classes.GetValue (ClassName, "ID")
MyChar = GemRB.GetVar ("Slot")
GemRB.SetPlayerStat (MyChar, IE_CLASS, Class)
KitIndex = GemRB.GetVar ("Class Kit")
if ClassName == "MAGE":
GemRB.SetVar("MAGESCHOOL", KitIndex)
#the same as the unusable field
Kit = CommonTables.KitList.GetValue(KitIndex, 6)
GemRB.SetPlayerStat (MyChar, IE_KIT, Kit)
CharGenCommon.next()
示例15: DonePress
def DonePress ():
FileNameEditBox = ExportWindow.GetControl (7)
FileName = FileNameEditBox.QueryText ()
Slot = GemRB.GetVar ("Slot")
GemRB.SaveCharacter (Slot, FileName)
if GameCheck.IsBG1():
GUICommon.CloseOtherWindow (None)
CharGenCommon.close()
GemRB.SetNextScript ("Start")
else:
if ExportWindow:
ExportWindow.Unload ()
GemRB.SetNextScript (GemRB.GetToken("NextScript"))
return