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

[Defense / Survival] teamwork hero defense, crafting, politics

Status
Not open for further replies.
I apologize for bad formatting in advance, and for bad writing, I wrote this hastily.
I've been playing Terrania for a while now, and it felt very inspiring. The teamwork crafting, combined with survival/defense was the first I've seen in a wc3 map. Now I probably just didn't play enough maps, but anyway, this is what I came up with:

A group of evil demons has been exiled from their home plane and found themselves right between 3 cities who would threaten their survival. Their plan is to establish a base, to discover a way to return to their home, through exploring and excavating old ruins and performing magical research.

These are crucial goals the demons must meet to successfully reach their goals.
1. To avoid being spotted as long as necessary as to avoid conflict and casualties while setting up base and teching up.
2. To claim nearby natural and... other resources necessary for development and magical research.
3. To spy on nearby towns as to gain info of their planned attacks or to foil their plans.
4. To collect innocent souls as a resource in any of the cities by killing civillians.
6. To defend against towns' invasions.
7. To acquire a few different artifacts and to assemble the abyss portal, which finishes the game.

I am just going to say that day/night cycle will be much faster than default wc3 one.


1. Boss - unique role. This unit is a strong hero. He controls the operation. He is required to defend against humans and get stronger through kills, and through use of magical items. He is the main powerhouse behind demons. If he dies, game is over. He is very formidable and scary looking, so anyone who sees it will be scared.

2. Master of Shadows - investigative and saboteur role. He dwells in nearby cities, employing magical creatures that eavesdrop on citizens. This enables him to hear rumors and predict the enemy attacks, their timing and army composition. Does most of this by disguising into a citizen and interrogating people walking on streets, or employ them (either through threat or a bribe) to tip off local authorities, giving false sightings locations, so they waste time walking there. Same people can't be interrogated twice in same day. He must take care though, as nearby passing magicians and priests will easily recognize their evil aura, and attack them on sight.
Each day, they can perform one of their Social "Actions" upon each of the town's civilians only once. After interaction, whether successful or not, the citizen turns grey.

There will be magical tech that enables crafting of an item that makes target radiate evil aura, making them into targets for priests and magicians, but eventually, town will get to know of this, and will not kill them on spot.
There should also be an ability to steal from cities, and buying items from their shop, that other crafters can use or upgrade.


3. Magical Researcher - building role, crafts buildings that research additional abilities and upgrades existing buildings. Uses "soul energy" as a resource mostly.

4. Minion classes - combat classes, used for everything from defending the base to farming souls and terrorizing cities so they lose income.

5. Prospector - class responsible for gathering and refining materials for other crafters and adapting the terrain to enable building on those places.

6. Blacksmith - crafts and upgrades items that benefit everyone else on the team

Soul Energy is (lumber) a resource gained by transmuting souls of freshly killed innocent citizens. It is mostly used by crafters for special recipes. Souls are harvested by killing a citizen with an "Empty Soul Gem" in your inventory that is crafted by Blacksmith, and using it within a "Power Reactor" building. This awards all nearby heroes a fixed amount of "Soul Energy".


I haven't thought much about crafting specifically, but I will make the base materials have to be in inventory, and having to use a skill to craft an item, much like it is in Terrania.

What I have thought a lot about is the town system. Towns act like each is a separate unit. Their decisions are based on a certain AI, and their actions depend on their main stat mechanics: Economy, Threat and Intimidation.

They will periodically send off their scouts in demons' direction, which, if they spot you, they will alert the town of your presence.

1. Scout spots demons and successfully reports, or is killed (after 1 day) - Town is suspicious, and sends scouts more regularly and more further. If the scout spots the "Boss", Intimidation of that town is increased considerably.
2. Next scout spots demons and reports successfully, town sends a few guards to investigate.
3. Town will send a few guards every once in a while as long as they don't find anything.
4. When they find something and successfuly report, or are killed and 1 day passes, the town is in "offense" mode, which is the last mode the town can be in.

Scouts and guards can be warded off with special skills or buildings (like a suggestion tower that makes target unit or units in AoE turn back. Doesn't work if other nearby units haven't been "suggested")


Offense mode:
This features three mechanics that town AI depends on.

1. Economy - how much resources a town possesses (and generates(Income)). Bigger economy means higher potential offense and defense, and higher potential to steal gold from the town. Extremely low economy decreases population.

2. Threat - Highest amount of resources a town can spend on an attack. Threat meter affects how much the town is willing to spend to exterminate you, which directly means how big of an army. It also affects how often they send troops to attack you. A town with high threat will try to quickly burn through its resources/economy by attacking you. A town's economy cannot drop below 1.5 of its threat value through financing offensive attacks. A threat increases with more town's units killed and similar actions. It is increased much more if scouts sight demons' leader and so on.

3. Intimidation - How scared the town is of you demons. Intimidation is a value that sits between 0 and Threat value. It's an indicator of minimum resources value that town will use to attack demons. Intimidation is not shown to players as a number, but in four stages relative to Intimidation-Economy: No problem, Not scared, Careful, Frightened, Scared, Terrified. Intimidation value is directly increased with demons' offense on the city in any way.

Where I was going with this is basically (let's say the town knows demons exist):
A town has its resources. They send in a small group to exterminate you, but you butcher them. You accidentally let one footman slip, and he returns, reporting to the town that you killed all the rest. Town's Threat value is increased immediately, and let's say it's now enough to support twice as big of a group as before.
Since their economy is booming, and their income is 3-4 times their Threat value (how much resources they are willing to use to "equip" an army to attack you), so they will use gold up to their threat value, and send a force twice as big. You butcher them all, and leave nobody alive. After 1 day, the town will conclude that their forces have been killed, and Threat will yet again increase, this time equal to 1/3 of their income.
They will send messengers to either of two other towns, at one point in the next day to alert them of your presence, and to ask for help. Luckily, your Minions intercept the traveler and kill them, making sure the letter doesn't reach them.
The Minions also take their time to "Terrorize" that town by killing lots of civilians and burning numerous buildings, thus lowering their Economy, and raising their Intimidation score by quite a bit.
This time however, the town's Threat level is lower than their Intimidation level, meaning that they do not consider you enough of a Threat to send that big of an army (low threat), but they expect to lose if they send any less soldiers, so it just pays off to not do anything.

The goal of the game should be balancing these values between the three towns as you work up to create the portal. I am still not sure about how I would balance these values according to the game (so it doesn't go too easy or too hard, and that it scales with time, about scaling I was thinking constant income possibly increasing and researching techs)

I was also planning to add game events like "A hero visits ~town name~, they will try to conquer the evil!" or something along the lines. Basically this means a town will send off a hero, or a "party of heroes", and give them army equal to their Threat or Intimidation value, whichever is higher, unless Economy would remain too low (less than 1.5 of threat), then they will send maximum they can.
Heroes have abilities and are much harder to kill (akin to a boss).

All of this is still very raw theory, and I am not sure how it would play out, if it will be playable or have enough of a challenge as it should, so I welcome any comments ^^

Edit: So, I've concluded that this way, threat is an inbuilt "challenge curve". The more soldiers you kill from the towns, the Threat rises, therefore, you cannot always just kill them.
More subtle and calculated approach is needed. This also means you need to balance between all 3 cities, which makes it harder. Need to decide whether you will fight 2 and avoid 3rd or lure them on desolate places and have them die of traps (Threat increases only by direct kills) that Magical Researcher placed there, or just have them wonder for a set amount of time before they return.
Or destroy their economy as soon as possible as to lessen their ability to amass the army. Or increase Intimidation so much that they just can't attack you.
 
Last edited:
Level 12
Joined
Mar 24, 2011
Messages
1,082
First of all, I like this.

Hope we talking medieval-ish here?
I am not sure why your towns are sending out scouts ? Are they in war ? Are they expecting an attack from somebody to send out people specifically with the duty of guarding their perimeter?

Instead;
If there are towns close to each other, they would also have relation with each other. e.g. Trade, Correspondence, Work.
You could simulate that with:
  • Trade caravans - Both scheduled and random.
  • Messenger - Mail Delivery every morning/evening
  • Citizens with "jobs" in the other town, e.g. Timmy would like to be blacksmith apprentice. Blacksmith lives in the next town.
  • Town events - Market every weekend in one of the towns
  • Citizens going into the woods: Wood cutting, Fishing, Kids playing in the woods
  • Hunting party
You could have the host player be able to turn on/off those in the beginning of the game as "difficulty" control.

All in all, to create more movement around.
You could also assign different threat values to different encounters:
  • Child sees a demon - It's just a child, it saw a shadow and it's imagination kicked - Minimal response, slight increase of Intimidation/Threat
  • Adult sees a demon - Slight increase of Intimidation/Threat
  • Child goes missing - It should have been wild animals - Organize a Hunting party for a few days
  • Adult goes missing - Hunting party again
  • Messenger goes missing - Investigation party + Hunting party ?
  • Caravan/Group of adults goes missing - Big investigation + Militia ?
  • Survivor of annihilated party returns back - Subjugation party is formed.
Many other options around, but all in all, it would make more sense and creates more interaction for the players.


Another thing, I don't think a town would send guards to check on random things in peaceful situation. Did medieval towns even have guards? Weren't those guys more like Royal Soldiers who acted only in extreme situations? Much more like the National Guard of USA?
To me, it would make much more sense to have a Militia party or Hunting Party do small check-ups every now and then and if something goes reaaaaaaaly south then involve soldiers. Would also add scalability into your game. Hunters < Militia < Mercs < Soldiers < Heroes (or something like this) Soldiers and heroes could be like not related to Threat / Economics / Intimidation.
Soldiers can be like End-game threat for the player, stronger than all previous as individual units and also traveling in large groups.
Heroes would be most suitable as you've described them, like random events, could also have an "escort" e.g. 2-3-4-5 weaker units in a party with them.
May leave if they don't encounter anything for X time.

I am talking hunting party as two separate things, one would be like a regular hunting party and the other one would be like dedicated hunting party.
Regular Hunting Party - Goes out on regular intervals to hunt any wild animals for food.
Dedicated Hunting Party - Goes out on certain events (Citizen missing, belief to have been eaten by carnivores) and hunts carnivores. May be recalled once a wolf or bear or something like that is killed.


All that sounds a bit complex as relations and AI, but it would pay off extremely well.
Would love to see that happening.

regards
-Ned
 
Thanks for your input Ned! I really appreciate this.

Yes, I was planning to use wc3 medieval era. You are completely right about the scouts though, towns have no reason to expect an attack.
I like the idea of hunters and children much more. I also think finding even a single child's corpse and realizing it was demons' fault should award much higher threat than that of an adult, but also equally more soul energy as well, since a child's soul is "pure". This compliments the balance, and is just a variation in gameplay.

I will certainly look to add other relation simulations as well, but for now I will concentrate on MVP qualities, so the map can be playable asap.

I love the idea of difficulty control, that was exactly the thing I was badly missing. You could tailor the game how it suits you.

All those kind of encounters might be a bit too much for me right now, considering my grasp of world editor, although I will try to get them down as good as possible.

All of these are brilliant ideas, and show you think in reality and broad enough approach. It's just now that I notice how little I thought about it. I based it off of all the competitive games with simple mechanics that are often hosted on bnet.

The reason I included "guards" right away is to excuse having an army ready to attack the demons. They are generally nothing but villagers with a shortsword and a leather armor. They are called "guards" because are either keeping guard, or patrolling. They would rush to defense if town were to be attacked. I could explain it by saying the three towns were in immediate proximity to the kingdom border. Or that the towns have each their own administration, and relations between the three towns are barely on cooperating terms, not really expecting an attack, but still taking measures against it. The demons would unify them. It would be very weird however, to see that very same town, that at beginning didn't send any soldiers against a clear possible enemy threat (first sighting of demons by an adult), only to send dozens of footmen equipped with full plate armor near end game, which would probably be about a third of a month into the game (23 days). By current standard (1 day = 4 min), that would be 1.5 hours.

Regarding Heroes, I never planned to have them be affected by the threat mechanic. Only thing I believe would make sense is that the chance of a hero coming rises as days pass. Heroes come of their own will, maybe with their lackeys. What is related to threat and economy though, is what the town will give them to help them with their goal. Of course, you would think a hero coming from a rich town would have more investment than a hero coming only with his own gear, that passed through a poor town.

It is clear that all of this would create an AI monster. Not only does it require an AI for the towns themselves, but also one for each "job" and towns' interaction. But nevertheless, I agree it will pay off very well.
If nothing else, it would be satisfying to play due to the amount of details.

Initially I was planning to do it in gui due to simplicity, but it would quickly transform into an architectural hell, so I guess I need to do it in jass and dive deeply into wc3 AI. I might find other crew members for this, but I doubt I will succeed, as there has obviously been very little interest in this thread. Well hoping for the best!
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Regarding Heroes, I never planned to have them be affected by the threat mechanic. Only thing I believe would make sense is that the chance of a hero coming rises as days pass. Heroes come of their own will, maybe with their lackeys. What is related to threat and economy though, is what the town will give them to help them with their goal. Of course, you would think a hero coming from a rich town would have more investment than a hero coming only with his own gear, that passed through a poor town.
Hmmm... Towns could put up "bounty" for adventurers and "recruitment" for Mercs. I was thinking, maybe if the towns also have population statistics that could form up the hunting groups. So, when they run out of own fighters they would recruit outside.
That is going too far for the moment though.


It is clear that all of this would create an AI monster. Not only does it require an AI for the towns themselves, but also one for each "job" and towns' interaction. But nevertheless, I agree it will pay off very well.
If nothing else, it would be satisfying to play due to the amount of details.
For such AI I am not entirely sure if JASS would be enough. You'd be looking to create AI for units and unit groups instead for players which may become quite confusing in GUI/JASS. I believe you may need one of the object-oriented custom scripts around... Not that you can't do it in JASS, it just would be way easier in OOP.

Initially I was planning to do it in gui due to simplicity, but it would quickly transform into an architectural hell, so I guess I need to do it in jass and dive deeply into wc3 AI. I might find other crew members for this, but I doubt I will succeed, as there has obviously been very little interest in this thread. Well hoping for the best!
Well, it has been up only for today. I would expect to pick up interest soon ;) And it has definitely sparked my interest. I could help on programming side, wink, wink ;)

regards
-Ned
 
When I say JASS, I meant using structs, interfaces and modules etc. which form OOP together. There is no such thing in GUI. I'll just create a base script for a single town that will be reusable on however many towns I create, or might create in future. I see it in that way, and I have a feeling that "state machine" would be best for this situation.

nedio95 said:
For such AI I am not entirely sure if JASS would be enough. You'd be looking to create AI for units and unit groups instead for players which may become quite confusing in GUI/JASS. I believe you may need one of the object-oriented custom scripts around... Not that you can't do it in JASS, it just would be way easier in OOP.

I've never done an AI with wc3 scripts, so I'll look into it. It may probably reveal itself as the best possible solution, but I'm afraid I'll have to take up 3 Player slots instead of 1.
Only thing I'm currently familiar with is jass, vjass and its OOP aspect. I've made a few systems for myself, so that's where my experience comes, including my experience as a programmer.
This way, if I make ai with vJass, I can push it all into one player (player Brown).
 
Level 5
Joined
Mar 27, 2017
Messages
106
Why would you need 3 players slots?
Since all the towns are going to be allied with each other you could just have one slot and give units abilities indicating to which town they belong.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Why would you need 3 players slots?
Since all the towns are going to be allied with each other you could just have one slot and give units abilities indicating to which town they belong.
Fairly good point actually. Although, doing it with 1 player causes more trouble.

A reason I see would be to indicate to the player more clearly what is happening.
Lobby would have 3 NPC players.
When you hover with mouse over a unit it would have a town name or whatever
Would not require triggering the team colour
Would not require extra coding to register town properties & citizens

Basically, purely for aesthetic and informative reasons, but also saves a bit of work.

regards
-Ned
 
I already made a base for AI, based on finite-state-machine that I am willing to try out, but I will not discuss it here due to obvious reasons.
This makes it a bit easier to control which unit belongs to which town and keeping record of towns' properties such as Economy, income, threat etc.
It also allows me to reuse code for similar units (hunters searching for animals or militia searching for demons)
It is working on a very basic level at the moment ("first enemy in range, start attacking it" state)

Due to the possible conflicts with Wc3's already present AI, I am not sure how good it will go, but so far, it's been working.

Considering all this, choice between 3 players and 1 player is brought down to exactly what Ned says,
purely aesthetic and informative reasons. And I'd give 1 player a preference, because it allows 2 more players to play.
 
Level 5
Joined
Mar 27, 2017
Messages
106
If you want to avoid default wc3 ai try setting the creatures to worker and to remove the fleeing behaviour(I believe there is a second tag for that maybe it was ward)
Then for the skills to avoid default Wc3 ai you can use channel and make triggers for the abilities(do not forget to do that for potions too unless you want the default wc3 potion drinking behaviour)
 
Status
Not open for further replies.
Top