jastey Posted January 25, 2008 Share Posted January 25, 2008 Does anyone happen to know why in my vanilly BG1+TotSC game the trigger Alignment(Player1,CHAOTIC_GOOD) or, also Alignment(Player1,MASK_GOOD) does not work for my chaotic good human PC fighter. It compiles fine, but in the game, the script block using these triggers aren't executed. And here I sit trying to implement a romance for a paladin... Link to comment
devSin Posted January 25, 2008 Share Posted January 25, 2008 I think one of the alignment IDS files is buggered (it'd compile to an incorrect value). Try Alignment(Player1,49) or Alignment(Player1,1) and see if that works. Otherwise, you might have a bug somewhere else. Link to comment
jastey Posted January 25, 2008 Author Share Posted January 25, 2008 It's this thing about using the numbers again, isn't it? I'll never learn that! Thank you, I will try. Link to comment
devSin Posted January 25, 2008 Share Posted January 25, 2008 Normally, it's not necessary, but IIRC, one of the alignment IDSs that may or may not be used for the Alignment() trigger was horribly screwed in BG/TotSC. Using the number is just a quicker way to check if something else is going on or if the engine is handed nonsense numbers in the BCS (since they'll compile to the incorrect numbers used in the IDS). If it's the latter, you can then decide if it's worth fixing up the IDS file for your mod or just leaving the numbers (the numbers will *always* work, regardless of the state of the user's IDS files). Link to comment
jastey Posted January 25, 2008 Author Share Posted January 25, 2008 Alignment(Player1,1) didn't work (if taken out, it is working, so it is related to this trigger). Oh well, I can always make it a paladin PC romance only. Assuming the class checks work properly, of course. Link to comment
devSin Posted January 25, 2008 Share Posted January 25, 2008 Post the whole trigger list? Alignment() should be working in BG/TotSC as far as I can remember (Class() definitely will)... Link to comment
jastey Posted January 25, 2008 Author Share Posted January 25, 2008 IF Global("X#AjantisRomanceMatch","GLOBAL",0) Global("X#AjantisRomanceCheckMatch","GLOBAL",0) Gender(Player1,FEMALE) ReputationGT(Player1,10) Alignment(Player1,1) //MASK_GOOD THEN RESPONSE #100 SetGlobal("X#AjantisRomanceCheckMatch","GLOBAL",1) SetGlobal("X#AjantisRomanceMatch","GLOBAL",1) END This is the script block. It wasn't executed with the Alignment check. Without it it worked (first LT dialogue got triggered afterwards). Link to comment
devSin Posted January 26, 2008 Share Posted January 26, 2008 Did you try the actual alignment (it's possible just the masks don't work)? Are you sure that Player1 is actually good? Assuming yes to both, I guess it's one more thing to look at the next time I fire up BG/TotSC (sometime in the next eon). Link to comment
jastey Posted January 26, 2008 Author Share Posted January 26, 2008 My PC is chaotic good, so I tried Alignment(Player1,31), but it also doesn't work. I give up on that one for now. If you find something out, let me know. Link to comment
devSin Posted January 26, 2008 Share Posted January 26, 2008 Er, 49. Chaotic good is 0x31 == 49. Link to comment
jastey Posted January 26, 2008 Author Share Posted January 26, 2008 I love you! Alignment(Player1,49) worked. Cool! Now, before I embarrass myself again, what would be the numbers for the other alignments (it's hex numbers? Is there a way to calculate the numbers I have to put in?). I feel so stupid. Link to comment
devSin Posted January 26, 2008 Share Posted January 26, 2008 Assuming I didn't screw up (it's really late here) 0 NONE 17 LAWFUL_GOOD 18 LAWFUL_NEUTRAL 19 LAWFUL_EVIL 33 NEUTRAL_GOOD 34 NEUTRAL 35 NEUTRAL_EVIL 49 CHAOTIC_GOOD 50 CHAOTIC_NEUTRAL 51 CHAOTIC_EVIL 1 MASK_GOOD 2 MASK_GENEUTRAL 3 MASK_EVIL 16 MASK_LAWFUL 32 MASK_LCNEUTRAL 48 MASK_CHAOTIC Apparently, the MASK_s don't work very well in BG/TotSC, but it looks like the specific alignments should work. You can also fix up the bad IDS file (I believe ALIGN is the broken one in BG, but it might be ALIGNMEN) by either correcting the values or by altering TRIGGER.IDS to reference the correct one (the IDSFileHere part of Alignment(O:Object*,I:Alignment*IDSFileHere)), and then revert to using the symbols. A correct version of the file for all engine variants would be 15 0x00 NONE 0x11 LAWFUL_GOOD 0x12 LAWFUL_NEUTRAL 0x13 LAWFUL_EVIL 0x21 NEUTRAL_GOOD 0x22 NEUTRAL 0x23 NEUTRAL_EVIL 0x31 CHAOTIC_GOOD 0x32 CHAOTIC_NEUTRAL 0x33 CHAOTIC_EVIL 0x01 MASK_GOOD 0x02 MASK_GENEUTRAL 0x03 MASK_EVIL 0x10 MASK_LAWFUL 0x20 MASK_LCNEUTRAL 0x30 MASK_CHAOTIC Link to comment
cmorgan Posted January 26, 2008 Share Posted January 26, 2008 devSin, I have an exactly matching your .ids entries in EasyTutu_ToB for ALIGN.IDS, and again in ALIGNMEN.IDS, ALIGNMNT.IDS - so is this just a BG/TOTSC and perhaps Tutu v4 difficulty? Reading the above, it sounds like the safest and most univerally compatible way of coding would be to skip straight to the numbers, as other mods may or may not change these values, right? Sorry - rereading, let me rephrase and actually ask what i need to know: in your opinion, is the most stable way of addressing this in a non-fixpack mod a. repairing this at the .ids level or b. recoding all instances of ~OR (2) Alignment(Player1,MASK_GOOD) Alignment(Player1,MASK_LCNEUTRAL) ~ etc. to ~OR (2) Alignment(Player1,1) Alignment(Player1,32) ~ or c. recoding all of the instances of MASK_myalignmentWanted from Alignment(Player1,MASK_GOOD) to OR(3) Alignment(Player1,17) // LAWFUL_GOOD Alignment(Player1,33) // NEUTRAL_GOOD Alignment(Player1,49) //CHAOTIC_GOOD ? Link to comment
devSin Posted January 26, 2008 Share Posted January 26, 2008 devSin, I have an exactly matching your .ids entries in EasyTutu_ToB for ALIGN.IDS, and again in ALIGNMEN.IDS, ALIGNMNT.IDS - so is this just a BG/TOTSC and perhaps Tutu v4 difficulty?I have no experience with Tutu games, so I'm not sure if any other variants of BG/TotSC would be affected. In vanilla BG/TotSC, ALIGN.IDS (which the Alignment() trigger uses) has incorrect values for LAWFUL_EVIL, NEUTRAL_EVIL, CHAOTIC_GOOD, CHAOTIC_NEUTRAL, and CHAOTIC_EVIL.15 0x00 NONE 0x11 LAWFUL_GOOD 0x12 LAWFUL_NEUTRAL 0x14 LAWFUL_EVIL // should 0x13 0x21 NEUTRAL_GOOD 0x22 NEUTRAL 0x24 NEUTRAL_EVIL // should 0x23 0x41 CHAOTIC_GOOD // should 0x31 0x42 CHAOTIC_NEUTRAL // should 0x32 0x44 CHAOTIC_EVIL // should 0x33 0x01 MASK_GOOD 0x02 MASK_GENEUTRAL 0x03 MASK_EVIL 0x10 MASK_LAWFUL 0x20 MASK_LCNEUTRAL 0x30 MASK_CHAOTIC Reading the above, it sounds like the safest and most univerally compatible way of coding would be to skip straight to the numbers, as other mods may or may not change these values, right?Correct. The engine knows all the numbers (and only those numbers). They cannot and will not change, regardless of mod installations. (This isn't to say that there's a hardcoded list of numbers in all cases, but the engine knows how to get the data it needs from the numbers and will always do the same thing with them.) In most cases, I don't think it's terribly necessary to choose one method over the other; whichever is easier for you is probably the better approach. I prefer numbers (after working on this stuff for so long, you remember that 2112 is *SPELL Magic Missile and that 4 is *GENERAL UNDEAD and that 30 is *EA GOODCUTOFF, etc.), but fixing the IDS file possibly allows other mods that are installed afterward that may mistakenly depend on the incorrect values to work correctly. In my opinion, Option B is best when you know that the MASK_s work correctly (you're modding BG2 or Tutu or whatever). But all are acceptable (and with correct IDS files will behave identically); there really is no wrong answer, as much as I'd like to point to one single "right" option. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.