Ambient with Combat Behavior Explanation of Variables
View Single Post
Join Date: Dec 2007
12-05-2010, 05:45 AM
Originally Posted by
Alright, I'll try to break it down a little more, as I understand it (I could be off as well).
Straightforward, this is what they'll say when they start fighting something.
NPCs are programmed to randomly select from a list of actions they can perform at certain intervals. Let's say you've got Wander and Idle set on an NPC. They're standing at Idle, and the Duration you've set determines how long they're just going to stand around (I'm not sure what the unit of measurement is, but I'd guess seconds). Once that Duration runs out, the NPC goes back to the list of available actions and randomly chooses another one. So if they choose Wander this time, they'll move around.
In terms of Weight, you're essentially setting the priority of that given action, and increasing the odds it'll be selected each time. So an NPC with a Wander Weight of 20 and an Idle Weight of 1 means they're almost always going to choose to Wander, and once in a while they'll stand around. If the Weight values for all actions are the same, then it's an even chance any of them will be picked.
Also straightforward. The Idle animation can be almost anything you want, so that gives you a good variety of actions and traits you can display (and make it extremely handy for Demo Recordings
The NPC, if they choose the Chat action from the list of possible actions, will say something you designate. If you have them set to basically only Chat, then they'll say the phrase pretty much constantly. If you want an NPC to just stand around and occasionally say something, then set the Idle Weight for a higher value than Chat (obviously, the higher you set it, the less frequently they'll say the phrase).
Essentially, every time the Wander option gets chosen, the NPC creates a random path for itself to walk along. Again, Weight affects how often this happens. When they reach each path node, they'll pause for a moment (how long they wait can be changed with Wander Idle). If they've reached the end of the path they've created, they'll go back to the list of actions. Otherwise, they'll go to the next node (so the more nodes, the longer and farther they'll wander around). Wander Distance, you can pretty much think of like an electric collar. The spawn point is the grey circle the NPCs are arranged around when you first create their groups, so the Wander Distance is a radius around that which determines how far away from that point they can wander.
If my assumption is correct, this is mostly an ambiance thing. Basically it allows NPCs to walk around and interact with various objects (such as a Starfleet officer walking up to a console and pushing buttons for a moment). However, since it only works with Cryptic-designated objects, and there's as yet no list of what these objects are, it's a bit hard to figure out what'll make it work. :p
Thanks Allerka. This is really helpful. My only problem is that none of it seems to work. Have you tested this with groups of npcs? Is there a specific group? Do you have to publish the mission before seeing the results, or can you play around with it in map previews?