| The Black Wyrm's Lair Terms of Use |
Help
Search
Members
Calendar
|
Jul 7 2005, 10:06 PM
Post
#1
|
|
|
Master of energies ![]() Council Member Posts: 3331 Joined: 9-July 04 From: Magyarország |
I wasn't sure if this was known or not, but since it isn't in current IESDP, I thought I'd mention that in BG1: TotSC, the names of your Globals shouldn't be longer than 32 bytes.
The script will still be compiled (and can be properly decompiled), but the game will ignore the trigger/action that uses the global. The following script block uses a global which name is exactly 32 characters long. The creatures appear in the game normally. CODE IF Global("BW05_TGC1","GLOBAL",7) Global("BW05_CreatureSummonedinMagicTrap","GLOBAL",0) THEN RESPONSE #100 SetGlobal("BW05_CreatureSummonedinMagicTrap","GLOBAL",1) CreateCreature("BW05MOLD",[510.349],0) CreateCreature("BW05HERT",[412.456],3) END In this block the variable's name is longer than 32 characters. The creatures start to appear in the game in an infinite loop. CODE IF Global("BW05_TGC1","GLOBAL",7) Global("BW05_CreaturesSummonedinMagicTrap","GLOBAL",0) THEN RESPONSE #100 SetGlobal("BW05_CreaturesSummonedinMagicTrap","GLOBAL",1) CreateCreature("BW05MOLD",[510.349],0) CreateCreature("BW05HERT",[412.456],3) END This was with 33 characters, and my tests proved that the same happens with more characters as well. Normally it's pointless to use so long variable names, but I think it is important to know that there is such limit. As I've said, I'm not sure if this has been already known or not. Additionally, I am wondering if the same variable length limit applies for BG2 / other IE games... -------------------- Mental harmony dispels the darkness.
|
|
|
|
![]() |
Jul 7 2005, 10:41 PM
Post
#2
|
|
|
Master of energies ![]() Council Member Posts: 3331 Joined: 9-July 04 From: Magyarország |
QUOTE According to what you are saying the game does not ignore the action but will ignore the setting of the global variable. Right, I was incorrect in my statement. (I actually meant that the action didn't work properly.) QUOTE If you check the IESDP, you'll see that the baldur.gam structure has finite bytes for a variable name (32 for global and area, 24 for locals). Hence, the second script was incrementing tha variable BW05_CreaturesSummonedinMagicTra and checking for BW05_CreaturesSummonedinMagicTrap, hence the loop. Checking the structure of baldur.gam would have been a good idea. Anyway, I think that in the next version of IESDP these length limits could be mentioned in the Variables section. -------------------- Mental harmony dispels the darkness.
|
|
|
|
Baronius Maximum length for Globals Jul 7 2005, 10:06 PM
Rabain NULL Jul 7 2005, 10:29 PM
devSin NULL Jul 7 2005, 10:30 PM
The Bigg NULL Jul 7 2005, 10:33 PM
Rabain NULL Jul 7 2005, 10:45 PM
The Bigg NULL Jul 7 2005, 11:25 PM
Rabain NULL Jul 8 2005, 07:38 AM
The Bigg NULL Jul 8 2005, 09:35 AM
Rabain NULL Jul 8 2005, 11:33 AM
igi NULL Jul 8 2005, 11:34 AM
The Bigg NULL Jul 8 2005, 12:06 PM
igi NULL Jul 8 2005, 12:10 PM
Baronius NULL Jul 8 2005, 03:19 PM
devSin NULL Jul 8 2005, 04:10 PM
Avenger_teambg NULL Jul 23 2005, 07:02 PM![]() ![]() |
|
Lo-Fi Version | Time is now: 13th May 2026 - 03:11 AM |