Jump to content

NPCs (And displaying my limited intelligence)


Recommended Posts

Tried it, doesn't work. I can get the person to join my group, they just won't follow me, they stay in the same spot unless I run into them to switch places. Also, adding dialogue does not seem to work either. I'll type in the Personality and I've got all the dialogue typed out it just doesn't work.

Link to comment
Share on other sites

As a general rule, if you want to get anything to work, look how it's done in the scenarios that came with the game. Then you can copy the scripts into yours and edit them as needed.

 

There's an NPC in VotDT named Bruning (I think) who will join the party. I think he lives in Sweetwater. Check out his dialog and the creature script. This should answer your questions.

 

This is the only way I've been able to learn how to do things, as the docs are pretty worthless. Well, not worthless, but not very thorough. Each time I read them to see how to do something, they always seem to leave out something.

Link to comment
Share on other sites

Whenever I left and returned, the NPC was in line, he just didn't follow. Here is my code.

 

My Init_State in the Town Data file:

 

beginstate INIT_STATE;

enable_add_chars(1);

// This state called whenever this town is entered.

break;

 

This is the Talk-Node to join the group.

 

begintalknode 2;

state = 1;

nextstate = -1;

question = "We heard you might be interested in coming with us on our journey. Want to join us?";

text1 = "_Finally!_ He yells. _You have no idea how boring it is sitting in this lab all day studying hydras._ Of course, I'll come!";

text2 = "_I would, but I think you can handle it alone._";

code =

if (add_char_to_party(6) == FALSE) {

remove_string(1);

} else {

remove_string(2);

}

break;

 

For the NPC's script I used basicnpc. Anything else I need to do?

Link to comment
Share on other sites

Just a thought, but I've never used add_char_to_party() as a comparative call before. I just check everything with flags (i.e. a counter to count the number of NPCs for greater versatility; I check to see if the number is greater than two when adding new party members). Just have add_char_to_party(6) as a separate call that does not compare anything. Try that and see if it works.

Link to comment
Share on other sites

Did you do

 

void enable_add_chars(short can_add)

 

in this town?

<edit> Ah, I see you did.

<another edit> This call is not in Babysitting t3lair.txt, which works, so it is probably not necessary.

 

I am not sure if that is necessary, but it is in the Sweetgrove init. The docs say, "A character who joins the party must have its own script." See t1Bruning.txt. The call is used as a comparative in Bruning's case, so that should be okay.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...