Call to H-IV mapmakers - AI enchancing scripts
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
I already have the scripting done to reduce a stack by a given percent, so I would think that wouldn't be too different from giving a percentage of creatures to the attacking AI. I could script it, but I feel I've been spending more time creating these scripts than I have on the tool to inject them.
As far as the events to reduce all neutrals during an AI turn, there are probably things I could do to make it faster, but I would have to ditch some other things, like calculating the experience the AI would receive for the full stack on victory.
As far as the events to reduce all neutrals during an AI turn, there are probably things I could do to make it faster, but I would have to ditch some other things, like calculating the experience the AI would receive for the full stack on victory.
Re: Call to H-IV mapmakers - AI enchancing scripts
I don't have it, but I can create new one within several days (there is a LOT of scripting to make it work). And how did you make a percentage reduction of neutrals??? I believe there is no type of script like that.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
I would appreciate if you could do that scripting for me. All you need to do it for is a single creature, and then I can copy / paste the scripts within the event, using the H4MG, and then just change the creature name where necessary.
Are these scripts only on the Encountered / Defeated events? Encountered -> check for space and give appropriate units, and Defeated -> Remove what was given?
As far as how I did the percentage reduction, I have a single variable containing a number between 0 and 99 which represents the percent reduction. So, a value of 80 means reduce by 80 percent (stack of 100 creatures will be reduced to a stack of 20 creatures).
Each neutral stack has an event #H4MG Reduce _Neutrals, which checks for each possible creature, and if there is at least one, does some calculations. For example, if number of air elementals in this army is greater than 0, calculate 80% of that number by first multiplying it by 80, and then dividing by 100 (to get a percent of something, you multiply it by the decimal equivalent of a percent, which is .8 in this case).
Then I call an event #H4MG Reduce Air Elementals, which uses the number I just calculated and takes away that many air elementals from this stack.
If the stack wins against the AI, I give back to the stack what I took away.
Are these scripts only on the Encountered / Defeated events? Encountered -> check for space and give appropriate units, and Defeated -> Remove what was given?
As far as how I did the percentage reduction, I have a single variable containing a number between 0 and 99 which represents the percent reduction. So, a value of 80 means reduce by 80 percent (stack of 100 creatures will be reduced to a stack of 20 creatures).
Each neutral stack has an event #H4MG Reduce _Neutrals, which checks for each possible creature, and if there is at least one, does some calculations. For example, if number of air elementals in this army is greater than 0, calculate 80% of that number by first multiplying it by 80, and then dividing by 100 (to get a percent of something, you multiply it by the decimal equivalent of a percent, which is .8 in this case).
Then I call an event #H4MG Reduce Air Elementals, which uses the number I just calculated and takes away that many air elementals from this stack.
If the stack wins against the AI, I give back to the stack what I took away.
Re: Call to H-IV mapmakers - AI enchancing scripts
Well, I created a part where AI gets creatures on encounter. Soon I will make a second part, where it loses bonus creatures.
Re: Call to H-IV mapmakers - AI enchancing scripts
I will have to test one of my maps again/look for old saves, coz I recall I had the results of the AI doing more progress on novice than on advanced.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
Michael, please let me know which map so I can use it as a test case
Re: Call to H-IV mapmakers - AI enchancing scripts
The 5th map.
I might have to send you some older version of it, as I've added some Changes to deal with the issue in the latest version.
I might have to send you some older version of it, as I've added some Changes to deal with the issue in the latest version.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
Just a minor update on progress. I went through this thread to try to pick out all suggestions and compile them into a single post. If I missed anything, or there are other ideas, please let us know
List of things to do for AI enhancement (in no particular order):
AI Enhancement
- Show entire map for AI
- Make every player "vital" under AI properties
- Events to give gold / resources to AI (including recurring increases)
- Increase starting level of AI heroes
- Reduce neutrals on encounter for AI (fewer AI losses while still gaining normal experience)
- Increased AI movement
- Increased AI experience
- Increase dwelling populations for AI towns
- Starting skills for new AI heroes. (Need suggestions for skill combinations)
- AI artifact sorting (PatFX working on this)
- AI hero stat buffs
Other
- Balancing mechanism for neutral armies for each difficulty level
- Make the AI options tunable for difficulty. The easiest way to do this would be to have a selectable percentage reduction applied for each difficulty level under champion.
- Control neutrals vs. an opponent.
List of things to do for AI enhancement (in no particular order):
AI Enhancement
- Show entire map for AI
- Make every player "vital" under AI properties
- Events to give gold / resources to AI (including recurring increases)
- Increase starting level of AI heroes
- Reduce neutrals on encounter for AI (fewer AI losses while still gaining normal experience)
- Increased AI movement
- Increased AI experience
- Increase dwelling populations for AI towns
- Starting skills for new AI heroes. (Need suggestions for skill combinations)
- AI artifact sorting (PatFX working on this)
- AI hero stat buffs
Other
- Balancing mechanism for neutral armies for each difficulty level
- Make the AI options tunable for difficulty. The easiest way to do this would be to have a selectable percentage reduction applied for each difficulty level under champion.
- Control neutrals vs. an opponent.
Last edited by iLiVeInAbOx05 on 27 Sep 2016, 03:08, edited 6 times in total.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
I have been sneakily editing my last post with updates from my progress. I'm currently at the increased experience for AI heroes. I can easily just add a single experience bonus daily, but there was some discussion about the amount increasing over time.
What would be a good "amount of time" to increase the amount of experience being given to AI heroes? Increase each week? Each month? What would the high end be for time (at some point I have to just say if time > some time, use this amount)? For the amount of increase, I'll probably have the user set a percentage to increase for each time amount.
Also, giving new AI heroes decent starting skills. Could someone provide some combinations that I could choose from to give to a newly hired AI hero?
What would be a good "amount of time" to increase the amount of experience being given to AI heroes? Increase each week? Each month? What would the high end be for time (at some point I have to just say if time > some time, use this amount)? For the amount of increase, I'll probably have the user set a percentage to increase for each time amount.
Also, giving new AI heroes decent starting skills. Could someone provide some combinations that I could choose from to give to a newly hired AI hero?
Last edited by Anonymous on 07 Sep 2016, 19:09, edited 1 time in total.
Re: Call to H-IV mapmakers - AI enchancing scripts
I think weekly would be fine.
Assuming most maps take an average of 3-4 months (depending on size of course), I don't think once a month is of much use. Also I think you could end the time after 4-5 months. XL maps seems to be the only type benefiting from a longer time span. I take scripts are put on new heroes, not universal time? You could also consider the amount of XP given, at first 1000's soon add up to levels, but after x levels/months they matter less, unless the xp is somewhat increased. perhaps 3-4 month time span is enough?
Will the starting XP be preset or adjustable like the percentage increase?
Assuming most maps take an average of 3-4 months (depending on size of course), I don't think once a month is of much use. Also I think you could end the time after 4-5 months. XL maps seems to be the only type benefiting from a longer time span. I take scripts are put on new heroes, not universal time? You could also consider the amount of XP given, at first 1000's soon add up to levels, but after x levels/months they matter less, unless the xp is somewhat increased. perhaps 3-4 month time span is enough?
Will the starting XP be preset or adjustable like the percentage increase?
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
I was thinking weekly as well, just wanted to get some others to chime in with their thoughts It wouldn't be that difficult to make the amount of time between increases user selectable as well (just use current day modulus number of days between increase == 0 and then switch to the next amount), but I think for now we can just say a week is a good amount of time. So, just checking the week number and selecting the appropriate amount of experience to give based on that is probably the easiest way to go.
The scripts will be put on any hero that is placed on the map, as well as on placed events around the entrance to towns for hired heroes (starting heroes can still trip the placed events, so they can get extra bonuses, but I don't currently see a way around that).
The starting experience increase and percent increase of that experience per week will both be adjustable so users can find a good starting point and percent increase that works reasonably well
The scripts will be put on any hero that is placed on the map, as well as on placed events around the entrance to towns for hired heroes (starting heroes can still trip the placed events, so they can get extra bonuses, but I don't currently see a way around that).
The starting experience increase and percent increase of that experience per week will both be adjustable so users can find a good starting point and percent increase that works reasonably well
Re: Call to H-IV mapmakers - AI enchancing scripts
So you can't really add it to hired heroes right?
It would just be a one time bonus?
In which case, only giving to lvl. 1 heroes would mean newly hired or only allowing it to trigger once a day, could rule out some unwanted increases (not gonna call it abuse, as it's AI only)
It would just be a one time bonus?
In which case, only giving to lvl. 1 heroes would mean newly hired or only allowing it to trigger once a day, could rule out some unwanted increases (not gonna call it abuse, as it's AI only)
Last edited by Anonymous on 10 Sep 2016, 08:40, edited 1 time in total.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
Can't add it to hired heroesnas things currently stand. It might be possible by injecting a dll into the game while it's running which would attach to whatever method creates the hero object and adds it into the game, but I don't know anything about that right now
The placed events in front of towns are currently set to only be usable twice per turn, so the AI won't be able to accidentally abuse it
The placed events in front of towns are currently set to only be usable twice per turn, so the AI won't be able to accidentally abuse it
Re: Call to H-IV mapmakers - AI enchancing scripts
Well, I had to disappear for some time. iLiVeInAbOx05 - do you still need that script with neutrals? I can create it this weekend.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
If it doesn't cost you too much time to do, then you might as well so that we can bundle it in with the other events.
Re: Call to H-IV mapmakers - AI enchancing scripts
Here you go: https://drive.google.com/open?id=0B-htY ... 2NBX0k0aGc
It is made for level 1 units but you can copy it anywhere you like. And if you decide to implement it then please stay with original name of "neutral slayer".
I have idea for one simple script. Starting AI hero could get healing potion when encounter human player. With it killing this hero wouldn't be that easy.
It is made for level 1 units but you can copy it anywhere you like. And if you decide to implement it then please stay with original name of "neutral slayer".
I have idea for one simple script. Starting AI hero could get healing potion when encounter human player. With it killing this hero wouldn't be that easy.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
Got it, thanks! I'll call the AI event group "#H4MG AI Neutral Slayer". Is that alright?
Re: Call to H-IV mapmakers - AI enchancing scripts
Yeap, that' alright. Are you plannning script with reveal map for AI (or at least some part of it?).
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Call to H-IV mapmakers - AI enchancing scripts
I've actually already got showing the map for the AI working. I used the hero from the map you posted on the first page and put them all around the map so that the entire map is visible to the AI on the first turn.
Re: Call to H-IV mapmakers - AI enchancing scripts
I understand but is it even possible to implement it in your program? Because as far as I know you can give scripts to already existing objects. With this you have to place these heroes first. And this could be a problem.
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest