Jump to content

[Dialog] How to place a "welcome" instruction BEFORE the vanilla one

Recommended Posts

The question is in the title.

A want to change the dialog of Lady Yurth (Scroll01) to add an instruction (IF ~HasItemEquiped("PXLDAB",LastTalkedToBy) Global("Pxpmldor","LOCALS",0)~ THEN GOTO PXLDAB1), for an alternative welcome instead of the vanilla one.

I've tried Extend_Bottom, Extend_Top, nothing work. The dialogue are always added after the vanilla welcome. Please, can someone help me ?

Edited by deratiseur
Link to comment

Sorry, the line i give for exemple wasn't the true line, i want keep the secret, but with the code, i cant..., so :


    IF ~HasItemEquiped("PXPMLDOR",LastTalkedToBy) Global("Pxpmldor","LOCALS",0)~ THEN  SAY @51 GOTO PXLAMEDOR //Hello .. Ho, i show that you wear Lamedor. Don't ask me How [...] but i can upgrade it.
    IF ~HasItemEquiped("PXPMLDOR",LastTalkedToBy) Global("Pxpmldor","LOCALS",3) PartyHasItem("MISCBP") PartyGoldGT(11170)~ THEN GOTO PXLDOROK

    IF ~~ THEN BEGIN PXLAMEDOR SAY @52 //Gimme a vampire hearth and 11171 gold pieces and i'll unleash his true power
    IF ~~ DO ~SetGlobal("Pxpmldor","LOCALS",3)~ EXIT

    IF ~~ THEN BEGIN PXLDOROK SAY @53 // you have the heart and the gold, do you want i upgrade lamedor ?
        IF ~~ THEN REPLY #66664 DO
            ~TakePartyItemNum("Pxpmldor",1)    DestroyItem("Pxpmldor")
            TakePartyGold(11171)    DestroyGold(11717)
        IF ~~ THEN REPLY #66662 EXIT


I want : if the lady talk to someone who wear lamedor, she notice it and dont greet normaly, but instead say the 51, then say the 52. If later the pcs come with lamedor +the heart + the gold, she propose the forge.

Edited by deratiseur
Link to comment

Checking her dialog it seems to me like you should 


and not 1, because 1 is after the greeting. 0 is the greeting state.

By the way when making new dialogue try to use EXTEND_BOTTOM instead since some modders rely on the vanilla answer order, which EXTEND_TOP screws with.

Edited by Daxtreme
Link to comment

Firstoff, what Daxtreme altready pointed out: do not add reply options using EXTEND_TOP. It changes the number count of the existent reply options and will screw up any mod added after yours that adds specific reply triggers or transactions. Really the only dialogue state you can add via EXTEND_TOP is the fate spirit summoning to place your NPC further up, because nearly all mods do that. :)


To your question: if you want to add a new greeting to an existing character in game, EXTEND_BOTTOM will not help you since this only adds new reply options to existent dialogue states. What you can do is add a new dialogue state with appropriate triggers using APPEND ~SCROLL01~ (assuming SCROLL01 is the game DLG you want to add to).


Something like this for the first item you mentioned:

    IF WEIGHT#-1 //you need weight so this gets called first

~HasItemEquiped("PXPMLDOR",LastTalkedToBy) Global("Pxpmldor","LOCALS",0)~ THEN pxpmldor

  SAY @51

IF ~~ THEN DO ~SetGlobal("Pxpmldor","LOCALS",1)~ GOTO PXLAMEDOR


... // put all your other dialogue states here



One note to compatibility, as a rule of thumb:

-close (disable) these new greeting dialogues as soon as possible, preferably after they payed once, or your mod will block any other mod added dialog

-optimally, your greeting dialogue transitions to the original greeting dialogue to give the original game content and other mods the possibility to play out.

Link to comment

Thanks for your answer.

I've find another thing for the result i wish. As my dialogues are only read After the vanilla "hello", i've updated thems for a continuality, and this is a good result. Now Lady Yurth says "Hello[...]" >continue -> ho, i see you wear Goldbrand[...] then the player can reply "we'll think of this, bye" or "show me your wares" (vanilla reply)

So i can put a [solved] tag to this topic.

Link to comment

But do you cycle back to the actual vanilla state of the greetings dialogue? Just adding the original reply options at the end is not enough for compatibility, because other mods will add their reply options to the original one but yours will skip them. Unless she lists all the possibilities only once and not again if talked to once more.

Link to comment

I'd like to add something to this conversation. I was looking for a way to add my own reply to a state, and though I think modders have no business targeting specific numbers of replies on the list - EXTEND_TOP is the natural place to add new lines - I accepted using EXTEND_BOTTOM for this. The last line in a conversation, though, is usually a "Goodbye," so additions should at least be above that. Maybe it's not new, but you can add your lines before the last by using EXTEND_BOTTOM ~DIALOG~ 0 #50, or another crazy number there instead of 50. This function puts the line between transition #yournumber and #yournumber +1 in state 0, in this case. The final line is going to be just that, +1 to your number, so your insertion ends up just above.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...