AI in Heroes IV

Official forum of the Equilibris mod to Heroes of Might and Magic IV (Russian forum)
bodek
Leprechaun
Leprechaun
Posts: 12
Joined: 17 Feb 2011

AI in Heroes IV

Unread postby bodek » 17 Feb 2011, 10:43

Hail to all Eguilibris Team and all fans of Heroes IV.

I've noticed that equilibris aims on very wide spectrum of things in the game. But for me the bigest problem in Heroes 4 is AI. AI is so dumb that even if i find interesting map my play end 10 minutes after start cos AI doing something that terrible stupid that its no fun to play longer.

For all modders and heroes 4 fans out there lets make this topic alive. Put here Your IDEAS ABOUT HOW TO IMPROVE AI IN HEROES 4.

My first idea and also question for modders:

1. is there a way to turn off posibility to move army without heroes.
2. is there a way to implement to AI a battle tactic that prevent AI Heroes rushing for opponents (for example that every AI hero will equip bow or crosbow and hide behind stronger units) or maybe that AI heroes use defence instead rushing forward and only when enemy units close they fight but with weaker unit.
3. is there a way to make that AI will atack player towns more often and that he will take mines, resources, dwellings and artifacts aspecialy that is in front of his castle(sic!).

Lets try everyone to help modders with good ideas!
We all know after years of playing heroes 4 what is the worst flaw of this game. Lets try together with small steps make it better!

User avatar
Dalai
Equilibris Team
Equilibris Team
Posts: 1073
Joined: 06 Jan 2006
Contact:

Unread postby Dalai » 17 Feb 2011, 10:52

AI is the field of modding with highest priority and lowest possibility at the same time. Too sad, but you have to go for a greatly scripted maps or online to compensate for poor AI.
"Not a shred of evidence exists in favour of the idea that life is serious." Brendan Gill

bodek
Leprechaun
Leprechaun
Posts: 12
Joined: 17 Feb 2011

Unread postby bodek » 17 Feb 2011, 11:10

Dalai wrote:AI is the field of modding with highest priority and lowest possibility at the same time. Too sad, but you have to go for a greatly scripted maps or online to compensate for poor AI.


And there is no posibility change behavior of AI heroes in battle??

Ive noticed that if only Ive equiped my heroes with ranged weapon they die not so often in autocombat that heroes without ranged weapon
(even casters who should cast spells first in auto combat rush foward without ranged weapons)

Maybe there is way that every hero in game that comes from tavern will be equiped with crosbow?

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Unread postby GreatEmerald » 17 Feb 2011, 14:24

bodek wrote:And there is no posibility change behavior of AI heroes in battle??
If I understand Dalai correctly, he means "there is, provided that you know how to code in the Assembly language".

User avatar
Dalai
Equilibris Team
Equilibris Team
Posts: 1073
Joined: 06 Jan 2006
Contact:

Unread postby Dalai » 17 Feb 2011, 17:51

GreatEmerald wrote:If I understand Dalai correctly, he means "there is, provided that you know how to code in the Assembly language".
...and even then it would require a HUGE amount of trial and error without a source codes.

So, strictly saying - it is possible, but I really wouldn't hope for that.
bodek wrote: Ive noticed that if only Ive equiped my heroes with ranged weapon they die not so often in autocombat that heroes without ranged weapon
(even casters who should cast spells first in auto combat rush foward without ranged weapons)

Maybe there is way that every hero in game that comes from tavern will be equiped with crosbow?
Interesting idea. I personally doubt it would help, but it can be done - just to check if you are right.
"Not a shred of evidence exists in favour of the idea that life is serious." Brendan Gill

User avatar
Pol
Admin
Admin
Posts: 10086
Joined: 29 Nov 2005
Location: IN SOMNIS VERITAS
Contact:

Unread postby Pol » 17 Feb 2011, 19:34

Similar mechanics how to comfort AI worked in H3. So, will likely work in H4. The question is, on what habits its just reacted. (What the AI expect to do something condition.)
"We made it!"
The Archives | Collection of H3&WoG files | Older albeit still useful | CH Downloads
PC Specs: A10-7850K, FM2A88X+K, 16GB-1600, SSD-MLC-G3, 1TB-HDD-G3, MAYA44, SP10 500W Be Quiet

bodek
Leprechaun
Leprechaun
Posts: 12
Joined: 17 Feb 2011

Unread postby bodek » 18 Feb 2011, 06:53

Ive read somewhere that there is a script that make AI more agrresive agains player. Its gives AI Hero 5000 dread knights but only when AI fights with player and the dread kniths desapear when battle begins. Thanks to it AI atack player more often. Unfortunately I cant find this script right now. Anyone see it?

O im dummy I found it on Scripting Library on Celestial Heavens autor says

"I gave the AI huge amount of level 4 creatures and took the same creatures again when meeting a human player and on each day of the human's turn.

This way the human player will never notice the faked AI strength. This is the basic idea, but there have to be more detailed scripts to make it 100% safe."

link
https://www.celestialheavens.com/featur ... k_tool.zip

Its a shame that it cannot be implemented on H4 permanently on every map

One and i think most important aspect Ive learnd from autor of this script is that the AI will attack only when it's 100% sure of winning and Ive wondered if there's a way to change that AI attack when he has 50% chances of winning???
Last edited by bodek on 18 Feb 2011, 09:27, edited 2 times in total.

bodek
Leprechaun
Leprechaun
Posts: 12
Joined: 17 Feb 2011

Unread postby bodek » 18 Feb 2011, 07:03

And about bows or crossbows for heroes. Ive asked for this cos when I play quick combat and equipe my heros with bow/crossbow they die less often. So I dont know if battles Player vs neutral, Player vs AI is calculated but bow/crossbow definitely makes a diference.

User avatar
wimfrits
Round Table Knight
Round Table Knight
Posts: 2047
Joined: 06 Jan 2006
Location: Utrecht, the Netherlands

Unread postby wimfrits » 20 Feb 2011, 13:55

bodek wrote:Its a shame that it cannot be implemented on H4 permanently on every map
Use of scripts like those are limited to very specific situations. A general implementation would cause weak heroes to throw themselves at the human player without gaining strength and/or building an army first
Are you suggesting coconuts migrate?

User avatar
jeff
Moderator
Moderator
Posts: 3741
Joined: 06 Jan 2006

Unread postby jeff » 20 Feb 2011, 14:59

wimfrits wrote:
bodek wrote:Its a shame that it cannot be implemented on H4 permanently on every map
Use of scripts like those are limited to very specific situations. A general implementation would cause weak heroes to throw themselves at the human player without gaining strength and/or building an army first
This is the reason I never use that script. I felt it would cause the AI hero to move into harm's way, just to be slaughtered when it found itself in combat without the very troops it counted on when moving close to the player's hero.
Mala Ipsa Nova :bugsquash:

bodek
Leprechaun
Leprechaun
Posts: 12
Joined: 17 Feb 2011

Unread postby bodek » 21 Feb 2011, 08:13

And what about forbid AI to walk with army when there is no hero in it to avoid situation when big army is whithout even single one hero. Is it possible?

User avatar
Dalai
Equilibris Team
Equilibris Team
Posts: 1073
Joined: 06 Jan 2006
Contact:

Unread postby Dalai » 21 Feb 2011, 09:58

bodek wrote:And what about forbid AI to walk with army when there is no hero in it to avoid situation when big army is whithout even single one hero. Is it possible?
Not today. And I think it's too limiting solution, which could bring just as many problems as it would possibly solve.
"Not a shred of evidence exists in favour of the idea that life is serious." Brendan Gill

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Unread postby GreatEmerald » 21 Feb 2011, 14:28

Dalai wrote: Not today.
Heh, that reminds me of the trainer in Harmondale after you go past what they can teach :D

User avatar
igoraki
Scout
Scout
Posts: 151
Joined: 30 Nov 2005

Unread postby igoraki » 23 Feb 2011, 14:59

Somebody mentioned(and did some tests to prove it) that ai dont see whole map like it used to be in the previous versions...instead he need to explore it like human players do to reveal points of interests(city's,mines ect).So is it possible to enable ai to see whole map ? My guess is he will be much better on adventure map in that case.
"You cannot make a baby in a month with nine women."

bodek
Leprechaun
Leprechaun
Posts: 12
Joined: 17 Feb 2011

Unread postby bodek » 23 Feb 2011, 15:10

igoraki wrote:Somebody mentioned(and did some tests to prove it) that ai dont see whole map like it used to be in the previous versions...instead he need to explore it like human players do to reveal points of interests(city's,mines ect).So is it possible to enable ai to see whole map ? My guess is he will be much better on adventure map in that case.
Wow when I look in to it I think U may be right. AI acting strange sometimes wandering through the land almost like it dont have idea where to go. But when U look it from perspective where AI just exploring map to spot some key points its no longer seems so dumb.

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Unread postby GreatEmerald » 23 Feb 2011, 16:39

Really? The AI does a good job of convincing me that it can't see through the Cover of Darkness in HoMM3. Or that the building that creates a shroud around it is actually useful. Or that when an enemy sees my town and it's around an obstacle, it will only then start making its way towards said town (although admittedly with distractions).

Or did you mean the fog of war?

User avatar
jeff
Moderator
Moderator
Posts: 3741
Joined: 06 Jan 2006

Unread postby jeff » 23 Feb 2011, 21:42

igoraki wrote:Somebody mentioned(and did some tests to prove it) that ai dont see whole map like it used to be in the previous versions...instead he need to explore it like human players do to reveal points of interests(city's,mines ect).So is it possible to enable ai to see whole map ? My guess is he will be much better on adventure map in that case.
Yes there was someone who ran tests and they seemed to show the AI performed better when it saw objects. Two ways to attract the AI's interest that I use. I place around the important objects a small creature stack that changes color to the various AI colors present during the first turn. This reveals the locations I want them to know. My maps the player usually plays red (first). So before the players second turn that stack changes to neutral (gray) and is eliminated fighting 99 angles or something like that. The second trick is if I want the AI to go to a neutral town or other object, I hide an artifact under the object and set the importance to vital. I used that in one town the player had to defend in Dragon's Fate and the AI heroes were all over it until the defenses are built up to a point the AI does not believe it can win.
Mala Ipsa Nova :bugsquash:

bodek
Leprechaun
Leprechaun
Posts: 12
Joined: 17 Feb 2011

Unread postby bodek » 24 Feb 2011, 06:49

And there is no way to do .reg file like this one for player that reveal whole map for AI?

midknight85
Leprechaun
Leprechaun
Posts: 2
Joined: 15 Jun 2011

Unread postby midknight85 » 15 Jun 2011, 11:41

Is there any chance to get the source code of heroes 4?

or just the source code for the AI? maybe if we collect money from
all the guys who are interested and spend it to the bankrupt new world computing? (would spend too)

this damn AI is just worth nothing...

Quantomas did a very good job to write a new AI mod for Heroes V TOE...
maybe we should ask him for a little help..?

cheers,
midknight85

User avatar
Dalai
Equilibris Team
Equilibris Team
Posts: 1073
Joined: 06 Jan 2006
Contact:

Unread postby Dalai » 15 Jun 2011, 13:51

midknight85 wrote:Is there any chance to get the source code of heroes 4?
...
maybe if we collect money from
all the guys who are interested and spend it to the bankrupt new world computing?
I don't know of any way or chance to get it. If you, or someone else, do - I'll easily add my monthly income to the pool.
"Not a shred of evidence exists in favour of the idea that life is serious." Brendan Gill


Return to “Equilibris”

Who is online

Users browsing this forum: No registered users and 3 guests