Scripting combined with Strategic AI

Started by
6 comments, last by Nazrix 23 years ago
[rhetorical question used to vent frustration]
(don't you just love it when you spend a half-hour typing something only to have IE screw you over and you have to type the whole thing again?)
[/rhetorical question used to vent frustration] I mentioned this in another thread but decided to post a seperate thread on it. I'm thinking of the uses of combing a more scripted approach (specifically Dwarfsoft's trigger/event system) of creating situations with Wav's strategy approach. A trigger/event system changes whatever game elements the developers want then the NPCs use their AI and a strategical approach to attain whatever goal the trigger/event system has set in motion. For instance, a particular trigger is set up to cause an event that causes an NPC to perform a certain task. Then that NPC uses whatever means he/she wants to attain that task. That's where the strategy side comes in. NPCs will use their attributes to reach their goals that the event gives them. Different NPCs will have different strengths/weaknesses and attributes about their character (i.e. lawful, moral, honest, etc). Perhaps, events could be atttatched to various different NPCs each time a brand new game would be created allowing different NPCs to carry out an event. Different NPCs would carry out an event differently (assuming NPCs would have various attributes such as honest/dishonest, etc. as explained above). What I think this will offer is the detail and custom situations of script and the dynamic feeling of randomization. I think it could also help to reduce repetition. The trigger/event system allows for fairly controlled events (which will then be more detailed), but how that event plays out will be more dynamic. So, the trigger/event system basically sets up or initializes the situation, and the NPCs determine the rest. Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers Edited by - Nazrix on March 21, 2001 2:48:14 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Advertisement
This sounds sound.

A couple of things occurred to me, though.

Why do the strategy rules not encompass the problem you''re thinking about solving. Is it a case of being too complex? What I mean is that, if we''re strictly talking about "what action should the NPC perform," then do you see situations that don''t fit easily into the strategy rules? Or are you wanting more authorial control?

I can see using a script if you want to guarantee that something ALWAYS happens. But the problem with the dynamic state that could arise from the result of random NPCs interacting (especially if you do the strategy plot thing) is that you might trigger events that don''t apply to the situation.

Here''s a sample of what I mean: Say you ALWAYS want the King to declare war against the Goblin Frontier when the player brings back evidence of the Princess''s kidnapping. If this is a script, then when the player tells the king it triggers the war (or whatever).

But, what if the player violates the script? Say he never tells theking. Or rescues and returns the Princess. Without a dynamic system, you may well have an event waiting that doesn''t consider with the state of the world. I think one reason they''re so inflexible is BECAUSE there are too many factors for them to consider.

That may not be a problem in this example, but I get the sense that if you mix the methods then you need to take care to avoid incongruent situations. A good place to use events might be ONLY at initialization, when you know your event will occur when things are relatively static.

Hmmm... did that make ANY sense?

--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
I see what you're saying, Wav. The reason for using something like this is not necessarily authoritive control unto itself, but more to avoid the repeitious factor that can occur with a purely dynamic system.

For instance, in that post of yours, Wav, you listed the actions NPCs could perform on different game objects. No matter how many higher-level variables you can put on those actions, eventually it's going to feel kind of repetitous.

Let's say for a moment the goal is not to create an infinite universe with infinite situations, but to create a more consise, detailed world that is also dynamic giving decent replayability and interactivity.

I am, indeed, thinking events are only used for initialization of events. It would be tricky to balance how much control you want and how much you want to leave to the dynamic AI.

Furthermore, I'm thinking triggers would be based on more isolated situations

I don't know why, but I don't mind things being isolated. You know in PnP games where you'd have adventures that were in many ways isolated and unrelated? well, maybe it was just my DM that was like that

I don't think there has to be a story that spans the entire game to draw the player in if the individual stories are highly interactive and dynamic. I know someone's going to ask, how do you end a game that is made up of unrelated stories. Well, let us worry about that part later
.


The advantage of this is that the event could initialize NPC actions and give them very specific instructions that could be as detailed and customized as the designer wants, but how the rest of the event plays out is up to the NPC.



Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers




Edited by - Nazrix on March 21, 2001 4:53:51 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
The thing about triggers that I forgot to mention is that I''m thinking that triggers won''t be based upon previous events. They''ll be more isolated. They''d probably be almost as random as the NPC''s reactions and AI.

I don''t see why I can''t make a game of isolated events. Many games get to have little to no story, why must mine have a connected one throughout the whole game? If nothing else this system could be used for the game''s "side-quests".

The point would be that the event (effect) would be more interesting (and more detailed) than the trigger (cause).

Does this mean that the player will feel s/he has little influence on the game? I don''t think so, because when the NPC''s AI takes over it will react to outside stimuli (including player''s actions) as well as internal attributes (stuff like honesty, greed, selflessness, etc.).




Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Well how about a slightly different approach:

Every person in your world has his/her own set of properties, you'll definetly have several moralic attitudes (good/evil...), needs (food, drinking, money, communication) and maybe also emotions (Player killed my brother, so I don't like him...).

Every person gets initial values and is placed in the world. You should also consider several skills, a person can have or learn, resulting in a unique set of interactions with the world that will be chooseable for the AI.

So let's look at an example, you have a man, he wandered around quite a while and is thirsty, so the need for drinking is rather high, so the priority for getting something to drink will be high. (You could maybe build some kind of lottery that chooses the action so our NPC may not always go immediatly for water if he's thirsty)
So now the AI could search the NPCs (preprogrammed?) memory for a wellspring, a bar or something else. If he doesen't know one or it is too far away he could , perhaps search surroundings for one or ask another NPC or generate a Quest for the Player (if he is in range).
Depending on the moralic attitude of a NPC he could raid a peasant for water or ask him for some, you see there are nearly endless possibilities!

You could also implement a master AI that supervises every activity of the sub AIs and redirects them to some fixed or dynamic points in the world (meet/help the player). The master AI would then also handle your script.

So you should structure your AI like that:
.................................................................
...........................MASTER AI<---------->SCRIPT...........
................................|................................
...|--->ENVIRONMENT.............|................................
...|.........|..................|................................
...|.........|..................|................................
...----->PARAMETERS------>ACTION-SELECTER-----------.............
...|.........|.....................................|.............
...|---->NPCs/Player(s).....-ACTIONS<--------EXECUTING AIs.......
...|........................|...............(path finding,.......
...------RESULTS of ACTIONS<-................search memory...)...
.........(did the vendor catch you?).............................
.................................................................

I hope you are able to understand this confuse flash of genius that was immediatly cut back by my humble english!

Edited by - Vaporisator on March 21, 2001 5:43:46 PM
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!
Vaporisator,
Yes, nice ideas, although that''s sort of like what Wavinator has spoken of before.

The thing is that I fear it could be too repetitive from lack of human intervention. If we, designers, were to have some initial intervention we could make things more detailed and less "cookie-cutter"-like (is that a word?).

It could initally be very detailed as to how the quest/event/adventure/whatever starts, then the NPCs take it from there.


Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Naz, I get what you''re saying. Maybe this relates to what bishop_pass was talking about with templates?

Imagine having a game world where you could continuously spawn interesting situations based on placement and initial AI behavior. Rather than trying to develop an AI and rules system that has the Goblin Fringe kidnap the King''s daughter (and all the AI cycles it takes to get to that point), you simply trigger a Kidnapping template involving the King, his daughter, and the Goblins. This could probably more cleanly take care of initial setup (putting people where they should be, etc.). And you could be guaranteed some unique and interesting situations. From there, then the AI figures stuff out.

What this amounts to (and I VERY much see the need for) are situations that might otherwise not occur, or that the player might avoid. This is one reason why strategy game missions are so great, even if they are sometimes frustratingly linear.

I still hold out hope that a higher level system of interactions could beget these lower-level actions naturally, but it would be wrong for me to say this will work when I''m not even finished with the high level yet. At the end of the day, missions /quests / situations often really break down to "find X", "rescue Y," "kill z" etc., etc., in combinations, with different resources, enemies, and challenges in the mix. This is why I think the interaction of strategic actions at a high level would be sufficient, but I won''t know for sure for a couple of months.



--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
Yes, I suppose this would be like strategy game's missions because it initializes an event. I never thought of it that way

I agree that all the higher level stuff ends up breaking down to very simple actions. By initializing stuff, I think it could still be quite interesting and random, but you also get a little more control.

Well, I guess it all comes down to how much control you want, but I guess it was worth bringing up.


Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers


Edited by - Nazrix on March 22, 2001 9:04:53 AM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi

This topic is closed to new replies.

Advertisement