Random questions I have regarding modding
elminster
Member, Developer Posts: 16,317
Rather than making a new thread every time I have a modding related question I figure I'll just repurpose this one.
At the moment it concerns an issue I'm having with getting quests to appear in the journal (see below).
At the moment it concerns an issue I'm having with getting quests to appear in the journal (see below).
Post edited by elminster on
2
Comments
You'd prefer adding an actor to the .are and editing the flags in the appareance time with WeiDU.
http://www.weidu.org/~thebigg/README-WeiDU.html#htoc51
http://gibberlings3.net/iesdp/file_formats/ie_formats/are_v1.htm#formAREAV1_0_Actor
No idea about those soldiers... Look at thier destination fields [x.y] on their actor entry in the .are and see if it's that.
For instance AR3323 (in BGEE) has two townsfolk in it that I'd like to remove.
I added in
AddJournalEntry(@105,QUEST)
for one of my dialogues. Everything installs fine and when I go through the dialogue I get a message saying that the journal has been updated, but when I look in the journal there isn't anything in it.
IF ~~ THEN
BEGIN k9gooddarren2
SAY ~I've heard he spends his days and nights in either the Feldpost Inn, the Burning Wizard, or the Red Sheaf. If you can't find him in one of these places then he likely will be found in one of the other two. Now, if you excuse me I must get back to other pressing matters. Please return to me after you have talked to him.~ IF ~~ THEN DO ~AddJournalEntry(@105,QUEST)~ EXIT
END
Any thoughts about what I might be missing?
Check in this thread's OP http://gibberlings3.net/forums/index.php?showtopic=26671 (you'll have to scroll down a bit) where it says Journal Entries or something like that.
So far I have
IF
Global("Chapter","GLOBAL",3) Global("k9unlocked", "GLOBAL", 0)
THEN
RESPONSE #100
SetGlobal("k9unlocked", "GLOBAL", 1)
Unlock("Door3323")
OpenDoor("Door3323")
END
Weidu has no problems with this but when it comes time to see if the door is unlocked it isn't (even if I'm in chapter 3).
First, does the door require a key? If not, make so, and use an invisible creature with the key to open the door.
And second, you could use the check: (Returns true only if the open state of the specified door matches the state specified in the 2nd parameter).
^ shamelessly stole form the IESDP
(I know the command ADD_MAP_NOTE but obviously that is just adding one)
Edit: I found this online
RemoveMapNote(P:Position*,I:STRREF*)
Will this still work in BGEE?
This is what I have for the BAF file I'm using for it
//Nashkel Inn name
IF
GlobalGT("Chapter","GLOBAL",0) Global("k9Nashkel1", "GLOBAL", 0)
THEN
RESPONSE #100
SetGlobal("k9Nashkel1", "GLOBAL", 1)
RemoveMapNote ([1300.564], 16266)
END
//Nashkel Store Name
IF
GlobalGT("Chapter","GLOBAL",0) Global("k92", "GLOBAL", 0)
THEN
RESPONSE #100
SetGlobal("k92", "GLOBAL", 1)
RemoveMapNote ([1684.820], 16267)
END
The top one (for the nashkel inn) works but the bottom one doesn't.
//Nashkel Inn name IF GlobalGT("Chapter","GLOBAL",0) Global("k9Nashkel1", "GLOBAL", 0) THEN RESPONSE #100 SetGlobal("k9Nashkel1", "GLOBAL", 1) RemoveMapNote([1330.652], 16268) END //Nashkel Store Name IF GlobalGT("Chapter","GLOBAL",0) Global("k92", "GLOBAL", 0) THEN RESPONSE #100 SetGlobal("k92", "GLOBAL", 1) RemoveMapNote([1655.867], 16267) END
Btw, the script actions AddMapNote/RemoveMapNote were very unreliable in the original BG2. Sometimes it worked, sometimes it added new strings to existing map markers instead of replacing them (in the case of AddMapNote()) and sometimes it did nothing at all. I don't know if this issue has been fixed in the Enhanced Editions of the games.
Nashkel Inn
Northern Light Inn
when I scroll over it when I just want it to say Northern Light Inn.
Whereas with the bottom one it removes the old map marker and replaces it with a new one with the correct text.
So looks like the issue you mentioned hasn't been fixed.
Edit: Nevermind I figured out what I was doing wrong based on this
http://forums.pocketplane.net/index.php?topic=11555.0
APPEND INNKN2
IF WEIGHT #1 ~ InParty("VICONIA") InParty("BAELOTH")~ THEN BEGIN k9wizard
SAY @2050
++ @2051 DO ~ Enemy()~ EXIT
END
END
Yet when I talk to the person I need to talk to this dialogue is ignored (even when I have both Baeloth and Viconia in my party). Any ideas why?
So something like this should update it:
COPY_EXISTING ~MYAREA.ARE~ ~override/MYAREE.ARE~ WRITE_SHORT 0x4C value
State weight in game dialog start at 0, which is the higher priority, according to the WeiDU readme. Since that weight might already be used in the dialog, and prior to anything you append (in case of equal weight, the first to appear in file will trigger), you are allowed to specify negative number for weight when you append something.See example in chapter 8.7 state WEIGHTs of the WeiDU readme for explanations and example:
APPEND BJAHEIR IF WEIGHT #-999 ~MyCondition()~ THEN BEGIN mystate SAY ~My Stuff~ END END
This is the dialog file that I am appending. There isn't really much to it.
// creator : weidu (version 23600)
// argument : INNKN2.DLG
// game : .
// source : ./DATA/DIALOG.BIF
// dialog : lang\en_us/dialog.tlk
// dialogF : (none)
BEGIN ~INNKN2~
IF ~ True()
~ THEN BEGIN 0 // from:
SAY #3586 /* ~Ya should do yerself a favor and stay indoors tonight. I've heard of all sorts of weird things happening at night.~ */
IF ~~ THEN REPLY #15275 /* ~What can you give me today?~ */ DO ~StartStore("Inn4801",LastTalkedToBy(Myself))
~ EXIT
IF ~~ THEN REPLY #15276 /* ~I don't need anything at the moment.~ */ EXIT
END
IF ~ False()
~ THEN BEGIN 1 // from:
SAY #3587 /* ~Have you ever danced with the devil in the pale moonlight? Well, neither have I.~ */
IF ~~ THEN EXIT
END
EXTEND_TOP INNKN2 0
+~CheckStatGT(Player1,14,CHR)~+ @2045 GOTO 3
+~CheckStatLT(Player1,15,CHR)~+ @2045 GOTO 4
END
APPEND INNKN2
IF WEIGHT #0 ~~ THEN BEGIN k9wizard
SAY @2044
+~InParty("VICONIA") InParty("BAELOTH") Kit(player1,DARK_MOON)~+ #15275 GOTO k9ViconiaBaelothMonk
+~InParty("VICONIA") InParty("BAELOTH") !Kit(player1,DARK_MOON)~+ #15275 GOTO k9ViconiaBaeloth
+~InParty("VICONIA") !InParty("BAELOTH") Kit(player1,DARK_MOON)~+ #15275 GOTO k9ViconiaMonk
+~InParty("VICONIA") !InParty("BAELOTH") !Kit(player1,DARK_MOON)~+ #15275 GOTO k9Viconia
+~!InParty("VICONIA") InParty("BAELOTH") Kit(player1,DARK_MOON)~+ #15275 GOTO k9BaelothMonk
+~!InParty("VICONIA") InParty("BAELOTH") !Kit(player1,DARK_MOON)~+ #15275 GOTO k9Baeloth
+~!InParty("VICONIA") !InParty("BAELOTH") Kit(player1,DARK_MOON)~+ #15275 GOTO k9Monk
END
IF ~~ THEN BEGIN k9ViconiaBaelothMonk
SAY @2051 IF ~~ THEN DO ~ Enemy()~ EXIT
END
IF ~~ THEN BEGIN k9ViconiaBaeloth
SAY @2050 IF ~~ THEN DO ~ Enemy()~ EXIT
END
IF ~~ THEN BEGIN k9ViconiaMonk
SAY @2052 IF ~~ THEN DO ~ Enemy()~ EXIT
END
IF ~~ THEN BEGIN k9Viconia
SAY @2049 IF ~~ THEN DO ~ Enemy()~ EXIT
END
IF ~~ THEN BEGIN k9BaelothMonk
SAY @2053 IF ~~ THEN DO ~ Enemy()~ EXIT
END
IF ~~ THEN BEGIN k9Baeloth
SAY @2049 IF ~~ THEN DO ~ Enemy()~ EXIT
END
IF ~~ THEN BEGIN k9Monk
SAY @2048 IF ~~ THEN DO ~ Enemy()~ EXIT
END
IF ~~ THEN BEGIN 3
SAY @2047
++ #15275 /* ~What can you give me today?~ */ DO ~StartStore("Inn4801",LastTalkedToBy(Myself))
~ EXIT
++ #15276 /* ~I don't need anything at the moment.~ */ EXIT
END
IF ~~ THEN BEGIN 4
SAY @2046
++ #15275 /* ~What can you give me today?~ */ DO ~StartStore("Inn4801",LastTalkedToBy(Myself))
~ EXIT
++ #15276 /* ~I don't need anything at the moment.~ */ EXIT
END
END
Somehow the weight must be related to the issue because when I tried basically just replacing the file with my own (but without any weight and after making some adjustments) and it had no issues.
If you append another state with weight 0 later in the file, it will always be behind the very first state in terms of priority. As I wrote, use a negative weight in your append if you want it to trigger.
The problem I think is that I'm trying to use more than one SOLVED_JOURNAL in the same block. Its only recognizing the last one though.
What I have for it is this.
IF ~~ THEN
BEGIN k9militiathings3
SAY ~Did ye now? Well much appreciated. I've not got much myself but you deserve a reward all the same. Its not much but take it.~ IF ~~ THEN DO
~SetGlobal("k9pints", "GLOBAL",3)
AddexperienceParty(2000)
EraseJournalEntry(@110)
EraseJournalEntry(@111)
EraseJournalEntry(@112)
EraseJournalEntry(@113)
EraseJournalEntry(@114)
EraseJournalEntry(@115)
EraseJournalEntry(@116)
EraseJournalEntry(@117)
EraseJournalEntry(@118)
EraseJournalEntry(@119)
EraseJournalEntry(@120)
EraseJournalEntry(@121)
EraseJournalEntry(@122)
EraseJournalEntry(@123)
EraseJournalEntry(@124)
EraseJournalEntry(@125)
EraseJournalEntry(@126)
EraseJournalEntry(@127)
EraseJournalEntry(@128)
EraseJournalEntry(@129)
EraseJournalEntry(@130)
EraseJournalEntry(@131)
EraseJournalEntry(@132)
EraseJournalEntry(@133)~
SOLVED_JOURNAL @107 SOLVED_JOURNAL @1071 SOLVED_JOURNAL @1072 SOLVED_JOURNAL @1073 EXIT
END