|
|
|||||||
| Old Skool Monsta Toolz OSMT and the OSM Adventure gametype. Monsters and Puzzles and Traps! Oh, my! |
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
#1 |
|
Registered Monkey
|
Monster AI Problems & Solutions
This thead is meant elaborate on specific problems or situations with respect to Monster AI, general OSMT tool use or implementing the OSM Adventure gametype.
Got a cool idea for monster behavior, but can't get the toolset to do your bidding? PM me with your situation and I'll help by posting it here (if applicable) so that everyone can benefit from seeing the solution we come up with. Some overall tips: - Keep it simple: Don't expect the creatures to play cricket or baseball (although that does sound like a fun challenge). Start with a design that will work in service of the story, then modify that design to what you know works, and finally ask questions and try new things to see how close you can get to the original behavior design. - BotPath your map: Monster AI is no more intelligent about navigating your custom map than bots are. They use the same path network to know how to move around, so path your map. You can temporarily set an OSM map to DM for testing the path network with bots before beginning to place monsters. - Check the Log file: When trying to figure out why a setup isn't working, or when trying to make sure everything is working properly, I will first look at the Log file after playing the map. In your UT2004/System directory there is a text file called, "UT2004.txt". This file records all the Logs (the comments, warnings and errors) the game encountered while the map was run. After getting used to what a normal (properly working map) Log file looks like, it is often very easy to see what went wrong after taking a quick look at this file. - Spelling counts: The Orders property (among others) are string variables that will accept only correctly spelled string values. If your Patroling creature isn't patroling, make sure it isn't trying to "partoling", make sure your Guarding creature isn't trying to "gaurding"., etc. - Know the tools: There is a lot available in this toolset. Most of it is mimicing the tools available in old UT99. That means there's plenty of documentation available to you, through the wiki, the toolset Manual, the old skool Creature Care document, etc. By browsing the documentation on these tools periodically, you'll find different ways to get things done and get ideas for new behaviors you hadn't thought of. - Use the right creature for the job: There's a variety of monsters available in this toolset to get you started: some weak, some very strong, some mobile, some smart, etc. Consider the individual states and behaviors available from these monsters as well; some have interesting "hobbies". If all else fails, consider designing your own creature. It may take modeling, animation and skinning, but the "coding" is nearly done for you with this toolset. The ScriptedMonster class (along with functions used by the available creatures) is ready to "plug in" your custom character, if desired. - Look at other maps for ideas: Other mappers have likely needed to do the same things you're trying to do. If you see some AI setup you like, reverse-engineer it, or just rip it out and place it in your map. If you have the ability to check out old UT99 maps with ScriptedPawn creatures, do so. (see also OSM-Guide) For reference and quick start, see: - Old Skool Monsta Toolz (Information base on the UnrealWiki) - Basic ScriptedPawn Tutorial - Monster Manual Notes thread and the old skool doc, - Unreal Creature Care and Feeding Guide, by Steven Polge Table of Contents: Guidelines for Mapping: Establishing the Creature's Natural Habitat Trigger System Troubleshooting Reviewing the Available Animations for Old Skool Creatures General OSMT Use: AlarmPoints Triggering Monsters Guarding & Ambushing Orders Making a Creature "Sound the Alarm" Monsters Activating Triggers Triggering Creatures to Attack or Patrol Creatures set to AttitudeToPlayer ATTITUDE_Follow Use of the PlayerAloneTrigger Problems Seeing All the OSMT Actors Listing on the Component List Followers, Teams and Monster Teams OSM Adventure Configuring: OSM Adventure Match TimeLimits and Per Objective TimeLimits Handling Creatures During Multiple CutScenes and In Game OSM Adventure Default Equipment and Additional Equipment PlayerPawn Script Control Advanced use of OSMT: Forcing Creatures to Fight Each Other Managing Waves of Creatures Advanced OSMT Setup For Mappers and Modders If you have a problem that isn't solved here and, more importantly, isn't solved by reviewing all the available documentation I've provided, please PM me and I will help. If the problem you pose is new or warrants posting for all to see and get help with, I will post the problem and solution on this thread myself. Thank you.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 07-04-2007 at 10:23 AM. |
|
|
|
|
|
#2 | |
|
Registered Monkey
|
Quote:
ScriptedMonsters have an Orders -> AlarmTag property that is very powerful, according to the original AI docs written by Steven Polge. Alarms allow for very complex AI designs and realistic behavior. Essentially, the creature is given an AlarmTag to match the Tag of the AlarmPoint (or the first AlarmPoint in a series). As soon as the creature first detects a player enemy, instead of attacking (or greeting, if a very friendly creature), they will go to their AlarmPoint and perform behavior as described by that AlarmPoint. One of the settings on AlarmPoint is to send the creature on to the NextAlarmPoint, so this can be a series of locations, behaviors, etc. (even a never-ending loop) Once the creature has completed its behavior, it will continue on from there, most likely to Attack the player it saw. Also, since this is separate from the Orders property, these behaviors can be designed along with standard Orders such as Patroling, Ambushing, etc. There are many properties on the AlarmPoint NavPoint actor that define the Alarm behavior, including AlarmAnim, AlarmSound, PauseTime, etc. (see also AlarmPoint on the wiki and the Creature Care doc also goes into extensive detail about this actor) Triggering Monsters: By matching the Tag of a creature with the Event of some Trigger System, the creature will immediately consider the Instigator of the trigger their Enemy when it is fired. The Instigator is a "who fired me", property that Triggers keep track of, and try to pass on as one trigger fires another. For example: A Mover lift is set to StandOpenTimed. It has an OpenedEvent that fires a normal Trigger. That Trigger has an Event matches the Tag of a creature nearby. When the player stands on the lift, the Mover moves to the Open position and fires the OpenedEvent, this triggers the Trigger, which triggers the creature. The Mover tells the Trigger, "the player fired me", and the Trigger tells the creature, "the player fired me too", so now the creature knows to make the player their Enemy. (NOTE: This is just an example showing how the Instigator is passed between a chain of triggers in a Trigger System, there's no real need here to have the Mover fire a Trigger before firing the creature.) So creatures may be anywhere in the map, not even within LineOfSight, SightRadius or earshot of the player, but the creature will still immediately consider the player their Enemy when the creature is triggered by the player. By placing the trigger somewhere in the player's path, it's as if the creature is alerted to their presence by a security system, for example. Guarding Orders: "Guarding" is an Order that is used to have the creature stay put and watch an item, attacking any player they see or that touches it. It is the easiest Order to set up; just place your creature and set the Order to "Guarding". Additionally, you can set the OrderTag to match the Tag of the object the creature is guarding. The creature will automatically spawn a GuardPoint at it's placed location during map initialization, so that it can find it's "guard post" later. It will attack any Enemy that is sees, it will also become triggered if the object it is guarding is touched. (theoretically) After combat, if the creature survives, it will return to the initially placed location and resume Guarding. Ambushing Orders: "Ambushing" is an Order that is used to get the creature to stay at one spot and lie in wait for an Enemy. The ambush location and facing direction is defined by placing AmbushPoints. If the Orders -> OrderTag property on the creature matches the Tag of the AmbushPoint, that spot is one possible place for the creature to ambush from. A creature set to Ambushing can be associated with as many AmbushPoints as you like; one will be picked randomly. After the creature has attacked a player, if it survives, it will return to an Ambushing state, randomly pick another AmbushPoint and travel to it to lie in wait again (so make sure these AmbushPoint are all reachable). AmbushPoints have some properties that define how the creature will act while ambushing. (see also AmbushPoint) So these are a couple good ways to have creatures sit and wait for the player, either in one spot or in any one of a number of spots, randomly picked. Really old skool DOOM monsters worked exactly like a Guarding creature or an Ambushing creature with one AmbushPoint.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 10-22-2006 at 04:14 PM. |
|
|
|
|
|
|
#3 | |
|
Registered Monkey
|
OSM Adventure Match TimeLimits and Per Objective TimeLimits:
Quote:
OSMObjectiveManager handles per Objective Timelimits by entering the limit in the Objectives slot you wish to have a Timelimit. Mappers may time each Objective to make the entire map "timed". If intermediate Objective cutscenes are used, per Objective TimeLimits start after the cutscene and ends before the next cutscene starts.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 10-22-2006 at 03:58 PM. |
|
|
|
|
|
|
#4 |
|
Registered Monkey
|
Making a Creature "Sound the Alarm":
In Lord_Simeon's latest installment of Wangara2, he has a Krall set with an AlarmTag to run away when the Player is encountered. It runs around the corner. When the Player follows, they see a series of Brutes waiting behind cover to attack the Player. To get this Krall to "Sound the Alarm" and make the Brutes aware of the Player's presence uses two concepts outlined above, AlarmPoint and Triggering Monsters, in a fairly simple Trigger System. The Krall will follow it's Alarm behavior when encountering the Player; in this case, running around the corner. To get the Krall to alert the Brutes to the Player's presence, put a Trigger at the Krall's AlarmPoint, so that the Krall will fire the Trigger's Event when he has reached it. This Trigger will be used to turn on another Trigger, one whose Collision Cylinder covers the area the Player will walk into while following the Krall around the corner. Now, by matching the Event of that second Trigger to the Tags of the Brutes, the Player will at that point be causing the Brutes to be aware and attack them. Now, the Krall is able (if they "escape" the Player) to alert the Brutes and make sure they are ready to attack the Player when they round the corner. Summary: - Krall -> AlarmTag matches AlarmPoint -> Tag. - Trigger -> Event at AlarmPoint matches Tag of second Trigger covering the Player area. - Second Trigger is set to Object -> InitialState -> OtherTriggerTurnsOn and Trigger -> bInitiallyActive = False. - Second Trigger's Event matches the Brutes -> Tag, so that the Player will trigger the creatures and cause them to be aware and attack the Player.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 03-10-2008 at 09:49 PM. Reason: spelling correctly is fun! |
|
|
|
|
|
#5 |
|
Registered Monkey
|
Establishing the Creature's Natural Habitat:
When implementing Monsters and NPCs, the mapper should think about how they fit into the environment they enhabit. The Player will experience both the environment (the map) and the creatures at the same time, so they end up complimenting each other. If the creatures feel tacked on, thrown in or otherwise disjointed from the setting, the Player will notice, taking away from the immersion of the experience and detracting from the believability of both. To help weave the monsters and their behavior with the environment the map supplies, think about how these creatures go about their daily lives when the Player isn't there and spice up their AI by showing that to the Player in key places. Several Monsters have individual behaviors that can help. Krall have dice games that they like to play, gathered in tight circles. Pupae have a special "Feeding" Order that shows them munching on a carcass or gib. Some creatures suggest behavior just by their appearance and description. The NaliCow is a herd animal and suggests flocking behavior in a grassland or pen. Flies are insects that suggest they make up a hive and perform bee-like activity, traveling from flower to flower, or perhaps dragonfly-like activity, traveling along a swamp's surface. All Monsters have the ability to be sent on basic Orders, like Patroling or Ambushing. The design you give individual monsters or groups can help lend believability to their existence in the map. For example, Skaarj are intelligent and Players will expect they have tasks to perform and a reason to be in the space they're in. A group of Skaarj encountered in an area can be set up to show the Player their advanced tactics and social structure. Two may be set to guard the entrance to the area. A few more may be busy chatting in a tight group. Another may be working a control panel. Perhaps another walks between those groups, checking in, giving "orders". One may obviously be the Leader, perhaps he's a different Skaarj class, like SkaarjLord, and may have a commanding view of the group. This sets up a scene the Player will encounter that merges the creatures with the environment they're found in. Lesser intelligent creatures can still be organized by the mapper to appear in a more natural and believable conduct. Using Patroling Orders, Pupae and Flies can be huddled together in groups, where they move within a tight, warm space, while Mantas can be spread apart solo in open, airy places, as if controlling their own wider territory. Perhaps some of the pack or herd creatures have sentries, individuals who are on guard and protect the group. Think about how the different AI options available (Orders, AttitudeToPlayer, AlarmTag, etc) can be combined to create behavior that is unique to the purpose or desires of the creatures within their environment. A group of Krall set to guard an area may already know how they will defend against enemies. The Krall can be set so that some stand Guard, while others Patrol, but when a Player is encountered, they sound an alarm and assume a defensive formation, taking cover or high ground, perhaps using some of their group as bait to lure the enemy in further. Maybe they are ready to spring a trap for the enemy or they send one off to another area to bring in reenforcements. All this behavior (and plenty more) is possible by using combonations of the AI tools you have available. By thinking about how the creatures can compliment the environment the map provides, and vice versa, the Player will get more enjoyment out of both.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 06-16-2006 at 12:53 PM. |
|
|
|
|
|
#6 | |
|
Registered Monkey
|
Monsters Activating Triggers:
Quote:
To fix, you can try a couple things. If it is a Trigger subclass, you can try setting the Trigger to TT_HumanProximity. Alternately, I added an ExclusionTrigger to the toolset. This allows mappers to specify a class that the Trigger *doesn't* consider valid. So, while a Normal trigger, even ones set to PlayerProximity will be triggered by both Players and Monsters, the ExclusionTrigger can be set to Trigger -> ExclusionClass = 'Monster' to ignore Monsters and solve the problem.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 10-22-2006 at 03:47 PM. |
|
|
|
|
|
|
#7 | |
|
Registered Monkey
|
Triggering Creatures to Attack or Patrol:
Quote:
Alternately, you can have a creature waiting to patrol. So when they are triggered, they begin a patrol path, like a search. (Set Orders "Patroling", bDelayedPatrol true, then trigger as normal) This will not let on to the Player's presence until the Player is seen, they will simply begin the patrol path. Before the trigger, they will simply wait in place. An alarm point is strictly for when the creature is first alerted to a Player's presence. It can be used to lead the creature to a place to see the Player and then wait, but to do it, the Player must already have triggered the creature and alerted them. But, if you already have a creature in place, performing other Orders or having a different AlarmTag and you need to change those Orders in-game, perhaps this is a good occassion to test the ScriptedAction ACTION_SetOrders. This might not be the ideal solution, but I thought I should bring it up.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 10-22-2006 at 03:48 PM. |
|
|
|
|
|
|
#8 | ||
|
Registered Monkey
|
Creatures set to AttitudeToPlayer ATTITUDE_Follow:
Quote:
PlayerAloneTrigger: Quote:
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 10-22-2006 at 04:08 PM. |
||
|
|
|
|
|
#9 |
|
beep...beep....beep...
|
Thanks, that clears things up a bit.
I can get them to follow me to the drain, but that's the only one they will follow too. I have a variable amount set up waiting in each sub level now which works well. Also, i got the intro anims to work....i had the AI script set up to trigger right at the end of the matinee.....d'oh. Disable this script worked well too, that was the ticket ![]() Play alone trigger might be the way to go for the final battle, it's a mish mash of creatures scattered over the bathroom, all will be set to a counter / objective completed actor. I'm still having trouble spawning the damn things from the creature factory though, i ask for 5, it gives me one......groan..... I'm nearly at a stage where i can send you the latest version, so could you check that out for me please? I just can't get my head around the factories..... ![]()
__________________
|
|
|
|
|
|
#10 | |
|
Registered Monkey
|
Forcing Creatures to Fight Each Other:
Update: As of OSMT v1.4, this is easier to do, using the ScriptedAction ACTION_SetEnemy in any ScriptedTrigger or ScriptedSequence. By specifying the creature's Tag and the Tag of the enemy, this simplifies the process. But here is the method I used in OSM-Guide by contratst. Quote:
The trick is to make them hate each other. The way I did so was to provoke one side to fight, by forcing the other side to fire (using Firing animations) in their direction. Immediately after that I make them fire, I "Monsterize" that side, so they're ready to be equally provoked when the first side retaliates. Make sense? You can look at the ScriptedSequences I use for the Skaarj in OSM-Guide and see how I did it. Creatures freezing sounds like they're using "Scripting" Orders, where the Script isn't telling them to do anything and their ScriptedMonster -> StartingAnim property isn't set to anything. Or it's possible the script is either broken (stopped) or is waiting for an Event or some other latent action step. (If you "ghost" in OSM-Guide to the first battle between the Skaarj and Krall, you'll see the Krall waiting "frozen" until the battle Event is fired)
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 07-04-2007 at 10:34 AM. |
|
|
|
|
|
|
#11 | |
|
Registered Monkey
|
Handling Creatures During Multiple CutScenes and In Game:
Quote:
While ChangeScript should be able to do what you'd like, I think this could be done a few different ways. One way would be to use multiple Boss meshes, one for each sequence. Each mesh's script waiting for an Event to tell it, "okay, you're on". Then it teleports in using ACTION_TeleportToPoint and plays for the cutscene. You could have different bosses for each cutscene or have one boss mesh for cutscenes and one for normal play, etc. You could certainly have all the boss' actions on one script. Although it would be one large, unweildy script, I doubt you'd run into a script size limit. A ScriptedAction in OSMT called ACTION_PossessPawn is available which will do something close to ChangeScript. It might actually be more reliable. It simply takes the Tag of the Pawn in question and grabs control of it. Meant as the antethesis of Monsterize. You can see an example of PossessPawn and Monsterize in action by looking at the "Torturer Skaarj" ScriptedSequence in OSM-Guide.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 10-22-2006 at 03:56 PM. |
|
|
|
|
|
|
#12 | |
|
Registered Monkey
|
OSM Adventure Default Equipment and Additional Equipment:
Quote:
(OSMT v1.1 or later): The OSMObjectiveManager also includes a per Objective AdditionalEquiptment array, which works exactly like DefaultEquipment, but adds weapons on top of the default ones.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
|
|
|
|
|
|
|
#13 |
|
┌┬┴┴┬──┼┼
|
I'd like to add a small hint with the DefaultEquipment fields.
Yes, you use XWeapon.LinkGunPickup for allowing the players to pick up weapons, but when they're allocated to the players inventory, you need to drop Pickup from the end. (Yep, thats what I did at first!) |
|
|
|
|
|
#14 |
|
Registered Monkey
|
You are describing two separate classes: one is a Pickup class, the other is a Weapon class. In this DefaultEquiptment string array, you want to give the full name of the Weapon class.
![]() This is as opposed to a ScriptedMonster's GoodieDrop array, where you select from a list of Pickup classes.
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
|
|
|
|
|
|
#15 | ||
|
Registered Monkey
|
PlayerPawn Script Control:
Quote:
Once that is set up, you can simply use ScriptedActions to control the PlayerPawn. Many ScriptedActions work just as you'd expect, like ACTION_Walk, ACTION_Run, ACTION_Crouch, ACTION_Jump, ACTION_SetViewTarget and ACTION_MoveToPoint. These last two are crucial for making the player move around to places during your cutscenes, but it's important to consider the other actions I list there. A player could be in mid-crouch or mid-jump when the cutscene starts, so depending on the length of cutscene and the way it's triggered, the mapper should take steps to make sure the correct movement / behavior will take place. For example, make sure you give the player enough time to get to a MoveToPoint destination by forcing them to RUN, then move. Also, keep in mind of which ScriptedActions are latent and which are immediate. Latent actions in a script will pause until the ScriptedAction is complete. For example, ACTION_MoveToPoint is a latent action and the script will pause until the Pawn actually reaches the point in question. On the other hand, ACTION_SetViewTarget is not a latent action and the script will simply set the Pawn's ViewTarget and move on to the next step, letting the Pawn rotate to the ViewTarget on it's own. Many other ScriptedActions are available to use through Pawns via ScriptedSequence. Try them out. Note that many Actions will require a Pawn, as opposed to being able to be used by a ScriptedTrigger. For example, ACTION_PlayAnim obviously needs a Pawn to play the animation. One last thing to remember about ACTION_MoveToPoint. Like all other aspects of Pawn navigation (vehicle, monster, bot, etc.) the map needs to be properly pathed for this to work. If a Pawn is told to travel to a point and the bot path network does not support it, the Pawn will simply stop. In the case of a Pawn controlled by a ScriptedSequence, this breaks the script. Trigger System Troubleshooting: Quote:
To really nail this problem, we'll have to look at the Trigger System from start to finish, taking each step (each element) one-by-one and making sure (by testing it) that it's doing what it should be doing. See also, the Trigger Systems page on the wiki; specifically the Testing / Debugging Methods section. (outpt.co.uk, if you PM me with the details, we can work it out and I can complete this section of this post.)
__________________
- SuperApe ![]() -= Unreal Geek =-= Flash Padawan =-= Animation Refugee =-
Last edited by SuperApe; 11-05-2006 at 07:06 PM. |
||
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|