Call to H-IV mapmakers - AI enchancing scripts

The old Heroes games developed by New World Computing. Please specify which game you are referring to in your post.
User avatar
Taro
Scout
Scout
Posts: 163
Joined: 11 Feb 2011
Location: Poland

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Taro » 16 Aug 2015, 08:15

Sooooo... We have to wait until Namerutan is back?

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Dalai » 18 Aug 2015, 15:24

It's the best case scenario. Next option is for someone to step in. Namerutan laid a very solid foundation, so I'm hopeful.
"Not a shred of evidence exists in favour of the idea that life is serious." Brendan Gill

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 07 Nov 2015, 21:26

still waiting are we..? it's been months..
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
PatFX
Peasant
Peasant
Posts: 68
Joined: 05 Mar 2015
Location: Montreal, Canada

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby PatFX » 20 Nov 2015, 14:42

Hi Karmakeld,
I did approx. 30% of the script. Any news about Namerutan?

I was really busy (work, familly and testing/scripting my H4 map), but now I can continue the artifact script.

I would like to know if this will be usefull for someone, because this is a lot of job and I don't want to do it (wast my time) if nobody step in to help Dalai...

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 22 Nov 2015, 21:03

I can't promise to help scripting, as my campaign project is already progressing very slowly, only I can give my approval to go on.
I think many will find it useful, but I have no skills to offer regarding implementing it as an equilibris feature. That will have to rely on others.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Dalai » 01 Jul 2016, 15:40

Update:
No news from Namerutan.
But!
A lot of progress with iLiVeInAbOx05 :)

Your ideas will not be wasted. In fact, we'll need concrete help from mapmakers very soon. Stay tuned :)
"Not a shred of evidence exists in favour of the idea that life is serious." Brendan Gill

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 01 Jul 2016, 20:01

Hi fellow map makers :)

It would be really useful to me if someone (or group of someones) worked on and provided me with the following couple events:

1) An event that gives control of a neutral army to a player when encountered by an opposing player.
2) An event that reduces a neutral army by a percentage for the AI's turn. For example, reduce by 20% -> multiply stack by .8 (times 8, divided by 10)

A few guidelines: If possible, please package all of the scripting into a single event. If this is not possible, that's alright, please just explain why there must be separate events.

You can send these scripts to me however you would like. Either send me a .h4c map that contains these scripts, or send me the event group file created using the H4MG if you have downloaded and are using it.

Most of the events are pretty simple, so I'll take care of those.

A couple other ideas for events:
- An event that gives the AI a discount on purchasing creatures
- An event that gives the AI a discount on purchasing structures

Any thoughts on how to script these two?

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 03 Jul 2016, 21:26

Just to get it right (I'll post in case I find the time and get the scripts done and send, else feel free to beat me to it).
1) will the script require check for all AI colors and or player color or will you add that yourself? Or is this intended for multiplayer (in which case I believe such a script can already be found in the library).
2) I assume the script should check for all creature types, or will you add/copy that yourself?

Regarding the last two, I find it simpler to merely add extra gold, either daily/weekly or just once.
The creature discount would require a tremendous amount of scripting. Perhaps it doesn't have to be that complicated, but if it's to have full effect it should be continuous, not timed. Depending on how you want to give the discount; pr. single creature, different percentages to match creature level, percentage of creature cost etc. it will become quite long and likely require a loop, which to my knowledge isn't recommended, compared to the easy solution.

Regarding buildings, I think it would have to require a continuous check of towns army size, check that money had been spend, and the army hasn't increased in that town (or basically any towns owned by the current player), then the money could've been spend on a structure. ..or a power up, or hiring from a creature dwelling or.. Alternative is to check for a match between structure costs and resources spend (and making sure it doesn't match any creature costs).
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 04 Jul 2016, 04:22

Karmakeld wrote:Just to get it right (I'll post in case I find the time and get the scripts done and send, else feel free to beat me to it).
1) will the script require check for all AI colors and or player color or will you add that yourself? Or is this intended for multiplayer (in which case I believe such a script can already be found in the library).
Sorry, I forgot to specify that the first one was intended for multiplayer, so whoever decides to script it can approach it from a 1on1 perspective (and I'll take a look at the scripts here on CH).
Karmakeld wrote:2) I assume the script should check for all creature types, or will you add/copy that yourself?
It does need to check for all creature types, but if someone just scripts it for one creature, I can certainly copy and paste, and then edit the rest :)
Karmakeld wrote:Regarding the last two, I find it simpler to merely add extra gold, either daily/weekly or just once.
The creature discount would require a tremendous amount of scripting. Perhaps it doesn't have to be that complicated, but if it's to have full effect it should be continuous, not timed. Depending on how you want to give the discount; pr. single creature, different percentages to match creature level, percentage of creature cost etc. it will become quite long and likely require a loop, which to my knowledge isn't recommended, compared to the easy solution.

Regarding buildings, I think it would have to require a continuous check of towns army size, check that money had been spend, and the army hasn't increased in that town (or basically any towns owned by the current player), then the money could've been spend on a structure. ..or a power up, or hiring from a creature dwelling or.. Alternative is to check for a match between structure costs and resources spend (and making sure it doesn't match any creature costs).
I didn't think there would be an easy way to do it, but thought I would ask anyway :)

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 04 Jul 2016, 17:44

Well as long as it doesn't cost to ask, you're 'free' to ask ;)
I could most likely look into #2.
Please tell if the script in the library isn't what you need for #1.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 04 Jul 2016, 17:50

The scripting in the library for opponents controlling neutrals should work, I just need to understand it a little better because I think it needs to be tweaked. Some of the triggerable events are actually on a creature stack that aren't part of the gameplay, likely since events couldn't be copied and that was the only way to make them easily moved from map to map.

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Humakt » 13 Jul 2016, 17:29

iLiVeInAbOx05 wrote:Hi fellow map makers :)

It would be really useful to me if someone (or group of someones) worked on and provided me with the following couple events:

1) An event that gives control of a neutral army to a player when encountered by an opposing player.
2) An event that reduces a neutral army by a percentage for the AI's turn. For example, reduce by 20% -> multiply stack by .8 (times 8, divided by 10)

A few guidelines: If possible, please package all of the scripting into a single event. If this is not possible, that's alright, please just explain why there must be separate events.

You can send these scripts to me however you would like. Either send me a .h4c map that contains these scripts, or send me the event group file created using the H4MG if you have downloaded and are using it.

Most of the events are pretty simple, so I'll take care of those.

A couple other ideas for events:
- An event that gives the AI a discount on purchasing creatures
- An event that gives the AI a discount on purchasing structures

Any thoughts on how to script these two?

1) Fierce and Furious has it, it is specified for certain colors though and only works if there are two human players. It is in encountered event on creature stacks (and day 1 timed event to count human players).

2) I think it would just be better to give and take 999 titans for computer players when they are facing neutrals. Broken part is not the initial evaluation itself when it comes to difficulty adjustment, it is the quick combat.
Thundermaps
"Death must be impartial. I must sever my ties, lest I shield my kin."

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 13 Jul 2016, 18:11

Humakt wrote:1) Fierce and Furious has it, it is specified for certain colors though and only works if there are two human players. It is in encountered event on creature stacks (and day 1 timed event to count human players).

2) I think it would just be better to give and take 999 titans for computer players when they are facing neutrals. Broken part is not the initial evaluation itself when it comes to difficulty adjustment, it is the quick combat.
Hi Humakt!

Thanks I'll take a look at that map to see how it was done there. I'm probably going to end up scripting it in my own way, but I would definitely like to see another approach before I dive in :)

For the reducing neutrals script, I believe I have it setup and working for one creature (Air Elementals). The user will be able to choose the level of reduction by setting the percent to reduce by on the dashboard.

Now I just need to copy and paste the scripting for Air Elementals and change a few fields for each of the other creatures :) And of course: test, test, test! But hopefully when this gets further along we can release it for others to help with testing :)

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Humakt » 13 Jul 2016, 20:49

Personally I think you are better off with the titan/mega dragon treatment. AI losing battles to the neutrals is the issue, this percentage reduction wont likely have much of a noticeable impact.

And I recommend making a github repository for the project and linking it here, then others can contribute as well.
Thundermaps
"Death must be impartial. I must sever my ties, lest I shield my kin."

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1126
Joined: 12 Nov 2011

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Karmakeld » 15 Jul 2016, 22:02

Well the intention isn't to make the AI leave the battle unharmed or make it generally more aggressive during AI's turn, but rather to deal with the issue of AI being superior on Novice and getting beaten on Champion.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby wimfrits » 31 Jul 2016, 07:50

I'm with Humakt here.
Main issue is: AI estimates odds are reasonable, engages, loses too much in quick combat.
You want to turn that around to: AI estimates odds are reasonable, engages, has minimal/no losses.
Are you suggesting coconuts migrate?

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 31 Jul 2016, 17:04

Well, how would you and Humakt propose the scripting could he done in this way? I could do it for heroes already on the map, but what about purchased heroes and creature armies? Without a rather large amount of events and scripting, which I'm likely the one to be doing, I'm not sure this approach is feasible.

I've already tested reducing each neutral on the map for the AI's turn in order to make the AI more bold, and that is too slow (and I didn't notice much of an impact on the AI's adventure map decisions with neutrals reduced or not).

Currently I've changed the approach to reducing a single neutral that is encoutered by the AI. I haven't tested yet because I'm fixing the scripting so that it can also be placed on castles and garrisons.

If anyone has a particular map in mind that would be a good one to test this with, please let me know.

User avatar
Taro
Scout
Scout
Posts: 163
Joined: 11 Feb 2011
Location: Poland

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby Taro » 31 Jul 2016, 18:53

Once I made a map where AI armies got a thousands of units after encounter neutrals. They got 9999 of every possible unit. Why? Because you can't predict which units they will have. Let's say you want to give them only 9999 of titans. What if AI has no place for titans in the army? This will cause problems. So every unit is needed.

Effect was quite good, AI had some loses on fast units (like vampires, black dragons) but it was moving pretty fast on the map. This script has one big disadvantage - small AI army forced to attack stronger neutrals will win. Even one hero will win against 100 black dragons and it looks like cheating. But it works.

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 773
Joined: 21 Jul 2014

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby iLiVeInAbOx05 » 31 Jul 2016, 20:04

Taro, do you still have that map? If so, I could copy those scripts and do some tests with them as well to see what works best.

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

Re: Call to H-IV mapmakers - AI enchancing scripts

Unread postby wimfrits » 31 Jul 2016, 21:32

As Taro said, scripts on neutrals that give/take creatures to AI opponent before/after combat work great to minimize losses. I've seen this in several maps but I don't remember the names. Would a proportional increase per creature like add 100% / take 50% be possible? Then you wouldn't get too much unrealistic victories.

Interesting to read the results of the reduction of neutrals during AI turns. I used to wonder if that could work to make AI more bold, but never tried that approach.

An AI that is both bolder and survives battles against neutrals would be perfect.
Are you suggesting coconuts migrate?


Return to “Heroes I-IV”

Who is online

Users browsing this forum: No registered users and 22 guests