[BGEE Mod] Improved Gnoll Stronghold - Help needed
kungfuhobbit
Member Posts: 169
This mod adds:
-A challenging Gnoll Overlord between the upper pits of the Gnoll Stronghold
-Textscreen and artwork for the Gnoll Stronghold upon entering first time (artwork to be finalised)
I wish for the Gnoll Overlord to say a single line to the PC and then attack.
I have gnoll_x.bcs call gnoll_x.dlg (which is compiled from gnoll_x.d)
I have spent two days trying to decipher the many guides and weidu tutorials available to no avail in finding a solution to why my code doesn't work.
I have attached the files in a zip.
Please can anyone help out?
1. Why does this code from the .d file not even make the Gnoll Overlord say the line when he sees a party member?
BEGIN gnoll_x
IF ~~ THEN BEGIN block1
SAY ~The weak will perish!~
IF ~~ THEN EXIT
END
2. Why does the below code to speak and attack not compile from .d to .dlg dialogue file?
IF ~~ THEN BEGIN block1
SAY ~The weak will perish!~
DO ~Enemy() Attack(Player1)~ EXIT
END
3. Isnt the IF ~~ THEN on 3rd line below pointless despite it not compiling without it?
4. Fundamentally, when exactly are "BEGIN xyz", END, EXIT and "IF ~~ THEN" used please?
Many thanks
-A challenging Gnoll Overlord between the upper pits of the Gnoll Stronghold
-Textscreen and artwork for the Gnoll Stronghold upon entering first time (artwork to be finalised)
I wish for the Gnoll Overlord to say a single line to the PC and then attack.
I have gnoll_x.bcs call gnoll_x.dlg (which is compiled from gnoll_x.d)
I have spent two days trying to decipher the many guides and weidu tutorials available to no avail in finding a solution to why my code doesn't work.
I have attached the files in a zip.
Please can anyone help out?
1. Why does this code from the .d file not even make the Gnoll Overlord say the line when he sees a party member?
BEGIN gnoll_x
IF ~~ THEN BEGIN block1
SAY ~The weak will perish!~
IF ~~ THEN EXIT
END
2. Why does the below code to speak and attack not compile from .d to .dlg dialogue file?
IF ~~ THEN BEGIN block1
SAY ~The weak will perish!~
DO ~Enemy() Attack(Player1)~ EXIT
END
3. Isnt the IF ~~ THEN on 3rd line below pointless despite it not compiling without it?
IF ~~ THEN BEGIN block1
SAY ~The weak will perish!~
IF ~~ THEN EXIT
END
SAY ~The weak will perish!~
IF ~~ THEN EXIT
END
4. Fundamentally, when exactly are "BEGIN xyz", END, EXIT and "IF ~~ THEN" used please?
Many thanks
1
Comments
2. You need an "IF ~~ THEN" before the "DO" part.
3. Each state needs at least one "reply" to determine what happens next. There can be multiple replies, all with different conditions (for example, whether an NPC is in the party or not). Here's an example that checks if the character is speaking to the protagonist: In reply triggers, "IF ~~ THEN" is equivalent to "IF ~True()~ THEN"; i.e. this always happens or this response is always displayed.
Note: State triggers are different. As mentioned earlier, if you want a dialogue to trigger, you need something in between the tildes of a state trigger that evaluates to true when you want the dialogue to happen.
4. "BEGIN xyz" is used after the state trigger (the first "IF ~~ THEN" in the block) in order to label that state with the unique name "xyz." You can jump to this state from another state using "GOTO xyz" (if xyz is in the same file as the earlier state) or "EXTERN otherDlg xyz" (if xyz is in a different file called otherDlg.d).
END is used to close a BEGIN. Think of BEGIN and END as left and right parentheses.
EXIT is used at the end of a reply line to end the dialogue.
IF ~~ THEN denotes a trigger, i.e. the condition necessary for something to happen. It needs to be at the start of each state block and the start of each reply line.