• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Brainstorming: How to design a Hack & Slay AI

Status
Not open for further replies.
Level 3
Joined
Mar 30, 2013
Messages
22
Hey guys,

I want to create a survival-hack-and-slay crossover map. I tried some stuff with orders and regions now, but somehow the game does absolutely not feel like a hack and slay! The NPC behaviour / AI is way to stagnating and slow.

How can i make an AI / System, that makes Monsters running around in specific Areas and attacking Heroes near to them? Best they also behave in small Groups instead of Individuals.

What are your Ideas regarding Triggers, Settings and Abilitys to bring the Hack and Slay genre to WC3 ?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You mean it SHOULD be in the triggers and scripts forum.
Just a note: this thread has been moved from T&S to WEHZ.
Deathismyfriend was correct.


The enemy units should definitely have a small collision size. Setting it to 8 or lower will make them less clunky (after all, a HnS should have some flow in it).
Instead of spawning single units, you can spawn a group of units who share the attack command together (while other commands, such as spells and retreating, should be individual).
You can store all other units inside the group in a hashtable (value: other unit from the group, child: number of other unit, parent: id of picked unit).
Once a unit gets an attack-command, this can be picked up with triggers and all units stored in the hashtable can be ordered to attack that target (or attack-move to that location, if there can be multiple targets).
 
Level 3
Joined
Mar 30, 2013
Messages
22
For example, groups that are just a certain type of monster, or have little minions with them?
For example having a Vampire Lord always walking with 2 Zombies and 2 Minor Vampires, which build kind of a "pack" as known from most MMORPGS and Hack and Slays

You can store all other units inside the group in a hashtable (value: other unit from the group, child: number of other unit, parent: id of picked unit).
Once a unit gets an attack-command, this can be picked up with triggers and all units stored in the hashtable can be ordered to attack that target (or attack-move to that location, if there can be multiple targets).

That sounds pretty awesome! but...

... can that be done in GUI? I am not confident with jass tbh :/
... if i let units spawn like every 30 seconds, is there a proper way to clean the hashtable, so no leaks are left?
... if i want units to continuously walk around in an area, is there a way to give them an order once the one before was fulfilled? I cant really imagine of a leakles system, that stores and manages orders?
 
Level 9
Joined
Apr 4, 2013
Messages
373
For example having a Vampire Lord always walking with 2 Zombies and 2 Minor Vampires, which build kind of a "pack" as known from most MMORPGS and Hack and Slays

Thank you. Now I can build a sample map with the triggers for you :)

... can that be done in GUI? I am not confident with jass tbh :/

I am flawless with GUI, and I can probably do that :)

... if i let units spawn like every 30 seconds, is there a proper way to clean the hashtable, so no leaks are left?

I might do a Hashtable, but I will experiment with other ways!

... if i want units to continuously walk around in an area, is there a way to give them an order once the one before was fulfilled? I cant really imagine of a leakles system, that stores and manages orders?

I'll see what I can do.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
thanks apocalypse.

@Jesaja
sry i didnt mean to sound like i was shouting at u or anything like that.

also i do believe that what apocalypse has said can all be done in gui. doomguy seems like he is interested in doing that for u so hopefully it works good for u. u clean hashtables by cleaning the parent keys after they r done w. hashtables would also be a lot easier and they should be faster in this case
 
Status
Not open for further replies.
Top