NPC Generator

Lich

Water Chip? Been There, Done That
Introduce to idea:

Am trying to build big mod which will contain hundreads of NPC. To make it in traditional way it require write hundread scripts and spend on them hundread years of time :D So i found that much better is build just one script which will generate lot NPCs. Ofcourse such scrpt is very dificulty, but i made some progress.

Concept:

NPC will have not usual conversation and style:

NAME: Is generated from three parts and contain nick, name, town for example "Dirty Harry from Saltrocks Desert" Its selected randomly and save in local variables.

DIALOG: Everything its possible to tell is connected to some skill. And peoples often want to hear things which they understand. So person tell you some story from randomly selected skill and randomly selected dificulty. When you have small amount of that skill, it mean you dont understand it and are not interested to hear it= dialog end. But when you got require skill then he tell you selected story.

QUEST: It could be barter, sell or buy randomly item with randomly value "buy knife for 12$" or "sell beer for 5$" It could be also about learn or teach skill. But i still think about this part.

SCRIPT: (EDIT deleted after upgrade)
 
I wrote approx 70 NPC scripts in nearly a half year. So.. I don't need a "NPC Generator". :D

Nice idea, but.. I think, I would never use it...
 
Pure extravaganza, as expected. Seems like an interesting idea though. And a big help for the starters.

I agree with Lexx, writing a script for a NPC is not that hard, it's the dialogue (along with the tree) which makes my spline deforming.
 
UPDATE:

CODE: NPC Generator v2 (under developement)

Every (5) dialog options depend on some skills
increase these skills to get better chances for these dialog options

1: Share experiences = conversation skill
NPC tell you about his life or background, random story
Its good if you want to get more into game plot, situation around

2: Barter any stuff = barter skill
buy and sell items to earn money (under developement)

3: Learn Sub-Skill = science
it could be much more than 18 skills!
you must learn these extra skills to use (similar to gecko skining)
succes in subskill test science + other skill
for example:
herbology= science+first aid (allow to make mixtures)
geology= science+outdoorsman (allow to search gold and gems)
engineering= science+repair (upgrade items and build new from junk parts)
NPC teach you one randomly selected skill (under developement)

4: Secret locations = outdoorsman
NPC tell you about secret location and mark it on map (under developement)

5: Play hazard game = gambling
Play with NPC for (randomly selected) game such like dices, cards or else
Its way to get money and entertainment: game inside game (under developement)

Ofcourse this dialog could grown more

When you dont have any required skills then NPC say you nothing
dialog dont open, he just shown some random floating messages over head

In before concepts i build dialog based on stats: IQ, CHA, LUC
This one is based mostly on skills, because you may increase them
during game and get new options from NPC you meet before
Stat test give only one chance so you must start new game to see new things

Ofcourse Dude could shown in many parts of game angry cha<4 or dumb iq<4
messages over head, mostly by succes or failure in use skills


Picture: example of dialog options when you have high skills, usualy you will see only few options depend on your best skills or dialog will not open when every skills are low (only random floating messages)

scr71.jpg
 
hi, i'm trying to add a npc myself but i'm new to this topic
and the scripting is hard to understand

some guy mentoined that npc scripting is not that hard but there is still no toturial for npc scripting or explaining the friendly klint mod scripting could anyone help me with that

thx in any way
 
The best thing for this is, to look at the scripts of other NPCs (not only the script of one). Then play a little bit with this (things like copy&paste and so on) and try out things by yourself. It isn't really that hard.
 
Nidhacker said:
hi, i'm trying to add a npc myself but i'm new to this topic
and the scripting is hard to understand

In begining i even dont known how made floating messages, and everything was so hard, but during experiences its become much easy. Mostly start from modify existing scripts from game.

Ofcourse usual script from game is build from many parts, but most of them you can throw away and concentrate on one procedure. For example to made simple NPC dialog you need to known only talk procedure. Here is basic script for example:

Code:
procedure start;
procedure talk_p_proc;
procedure talk_01;
procedure talk_02;
procedure talk_03;
procedure talk_04;

procedure Node999;

procedure start begin
end

procedure talk_p_proc begin
start_gdialog(NAME,self_obj,4,-1,-1);
gSay_Start; 
call talk_01; 
gSay_End; 
end_dialogue; 
end

procedure talk_01 begin
Reply(100);
NOption(200,talk_02,002);
NOption(300,talk_03,002);
NOption(400,talk_04,002);
end

procedure talk_02 begin
Reply(250);
NOption(290,Node999,002);
end

procedure talk_03 begin
Reply(350);
NOption(390,Node999,002);
end

procedure talk_04 begin
Reply(400);
NOption(490,Node999,002);
end

procedure Node999 begin
end

Reply is what NPC tell you
NOption is what you say (usualy ask)

in procedure talk_01 is introduce and your questions
NOption(200,talk_02,002);

200 line from msg file (folder: Fallout2/data/text/english/dialog)
The same in Reply(100); where 100 mean text line from msg file
talk_02 is procedure called when you select this option
Procedure Node999 have nothing so here dialog will end
procedure talk_p_proc is open automaticly when you start talk and its call dialog procedure talk_01

You must also known how register script (in scripts.h, scrname.msg, script.lst) and compile it and other stuff. And dont be surprised when you encounter many dificulties in made own scripts.

PS. i made some update to generator, (it was one bug) and new stuff: now npc dont tell just introduce but he got normal dialog (introduce, 3 questions, answer give next question with answer) One script could contain several or more dialogs chosen randomly.
 
Back
Top