Jump to content

Custom NPC


Greenman019

Recommended Posts

If you mean this:

CHAIN

IF ~NumTimesTalkedTo(0)~ THEN G)TRA Tra01

~WHAT! What is the meaning of th-~

==Savon IF~InParty("Savon")~THEN~Hey, hey~

== G)TRA IF~InParty("Savon")~THEN~Savon, isn't it? Yes, I remember you.~DO ~Enemy()~

EXIT

It lacks the proper SPACE'ing....

 

Aka:

CHAIN

IF ~NumTimesTalkedTo(0)~ THEN G)TRA Tra01

~WHAT! What is the meaning of th-~

== Savon IF ~InParty("Savon")~ THEN ~Hey, hey~

== G)TRA IF ~InParty("Savon")~ THEN ~Savon, isn't it? Yes, I remember you.~ DO ~Enemy()~

EXIT

If there's something else, we need to see the debug and the code to solve the mystery. Roxanne was probably on a phone typing that... :p

 

 

^^ Would make sense.

 

Anyways, here's what I got now so far on that. I replaced all instances of "Savon" with the correct script name. I also added some ~ which fixed the parsing errors, but maybe I broke something.

BEGIN ~G)TRA~ 
CHAIN
IF ~NumTimesTalkedTo(0)~ THEN ~G)TRA~ Tra01
~WHAT! What is the meaning of th-~
== ~G)SORV~ IF ~InParty("G)SORV")~ THEN ~Hey, hey~
== ~G)TRA~ IF ~InParty("G)Sorv")~ THEN ~Savon, isn't it? Yes, I remember you.~ DO ~Enemy()~
EXIT

When Sorv is in the party, G)Tra will still initiate conversation, but there is nothing after the first line.

Link to comment

 

If you mean this:

CHAIN

IF ~NumTimesTalkedTo(0)~ THEN G)TRA Tra01

~WHAT! What is the meaning of th-~

==Savon IF~InParty("Savon")~THEN~Hey, hey~

== G)TRA IF~InParty("Savon")~THEN~Savon, isn't it? Yes, I remember you.~DO ~Enemy()~

EXIT

It lacks the proper SPACE'ing....

 

Aka:

CHAIN

IF ~NumTimesTalkedTo(0)~ THEN G)TRA Tra01

~WHAT! What is the meaning of th-~

== Savon IF ~InParty("Savon")~ THEN ~Hey, hey~

== G)TRA IF ~InParty("Savon")~ THEN ~Savon, isn't it? Yes, I remember you.~ DO ~Enemy()~

EXIT

If there's something else, we need to see the debug and the code to solve the mystery. Roxanne was probably on a phone typing that... :p

 

 

^^ Would make sense.

 

Anyways, here's what I got now so far on that. I replaced all instances of "Savon" with the correct script name. I also added some ~ which fixed the parsing errors, but maybe I broke something.

BEGIN ~G)TRA~ 
CHAIN
IF ~NumTimesTalkedTo(0)~ THEN ~G)TRA~ Tra01
~WHAT! What is the meaning of th-~
== ~G)SORV~ IF ~InParty("G)SORV")~ THEN ~Hey, hey~
== ~G)TRA~ IF ~InParty("G)Sorv")~ THEN ~Savon, isn't it? Yes, I remember you.~ DO ~Enemy()~
EXIT

When Sorv is in the party, G)Tra will still initiate conversation, but there is nothing after the first line.

 

This was just meant as an example - of course you need to complete it with whatever you want to happen if that Sorv is not present e,g, have PC say something or Tra going hostile still???

 

BEGIN ~G)TRA~

CHAIN

IF ~NumTimesTalkedTo(0)~ THEN ~G)TRA~ Tra01

~WHAT! What is the meaning of th-~

== ~G)SORV~ IF ~InParty("G)SORV")~ THEN ~Hey, hey!~

== ~G)TRA~ IF ~!InParty("G)Sorv")~ THEN ~ I mean, why can't we all be friends? ~

== ~G)TRA~ IF ~InParty("G)Sorv")~ THEN ~Savon, isn't it? Yes, I remember you.~ DO ~Enemy()~

END

IF~!InParty("G)Sorv")~ THEN REPLY~Yes, come along with us.~DO~JoinParty()~EXIT

IF~!InParty("G)Sorv")~ THEN REPLY~Yes, yes, be friends and sing and laugh, blablabla.~EXIT

IF~InParty("G)Sorv")~ THEN REPLY~ This will not end well...~EXIT

 

The advantage of CHAIN is that you can add as many other NPCs or going back and forth between NPCs as you want to. You may involve the PC with the lines after END. Instead of EXIT you may go to another block of dialogue, and and and...

 

Link to comment

My mistake.

 

Further down the line I'm hoping that Tra will only spawn if you have Sorv in the party. But that's for future greenman to worry about. :)

By the way, RE: These dialogs. Will I have to make changes due to my XP system? (I have G)Sorv2/3 and so on, all scripts right now reference only G)Sorv) Tested this, and it seemed to recognise them all as G)SORV which is great. The dialogue worked without him in the party, but when he's in the party G)TRA only says his first line. :(

Link to comment

My mistake.

 

Further down the line I'm hoping that Tra will only spawn if you have Sorv in the party. But that's for future greenman to worry about. :)

By the way, RE: These dialogs. Will I have to make changes due to my XP system? (I have G)Sorv2/3 and so on, all scripts right now reference only G)Sorv) Tested this, and it seemed to recognise them all as G)SORV which is great. The dialogue worked without him in the party, but when he's in the party G)TRA only says his first line. :(

What is G)Sorv 's in-party dialogue?? Did you assign one at all? A joinable NPC uses a different (or same) dlg file when joining but it must be defined in pdialog.2da. This could be G)SorvJ or you may keep G)Sorv but you need to tell the system what to use.

Link to comment

 

My mistake.

 

Further down the line I'm hoping that Tra will only spawn if you have Sorv in the party. But that's for future greenman to worry about. :)

By the way, RE: These dialogs. Will I have to make changes due to my XP system? (I have G)Sorv2/3 and so on, all scripts right now reference only G)Sorv) Tested this, and it seemed to recognise them all as G)SORV which is great. The dialogue worked without him in the party, but when he's in the party G)TRA only says his first line. :(

What is G)Sorv 's in-party dialogue?? Did you assign one at all? A joinable NPC uses a different (or same) dlg file when joining but it must be defined in pdialog.2da. This could be G)SorvJ or you may keep G)Sorv but you need to tell the system what to use.

 

 

I have only set-up G)Sorv right now, which has his initial joining dialog + PC responses. I don't have those interjections/lines in any of SORV's files, just in the TRA one I have made up (The one you posted.) I thought it could be handled in that way as long as the NPC was defined. Obviously not :c

 

Here is the tp2 setup on dialog.

// Dialogs
COMPILE ~SorvNPC/Dialog/G)SORV.d~

APPEND ~PDIALOG.2da~
~G)SORV G)SORVP G)SORVJ G)SORVD~
UNLESS ~G)SORV~

APPEND ~INTERDIA.2da~
~G)SORV G)SORVB~
UNLESS ~G)SORV~

COMPILE ~SorvNPC/Dialog/G)TRA.d~

It's very basic for now. Want to learn as much as I can before really getting on.

Sorry for all the questions. I'm sure I'll get there eventually ^^

Link to comment

 

 

My mistake.

 

Further down the line I'm hoping that Tra will only spawn if you have Sorv in the party. But that's for future greenman to worry about. :)

By the way, RE: These dialogs. Will I have to make changes due to my XP system? (I have G)Sorv2/3 and so on, all scripts right now reference only G)Sorv) Tested this, and it seemed to recognise them all as G)SORV which is great. The dialogue worked without him in the party, but when he's in the party G)TRA only says his first line. :(

What is G)Sorv 's in-party dialogue?? Did you assign one at all? A joinable NPC uses a different (or same) dlg file when joining but it must be defined in pdialog.2da. This could be G)SorvJ or you may keep G)Sorv but you need to tell the system what to use.

 

 

I have only set-up G)Sorv right now, which has his initial joining dialog + PC responses. I don't have those interjections/lines in any of SORV's files, just in the TRA one I have made up (The one you posted.) I thought it could be handled in that way as long as the NPC was defined. Obviously not :c

 

Here is the tp2 setup on dialog.

// Dialogs
COMPILE ~SorvNPC/Dialog/G)SORV.d~

APPEND ~PDIALOG.2da~
~G)SORV G)SORVP G)SORVJ G)SORVD~
UNLESS ~G)SORV~

APPEND ~INTERDIA.2da~
~G)SORV G)SORVB~
UNLESS ~G)SORV~

COMPILE ~SorvNPC/Dialog/G)TRA.d~

It's very basic for now. Want to learn as much as I can before really getting on.

Sorry for all the questions. I'm sure I'll get there eventually ^^

 

All of that is okay - for the dialog above you also need

 

BEGIN ~G)TRA~

BEGIN ~G)SORVJ~ //You may put this line here or into G)SORV.d or in a new file G)SORVJ.d just as you like

CHAIN

IF ~NumTimesTalkedTo(0)~ THEN ~G)TRA~ Tra01

~WHAT! What is the meaning of th-~

== ~G)SORVJ~ IF ~InParty("G)SORV")~ THEN ~Hey, hey!~

== ~G)TRA~ IF ~!InParty("G)Sorv")~ THEN ~ I mean, why can't we all be friends? ~

== ~G)TRA~ IF ~InParty("G)Sorv")~ THEN ~Savon, isn't it? Yes, I remember you.~ DO ~Enemy()~

END

IF~!InParty("G)Sorv")~ THEN REPLY~Yes, come along with us.~DO~JoinParty()~EXIT

IF~!InParty("G)Sorv")~ THEN REPLY~Yes, yes, be friends and sing and laugh, blablabla.~EXIT

IF~InParty("G)Sorv")~ THEN REPLY~ This will not end well...~EXIT

Link to comment

So I need that as a new dialogue file named g)sorvj, then each one can reference one another ?

You need this BEGIN mydialog to create a ressource of that name in the game's chitin.key. Once this dialogue exists, you can append to it or use it in CHAIN and so on...APPENDs and CHAINS can be in any dialogue as long as the files they reference to exist (otherwise you get a compile error). In case the dialogue is to be used for a specific purpose like J file or B file you also need to specify that (this you already did with the appends to INTERDIA.2da and PDIALOG.2da).

Link to comment

Don't thin I've touched on Chitin editing yet. Any good tutorials floating around ?

 

I've had a look at APPENDS before, thought they were mostly for banter. Adding to the core games characters dlg files. Thought I'd be ok right now with 2 custom NPC's

DO NOT touch chitin.key! With the BEGIN ~G)SORVJ~ you create the new dialog and it is added to the key automatically when you compile the game. Afterwards every other .d file can refer to it.

Link to comment

Thanks for the help. I made up G)SORVJ and stuck it in there and it seemed to fire fine (The bottom button didn't say Continue for some reason, only an empty space, dunno if it's related.)

 

Think i'll be able to do it again now. With chains, you're fine to add PC responses and such right?

Link to comment

Archived

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

×
×
  • Create New...