A couple of Random NPC's

Started by Maccers, September 02, 2009, 11:58:00 am

Previous topic - Next topic

Maccers

September 02, 2009, 11:58:00 am Last Edit: September 02, 2009, 02:05:32 pm by Maccers
Ok so i looked through the forums, i didnt find anything (so i hope im not just reposting what someone has before now).

These are pretty basic features, just something simple people can use to make some aspects of their game seem more realistic.

Ok so first is an NPC that will respond differently depending on the weather in the current zone.

Firstly, make an event (where you want your NPC to be), set his graphic, route and any other options you wish to include.

Now into event commands..

Insert a Conditional branch.
 (This is what you need..)

Spoiler: ShowHide


In the above image, you can the that the conditional branch is on tab4 of the conditional branch options.

Script code -
Spoiler: ShowHide
$game_screen.weather_type == X
** REMEMBER ** - replace the X with the correct number of your weather system.

1 = sunny
2 = light rain
3 = heavy storm
4 = snow

(obviously if your advance enough to have your own, feel free to use those).

The way in which the npc responds is entirly up to you, just edit the text inputs to what you want your npc to say.

So thats pretty much it for the random weather npc. (Any questions/ problems please feel free to ask).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ok moving onto the "Wealth dependant Npc".

This npc will respond in different ways, depending on how much of your games currency you have.

So again, make an event (where you want your NPC to be), set his graphic, route and any other options you wish to include.

Variable -

Spoiler: ShowHide


Now to make your variable, you need to insert it, so in the event commands, insert > Control Variable (1st page, 2nd column (2nd one down)). Name it whatever your ingame currency is called.

Variable options -
Single - (input the variable you just made).
Operation - Set.
Other - Gold.


Then click 'Ok' that has now inserted it into the event command page, now onto the conditional branch.

Insert > Conditional branch.

Spoiler: ShowHide


So as you can see above, in conditional branch options, set it to variable - (Your made variable for this event).
Then set the following option to 'Less than or equal to'
Then set a constant amount of "Currency", e.g here is 500 gold.

So what that now says, you npc will say something to you (whatever you decide to input) when you have 500gold or less.

Next line of the branch..keep everything the same, except the 'Constant of "Currency"', change that to any number you desire, again e.g here is now 5000 gold.

You can set any number of these branches to respond differently to many amounts of currency you choose.

Written e.g -
Spoiler: ShowHide

When your current held currency is <= (less than or equal to) 500, this npc will see you as a lowlife, and say
"Stay back, beggar scum!"

When you currently have <= 5000, this npc sees you as an equal and greets you politly. "Good day young man".

And when you have > (more than) 5000, the npc asks "What brings you to this neck of the woods?" as to say, why would a rich man be here.


Ok so i think thats it (sorry for the long post just wanted to make sure i covered it all for those who are just starting and looking for some basic things to help improve the realistic aspects of their game).

** Remember ** the currency can be edited to whatever you decide to have it at, also you can change the sayings of the npc by simply editing the text inputs on the conditional branches. And that if you want your npc to be polite when you have 'More than X gold' to change the variable option from 'Less than or equal to' to 'More than'.

If i have missed anything please let me know. (My first non-welcome post here!  :^_^': )

Enjoy.

**Edit - Added seperator for each Npc  :^_^':

Aqua

Nice nice nice effort! :D

Very nice guide for some simple and more real interactiveness :x

If you make the tutorial a little more organized, I'd be happy to move it in the database.
For example, when I was skimming through it... I couldn't tell where one ended and the other began.
Perhaps you should use horizontal rules or different sizes of fonts.

Maccers


G_G

Replace the red line with this


to use it use this
[hr]

Maccers

I know how to use it, i just preferred the red line :P

Magus

LEVEL ME DOWN. THE ANTI-BLIZZ GROUP IS AMONG YOU... Do it for the chick below...She watches..<br />

fugibo

Quote from: Maccers on September 02, 2009, 02:13:06 pm
I know how to use it, i just preferred the red line :P


Yes, but those of us with high gamma and bright backlights DON'T.

Tazero

This is in my multi-Realism tut -_-


If you were a fish...

winkio

Just because you made a tut on it doesn't mean that you are the only one that can talk about it. 

Tazero

Quote from: Maccers on September 02, 2009, 11:58:00 am
Ok so i looked through the forums, i didnt find anything (so i hope im not just reposting what someone has before now).


If you were a fish...