Sorrow Posted May 23, 2010 Share Posted May 23, 2010 I'm trying to make a dialogue with alignment checks for replies and it doesn't seem to work. I have tried: Alignment(LastTalkedToBy,MASK_EVIL) Alignment(Myself,MASK_GOOD) OR(3) Alignment(LastTalkedToBy,NEUTRAL_EVIL) Alignment(LastTalkedToBy,LAWFUL_EVIL) Alignment(LastTalkedToBy,CHAOTIC_EVIL) OR(3) Alignment(Myself,LAWFUL_GOOD) Alignment(Myself,NEUTRAL_GOOD) Alignment(Myself,CHAOTIC_GOOD) Neither of them seems to work. Link to comment
jastey Posted May 23, 2010 Share Posted May 23, 2010 Hm, maybe try to use the numbers instead, in case it's the ids that is making the trouble: 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 Thus, Alignment(Myself,LAWFUL_GOOD) would be Alignment(Myself,17). Link to comment
berelinde Posted May 24, 2010 Share Posted May 24, 2010 LastTalkedToBy() needs parenthesis, like in this trigger ~Gender(LastTalkedToBy(),MALE)~ but I don't know if that's your problem. Why don't you try posting the entire dialogue block so we can see what else is going on? You can substitute "blah blah" for the actual dialogue, if you're afraid of spoilers. I use Alignment(Object,ALIGNMENT) all the time in my mods, so I know it works, but without the rest of the syntax, it's hard to help you. @Jastey: I don't know if using the numbers ever works. I know that for AreaType() checks and TimeOfDay() checks, you need to use the word, OUTDOOR or DUSK, rather than the number. The BG2 Fixpack actually includes some blocks that correct this in the vanilla game. Link to comment
devSin Posted May 24, 2010 Share Posted May 24, 2010 LastTalkedToBy() needs parenthesis, like in this trigger ~Gender(LastTalkedToBy(),MALE)~ but I don't know if that's your problem.LastTalkedToBy is valid without going deeper (I think this is stored per object, but the last LastTalkedToBy is going to be the person who's talking, so you're never going to have a problem in the real world); in fact, most vanilla dialogues omit (Myself) with it. It's good form to include it, but you certainly don't need it. @Jastey: I don't know if using the numbers ever works. I know that for AreaType() checks and TimeOfDay() checks, you need to use the word, OUTDOOR or DUSK, rather than the number. The BG2 Fixpack actually includes some blocks that correct this in the vanilla game.Using the numbers always works. Using the incorrect text would never work (we have to correct a lot of OUTSIDE to OUTDOOR, for instance). And WeiDU compiles the code and then decompiles it, so it would end up as an IDS symbol (depending on the local IDS files) in the final DLG anyway (but this is just incidental to WeiDU checking your code by compiling it). Link to comment
berelinde Posted May 24, 2010 Share Posted May 24, 2010 Ah, OK, so when the Fixpack is doing REPLACE_TEXTUALLY ~AreaType(0)~ ~AreaType(OUTDOOR)~, it's just fixing the game's typos? To tell you the truth, I'm kind of surprised to hear you say that numbers always work. When I'm changing a creature's alignment in the tp2, I'll use the numeric value, but when I've tried using it in a dialogue trigger, it always seems to fail. If I've got Alignment(Player1,19), the PC reply won't show, but if I've got Alignment(Player1,LAWFUL_EVIL), it will. Who knows? This was in an alpha. Maybe I did something bone-headed like "Player1" or something and fixed it when I changed to LAWFUL_EVIL. One of these days, I'll see if I can reproduce the result and take screen shots if it comes back funky. Link to comment
devSin Posted May 24, 2010 Share Posted May 24, 2010 Yeah, when a script was compiled with an invalid symbol, BioWare's compiler output a "0" (so the designer would have typed OUTSIDE when writing the script, and then when they compiled it, they missed the error that it was bad and it turned into a 0 in the compiled script). This is the reason, for instance, Viconia would romance any race in vanilla (they likely did HALF_ORC instead of HALFORC or whatever, which compiled to 0, which matches any actor race). I'm not sure your behavior with dialogue. If it's like that in the D, it doesn't matter, because WeiDU will turn it into the IDS symbol for 19 when compiling (it compiles the code to BCS code, then decompiles it and writes the dialogue action list; when it decompiles the 19 value from the BCS code, it turns it into the expected ActionAsPrintedInIDSFile(ObjectAsInIDS,ValueFromIDS)). There's no way I know of to get WeiDU to just leave your input alone without having special IDS files (you can use NI to force code into a dialogue without having it compile-converted, but we probably corrupt your dialogues unless you sent us gifts), so what you actually put into your D is pretty irrelevant. Link to comment
Sorrow Posted May 24, 2010 Author Share Posted May 24, 2010 I'm using DLTCEP for dialog writing. Link to comment
berelinde Posted May 24, 2010 Share Posted May 24, 2010 Do you mean that you are composing dialogue in DLTCEP and expecting it to work right in the game? I'm no DLTCEP expert, but I'm pretty sure that doesn't work too well. Witya was working on a WeiDU Conversation Maker that would take a lot of the headaches out of learning WeiDU. It looked promising, but witya hasn't posted anything since November, so that project has probably gone bust. Link to comment
Sorrow Posted May 24, 2010 Author Share Posted May 24, 2010 Oh. I guess I'll have to try with WeiDU then. Link to comment
berelinde Posted May 24, 2010 Share Posted May 24, 2010 Yeah, DLTCEP is good for working with areas, items, CREs, even stores, but it was never designed to be used as a dialogue editor. Link to comment
Sorrow Posted July 5, 2010 Author Share Posted July 5, 2010 Ok, some seriously weird stuff is going on. It not only doesn't show the dialogue option with check but also my character's alignment disappears. No matter if I use DLTCEP or WeiDU. BEGIN ~ITTTP01F~ IF ~True() Global("blah","GLOBAL",0)~ THEN BEGIN 0 // from: SAY ~Oh no!~ IF ~OR(3) Alignment(LastTalkedToBy,35) Alignment(LastTalkedToBy,19) Alignment(LastTalkedToBy,51)~ THEN REPLY ~Evil Option.~ EXIT IF ~~ THEN REPLY ~Not Evil Option~ EXIT END Link to comment
cmorgan Posted July 5, 2010 Share Posted July 5, 2010 Alignment(LastTalkedToBy,35) might mean something is odd with your install's .ids file parsing... 0x0 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 0x1 MASK_GOOD 0x2 MASK_GENEUTRAL 0x3 MASK_EVIL 0x10 MASK_LAWFUL 0x20 MASK_LCNEUTRAL 0x30 MASK_CHAOTIC as per conversation above. Hmmm.... but doublecheck. If you want to evaluate that set of options, you need to reverse the order: Try IF ~Global("blah","GLOBAL",0)~ THEN BEGIN 0 // from: SAY ~Oh no!~ IF ~~ THEN REPLY ~Not Evil Option~ EXIT IF ~OR(3) Alignment(LastTalkedToBy,35) Alignment(LastTalkedToBy,19) Alignment(LastTalkedToBy,51)~ THEN REPLY ~Evil Option.~ EXIT END Scripts evaluate top to bottom, and dialog states are called top to bottom of valid ones, but reply states are evaluated bottom to top. I might even do this: IF ~Global("blah","GLOBAL",0)~ THEN BEGIN 0 // from: SAY ~Oh no!~ IF ~!Alignment(LastTalkedToBy,35) !Alignment(LastTalkedToBy,19) !Alignment(LastTalkedToBy,51)~ THEN GOTO not_evil_option_state IF ~OR(3) Alignment(LastTalkedToBy,35) Alignment(LastTalkedToBy,19) Alignment(LastTalkedToBy,51)~ THEN GOTO evil_option_state END Link to comment
devSin Posted July 5, 2010 Share Posted July 5, 2010 Honestly, I can't quite tell what he's talking about. Your character's alignment disappears? You're not trying to mod GemRB, are you? Why is your codebox double-spaced? Your .D is a plain-text file, correct? Link to comment
Sorrow Posted July 6, 2010 Author Share Posted July 6, 2010 Alignment(LastTalkedToBy,35) might mean something is odd with your install's .ids file parsing... 0x0 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 0x1 MASK_GOOD 0x2 MASK_GENEUTRAL 0x3 MASK_EVIL 0x10 MASK_LAWFUL 0x20 MASK_LCNEUTRAL 0x30 MASK_CHAOTIC I checked it. It looks just as you posted it, so it's probably not the alignmen.ids. as per conversation above. Hmmm.... but doublecheck. If you want to evaluate that set of options, you need to reverse the order: Try IF ~Global("blah","GLOBAL",0)~ THEN BEGIN 0 // from: SAY ~Oh no!~ IF ~~ THEN REPLY ~Not Evil Option~ EXIT IF ~OR(3) Alignment(LastTalkedToBy,35) Alignment(LastTalkedToBy,19) Alignment(LastTalkedToBy,51)~ THEN REPLY ~Evil Option.~ EXIT END It doesn't work either. It just doesn't show the dialogue option. Honestly, I can't quite tell what he's talking about. Your character's alignment disappears? You're not trying to mod GemRB, are you? No. It seemed that something was wrong with an exported character, though. I tried creating new characters and they don't lose their alignments in that dialogue O_o . Why is your codebox double-spaced? Your .D is a plain-text file, correct? Yes. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.