(H4) AI not claiming towns and resource nodes

Maps and the art of mapmaking.
Greydog
Leprechaun
Leprechaun
Posts: 3
Joined: 19 Jun 2008
Location: US

(H4) AI not claiming towns and resource nodes

Unread postby Greydog » 19 Jun 2008, 22:28

Hello :)

I have a map I started a few years ago before I got introduced to MMO's and set HoMM aside. I never lost my love for the game tho so I'm back :)

It's mostly finished I just need to get a few kinks ironed out.

Anyway, the map is an XL that I intentionally overstocked with goodies in the hopes that it would make for more epic battles in both single and mp modes (it's a single player map atm) ...but, in testing I'm finding that the AI simply run around with hero-less armies and clear all the stuff but take no (or very few) buildings untill I begin taking thiers. At which time they grab what they need to survive then putz around again.

changing the AI difficulty settings in Map Properties does nothing no matter if I set it to vital or easy. I remember seeing a feature (could have been H3) where you could choose between things like warrior or explorer of what not ...is it in H4? ...if not, I could sure use some advice here;)

thanks

User avatar
Humakt
Swordsman
Swordsman
Posts: 582
Joined: 06 Jan 2006

Unread postby Humakt » 24 Jun 2008, 14:48

Heroeless armies can't capture towns or mines. If you know how to do events/scripts with editor, I suggest that you give computer players hefty resource bonus and give them more heroes at start of game.

You can check with scripts if the current player is human, and if yes, you can kill the extra heroes and not assign them to that player. If no, you can change their ownership to current player's color. If you need more detailed explanation, just ask. You could also check other maps for different ways how to boost script. All my multiplayer maps for instance have such boosts.

Bit more advanced is to give computer player bonuses depending on the difficulty.
Thundermaps
"Death must be impartial. I must sever my ties, lest I shield my kin."

Greydog
Leprechaun
Leprechaun
Posts: 3
Joined: 19 Jun 2008
Location: US

Unread postby Greydog » 25 Jun 2008, 23:16

I see where you're coming from, although scripting is not my strong point atm (still learning it) ..but it's not that they don't have hero's, they usually wind up with 4- 5 each (I start them with one free and one in prison close by) it's that they simply don't take advantage of the things I set out.

So that brings up a couple more questions..

Is giving the bonus to the npc's a method mapmakers use to account for the fact that they don't take advantage of available buildings in many cases?

and, could the amount of resources placed have an effect on an npc's desire to expand?

As it sits, I do have a bonus scripted in, I suppose I could enlarge it and see what that does. In the meantime I'll look into the other added hero script you mentioned. Also if I get the time this week I'll put together a readme and upload it to one of my sites so someone can try it ...at the very least it's a fun map for those who like exploring;)

thanks for the reply!

User avatar
Humakt
Swordsman
Swordsman
Posts: 582
Joined: 06 Jan 2006

Unread postby Humakt » 26 Jun 2008, 07:49

Greydog wrote: Is giving the bonus to the npc's a method mapmakers use to account for the fact that they don't take advantage of available buildings in many cases?

and, could the amount of resources placed have an effect on an npc's desire to expand?
1. AI in HoMMs in general does not provide challenge without help, and since difficulty system of H4 is pretty broken (for AI), it should be standard practice for map makers to give AI some help. Personally, I give more than "some" help depending of course on the selected difficulty (though some of my older maps does not have difficulty specific help).

2. I think it only ensures that AI can expand faster and more aggressive. By the way, AI won't build up mines in case you have veins nor will it visit quest huts. It can pass through the gates though provided it is open for AI.
AI also has more tendency to flag weekly resource mines more actively than normal mines, so it would be good practice to use those instead of regular mines.
Thundermaps
"Death must be impartial. I must sever my ties, lest I shield my kin."

User avatar
Hippotaur
Leprechaun
Leprechaun
Posts: 14
Joined: 07 Nov 2009
Location: San Francsico, California
Contact:

Unread postby Hippotaur » 17 Nov 2009, 02:10

I have also noticed that the AI needs a clear path from its heroes' starting point.

If there are too many resources surrounding one of their heroes, that hero may go nowhere.

(Also artifacts - sometimes the AI doesn't pick them up - so they might block the way.)
"Well, we did do the nose."


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 3 guests