|
Thread: Better AI Fun but Impossible!! | This thread is pages long: 1 2 · NEXT» |
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 21, 2013 07:53 AM |
|
Edited by StrikerX at 07:59, 21 Apr 2013.
|
Better AI Fun but Impossible!!
Haha.. I just started using Better AI and WoG playing Heroes Chronicles.. The campaign where Tarnum is fighting the wizards for the barbarians freedom from slavery. The first one I got wiped on hard and put it to normal and still got wiped twice almost barely surviving and making a mad dash at his town after the last attack on my city before the next week. So the 2nd mission starts and I think I might do a bit better since I have higher level heroes lol but check this out.. This is day 4 of the 2nd week only. This wizard breaks thru a horde of trolls the pitifully weak garrison they setup and attack my town all on the same turn with this army.
Impossible!! Day 4 of second week.. Still trying to get first buildings up and capital not even build yet. Lots of cash cause I started with first money option and Normal but nothing to spend it on. I have to admit it's kinda fun. These campaigns usually a breeze but this way too much.
This guy has 98 lvl 4 wizards already! and 233 master gremlins with over 100 of 2 other usits! He must of found an artifact that gives the precision at start cause all those range units had precision for 50 rounds at start of battle(I use enhanced artifacts). My tent even heals more and has more hp's before it's destroyed but no way to protect against all that. Sucks you can't use ballista in castle defense. I thought you could before but maybe I'm remembering wrong.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 21, 2013 07:58 AM |
|
|
Better AI is mod for XL random maps, as it gives free towns to AI, which will screw a campaign or any custom map.
____________
Era II mods and utilities
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 21, 2013 08:04 AM |
|
|
Quote: Better AI is mod for XL random maps, as it gives free towns to AI, which will screw a campaign or any custom map.
Yeah that would make it a bit better not getting attacked so soon but it's kinda fun have the campaign's harder. One thing I noticed though is it's messing with my hiring of heroes. All of sudden the hero spots in tavern become empty. Sometimes one spot and then both and they never return. Guess I'll see if I can edit it and cut out some things just for campaigns.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 21, 2013 08:08 AM |
|
|
Is normal that sometimes one tavern spot is empty. Heroes already used by AI are marked and cannot be hired by human player, thus right/left spot will show empty, but is very unlikely that you get both spots empty at same time unless you play a custom map with restricted number of heroes, in which case the mod is not suitable. Read description in mod manager.
I will create custom options in Better AI as soon as I get time.
____________
Era II mods and utilities
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 21, 2013 08:21 AM |
|
Edited by StrikerX at 08:23, 21 Apr 2013.
|
Quote: Is normal that sometimes one tavern spot is empty. Heroes already used by AI are marked and cannot be hired by human player, thus right/left spot will show empty, but is very unlikely that you get both spots empty at same time unless you play a custom map with restricted number of heroes, in which case the mod is not suitable. Read description in mod manager.
I will create custom options in Better AI as soon as I get time.
Ah yeah these Heroes Chronicle's campaigns I've noticed I can only use barbarian heroes and they start with barbarian towns so I guess they go thru them pretty fast. I had read that and figured that what was causing it. There is a bug though or something strange going on with that option though. The first mission of the campaign showed both slots as empty. No picture but I clicked on both slots and was able to hire a hero from it even though I couldn't see it. But then after that I couldn't hire anything more.
Didn't realize you had created Better AI. Nice job.
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 21, 2013 02:16 PM |
|
|
I like how you explained what each section did in that BetterAI mod. Made it easier to understand and change what wasn't intended for campaigns.
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 24, 2013 09:09 PM |
|
Edited by StrikerX at 21:14, 24 Apr 2013.
|
If someone can win a game with default Better AI settings I'd like to know how lol. I played this XXL map twice, restarted after getting wiped out in 3rd week first time. Made it to week 6 and look at this I even made the script give like 5 less of each troops a week to AI in bottom 3 slots and less gold / resources and lessened amount of XP they get daily and only 4 random stats a week instead of 7 and by week 6 this guy had over 50 stat points in 3 places lol and I had 10! I also took off intelligience and only refilled him to max not double a day otherwise this guy would have 1360 mana hehe.
I even have mythril upgrades in castle and had over 12k+ extra gold a day lol but couldn't make enough creatures. It's amazing if you can actually win a game with this.
The random map generator with HD templates makes better maps and less portals but gives no mines except wood / ore at start castle and hardly no castles. Only one castle and I had the entire huge corner to myself. What map generator option is the best for XL+ maps?
The AI is treating me like I'm used to treating it hehe. I ended this fight and he lost like 50 archers only and they got resurrected at end of battle. Even counting 10 lvl 8 dragons I started with. This was every creature I had from beginning of game. Didn't lose any till this fight.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 24, 2013 09:30 PM |
|
|
Oh, never use random generator, you will get all AI's to your door pretty soon. Use templates from HD mod, some XL where you have at least 1-2 months to prepare. You should also use bonus wog options, as commander + artefacts, enhanced skills, enhanced utopias, emerald towers, level 8 creatures upgrades, get spells as blind, force field, berserk. I won every game when testing, AI is still AI, he puts all army on one hero then flags mines with him. Shackles are a must when fighting that hero, don't let him escape.
If you have utopias on map, you can't have 10 all stats on week 6, should be 50 too. Assuming that the template is not crap as the original one.
____________
Era II mods and utilities
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 25, 2013 04:43 AM |
|
Edited by StrikerX at 04:45, 25 Apr 2013.
|
Quote: Oh, never use random generator, you will get all AI's to your door pretty soon. Use templates from HD mod, some XL where you have at least 1-2 months to prepare.
I used the one that says 6LM10A(8p, XL+U). I guess that's an original random map generator? Doesn't seem like it is. Usually I would have a million portals / staircases but this map didn't have any portals I saw and a lot less stairs. Are the HD templates all the named ones I take it? Which ones are best?
Quote: You should also use bonus wog options, as commander + artifacts, enhanced skills, enhanced utopias, emerald towers, level 8 creatures upgrades, get spells as blind, force field, berserk.
Ah I use to play with commander + emerald towers but made it a lot easier so I stopped using those.
Guess it's time to bring them back
Quote: If you have utopias on map, you can't have 10 all stats on week 6, should be 50 too. Assuming that the template is not crap as the original one.
This map was wierd. I had an entire corner to myself covered in grasslands for Rampart but very little powerups. No utopia's / mines. Mostly just 1000 exp shrines. I couldn't go near a staircase without getting stepped on by the AI lol. I guess he had his castle nearby I never did find it. Besides clearing that side I mostly huddled in my castle terrified Only one good artifact I found was Hellsword +6 atk otherwise I would of had only 4 atk to his 52.
I don't see how to ever match his creature output though. I guess we'll see next game. Especially since he gets all towns rebuilt to his starting town. He must of had like 2 or 3 towns making 2x my one town.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 25, 2013 04:53 AM |
|
|
You can create a random map then edit it, place more towns, utopias, whatever you like. But as I said, the key for defeating better AI is to get the right spells, if there are no towns or utopias around, no spells or magic tomes. I don't think better AI is winnable on scarce maps, you need at least 3-4 towns early to be able to catch him.
____________
Era II mods and utilities
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 26, 2013 10:27 AM |
|
Edited by StrikerX at 10:30, 26 Apr 2013.
|
I had a script question if you don't mind answering.
I wanted to play around with all towns being changed to faction owner town type when they captured including human towns and same applies to human player when he captures any town so the faction pretty much will only have there own faction creatures.
This is your script for changing neutral town types in Better AI except I removed the -1000 so it affects every time a battle takes place.
;All towns will match their faction including human players
!?BA1; Any battle takes place this is called (if town empty and captured - no battle so not changed)
!!BA?v1/?v2/?v3;
!!OBv1/v2/v3:T?y2;
!!VRv300:Cv1/v2/v3;
!!FU&y2<>98:E; exit if not town
!!HE-1?v1;
!!FU&v1<0:E; exit if hero dead
!!OW:C?y1; current player
!!OW:Ny1/0/?y2; get first AI town number
!!if&y2>-1:; if AI has at least one town
!!CA0/y2:T?y3; get type
!!CA300:T?y4;
!!CA300&y4<>y3:Ty3 I0;
!!en:;
It works well except I've noticed one problem. The BA command is only called if a battle takes place but if the town is empty then no battle took place and the town type doesn't change. I like how it changes instantly so the AI has no chance to buy other creatures not his faction type.
Is there an easy way to tell if the current player has captured a town and change it without looping thru all towns each turn or I was thinking fix it like phoenix mod does when a hero attacked and he has no creatures. He gets 1 rogue when battle starts but then again probably wouldn't work cause no battle takes place.
If there's a different place to ask this question let me know.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 26, 2013 10:58 AM |
|
|
I think is a better option to add custom dialog when you right-click on town entrance.
ZVSE
!?CM0;
!!CM:P?y1/?y2/?y3;
!!OBy1/y2/y3:T?y4;
!!FU&y4<>98:E;
!!CAy1/y2/y3:N?z12;
!!IF:Q1^Would you want to convert the town of %Z12?^;
!!FU&-1:E;
!!VRz1:S^Select the town type^;
!!VRz2:S^Castle^;
!!VRz3:S^Rampart^;
!!VRz4:S^Tower^;
!!VRz5:S^Inferno^;
!!VRz6:S^Necropolis^;
!!VRz7:S^Dungeon^;
!!VRz8:S^Stronghold^;
!!VRz9:S^Fortress^;
!!VRz10:S^Conflux^;
!!VRz11:S^I changed my mind^;
!!CM:R0;
!!IF:G1/2/512/z1/z2/z3/z4/z5/z6/z7/z8/z9/z10/z11;
!!FU&v2=512:E;
!!FU333333:Py1/y2/y3/v2;
!!IF:M^Done^;
!?FU333333;
;x4 selection
!!CAx1/x2/x3&x4=1:T0 I0;
!!CAx1/x2/x3&x4=2:T1 I0;
!!CAx1/x2/x3&x4=4:T2 I0;
!!CAx1/x2/x3&x4=8:T3 I0;
!!CAx1/x2/x3&x4=16:T4 I0;
!!CAx1/x2/x3&x4=32:T5 I0;
!!CAx1/x2/x3&x4=64:T6 I0;
!!CAx1/x2/x3&x4=128:T7 I0;
!!CAx1/x2/x3&x4=256:T8 I0;
Not tested, let me know if some typo somewhere.
____________
Era II mods and utilities
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 26, 2013 11:49 AM |
|
Edited by StrikerX at 12:01, 26 Apr 2013.
|
Thanks for taking the time to do that script.. but not exactly what I was thinking. I wanted to use like yours where the AI will change any town including human to his type even if he captures it with no troops inside. I needed it automatic on his turn when he captures the town and before he gets a chance to hire troops (if this is even possible). BA works in most situations but I've found two problems with it.
(These 2 issues exist even in your Better AI script)
1.) If the player / AI attacks a town that has two heroes in it. The garrison and the one showing outside the town. Then the town will get changed if the attacker wins the first battle and doesn't even need to win the town battle or attack the town a 2nd time. This happens in your script too if the AI attacks another AI and only won the first battle that town would get changed cause the hero isn't dead.
This wouldn't happen all that often probably but would still mess up the other AI's town and change it's type even if the defending AI won the 2nd battle his town is already changed. Least that's what happened for me when I tested the script after I removed the -1000. I attacked an AI town with 2 heroes and the town type changed after I won the first fight even though the AI still owned the castle at that point. I wouldn't know how to do this but I think there needs to be a owner check before the battle for the town and see if the town actually changed owners after the battle. This might fix this issue where the attacker only attacked the first hero defending a town.
2.) This one is what I've talked about before if the town is empty when captured it isn't changed either. Would like this to be automatic too cause the AI takes out enemy AI towns that are empty and they aren't changed then. It wouldn't be practical to use this script for that. Seems more complicated to do this cause BA won't trigger. Been reading more on triggers but not sure if there is a trigger that would cover a town changing owners during the current turn of AI / human.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 26, 2013 11:54 AM |
|
|
I see. There is a timer running for AI in case he takes an empty town, and the timer will convert the town every day 1 of the week.
For two fights issue I didn't think of, thanks for noticing. I will look into a bit later but this was caused by changing the 1000 flag to -1000, it wasn't intended. If you lose a town to AI, it will convert automatically. If he steps in one of your empty towns, you have a chance to take it back until week ends, before converting, this was on purpose.
____________
Era II mods and utilities
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 26, 2013 12:06 PM |
|
Edited by StrikerX at 12:14, 26 Apr 2013.
|
Quote: I see. There is a timer running for AI in case he takes an empty town, and the timer will convert the town every day 1 of the week.
For two fights issue I didn't think of, thanks for noticing. I will look into a bit later but this was caused by changing the 1000 flag to -1000, it wasn't intended. If you lose a town to AI, it will convert automatically. If he steps in one of your empty towns, you have a chance to take it back until week ends, before converting, this was on purpose.
Oh I didn't noticed the timer part of your better AI script for changing town types. I thought that was referring to giving an AI a free town on day 1 of each week. This same area also changes any towns he currently owns as well to his type? (alot of scripting I don't understand yet.. I get the jist of alot of yours only cause it's well commented )
BTW I edited my post above. Is there a trigger that would activate if a town changes ownership where you could check previous and current owner and change the type before the AI gets a chance at hiring any creatures of the other factions town.
I might be able to figure out the problem to first issue. I think it should be easy to check if town changed ownership before and after battle.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 26, 2013 12:10 PM |
|
|
This:
!?FU15002;
!!UN:U98/-1/-1/1; [castle coordinates]
!!VRv300:Cv1/v2/v3; use later in do loop (15010)
!!CA300:O?y1; Owner
!!FU&y1<0:E; exit if neutral
!!OW:Iy1/?y2; AI/0 human
!!FU&y2<1:E; only AI
!!OW:C?y3; current player
!!if&y1=y3:; if owner=current player
!!FU15020:Py3;
!!SN:W^AI town^/?y4;
!!CA300&y4>=0:Oy3 Ty4 I0;
Checks every 1st day AI towns and changes them to his faction, so there is no chance AI has another town for more than a few days.
____________
Era II mods and utilities
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 26, 2013 12:18 PM |
|
|
Quote: I might be able to figure out the problem to first issue. I think it should be easy to check if town changed ownership before and after battle.
Replace this section:
;All AI towns will match his faction
!?BA1&-1000; only vs neutral towns or AI-AI
!!BA:P?v300/?v301/?v302;
!!OBv300/v301/v302:T?y2;
!!FU&y2<>98:E; exit if not town
!!HE-1:O?v2;
!!FU&v2<0:E; exit if hero dead
!!CA300:O?v1; [check owner]
!!FU&v1<>v2:E; [exit if town did not change owner]
!!FU15020:Pv2; [process conversion]
!!OW:C?y1;
!!SN:W^AI town^/?y2;
!!CA300&y2>=0:Oy1 Ty2 I0;
Added in bold the modifications. Please don't remove flag -1000, because human faction is not stored in SN:W, so the command will probably convert everything to castle (0) if human fight.
____________
Era II mods and utilities
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 26, 2013 12:34 PM |
|
Edited by StrikerX at 12:36, 26 Apr 2013.
|
Quote:
Quote: I might be able to figure out the problem to first issue. I think it should be easy to check if town changed ownership before and after battle.
Replace this section:
;All AI towns will match his faction
!?BA1&-1000; only vs neutral towns or AI-AI
!!BA:P?v300/?v301/?v302;
!!OBv300/v301/v302:T?y2;
!!FU&y2<>98:E; exit if not town
!!HE-1:O?v2;
!!FU&v2<0:E; exit if hero dead
!!CA300:O?v1; [check owner]
!!FU&v1<>v2:E; [exit if town did not change owner]
!!FU15020:Pv2; [process conversion]
!!OW:C?y1;
!!SN:W^AI town^/?y2;
!!CA300&y2>=0:Oy1 Ty2 I0;
Added in bold the modifications. Please don't remove flag -1000, because human faction is not stored in SN:W, so the command will probably convert everything to castle (0) if human fight.
I was gonna reply and say this didn't work for me then I noticed your script doesn't even match mine. My better AI doesn't have a FU15020 area at all. This is the last part of your script I have. I thought I had the newest version posted.
;All AI towns will match his faction
!?BA1&-1000; only vs neutral towns or AI-AI
!!BA:P?v1/?v2/?v3;
!!OBv1/v2/v3:T?y2;
!!VRv300:Cv1/v2/v3;
!!FU&y2<>98:E; exit if not town
!!HE-1:O?v1;
!!FU&v1<0:E; exit if hero dead
!!OW:C?y1; current player
!!OW:Ny1/0/?y2; get first AI town number
!!if&y2>-1:; if AI has at least one town
!!CA0/y2:T?y3; get type
!!CA300:T?y4;
!!CA300&y4<>y3:Ty3 I0;
!!en:;
Did you post a newer Better AI version that contains this updated script of yours?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 26, 2013 12:38 PM |
|
|
Hmm, strange, I thought I updated links, maybe not.
BetterAI.erm
Replace in Mods/better ai/data/s
Will not work on saved games I think, must start new.
I think the last version has AI towns types stored differently, JimV found a better way than what I had previously.
This is updated with the change.
____________
Era II mods and utilities
|
|
StrikerX
Known Hero
The Bringer of Rain
|
posted April 26, 2013 01:54 PM |
|
Edited by StrikerX at 16:35, 26 Apr 2013.
|
Thanks.. I'm sure you may of uploaded it somewhere. Kind of hard to find mod updates in that Era Mod post it's grown so many pages. I got the old script from the first page. Would be nice to have something like ModDB website where authors could update there mods and we could search the database of Homm3 mods on this site.
Well that seems to work for the AI. Which is what your script was for.
**************
I'm having trouble getting it to work when I remove the -1000 like I could do with your other script the town doesn't change to my faction even when I capture it the 2nd battle.
I setup comments to tell me what it doesn't make it past.
!!FU&v1<>v2:E;
It never makes it past this line if human attacks a town with 2 heroes. Town V1 always stays 1 (in this case) and Hero V2 always stays 0. It doesn't seem to register that the town changed owner before this line is run.
Well this script is totally different lol. If I omit that line just for testing human the town gets changed to a random town type and it removes the 2nd hero still in the castle and says that players been eliminated.
|
|
|