From: <lyn...@us...> - 2008-09-18 09:32:16
|
Revision: 5330 http://gemrb.svn.sourceforge.net/gemrb/?rev=5330&view=rev Author: lynxlupodian Date: 2008-09-18 09:32:26 +0000 (Thu, 18 Sep 2008) Log Message: ----------- tob::cg: check if the item fits the slot before addition staves are still broken since nothing seems to set their IE_INV_ITEM_TWOHANDED Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2008-09-17 20:26:53 UTC (rev 5329) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2008-09-18 09:32:26 UTC (rev 5330) @@ -167,9 +167,10 @@ if item == "*": continue realslot = GemRB.GetSlots (MyChar, RealSlots[slot], -1) - print "MMC", realslot, RealSlots[slot], slot + if realslot == (): # this shouldn't happen! continue + # if an item contains a comma, the rest of the value is the stack if "," in item: item = item.split(",") @@ -177,15 +178,18 @@ item = item[0] else: count = 0 - GemRB.CreateItem(MyChar, item, realslot[0], count, 0, 0) - GemRB.ChangeItemFlag (MyChar, realslot[0], IE_INV_ITEM_IDENTIFIED, OP_OR) - # identify all the items; FIXME: remove the current hack -# for slot in GemRB.GetSlots (MyChar, SLOT_ANY, 1): -# for slot in range(0,50): -# if not GemRB.ChangeItemFlag (MyChar, slot, IE_INV_ITEM_IDENTIFIED, OP_OR): -# pass -# #print "NNN", slot + targetslot = realslot[0] + SlotType = GemRB.GetSlotType (targetslot, MyChar) + i = 1 + # if there are no free slots, CreateItem will create the item on the ground + while not GemRB.CanUseItemType (SlotType["Type"], item, MyChar) and i <= len(realslot): + targetslot = realslot[i] + SlotType = GemRB.GetSlotType (targetslot, MyChar) + i = i + 1 + + GemRB.CreateItem(MyChar, item, targetslot, count, 0, 0) + GemRB.ChangeItemFlag (MyChar, targetslot, IE_INV_ITEM_IDENTIFIED, OP_OR) GemRB.UnloadTable (EquipmentTable) GemRB.UnloadTable (KitTable) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2008-10-04 11:14:31
|
Revision: 5384 http://gemrb.svn.sourceforge.net/gemrb/?rev=5384&view=rev Author: lynxlupodian Date: 2008-10-04 11:14:23 +0000 (Sat, 04 Oct 2008) Log Message: ----------- bg2: fixed an off-by-one error Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2008-10-04 09:51:04 UTC (rev 5383) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2008-10-04 11:14:23 UTC (rev 5384) @@ -183,7 +183,7 @@ SlotType = GemRB.GetSlotType (targetslot, MyChar) i = 1 # if there are no free slots, CreateItem will create the item on the ground - while not GemRB.CanUseItemType (SlotType["Type"], item, MyChar) and i <= len(realslot): + while not GemRB.CanUseItemType (SlotType["Type"], item, MyChar) and i < len(realslot): targetslot = realslot[i] SlotType = GemRB.GetSlotType (targetslot, MyChar) i = i + 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2008-11-09 19:43:06
|
Revision: 5482 http://gemrb.svn.sourceforge.net/gemrb/?rev=5482&view=rev Author: lynxlupodian Date: 2008-11-09 19:42:27 +0000 (Sun, 09 Nov 2008) Log Message: ----------- tob: put the initial potions into the quick slots (mod safe) Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2008-11-02 21:17:41 UTC (rev 5481) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2008-11-09 19:42:27 UTC (rev 5482) @@ -159,7 +159,7 @@ RealSlots = [ SLOT_ARMOUR, SLOT_SHIELD, SLOT_HELM, -1, SLOT_RING, \ SLOT_RING, SLOT_CLOAK, SLOT_BOOT, SLOT_AMULET, SLOT_GLOVE, \ SLOT_BELT, SLOT_QUIVER, SLOT_QUIVER, SLOT_QUIVER, \ - -1, -1, -1, -1, -1, SLOT_WEAPON ] + SLOT_ITEM, SLOT_ITEM, SLOT_ITEM, -1, -1, SLOT_WEAPON ] #loop over rows - item slots for slot in range(0, GemRB.GetTableRowCount (EquipmentTable)): slotname = GemRB.GetTableRowName (EquipmentTable, slot) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-02-03 13:39:54
|
Revision: 5632 http://gemrb.svn.sourceforge.net/gemrb/?rev=5632&view=rev Author: lynxlupodian Date: 2009-02-03 13:38:20 +0000 (Tue, 03 Feb 2009) Log Message: ----------- bg2::cg: set the base number of attacks so we don't get values over 100 anymore Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-03 13:16:49 UTC (rev 5631) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-03 13:38:20 UTC (rev 5632) @@ -84,6 +84,8 @@ StatID=TmpTable.GetValue (i,4) GemRB.SetPlayerStat (MyChar, StatID, GemRB.GetVar ("Ability "+str(i) ) ) + # set the base number of attacks; effects will add the proficiency bonus + GemRB.SetPlayerStat (MyChar, IE_NUMBEROFATTACKS, 1) TmpTable=GemRB.LoadTableObject ("weapprof") ProfCount = TmpTable.GetRowCount () #bg2 weapprof.2da contains the bg1 proficiencies too, skipping those This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-02-03 14:30:17
|
Revision: 5633 http://gemrb.svn.sourceforge.net/gemrb/?rev=5633&view=rev Author: lynxlupodian Date: 2009-02-03 14:30:10 +0000 (Tue, 03 Feb 2009) Log Message: ----------- bg2::cg: IE_NUMBEROFATTACKS is stored double Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-03 13:38:20 UTC (rev 5632) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-03 14:30:10 UTC (rev 5633) @@ -85,7 +85,7 @@ GemRB.SetPlayerStat (MyChar, StatID, GemRB.GetVar ("Ability "+str(i) ) ) # set the base number of attacks; effects will add the proficiency bonus - GemRB.SetPlayerStat (MyChar, IE_NUMBEROFATTACKS, 1) + GemRB.SetPlayerStat (MyChar, IE_NUMBEROFATTACKS, 2) TmpTable=GemRB.LoadTableObject ("weapprof") ProfCount = TmpTable.GetRowCount () #bg2 weapprof.2da contains the bg1 proficiencies too, skipping those This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-02-20 13:22:29
|
Revision: 5730 http://gemrb.svn.sourceforge.net/gemrb/?rev=5730&view=rev Author: lynxlupodian Date: 2009-02-20 12:27:57 +0000 (Fri, 20 Feb 2009) Log Message: ----------- bg2: don't set base abilities twice Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-20 12:09:17 UTC (rev 5729) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-20 12:27:57 UTC (rev 5730) @@ -110,8 +110,16 @@ TmpTable=GemRB.LoadTableObject ("ability") AbilityCount = TmpTable.GetRowCount () for i in range(AbilityCount): - StatID=TmpTable.GetValue (i,4) - GemRB.SetPlayerStat (MyChar, StatID, GemRB.GetVar ("Ability "+str(i) ) ) + StatID = TmpTable.GetValue (i,3) + if StatID == IE_STR: + strength = GemRB.GetVar ("Ability 0") + GemRB.SetPlayerStat (MyChar, StatID, strength) + if strength == 18: + GemRB.SetPlayerStat (MyChar, IE_STREXTRA, GemRB.GetVar ("StrExtra")) + else: + GemRB.SetPlayerStat (MyChar, IE_STREXTRA, 0) + else: + GemRB.SetPlayerStat (MyChar, StatID, GemRB.GetVar ("Ability "+str(i) ) ) # set the base number of attacks; effects will add the proficiency bonus GemRB.SetPlayerStat (MyChar, IE_NUMBEROFATTACKS, 2) @@ -132,19 +140,7 @@ #SetColorStat (MyChar, IE_LEATHER_COLOR, 0x16 ) #SetColorStat (MyChar, IE_ARMOR_COLOR, 0x17 ) GemRB.SetPlayerStat (MyChar, IE_EA, 2 ) - Str=GemRB.GetVar ("Ability 0") - GemRB.SetPlayerStat (MyChar, IE_STR, Str) - if Str==18: - GemRB.SetPlayerStat (MyChar,IE_STREXTRA,GemRB.GetVar ("StrExtra")) - else: - GemRB.SetPlayerStat (MyChar, IE_STREXTRA,0) - GemRB.SetPlayerStat (MyChar, IE_DEX, GemRB.GetVar ("Ability 1")) - GemRB.SetPlayerStat (MyChar, IE_CON, GemRB.GetVar ("Ability 2")) - GemRB.SetPlayerStat (MyChar, IE_INT, GemRB.GetVar ("Ability 3")) - GemRB.SetPlayerStat (MyChar, IE_WIS, GemRB.GetVar ("Ability 4")) - GemRB.SetPlayerStat (MyChar, IE_CHR, GemRB.GetVar ("Ability 5")) - #setting skills (thieving/ranger) TmpTable = GemRB.LoadTableObject ("skills") RowCount = TmpTable.GetRowCount ()-2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-02-20 13:23:50
|
Revision: 5731 http://gemrb.svn.sourceforge.net/gemrb/?rev=5731&view=rev Author: lynxlupodian Date: 2009-02-20 12:49:29 +0000 (Fri, 20 Feb 2009) Log Message: ----------- bg2: simplify the class/kit ability logic Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-20 12:27:57 UTC (rev 5730) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-20 12:49:29 UTC (rev 5731) @@ -64,22 +64,18 @@ print "KitValue**********:",KitValue GemRB.SetPlayerStat (MyChar, IE_KIT, KitValue) - # apply kit abilities - TmpTable = KitTable.GetValue (str(KitIndex), "ABILITIES") - ABTable = TmpTable - if KitValue != 0x4000 and TmpTable != "*": - TmpTable = GemRB.LoadTableObject (TmpTable) - elif KitValue == 0x4000: - # classes get clab**01 - TmpTable = ClassSkillsTable (ClassName, "ABILITIES") - if TmpTable != "*" and TmpTable != ABTable: - if KitValue == 0x4000 and "," in TmpTable: - # multiclass - classes = TmpTable.split(",") - for j in classes: - AddClassAbilities (MyChar, "CLAB"+j) - else: - AddClassAbilities (MyChar, TmpTable) + # apply class/kit abilities + if KitIndex: + ABTable = KitTable.GetValue (str(KitIndex), "ABILITIES") + else: + ABTable = ClassSkillsTable.GetValue (ClassName, "ABILITIES") + if not KitIndex and "," in ABTable: + # multiclass + classes = ABTable.split(",") + for j in classes: + AddClassAbilities (MyChar, "CLAB"+j) + else: + AddClassAbilities (MyChar, ABTable) # Lay on hands # Turn undead @@ -225,6 +221,7 @@ return def AddClassAbilities (MyChar, TmpTable): + TmpTable = GemRB.LoadTableObject (TmpTable) for i in range(TmpTable.GetRowCount()): ab = TmpTable.GetValue (i, 0) # only add level 1 abilities if ab != "****": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-02-20 15:11:03
|
Revision: 5733 http://gemrb.svn.sourceforge.net/gemrb/?rev=5733&view=rev Author: lynxlupodian Date: 2009-02-20 15:11:00 +0000 (Fri, 20 Feb 2009) Log Message: ----------- bg2: removed an unneeded table load and clarified a comment Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-20 14:53:54 UTC (rev 5732) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-02-20 15:11:00 UTC (rev 5733) @@ -77,8 +77,7 @@ else: AddClassAbilities (MyChar, ABTable) - # Lay on hands - # Turn undead + # Lay on hands, turn undead and backstab multiplier get set by the core # set the starting reputation TmpTable=GemRB.LoadTableObject ("repstart") @@ -147,8 +146,7 @@ GemRB.SetPlayerStat (MyChar, stat, value ) GemRB.SetPlayerName (MyChar, GemRB.GetToken ("CHARNAME"), 0) - TmpTable = GemRB.LoadTableObject ("clskills") - GemRB.SetPlayerStat (MyChar, IE_XP, TmpTable.GetValue (Class, 3) ) #this will also set the level (automatically) + GemRB.SetPlayerStat (MyChar, IE_XP, ClassSkillsTable.GetValue (Class, 3) ) #this will also set the level (automatically) #does all the rest LargePortrait = GemRB.GetToken ("LargePortrait") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-03-15 18:38:25
|
Revision: 5804 http://gemrb.svn.sourceforge.net/gemrb/?rev=5804&view=rev Author: lynxlupodian Date: 2009-03-15 18:37:47 +0000 (Sun, 15 Mar 2009) Log Message: ----------- bg2: fix ability granting issue reported on the forum Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-03-15 09:28:29 UTC (rev 5803) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-03-15 18:37:47 UTC (rev 5804) @@ -75,7 +75,8 @@ for j in classes: AddClassAbilities (MyChar, "CLAB"+j) else: - AddClassAbilities (MyChar, ABTable) + if ABTable != "*": + AddClassAbilities (MyChar, ABTable) # Lay on hands, turn undead and backstab multiplier get set by the core This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-03-15 18:55:07
|
Revision: 5805 http://gemrb.svn.sourceforge.net/gemrb/?rev=5805&view=rev Author: lynxlupodian Date: 2009-03-15 18:53:34 +0000 (Sun, 15 Mar 2009) Log Message: ----------- bg2: mage kits have only declared ability tables Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-03-15 18:37:47 UTC (rev 5804) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-03-15 18:53:34 UTC (rev 5805) @@ -75,7 +75,7 @@ for j in classes: AddClassAbilities (MyChar, "CLAB"+j) else: - if ABTable != "*": + if ABTable != "*" and ABTable[:6] != "CLABMA": # mage kits specify ability tables which don't exist AddClassAbilities (MyChar, ABTable) # Lay on hands, turn undead and backstab multiplier get set by the core This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-04-06 21:43:21
|
Revision: 5866 http://gemrb.svn.sourceforge.net/gemrb/?rev=5866&view=rev Author: lynxlupodian Date: 2009-04-06 21:43:03 +0000 (Mon, 06 Apr 2009) Log Message: ----------- bg2: fixed initial memorization of innate abilities when you start the game, they are all charged now Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-04-06 21:40:56 UTC (rev 5865) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-04-06 21:43:03 UTC (rev 5866) @@ -64,6 +64,10 @@ print "KitValue**********:",KitValue GemRB.SetPlayerStat (MyChar, IE_KIT, KitValue) + # no table for innates, so we make it a high value + # to guarantee innate, class ability and HLA memorization works + GemRB.SetMemorizableSpellsCount (MyChar, 50, IE_SPELL_TYPE_INNATE, 0) + # apply class/kit abilities if KitIndex: ABTable = KitTable.GetValue (str(KitIndex), "ABILITIES") @@ -94,9 +98,20 @@ TmpTable = GemRB.LoadTableObject ("abstart") AlignmentAbbrev = AlignmentTable.FindValue (3, GemRB.GetPlayerStat (MyChar, IE_ALIGNMENT)) AlignmentAbbrev = AlignmentTable.GetValue (AlignmentAbbrev, 4) - for i in range(TmpTable.GetColumnCount()): - ab = TmpTable.GetValue (AlignmentAbbrev, str(i)) - GemRB.LearnSpell (MyChar, ab) + AbilityCount = TmpTable.GetColumnCount() + spells = [] + for i in range(AbilityCount): + spells.append (TmpTable.GetValue (AlignmentAbbrev, str(i))) + spells2 = list(set(spells)) + spells2.sort() # create a sorted list of unique spells + spells.sort() + ClabOffset = GemRB.GetMemorizedSpellsCount (MyChar, IE_SPELL_TYPE_INNATE, 0) + for i in range(len(spells)): + ab = spells[i] + if GemRB.LearnSpell (MyChar, ab, 8) == 1: # 1 == LSR_KNOWN, 8 == LS_MEMO + # the spell is already known, so we have to memorize it manually + # the last MemorizeSpell parameter is the index of the known spell to memorize + GemRB.MemorizeSpell (MyChar, IE_SPELL_TYPE_INNATE, 0, spells2.index(ab)+ClabOffset) TmpTable=GemRB.LoadTableObject ("strtgold") t = GemRB.Roll (TmpTable.GetValue (Class,1),TmpTable.GetValue (Class,0), TmpTable.GetValue (Class,2) ) @@ -228,6 +243,7 @@ if ab[:2] == "AP": GemRB.ApplySpell (MyChar, ab[3:]) elif ab[:2] == "GA": - GemRB.LearnSpell (MyChar, ab[3:]) + GemRB.LearnSpell (MyChar, ab[3:], 8) + # TODO: fix memorization when the spell is already known else: print "ERROR, unknown class ability (type): ", ab This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-05-30 21:28:51
|
Revision: 6198 http://gemrb.svn.sourceforge.net/gemrb/?rev=6198&view=rev Author: lynxlupodian Date: 2009-05-30 21:28:07 +0000 (Sat, 30 May 2009) Log Message: ----------- bg2: fixed the starting tob gear (equipping) to take item exclusion into account Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-05-30 21:26:58 UTC (rev 6197) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-05-30 21:28:07 UTC (rev 6198) @@ -142,41 +142,52 @@ SLOT_RING, SLOT_CLOAK, SLOT_BOOT, SLOT_AMULET, SLOT_GLOVE, \ SLOT_BELT, SLOT_QUIVER, SLOT_QUIVER, SLOT_QUIVER, \ SLOT_ITEM, SLOT_ITEM, SLOT_ITEM, -1, -1, SLOT_WEAPON ] + inventory_exclusion = 0 #loop over rows - item slots for slot in range(0, EquipmentTable.GetRowCount ()): slotname = EquipmentTable.GetRowName (slot) - item = EquipmentTable.GetValue (slotname, EquipmentColName) + item_resref = EquipmentTable.GetValue (slotname, EquipmentColName) # no item - go to next - if item == "*": + if item_resref == "*": continue - + + # get empty slots of the requested type realslot = GemRB.GetSlots (MyChar, RealSlots[slot], -1) if realslot == (): # this shouldn't happen! + print "Eeek! No free slots for", item_resref continue # if an item contains a comma, the rest of the value is the stack - if "," in item: - item = item.split(",") - count = int(item[1]) - item = item[0] + if "," in item_resref: + item_resref = item_resref.split(",") + count = int(item_resref[1]) + item_resref = item_resref[0] else: count = 0 targetslot = realslot[0] SlotType = GemRB.GetSlotType (targetslot, MyChar) i = 1 + item = GemRB.GetItem (item_resref) - # if there are no free slots, CreateItem will create the item on the ground - while not GemRB.CanUseItemType (SlotType["Type"], item, MyChar) and i < len(realslot): - targetslot = realslot[i] - SlotType = GemRB.GetSlotType (targetslot, MyChar) - i = i + 1 + if inventory_exclusion & item['Exclusion']: + # oops, too many magic items to equip, so just dump it to the inventory + targetslot = GemRB.GetSlots (MyChar, -1, -1)[0] + SlotType = -1 + else: + # if there are no free slots, CreateItem will create the item on the ground + while not GemRB.CanUseItemType (SlotType["Type"], item_resref, MyChar) \ + and i < len(realslot): + targetslot = realslot[i] + SlotType = GemRB.GetSlotType (targetslot, MyChar) + i = i + 1 - GemRB.CreateItem(MyChar, item, targetslot, count, 0, 0) + GemRB.CreateItem(MyChar, item_resref, targetslot, count, 0, 0) GemRB.ChangeItemFlag (MyChar, targetslot, IE_INV_ITEM_IDENTIFIED, OP_OR) + inventory_exclusion |= item['Exclusion'] playmode = GemRB.GetVar ("PlayMode") if playmode >=0: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-05-30 21:53:26
|
Revision: 6200 http://gemrb.svn.sourceforge.net/gemrb/?rev=6200&view=rev Author: lynxlupodian Date: 2009-05-30 21:52:40 +0000 (Sat, 30 May 2009) Log Message: ----------- bg2: 25stweap.2da has an avoidable typo Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-05-30 21:40:45 UTC (rev 6199) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-05-30 21:52:40 UTC (rev 6200) @@ -153,6 +153,10 @@ if item_resref == "*": continue + # the table has typos for kitted bard's armor + if item_resref == "LEATH14": + item_resref = "LEAT14" + # get empty slots of the requested type realslot = GemRB.GetSlots (MyChar, RealSlots[slot], -1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lyn...@us...> - 2009-06-06 17:42:06
|
Revision: 6324 http://gemrb.svn.sourceforge.net/gemrb/?rev=6324&view=rev Author: lynxlupodian Date: 2009-06-06 17:40:34 +0000 (Sat, 06 Jun 2009) Log Message: ----------- tob: improved the starting equipment adding and made it equip the best weapon Modified Paths: -------------- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py Modified: gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py =================================================================== --- gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-06-06 17:39:44 UTC (rev 6323) +++ gemrb/trunk/gemrb/GUIScripts/bg2/CharGen9.py 2009-06-06 17:40:34 UTC (rev 6324) @@ -141,7 +141,7 @@ RealSlots = [ SLOT_ARMOUR, SLOT_SHIELD, SLOT_HELM, -1, SLOT_RING, \ SLOT_RING, SLOT_CLOAK, SLOT_BOOT, SLOT_AMULET, SLOT_GLOVE, \ SLOT_BELT, SLOT_QUIVER, SLOT_QUIVER, SLOT_QUIVER, \ - SLOT_ITEM, SLOT_ITEM, SLOT_ITEM, -1, -1, SLOT_WEAPON ] + SLOT_ITEM, SLOT_ITEM, SLOT_ITEM, SLOT_WEAPON, SLOT_WEAPON, SLOT_WEAPON ] inventory_exclusion = 0 #loop over rows - item slots @@ -159,7 +159,13 @@ # get empty slots of the requested type realslot = GemRB.GetSlots (MyChar, RealSlots[slot], -1) + if RealSlots[slot] == SLOT_WEAPON: + # exclude the shield slot, so the offhand stays empty + realslot = realslot[1:] + if realslot == (): # fallback to the inventory + realslot = GemRB.GetSlots (MyChar, -1, -1) + if realslot == (): # this shouldn't happen! print "Eeek! No free slots for", item_resref continue @@ -197,6 +203,7 @@ if playmode >=0: #LETS PLAY!! GemRB.EnterGame() + GemRB.ExecuteString ("EquipMostDamagingMelee()", MyChar) else: #leaving multi player pregen if CharGenWindow: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |