NPC Clothing

Anonymous
08 Jan 2005, 11:28
Hey i'm trying to get my head around developing NPC's. I've only just started so please forgive any easy mistakes.

At the moment i'm having trouble giving them clothes to wear when the game starts up.

I have a object type character that has the properties, head, body, legs, a picture etc.

Each npc I set to inherit the object type character, thus saving me typing and lines of code.

Getting to this stage my question is:

How do I physically move a clothing object to be worn by an NPC in one of these locations. NPCName.character.body (for example). In its most basic form as the game starts up i'd like my NPC's clothed :)

For major characters, I am going to have a couple of changes of clothes at certain points in the game.

I would prefer QDK directions but hand coding is fine as I program with C++.

Anonymous
08 Jan 2005, 14:58
hey, sorry I have another question :)

Whats the best way to make menu conversations that don't open in their own window. Giving the player a choice of 1,2,3,4 to be entered on the screen for instance.

Alternatively any other suggestions on menu's would be appreciated.

Anonymous
08 Jan 2005, 17:16
Conversation update:
(been working on this for hours)

Currently I have global commands for 1,2,3,4,5. These return an answer variable of 1-5. The answer variable can then be used in conversations to decide the path you take in a conversation tree.

The problem i'm having is for example, getting this command working:

ask NPC or about forest

I have tried setting commands for ask NPC about forest, and then
overiding the commands with an individual NPC action ask NPC about forest.

I have tried ask #@object#" about forest

However I must be misunderstanding actions, I thought actions were commands you could perform on objects OR actions were calls that came from commands (including custom commands), which when recognised to be part of an object, were then activated.

If this isn't the case can someone put me out of my misery heh ;)

Anonymous
08 Jan 2005, 19:00
sorry for spam but i wasn't activating the action command of an object.

ask #@nameobj# about #topic#

was what I required :)

To update the question's i'm struggling with is how to assign an option
for an item to start off in an NPC's inventory and what this involves.

To assign a body part I believe will be simple and require a variable for each NPC part property, i have worked that much out.

Also I am struggling slightly locking a coversation. What I mean is reseting an active conversation so I don't end up with two tree's running at once. I was going to base this on a check every time the player moves, that would involve custom commands for movement, reseting the conversation variable if the player typed one. However this is hamfisted and not really the best solution.

This is too ensure I don't have two npc's in the same room waiting for 1,2,3 etc to be typed in.

Suggestions welcome :)

Anonymous
08 Jan 2005, 19:11
sigh just call me spammer of the year :)
I solved the conversation question, just reset the conversation variable every time the player types the global command....

Always the little things.

davidw
08 Jan 2005, 21:49
It might help if you logged in. Seeing five people called Guest posting in a thread is a bit confusing to say the least.

Sphinx
08 Jan 2005, 22:03
Ah apologies i've been spending far too many hours today learning the code :) I'm a little excited when I get hold of a new language heh.

The stage i'm at currently:

I have a Conversation menu system worked out - using objects as nodes to hold complex responses. That is to stop any single object being overloaded and error's creeping in. I found this a few times with complicated IF statments, while using QDK

1 - 5 optioned variables to hold in game menu's. These use global commands to store answers to the menu questions

I'm still stuck with NPC's and their inventory, so any help would be appreciated. At this stage I am assuming I need a room assigned to each npc and each body part I want addressed, on each character, needs a variable. A simpler method would be preferable.

I have timers set for daylight, night-time stuff. That was nice and easy. I am working on NPC paths and movement tomorrow, so that should be fun.
The particular piece i'm working on, is heavily character driven, hence all the work on AI and the NPC's.

Any suggestions or hints would be welcome, especially on NPC inventories, Thank you.

paul_one
09 Jan 2005, 00:10
Look into object properties...
You can also create an array to save name-space.

Only have a room for a character - and have variables listing what is held in each body part...

Sphinx
10 Jan 2005, 20:48
Thank you for the help :)

I've continued this here:

http://www.axeuk.com/phpBB2/viewtopic.php?t=626

Hopefully putting the questions in a more cohesive format.

007bond
11 Jan 2005, 00:57
I wouldn't call you spammer of the year. I'd just call you a person who wants to learn, and I encourage that.

By the way, I like your new avatar CW.

paul_one
11 Jan 2005, 09:22
Good - the avatar took me ages to do.... in the end I had to use MSpaint to copy an alpha layer over and use that.
Bloody thing... Worth it though!