jastey Posted September 25, 2007 Share Posted September 25, 2007 True, very true, but a solution would be to give a bold link to the prefix list and using someone's else's prefix, for example (I've heard J# is quite popular, or C!, That was a JOKE), not to leave it out completely.I stand corrected, it's integrated. Link to comment
berelinde Posted September 25, 2007 Share Posted September 25, 2007 It's rare that you see prefixed dialogue state names, which means we can have all sorts of variable collisions for dialogue heavy mods.Seeing there are even tutorials available from modder(s) that don't care about prefixing their mod variables what can you expect? Heh, to be fair, prefixing in a tutorial usually means that the folks using your tutorial will use your prefix. I thought Ghrey's complaint that many NPC mods were using J# was pretty funny until I noticed a slew of kit mods using C!. No kidding. Prefixing everything is the safest way to go, but using that ! in your prefix is a bit of a pain. It can't be used in state labels, so I have to label interjections like I_C_T FILENAME 0 BGavFilename1 == ~B!GavJ~ IF ~InParty("B!Gavin2") InMyArea("B!Gavin2") !StateCheck("B!Gavin2",CD_STATE_NOTVALID)~ ~Doh!~ END Link to comment
BigRob Posted September 27, 2007 Share Posted September 27, 2007 For deciding whether to use locals or glogals, keep in mind that locals are not only bound to one NPC, they are bound to one cre. So, if your character dies and gets resurrected, all locals will be back at 0. In original BGII, romances would be dead if the NPC died, so triggering romance with local variables was feasible, but if you allow your NPC to continue romancing after dieing, using locals would lead to a great chaos. That's absolutely invaluable advice... I think I've just been saved a lot of headaches in the beta testing phase. Thanks! Link to comment
jastey Posted September 27, 2007 Share Posted September 27, 2007 That's absolutely invaluable advice... I think I've just been saved a lot of headaches in the beta testing phase. Thanks!Wohoo! Did I speed up Aklon's release? I am very proud of myself now. Link to comment
theacefes Posted September 27, 2007 Share Posted September 27, 2007 Thank you; this helped me a lot as well. Link to comment
jastey Posted September 27, 2007 Share Posted September 27, 2007 Glad to hear! Keep in mind that "NumTimesTalkedTo(0)" is a local variable, too. If used in the NPC's greeting dialogue it should be no problem, though, since it switches to the kick-out dialogue once the NPC joined (and as long as he hasn't joined, he can't be resurrected anyhow). Link to comment
devSin Posted September 27, 2007 Share Posted September 27, 2007 For deciding whether to use locals or glogals, keep in mind that locals are not only bound to one NPC, they are bound to one cre. So, if your character dies and gets resurrected, all locals will be back at 0. In original BGII, romances would be dead if the NPC died, so triggering romance with local variables was feasible, but if you allow your NPC to continue romancing after dieing, using locals would lead to a great chaos.This is false. Party-joinable characters are stored in the saved game file (GAM) and only change CREs until the first time they join the party. Afterward, the CRE is always restored from the saved game (even if they died and are just resurrected), and all their effects (including LOCALS variables) are appropriately maintained (imagine if you resurrected a character and all their proficiencies were gone!). NumTimesTalkedTo() should similarly be preserved (it's stored in the character headers in the GAM file). The romances broke because there's special code to end them if the character is out of the party or dead for too long, and it didn't ever work very well. For true NPCs, however, your observations are correct (LOCALS and NumTimesTalkedTo() exist independently for every occurrence of a particular CRE, and they won't be preserved if you DestroySelf() a particular CRE and CreateCreature() the same guy for instance). Link to comment
jastey Posted September 27, 2007 Share Posted September 27, 2007 Party-joinable characters are stored in the saved game file (GAM) and only change CREs until the first time they join the party. Afterward, the CRE is always restored from the saved game (even if they died and are just resurrected), and all their effects (including LOCALS variables) are appropriately maintained (imagine if you resurrected a character and all their proficiencies were gone!). NumTimesTalkedTo() should similarly be preserved (it's stored in the character headers in the GAM file).This is valuable information to me, thank you! So what I stated above is valid for non-joinable characters. I was imagining having troubles with LOCALS on my NPC but well, I guess I didn't try enough and made false conlcusions after seeing lost locals on non-joinable quest cres. (And I was feeling so proud. Oh well, it's a * ending of a * day.) Link to comment
BigRob Posted September 29, 2007 Share Posted September 29, 2007 Ah well, it's still a learning experience. Better now than later on. Link to comment
Gabrielle Posted October 5, 2007 Share Posted October 5, 2007 I would probably stick with Globals since they can be used any where in the game and are easier to keep track of. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.