Jump to content

Making changes to existing game data


St_Vitruvius

Recommended Posts

I want to use an existing npc in one of my mods. But there is a couple of questions I thought of asking before embarking on the next big project to mod..

 

How do I extract a .d-file from BG2 using NI? I know how to extract the .DLG-file, but how do I convert it so I can use it?

 

Can I, instead of adding a new dialogue file for an existing NPC, have weidu edit the existing .dlg?

Link to comment

Now I've figured out how to extract the existing dialogue and changing it.. Next problem is:

 

I want to modify Queen Ellesimes dialogue at the end of the game.. But she has 3! different dialogue files.. How do I find out which of the files is actually used in the game? Or are all three used and if that's the case, when are they used?

 

EDIT: Queen Ellesime uses the following files:

 

SUELLE.DLG

SUELLE2.DLG

SUELLEAP.DLG

SUELLES2.DLG

SUELLI.DLG

SUELLI2.DLG

Link to comment

You can try ctrl-M on the actor to see the actual dialogue.

Or you can search for the specific context in all suspected dialogues.

Shouldn't be too hard since you got all dialogs in plain text format by now :)

Link to comment

I found out that Ellesime uses SUELLE2.DLG for dialogue after she has resurrected the party following the final battle with Irenicus in Hell.

 

Now I can do two things, as I see it.. I could either modify the .dlg-file and put my version in the overrride folder. Ellesime would then use my version of the file for dialogue, correct?

Link to comment

Sorry.. my bad.. The other thing would be to use "REPLACE filename state list END".. in the weidu documentation it says:

 

This instructs WeiDU to load filename.DLG and replace some of its states with the new ones described in the state list. All of the states should have numeric stateLabels (e.g., "5" or "67"). A new state with label X will replace the old state number X.

 

I'm not sure of the limitations of the command and not sure how it would work either.. I haven't found any exambles yet..

 

I think it's more difficult to use, as I cannot see the .d-file when using REPLACE and APPEND on the same file to modify it with..

Link to comment

The weidu folks always prefer patching dialogues instead of overwriting due to compatibility reasons.

If you replace the complete ellesime dialogue, you surely screw all mods that use this dialogue too.

If you patch it, you might screw some, but the problems will be more obscure and will remain hidden for a long time :)

Link to comment

When using APPEND you should assume anyone else modifying the same dialog will also use APPEND. Using this rule the state numbers will remain the same as they are in the original version of the dialog.

 

If you completly REPLACE the state then you remove any other modifications to it by other mods and thereby break them. Eventually a player will report the break to the author and you will most likely be requested to change your code to an APPEND anyway. Either that of you are happy that your mod will be incompatible with other mods that change states you REPLACE.

 

There are hundreds of examples of APPEND around to have a look at. Few examples of REPLACE because of the inherent incompatibilities it brings with it in the majority of cases.

Link to comment

The problem is, that I want the player to be able to walk around in Suldanessellar after having defeated Irenicus. If I don't use REPLACE to change her dialogue the game will be like this, no matter what I add using APPEND:

 

Player defeats Irenicus in hell

Ellesime ressurects the partymembers

Ellesime talks about having prepared a party or something for the heroes, but will let them rest..

The party is held

SoA ends and ToB begins

 

I want to add a brake in the dialogue, so you can move about, talk to people and come back to Ellesime and say "I'm prepared for the party" or something..

Link to comment

You can insert a global check into the existing reply in State 5 (the one that start the cutscene cut59b)so that it does not return true. You then add your own reply to state 5 that redirects the dialog to a new state where Ellesime says something like "Or should you wish to explore; the freedom of our city is yours." You then just Exit out of this state and you can wander around the city.

 

Add another state for when they return to talk to Ellesime or have someone summon the party to her (as she says in state 5). This new state contains a reply "I'm ready to depart" which includes the same actions as the original state 5 and starts the cutscene.

Link to comment

Working with state 4 and 5 from SUELLE2.d we have this:

 

IF ~~ THEN BEGIN 4 // from: 3.0
 SAY #55241 /* ~I have planned a small ceremony to reward you for your actions, and to show our gratitude despite what your motives might have been.~ */
 IF ~~ THEN GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.0
 SAY #55242 /* ~You should rest, now, and regain your strength.  I will send a priestess to awaken you when it is time.~ */
 IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("cut59b")~ EXIT
END

 

If I then, in my .tp2 write:

 

ADD_TRANS_TRIGGER SUELLE2.DLG 4 Global("ExploreSuld",2) [DO 0]
EXTEND_BOTTOM SUELLE2.DLG 4 [#1] IF ~~ THEN GOTO MyOwnState

 

I would get the following:

 

IF ~~ THEN BEGIN 4 // from: 3.0
 SAY #55241 /* ~I have planned a small ceremony to reward you for your actions, and to show our gratitude despite what your motives might have been.~ */
 IF ~Global("ExploreSuld",2)~ THEN GOTO 5
 IF ~~ THEN GOTO MyOwnState
END

 

I would then just have to add a state returning the dialogue to state 5 for the original dialogue to continue..

 

Have I understood it correctly?

Link to comment

I wouldn't return the dialog to state 5 personally because you've already seen that state and you would get a repeat of ~You should rest, now, and regain your strength. I will send a priestess to awaken you when it is time.~ which would look a bit odd.

 

What I would do is create another new state that returns true when the player talks to Ellesime again (stick a global in MyOwnState to track this). Then copy the first reply from state 5 to this new state.

 

So you end up with something like this:

 

IF ~Global("ExploreSuld",3)~ THEN BEGIN MyNewEllesimeState1
 SAY ~You have returned, I hope you are well rested.  Is there something you would ask of me?~ 
 IF ~~ THEN REPLY ~No, I just wanted to say Hi.~ EXIT
 IF ~~ THEN REPLY ~I am ready to depart Suldenesslar.~ GOTO MyNewEllesimeState2
END

IF ~~ THEN BEGIN MyNewEllesimeState2
 SAY ~Ah very well then. I wish you well on your journies.~
IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("cut59b")~ EXIT
END

 

You set Global("ExploreSuld",3) at the end of MyOwnState that you have branched off from State5 as above.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...