• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Living AI

Status
Not open for further replies.
Level 8
Joined
Aug 13, 2018
Messages
338
It's possibe to create an AI for a map that has at least 8 factions as computer and some players, that has this featurs?
1.Dynamic system: Declare war on other factions when they're stronger.
2.General patrols: Some generals that patrol round the map (in normal phase) and attack enemy cities (in war phase)
3.Random quests for random events: For example apear a bandit lair or something sometimes and when you ask someone to give you quest, thay ask you killing bandits.
4.Relation with generals, based on what happens: When you complete a given quest they improve relation with you and On the contrary.
5.Conversation with generals: Talking about different things with generals.
6.Random dialogs based on relation: welcoming in good relation and On the contrary.

Actually I think about Mount and Blade wc3 map, but I don't think it's possible.
 
It's all quite easily achievable but proper implementation takes time and practice. It's all about trial and error though, so open the editor and try making this stuff yourself.

You will find some resources that can give you similar results to the ones you described, but I have found that creating my own resources (even if it's not as good as the custom resources already available) teaches a lot more than simply copy pasting some system you find on Hive.

  1. This is all a matter of counting resources and saving them to integers. Then when the right conditions are met resource wise you order them to declare war and set their alliances.
  2. Just order them to move with triggers, then when the war phase starts you simply set a boolean to true, and make the generals act differently when the boolean is true.
  3. You need to pre-define different quest regions, then make triggers for X amount of quests that can be chosen randomly. Personally I would run the quest triggers when "value of real variable becomes equal to X" and then set the actual real variable based on the events of my choosing. For example setting a random number between 0-100 and if the chosen number is between 0 and 10 you set the real variable to 1, thus triggering random quest no. 1. Hope this made sense.
  4. You can build a reputation system very easily with integers. Increase the integer every time you complete a quest from them, then you can have some triggers that checks how high the rep integer is. If it's over a certain value you create new dialog buttons for your dialogs.
  5. Not sure what you want here? Just make cinematics with dialogs and dialog buttons as conversation options.
  6. Random dialogs? Hmm, use the same logic as the random quests. With some modification it can work fine.
 
Last edited:
Level 5
Joined
Jun 12, 2018
Messages
149
As a Mount&Blade player, I get the point of your questions, I was working myself on a map using a M&B Warband mod concept (Full Invasion).

Everything you've listed is technically possible, however you should define first what kind of gameplay you want to port from Mount&Blade to War3 like do you want this to be a solo player game with every classic features of M&B or do you want it multiplayer.

In the latest, you will have to make choices to keep the map enjoyable, the idea of factions/lords/patrols could be great with some good AI and real time fight. This is a hard task to do because M&B Quest/recruiting troops/gameplay can make a multiplayer game pretty long even with a save/load system.
 
Level 8
Joined
Aug 13, 2018
Messages
338
  • This is all a matter of counting resources and saving them to integers. Then when the right conditions are met resource wise you order them to declare war and set their alliances.
  • Just order them to move with triggers, then when the war phase starts you simply set a boolean to true, and make the generals act differently when the boolean is true.
  • You need to pre-define different quest regions, then make triggers for X amount of quests that can be chosen randomly. Personally I would run the quest triggers when "value of real variable becomes equal to X" and then set the actual real variable based on the events of my choosing. For example setting a random number between 0-100 and if the chosen number is between 0 and 10 you set the real variable to 1, thus triggering random quest no. 1. Hope this made sense.
  • You can build a reputation system very easily with integers. Increase the integer every time you complete a quest from them, then you can have some triggers that checks how high the rep integer is. If it's over a certain value you create new dialog buttons for your dialogs.
  • Not sure what you want here? Just make cinematics with dialogs and dialog buttons as conversation options.
  • Random dialogs? Hmm, use the same logic as the random quests. With some modification it can work fine.
Actually there is no need to AI yeah? All must do with triggers. But if someone create them at newest patch and then I try to use them in 1.26a, no crashes happen?

Everything you've listed is technically possible, however you should define first what kind of gameplay you want to port from Mount&Blade to War3 like do you want this to be a solo player game with every classic features of M&B or do you want it multiplayer.
I don't like solo player maps. Also another question from you that played M&B, If I create it, for 12 player slots, how much factions and players are good? For example 4 factions with 8 players?
In the latest, you will have to make choices to keep the map enjoyable, the idea of factions/lords/patrols could be great with some good AI and real time fight. This is a hard task to do because M&B Quest/recruiting troops/gameplay can make a multiplayer game pretty long even with a save/load system.
M&B is enjoyable enough, also I want to create it with wc3 map and use races as factions, so it will has very enjoyable gameplay. I try to make it's gameplay faster than orginal M&B, if I don't, it takes at least 5 hours to become simple general and 10 hours to have a small village for your self :peasant-grin:, and may be it takes 100-200 hours to conquer the map! (What I didn't in M&B)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
1.Dynamic system: Declare war on other factions when they're stronger.
One can estimate a "power level" for each player and use that to estimate if it is stronger. The power level could be as simple as the sum of unit weights.

The only problem with this is that it creates rather aggressive AI. If the game supports winning as a team it might be better to implement different personalities of AI where some would prefer to remain friendly while others prefer to fight everything smaller than them.

One also needs the inverse logic where if they get too weak they try to team up/make peace with other players instead of fighting a losing battle.
2.General patrols: Some generals that patrol round the map (in normal phase) and attack enemy cities (in war phase)
Might need to hard code a set of patrol routes. The AI then searches through this set for reasonable patrol routes for it to use.

The patrol route could be a set of waypoints. The unit is either ordered to patrol with to the waypoints with the standard patrol logic, or some tactical controller orders it to sequential waypoints, waiting until all units in the group arrive before progressing to the next.
3.Random quests for random events: For example apear a bandit lair or something sometimes and when you ask someone to give you quest, thay ask you killing bandits.
Kind of like Anno? One would need a quest creating system. This system has a set of possible random quests. It then selects one that is possible to create and then gives it out to the player.
4.Relation with generals, based on what happens: When you complete a given quest they improve relation with you and On the contrary.
Would need to fit some sort of personality system. One could track how much they "like" you in a variable. Positive outcomes raise their liking of you while negative ones lower. The liking value could factor in to how willing they are to go to war with among many things.
5.Conversation with generals: Talking about different things with generals.
Usually implemented with conversation trees. One would have to feed in all the player options as well as the responses or questions. Some options could check the value of variables for more dynamic conversations.
6.Random dialogs based on relation: welcoming in good relation and On the contrary.
Set of possible dialogs and their "liking" range. The system would search through this set for applicable dialog entities and then select one at random.
 
Level 5
Joined
Jun 12, 2018
Messages
149
Actually there is no need to AI yeah? All must do with triggers. But if someone create them at newest patch and then I try to use them in 1.26a, no crashes happen?

No need to campaign AI, just your triggers yes. Some triggers used with the 1.31 won't be compatible with older versions so you it's your choice to target the 1.26 community or older.

I don't like solo player maps. Also another question from you that played M&B, If I create it, for 12 player slots, how much factions and players are good? For example 4 factions with 8 players?

For 12 player slots I'd make 4 factions but 6 factions would be better to get the M&B feeling of having multiple alliance choice to make. I'd go personally for 12 human slots and 6 AI slots.
 
Level 8
Joined
Aug 13, 2018
Messages
338
For 12 player slots I'd make 4 factions but 6 factions would be better to get the M&B feeling of having multiple alliance choice to make. I'd go personally for 12 human slots and 6 AI slots.
As I said, I use 1.26a and maximum number of players is 12 here. I thought create 4 factions : The Alliance, The Horde, The Scourge and The Sentinel with 8 human players.
But my problem is another thing currently, How can I save/load the map? For example:
Player 1 just played map single player and after conquering 2 cities of The Horde with The Alliance, saved his hero and get out. Player 2 played as a hero of The Horde and after conquering The Alliance, saved his hero. Now player 1 and player 2 want to play with their old heroes together. If I just load hero and his army, it's not bad?
 
Status
Not open for further replies.
Top