Jump to content

Moding question(s)


Deathsangel

Recommended Posts

Goodday to all. As you may know I am working on the Mod for the Wicked. So I am trying out my coding skills for quests and it really needs to improve. Many bugs are found and it doesn't all go to well ;) However, I am determined to learn and continue. :D I've got one problem that I can fix, but only in a nasty way. I have this:

 

I_C_T DLOST 0 ChildforKPQ1
== KIDOJ IF ~InParty("DKido") Global("Kidopersonalquest","GLOBAL",4)~ THEN
~Pssst... , we could use this child to help a friend of mine, if you know what I mean.~
END

EXTEND_TOP DLOST 0 #1
IF ~InParty("DKido") Global("Kidopersonalquest","GLOBAL",4)~ THEN REPLY ~Come with us child, we will help you.~ EXTERN KIDOJ Kidnap
END

 

The code as written, displays Kido's Psssst dialog. But I never get the 'Come with us child..... stuff from the EXTEND_TOP DLOST 0 #1.

 

It does work if I coded as below. As I said, however, I find this ugly. Mostly because the following order of sentences is weird and I do not favor DisplayStringWaits in none cutscenes parts. Does anyone no how to 'fix' the above standing code or no how to code it so it works in a way I would like to. Thanks for any help ;)

 

EXTEND_TOP DLOST 0 #1
IF ~InParty("DKido") Global("Kidopersonalquest","GLOBAL",4)~ THEN REPLY ~Come with us child, we will help you.~
DO ~DisplayStringWait("DKIDO",%Pssst... we could use this child to help a friend of mine, if you know what I mean.%)~
EXTERN KIDOJ Kidnap
END

Link to comment

Do you want to make these two strings displayed in the same dialog session?

Or one should pop up then the other.

If the latter, then you probably need to increase that global var in the first and trigger on the increased one in the second.

Link to comment
Do you want to make these two strings displayed in the same dialog session?

Or one should pop up then the other.

If the latter, then you probably need to increase that global var in the first and trigger on the increased one in the second.

 

What is is supposed to be is interjection into an existing dialogue and then the new extra answering option for PC should come up, however, it is an extra option. It need not be taken. That is what I want to accomplish. The global is for the possibility of kidnapping so to speak and is tied to the advancement in the quest I wrote.

Link to comment

Anything with COPY_TRANS in it (and that includes INTERJECT_COPY_TRANS) is processed BEFORE everything else. So if you want your EXTEND to work the way you're expecting, you'll need to compile it in a .d file which you compile before the .d with the I_C_T.

Link to comment
Guest Guest
So if you want your EXTEND to work the way you're expecting, you'll need to compile it in a .d file which you compile before the .d with the I_C_T.

 

Wouldn't an error message be generated because this file is compiled before the MyNPCJ.d file which has the externed to MyLabel?

 

EXTEND_TOP DLOST 0 #4

IF ~InParty("MyNPC") Global("Personalquest","GLOBAL",4)~ THEN REPLY ~Blah, blah, blah.~ EXTERN MyNPCJ MyLabel

END

Link to comment

Then you move that state, too. The bottom line is that if you're EXTENDing something that you also need COPY_TRANS'ed, you have to do the EXTEND in a preceding compile line.

 

Really, this is not a terribly good way to design an interjection (and you're finding out why) but since the lost kid doesn't have any other lines before the PC reply section, it's clear that it's just a difficult problem to solve if you really want your NPC to interject here with a new PC line to follow.

 

Another way to do it would be to use plain INTERJECT and then make the transition be

 

IF ~InParty("MyNPC") Global("Personalquest","GLOBAL",4)~ THEN REPLY ~Blah, blah, blah.~ EXTERN MyNPCJ MyLabel

COPY_TRANS DLOST 0

Link to comment
IF ~InParty("MyNPC") Global("Personalquest","GLOBAL",4)~ THEN REPLY ~Blah, blah, blah.~ EXTERN MyNPCJ MyLabel

COPY_TRANS DLOST 0

 

Interject's are not processed before EXTEND's then I assume, if you offer this option. For if that is so I reckon that this is the best way to go, seeming there is no other NPC I could find that interjects at that point. Oh and yeah, I noticed it doesn't work welll :). It is just that I wanted my NPC to comment that this little girl could be used for his personal quest, but to make that work I also needed an option to take the girl along, that is why I am fumbling around so much

Link to comment

You wouldn't use EXTEND if you used INTERJECT. INTERJECT takes a full list of transitions at the end, which in your case would be:

 

 

IF ~InParty("MyNPC") Global("Personalquest","GLOBAL",4)~ THEN REPLY ~Blah, blah, blah.~ EXTERN MyNPCJ MyLabel

COPY_TRANS DLOST 0

Link to comment

To be honest I am confused about adding an EXTERN and COPY_TRANS, both make a transition to the next string, but that would differ here wouldn't it?

I also wouldn't know how to code a new possible answer without extending the original list by EXTEND_TOP NPCinQuestion string placeofnewanswer. If I can't use EXTEND at the end of an Interjection, then my order will still be wrong right?

I can't use CHAIN as I still want to give the PC a choice, which is the whole reason why I try to code it like this...

 

I want to have this:

 

DLost: bla bla bla

Kido: bla bla <- new interjection

PC answers:

1 <- new answer which leads to another small new part, coded in the KidoJ file

2

3

4

Link to comment

I keep telling you how to do this. Apparently you're not looking very carefully at the documentation for INTERJECT, COPY_TRANS, or CHAIN for that matter. You most certainly can provide PC replies at the end of a CHAIN (and INTERJECT/I_C_T are just CHAIN with a funny hat anyway.)

 

You can "add a reply to an existing list" by simply placing a transition in a transition list above or below a COPY_TRANS statement.

 

This is what you should be doing.

 

INTERJECT DLOST 0 ChildforKPQ1

== KIDOJ IF ~InParty("DKido") Global("Kidopersonalquest","GLOBAL",4)~ THEN

~Pssst... , we could use this child to help a friend of mine, if you know what I mean.~

END

IF ~InParty("MyNPC") Global("Personalquest","GLOBAL",4)~ THEN REPLY ~Blah, blah, blah.~ EXTERN MyNPCJ MyLabel

COPY_TRANS DLOST 0

Link to comment

Sorry, I misunderstood I thought that to be an answer to that particular question, but not an addition to entire set (which I thought would come right after this only possible answer). In my defense, my debugster also did not follow (whom was the guest). However, apparenlty I should read up on my skills. Thank you Jason

Link to comment

Archived

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

×
×
  • Create New...