From: Laszlo T. <ave...@us...> - 2004-12-07 19:08:42
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/tob In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10556/GUIScripts/tob Modified Files: CharGen9.py GUICG7.py Log Message: modified clskills to store the starting xp (by class) fixed bg2 chargen scripts to set the correct class (and starting xp) Index: GUICG7.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/tob/GUICG7.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** GUICG7.py 7 Dec 2004 18:16:09 -0000 1.6 --- GUICG7.py 7 Dec 2004 19:07:58 -0000 1.7 *************** *** 43,47 **** GemRB.LoadWindowPack("GUICG") MageSpellsWindow = GemRB.LoadWindow(7) ! Learnable = GetLearnableMageSpells( GemRB.GetVar("Kit"), GemRB.GetVar("Alignment"), 1) GemRB.SetVar("MageSpellBook", 0) GemRB.SetVar("SpellMask", 0) --- 43,47 ---- GemRB.LoadWindowPack("GUICG") MageSpellsWindow = GemRB.LoadWindow(7) ! Learnable = GetLearnableMageSpells( GemRB.GetVar("Class Kit"), GemRB.GetVar("Alignment"), 1) GemRB.SetVar("MageSpellBook", 0) GemRB.SetVar("SpellMask", 0) Index: CharGen9.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/tob/CharGen9.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CharGen9.py 4 Dec 2004 12:35:21 -0000 1.9 --- CharGen9.py 7 Dec 2004 19:07:58 -0000 1.10 *************** *** 92,102 **** GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,": ") GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,GemRB.GetTableValue(RaceTable,GemRB.GetVar("Race")-1,2)) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,12136, -1) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,": ") KitIndex = GemRB.GetVar("Class Kit") if KitIndex == 0: ! ClassTitle=GemRB.GetTableValue(ClassTable,GemRB.GetVar("Class")-1,2) else: ! ClassTitle=GemRB.GetTableValue(KitTable, KitIndex,2) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl, ClassTitle) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,1049, -1) --- 92,104 ---- GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,": ") GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,GemRB.GetTableValue(RaceTable,GemRB.GetVar("Race")-1,2)) + print "Race: ", GemRB.GetTableRowName(RaceTable, GemRB.GetVar("Race")-1) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,12136, -1) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,": ") KitIndex = GemRB.GetVar("Class Kit") if KitIndex == 0: ! Class = GemRB.GetVar("Class")-1 ! ClassTitle=GemRB.GetTableValue(ClassTable, Class, 2) else: ! ClassTitle=GemRB.GetTableValue(KitTable, KitIndex, 2) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl, ClassTitle) GemRB.TextAreaAppend(CharGenWindow, TextAreaControl,1049, -1) *************** *** 121,126 **** GemRB.CreatePlayer("charbase", MyChar ) GemRB.SetPlayerStat(MyChar, IE_SEX, GemRB.GetVar("Gender") ) ! GemRB.SetPlayerStat(MyChar, IE_RACE, GemRB.GetVar("Race") ) ! Class=GemRB.GetVar("Class") GemRB.SetPlayerStat(MyChar, IE_CLASS, Class) KitIndex = GemRB.GetVar("Class Kit") --- 123,132 ---- GemRB.CreatePlayer("charbase", MyChar ) GemRB.SetPlayerStat(MyChar, IE_SEX, GemRB.GetVar("Gender") ) ! RaceTable = GemRB.LoadTable("races") ! Race = GemRB.GetVar("Race")-1 ! GemRB.SetPlayerStat(MyChar, IE_RACE, GemRB.GetTableValue(RaceTable, Race, 3) ) ! ClassTable = GemRB.LoadTable("classes") ! ClassIndex = GemRB.GetVar("Class")-1 ! Class = GemRB.GetTableValue(ClassTable, ClassIndex, 5) GemRB.SetPlayerStat(MyChar, IE_CLASS, Class) KitIndex = GemRB.GetVar("Class Kit") *************** *** 133,138 **** --- 139,150 ---- GemRB.UnloadTable(TmpTable) TmpTable=GemRB.LoadTable("strtgold") + print "count ",GemRB.GetTableValue(TmpTable,Class,1) + print "size ",GemRB.GetTableValue(TmpTable,Class,0) + print "add ",GemRB.GetTableValue(TmpTable,Class,2) + print "mult ",GemRB.GetTableValue(TmpTable,Class,3) t=GemRB.Roll(GemRB.GetTableValue(TmpTable,Class,1),GemRB.GetTableValue(TmpTable,Class,0), GemRB.GetTableValue(TmpTable,Class,2) ) GemRB.SetPlayerStat(MyChar, IE_GOLD, t*GemRB.GetTableValue(TmpTable,Class,3) ) + GemRB.UnloadTable(ClassTable) + GemRB.UnloadTable(RaceTable) GemRB.UnloadTable(TmpTable) *************** *** 174,177 **** --- 186,193 ---- GemRB.SetPlayerName(MyChar, GemRB.GetToken("CHARNAME"), 0) + TmpTable = GemRB.LoadTable ("clskills") + GemRB.SetPlayerStat(MyChar, IE_XP, GemRB.GetTableValue (TmpTable, Class, 3) ) #this will also set the level (automatically) + GemRB.UnloadTable(TmpTable) + #does all the rest GemRB.FillPlayerInfo(MyChar,PortraitName+"M", PortraitName+"S") |