• 🏆 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!

town maps with actual people?

adding 10-12 villagers (wander skill on) to a map like market square to make it look alive, but still feels like a ghost town, If I added more like 50, would it be better or just get in the way of your army moving down the road?
anyone tried using wandering villagers?
 

Attachments

  • XD.jpg
    XD.jpg
    263.6 KB · Views: 28

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,579
I would give some NPC's the Locust ability so that they're unselectable/uncollidable. Then have them hanging around shops and what not (out of the way). Then have 'living" NPCs that have patrol routes throughout the town. A nice technique for patrolling is to give the NPCs a hidden Target Point ability with like 5.00 cast range (I would base it on Channel). You can then use this Ability as a Move order. What's nice about this is it gives you a very easy way to detect when an NPC has reached their destination:
  • Events
    • Unit - A unit begins casting an ability
  • Conditions
    • (Ability being cast) Equal to TheChannelAbility
  • Actions
    • // Our NPC has reached it's destination, do something!
Combine the above with a Unit Indexer + some Arrays to track Points/Indexes and you'll have a very simple but powerful patrol system.

There's also Special Effects if you want to avoid the Locust thing. Those would have less overhead but of course they can't move (easily).
 
I would give some NPC's the Locust ability so that they're unselectable/uncollidable. Then have them hanging around shops and what not (out of the way). Then have 'living" NPCs that have patrol routes throughout the town. A nice technique for patrolling is to give the NPCs a hidden Target Point ability with like 5.00 cast range (I would base it on Channel). You can then use this Ability as a Move order. What's nice about this is it gives you a very easy way to detect when an NPC has reached their destination:
  • Events
    • Unit - A unit begins casting an ability
  • Conditions
    • (Ability being cast) Equal to TheChannelAbility
  • Actions
    • // Our NPC has reached it's destination, do something!
Combine the above with a Unit Indexer + some Arrays to track Points/Indexes and you'll have a very simple but powerful patrol system.

There's also Special Effects if you want to avoid the Locust thing. Those would have less overhead but of course they can't move (easily).
giving them defined routes would be nice, but I'm a caveman about triggers and shit. I understand the concept and how it works, but does not help me get them working lol. I'm gonna try putting some villagers here and there and try a couple of games.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,579
Here's a system I made if you're interested, hopefully it's not too complicated to use. You'll also need to be on the latest patch to open the map.

All you have to do is follow the examples I've made in this Patrol Setup trigger. First you define which Unit you want to patrol, then you set how many Patrol points it's going to use, then you set the actual Points around the map. It also has optional Wait/Angle variables for making the unit stand around and change directions once it reaches a Point. You don't have to Set the Wait/Angle variables, the system knows not to use them if they aren't set. Finally, you run the Patrol Add To System trigger to add all of this data for the current Patrol_Unit to the system. After that you can move on to your next Patrol_Unit and repeat the process:
  • Patrol Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set VariableSet Patrol_Hashtable = (Last created hashtable)
      • For each (Integer Patrol_Integer) from 1 to 999, do (Actions)
        • Loop - Actions
          • Set VariableSet Patrol_Wait[Patrol_Integer] = -1.00
          • Set VariableSet Patrol_Angle[Patrol_Integer] = -1.00
      • -------- --------
      • -------- System Variables: --------
      • -------- Patrol_Unit = The unit doing the patrolling. --------
      • -------- Patrol_Total_Points = How many Patrol_Points you have. --------
      • -------- Patrol_Points[] = Where you want your Patrol_Unit to move to (start at [1] and work your way up). --------
      • -------- Patrol_Wait = An optional variable for making the Patrol_Unit wait a moment when reaching a Point. --------
      • -------- Patrol_Angle: An optional variable for making the Patrol_Unit face a given angle when reaching a Point. --------
      • -------- --------
      • Set VariableSet Patrol_Unit = Child (2) 0002 <gen>
      • Set VariableSet Patrol_Total_Points = 4
      • Set VariableSet Patrol_Points[1] = (Point(-900.00, 1000.00))
      • Set VariableSet Patrol_Points[2] = (Point(900.00, 1000.00))
      • Set VariableSet Patrol_Points[3] = (Point(900.00, -1000.00))
      • Set VariableSet Patrol_Points[4] = (Point(-900.00, -1000.00))
      • Set VariableSet Patrol_Wait[1] = 5.00
      • Set VariableSet Patrol_Angle[1] = 135.00
      • Trigger - Run Patrol Add To System <gen> (ignoring conditions)
      • -------- --------
      • Set VariableSet Patrol_Unit = Villager (Male) 0001 <gen>
      • Set VariableSet Patrol_Total_Points = 4
      • Set VariableSet Patrol_Points[1] = (Point(420.00, 300.00))
      • Set VariableSet Patrol_Points[2] = (Point(-20.00, 300.00))
      • Set VariableSet Patrol_Points[3] = (Point(-460.00, 300.00))
      • Set VariableSet Patrol_Points[4] = (Position of Villager (Male) 0001 <gen>)
      • Set VariableSet Patrol_Wait[1] = 3.00
      • Set VariableSet Patrol_Wait[2] = 3.00
      • Set VariableSet Patrol_Wait[3] = 3.00
      • Set VariableSet Patrol_Wait[4] = 3.00
      • Set VariableSet Patrol_Angle[1] = 90.00
      • Set VariableSet Patrol_Angle[2] = 90.00
      • Set VariableSet Patrol_Angle[3] = 90.00
      • Trigger - Run Patrol Add To System <gen> (ignoring conditions)
      • -------- --------
      • Set VariableSet Patrol_Unit = Villager (Female) 0003 <gen>
      • Set VariableSet Patrol_Total_Points = 2
      • Set VariableSet Patrol_Points[1] = (Point(-850.00, 1100.00))
      • Set VariableSet Patrol_Points[2] = (Position of Villager (Female) 0003 <gen>)
      • Set VariableSet Patrol_Wait[1] = 10.00
      • Set VariableSet Patrol_Angle[1] = 155.00
      • Set VariableSet Patrol_Wait[2] = 5.00
      • Trigger - Run Patrol Add To System <gen> (ignoring conditions)
In my demo map I have three Villagers running around doing different activities.

Also, if the units don't have my Patrol (NPC - Movement) ability then they won't move anywhere.

Edit: Attached version 2 which uses a better design and has an additional variable for playing Animations.
 

Attachments

  • Patrol 1.w3m
    20.5 KB · Views: 3
  • Patrol 2.w3m
    21.4 KB · Views: 3
Last edited:
Top