How does one build npc in a virtual petsite?

Boltgreywing

Senior Member
I am quite curious as to how one builds an npc in a virtual petsite?

Does it require certain parameters to be filled out?

How does it know when it should appear and disappear?

How does approve or disprove an npc loan?

@Nate.Tube: Mentioned that one could use an npc to help out the bank scenario.

How advanced can an npc get?

Would the variables for the npc involving the lone fit into these categories:

Pays late, pays early, pays on time, never pays lone back, points in npc pouch, npcs income per minute and many more.

Would the npcs setting be better based in hex, binary, string or integers?

Any advice guys?

 
You don't have to actually have an NPC as far as the code goes. Simply have the illusion to the user that an interactive NPC. 

Im at work at the moment, but I'll put up more detail once I get home. 

 
Disclaimer: Sorry for the double post. I want to trigger a new notification for @Boltgreywing

So my answers in green:

I am quite curious as to how one builds an npc in a virtual petsite?
It isnt a case of "building" an NPC. All you need to do is the give the user the impression that an NPC actually exists. You could display an NPC image with text underneath. For the user this then looks like an NPC. 

Does it require certain parameters to be filled out?
It totally comes down to what you want it to do.

How does it know when it should appear and disappear?
Depends on your context and how to plan to use it?

How does approve or disprove an npc loan?
This is specific to the other thread, but refer to my first point - doesnt have to actually exist.

@Nate.Tube: Mentioned that one could use an npc to help out the bank scenario.
As above.

How advanced can an npc get?
As advanced as you want to code it.

Would the variables for the npc involving the lone fit into these categories:

Pays late, pays early, pays on time, never pays lone back, points in npc pouch, npcs income per minute and many more.
Again, this would be unique to the specific feature you were coding.

Would the npcs setting be better based in hex, binary, string or integers?
As above.

Any advice guys?
Hope this helps?
 
NPCs are are just non-playable characters, that's what it means. As far as what they are, their purpose, what they can do, the extent of their code, etc., it's all up in the air. There isn't really a standard.

 
Yup, as the others said, the NPC is just an image or set of images of a non-playable character but all the action is based on what you do with the code. I don't know much about code, but I think the others put all that out there for you.

I have npcs for several things. They are nice to have so that way you sorta have a face to your bank or market, or even just a face to a quest giver. It's more fun and feels more interactive instead of just receiving text as a player. Players like visuals more than just reading text.

 
Here are my takes on the questions for @Boltgreywing:
 

I am quite curious as to how one builds an npc in a virtual petsite?
A NPC is basically a scripted "character". They don't really exist as anything other then a placeholder for a real player to interact with. They are not actual players in the game. In the case of a pet site, their logic is usually very simple and they do very mundane things.

Does it require certain parameters to be filled out?
As @Nate, depends on the purpose of the NPC.

How does it know when it should appear and disappear?
Depends on the purpose of the NPC. In some cases, they may always be available to the player. In other cases, they may be setup to be available by time periods, randomly, or by other events. You decide how they appear through your games logic.
 

How does approve or disprove an npc loan?
I will provide a usage scenario or a NPC asking for a loan in the bank thread.


 
Disclaimer: Sorry for the double post. I want to trigger a new notification for @Boltgreywing

So my answers in green:

I am quite curious as to how one builds an npc in a virtual petsite?
It isnt a case of "building" an NPC. All you need to do is the give the user the impression that an NPC actually exists. You could display an NPC image with text underneath. For the user this then looks like an NPC. 

Does it require certain parameters to be filled out?
It totally comes down to what you want it to do.

How does it know when it should appear and disappear?
Depends on your context and how to plan to use it?

How does approve or disprove an npc loan?
This is specific to the other thread, but refer to my first point - doesnt have to actually exist.

@Nate.Tube: Mentioned that one could use an npc to help out the bank scenario.
As above.

How advanced can an npc get?
As advanced as you want to code it.

Would the variables for the npc involving the lone fit into these categories:

Pays late, pays early, pays on time, never pays lone back, points in npc pouch, npcs income per minute and many more.
Again, this would be unique to the specific feature you were coding.

Would the npcs setting be better based in hex, binary, string or integers?
As above.

Any advice guys?
Hope this helps?
@Nate: How do I display an npc on a page?

NPCs are are just non-playable characters, that's what it means. As far as what they are, their purpose, what they can do, the extent of their code, etc., it's all up in the air. There isn't really a standard.
@kami: That is probably one of the issues that makes it kind of hard.

Yup, as the others said, the NPC is just an image or set of images of a non-playable character but all the action is based on what you do with the code. I don't know much about code, but I think the others put all that out there for you.

I have npcs for several things. They are nice to have so that way you sorta have a face to your bank or market, or even just a face to a quest giver. It's more fun and feels more interactive instead of just receiving text as a player. Players like visuals more than just reading text.
@Aminirus: How does one setup one for a shop?

  12 hours ago, NateTube said:
Here are my takes on the questions for @Boltgreywing:
 

I am quite curious as to how one builds an npc in a virtual petsite?
A NPC is basically a scripted "character". They don't really exist as anything other then a placeholder for a real player to interact with. They are not actual players in the game. In the case of a pet site, their logic is usually very simple and they do very mundane things.


Does it require certain parameters to be filled out?
As @Nate, depends on the purpose of the NPC.

How does it know when it should appear and disappear?
Depends on the purpose of the NPC. In some cases, they may always be available to the player. In other cases, they may be setup to be available by time periods, randomly, or by other events. You decide how they appear through your games logic.
 

How does approve or disprove an npc loan?
I will provide a usage scenario or a NPC asking for a loan in the bank thread.

@Digital: I am kind of new to this npc thing as I have never used one before and my game development skills are still in its infancy though. I will check out the bank topic.


 
Well, the way I've seen an NPC set up for a shop was bit based on the type of game and type of shop. Usually they may or may not consist of multiple images, but in general you usually see an image of the shop keeper, maybe with some of their items or standing in front their shop/stall. Sometimes there is a secondary image for after the player makes a purchase and the NPC is then shown saying "thanks for stopping by" kind of thing. As for text, I've seen it done multiple ways, from a box beside the NPC to a word bubble, and sometimes clickable text for it you wanted to engage in a short conversation. These images are usually stills (as in they don't move) and are just a sort of "welcome to my shop" image.

 
Well, the way I've seen an NPC set up for a shop was bit based on the type of game and type of shop. Usually they may or may not consist of multiple images, but in general you usually see an image of the shop keeper, maybe with some of their items or standing in front their shop/stall. Sometimes there is a secondary image for after the player makes a purchase and the NPC is then shown saying "thanks for stopping by" kind of thing. As for text, I've seen it done multiple ways, from a box beside the NPC to a word bubble, and sometimes clickable text for it you wanted to engage in a short conversation. These images are usually stills (as in they don't move) and are just a sort of "welcome to my shop" image.
@Aminirus I seen a couple of those kind of things before. I think I will start with one of those first and then work upwards. Eventually I like to create smart shop keepers that actually talk. :)

Say is there a way to make a shop keeper as advanced as this?




 
Last edited by a moderator:
Of course @Boltgreywing That mainly requires animation but it's really a series of images strung together. From the looks of it, a certain animation is triggered when you visit the shop and for each option you pick on the menu. So depending on what's clicked will depend on what animation is triggered and what words show up for dialogue.

 
A fair example of a NPC in terms of a shop could be seen in Neopets. Their main shops have shopkeepers that actually haggle on prices.

As I said in the bank thread, NPCs are basically just scripted actions to stored data.

 
Of course @Boltgreywing That mainly requires animation but it's really a series of images strung together. From the looks of it, a certain animation is triggered when you visit the shop and for each option you pick on the menu. So depending on what's clicked will depend on what animation is triggered and what words show up for dialogue.
@Aminirus Dune has always been an inspiration to me. This I consider an advanced shop keeper.

A fair example of a NPC in terms of a shop could be seen in Neopets. Their main shops have shopkeepers that actually haggle on prices.

As I said in the bank thread, NPCs are basically just scripted actions to stored data.
@Digital: I really like to learn more about how they did that. :)

 
@Boltgreywing I can't tell you 100% but basically each main shop has a shopkeeper that has a normal, happy, and angry image. There are also a few different text responses, one being the greeting and few for the haggling.

The scripted event for haggling is basically just a user putting a price in that is tested to see if it fits inside a range that is okay to sell. I am assuming this range is randomized but is within a few percent under the base price. If the haggled price is outside the range, display angry shopkeeper and haggle message again. If haggle price is good, happy image and complete.

It is really just plain Boolean logic.

 
@Boltgreywing I can't tell you 100% but basically each main shop has a shopkeeper that has a normal, happy, and angry image. There are also a few different text responses, one being the greeting and few for the haggling.

The scripted event for haggling is basically just a user putting a price in that is tested to see if it fits inside a range that is okay to sell. I am assuming this range is randomized but is within a few percent under the base price. If the haggled price is outside the range, display angry shopkeeper and haggle message again. If haggle price is good, happy image and complete.

It is really just plain Boolean logic.
@Digital: So that is how it works. :) Say what about an ability where the user can actually try to rob a shop?

 
@Boltgreywing Ah, this is actually very simple, they have a mini-game that plays and allows a random successful attack or failed attack. Again, really the same concept as above.

 
Back
Top