HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to add a custom hero to AMAI

12-15-2006, 04:16 PM#1
moyack
Hi:

I've done a custom neutral hero for the hero contest. Mine is the Brutal Beast and I added AMAI 2.50 RC1 to test it against a good computer player.

I tried to customize AMAI, so AI uses my custom hero, I checked the AMAI Tutorial and modified all the neccesary files to include the new hero. The perl script compiles the new AMAI perfectly, I add the custom AMAI to my map, and when the AI tries to buy a neutral hero, the Ai gets stuck. I don't know if I forgot to add something to the compilation.

My questions are:
  • I have to modify in TFT folder:
    1. HeroAbilities.txt adding the names and the rawcodes
    2. NeutralHeroSkills.txt adding the abilities learning order
    3. StandardUnits.txt adding my hero with its properties (I copied the data from the pit lord hero)
    4. Heroes.txt (in each race folder) adding my hero with its properties (I copied again from the pit lord data)
  • Is any file missing???
  • Do I have to edit every profile to give preference to my custom hero?? or is there a better way, like a general behaviour for all the AI.

Thanks for your help :)
12-15-2006, 10:10 PM#2
Strategy Master
Those should be the correct files.
But also
globalsettings.txt - ver_neutral_hero_number (change to 9)
In the heroes.txt make sure your hero is above the racial heros as otherwise has been known to cause problems.

Nope you dont have to edit every profile. If you want your hero to be picked just in the heros.txt file change base_rp to something really large and amai should then nearly always pick your hero.

If it still doesn't work send me a zip of the whole amai and i'll look and see what your doing wrong.
12-22-2006, 01:59 AM#3
moyack
Sorry for my late response, I've been a little bit busy these days.

Well, I did all that you say and it fails :(

The issues are the following:
  • The AI upgrades if it is undead, otherwise it keeps in tier 1.
  • The AI trains few units when it's different from undead (I believe that it is an aftermath of the first issue)

Here is the AMAI 2.50 RC1 modified and the map which I want to add the customized AI.

I'm sure that I did something wrong, but I don't know what.

Any help wil be appreciated.
Attached Files
File type: rarAMAI2.50DE-RC1.rar (2.1 MB)
File type: w3x(4)Brutal Beast Hero.w3x (402.7 KB)
01-11-2007, 09:01 PM#4
Strategy Master
12/24/2006
Ok i have no idea whats going on. Debug scripts are not reporting anything at all so this will take me a while to check up on.

11/1/2007
Very strange. I re-did the ai in RC2 and is working no problem. The only problem i could see was a mismatch with where u placed hero in the racial lists and where the abilities where place in heroskills list. But that wouldn't have caused some of those issues. Maybe you accidentily changed something else without realising.

Anyway it seems to be working see attachment

You may want to change the hero priorities back to something else. I set them really high for orc players at 60 instead of 10 you had them at.
Attached Files
File type: zipAMAI2.50DE-RC2-brutal.zip (2.6 MB)
01-11-2007, 11:10 PM#5
moyack
Hi Strategy Master:

Thanks for your help. I tested the new AMAI. Everything is fine (now brutal beast is trained and used XD).... but..... there is a strange bug, only the undeads upgrades tiers, the other races don't.

I'll try to find the bug, but I think that it's related to the main code.

Here's the replay and the map.
01-12-2007, 12:06 PM#6
Strategy Master
Yeah i have noticed too when testing on this map. Other races do eventually upgrade but it takes ages for them to do it. I wonder if its something to do with the actual map.
01-12-2007, 12:33 PM#7
moyack
Ok, I'm going to test it with a bigger map, and if I have any issue, I will post the replay with the map.
01-16-2007, 09:44 PM#8
Strategy Master
Hey i found the problem.

Your map doesn't use the latest patch data set in the map options. It uses the custom and for some reason it is upsetting AMAI. You will want to change that back to Melee(latest patch data) and the problem will be gone
01-17-2007, 12:53 AM#9
moyack
Strategy: <3

It's strange that bug indeed, I think you have to put that discover in your documentation so nobody fails in implementing the AI.

EDIT: I'll put you rep as soon as possible.