Star IAI v1.0 (Protoss Only)

Started by DarkZeros, March 07, 2010, 06:36:10 PM

Previous topic - Next topic

DarkZeros

This is the last version, i won't continue the proyect.  :'(
I'm sry but i have no time for this. I wish good luck to the other AI proyects.

Changelog:
Quote
- Fixed Vespene gathering.
- Added ChronoBoost (thanks Aeg1s), with some mooded things. (It will cast chronoboost to production buildings, when they produce smt)
- Expands faster.
- More agresive
- Changed the unit production
- Completed all the researchs  (in late/end game)
- Small changes to all parts of the AI, to adapt to the chrono boost.

Hope you like it, bye!
----------------------------
DOWNLOAD: http://www.multiupload.com/9V8Q1G13DD

HOW TO INSTALL: Extract to: /Starcraft II beta/TriggerLibs/*.galaxy

1337

I am sad to hear that you won't be continuing this project. It was a great inspiration to me. It has some original ideas that I haven't seen in any other AI so far. I am working to incorporate the best parts from your AI plus some from StarCrack into mine... so it will live on in spirit!


I wish you the best of luck in your real life ;)

Phyon

Ah to bad you are not working on this any more I tried this ai out and it is quite tuff much stronger then starcracks cheating AI I found this out by having them fight :P I dont know how to do a pvp but i did a pvt and a pvz and your AI just stomped the cheat ai into the ground. The PVZ had a high point though when like 6 mutalisks killed a lone mothership. The zerg died from having no detectors around when the dts came even with out that i dont think it would of lived there at the end.

DarkZeros

I changed my mind. Well i'm not leaving the proyect(i love AI and coding :P). But i won't have time to code it day and night.

Some advance: Replay FFA v6.1 vs IAI

Hopefully, in some days I have a reactive AI with more openings.

Phyon

Cool well I await your next version! :D I cant watch replays so cant see what you posted  :'( ah well kinda have given up on that. I have noticed after watching some more ai games though yours struggles a little bit late game though just about every game i have watched most things just die to your first attack or by mid game only seen one late game vs a terran and the terran was messing your AI up with Battle cruisers

pouletAuBeurre

Wow, i just tried this AI after using StarCrack 6.1.1. for a while and StarIAI is a LOT more challenging. Really great job im glad u keep working on it!
I hope they make your AI a sticky that more people download it.

DarkZeros

Working on new version. The new one will be multirace ^^

v2.0 eta: 1-2days.

PD: Yes it will be reactive (and not only air reactive)

mysticalmage13

#7

Edit: Sorry posted this in the wrong topic, the consequence of having too many tabs.  :D 


Uhm guys, here's a guide to watch your replays against A.I.


http://darkblizz.org/Forum2/not-enough-pylons/how-to-view-your-own-replays-(with-full-instructions-on-how-to-install-the-game)/


I followed the instructions and it worked like a charm.  :)
Oh yeah, I'll be trying out your A.I. once it's done downloading. My downloads are getting slower by the minute.  >:(  Probably need to replace my service provider.

emylgoth

Quote from: DarkZeros on March 12, 2010, 08:25:29 AM
Working on new version. The new one will be multirace ^^

v2.0 eta: 1-2days.

PD: Yes it will be reactive (and not only air reactive)
All races!?... I can't wait, really, cos your toss was much-much better than 5.5. ;D

ptanhkhoa

    I love your Ai, it can run Multi task at one and do it on its  own. Can I used it to develop my Cheating Ai script :P ? I let it have double mineral and gas, modified some process to use the resources well.  I have some problem in gas minerals, when expand a new town. It just placed a assimilator very far from the expanded town. Some time the Ai stop production, I don't know why yet ? So I just placed a While command for it to continue, it works some how.
   
t = 0;
    while ( t <= 100 )
        {
        if (tech_level>=3)
        {   
            // 1 transport
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_WarpPrism, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_WarpPrism, 1);     
            }
            // 2obs
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Observer, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Observer, 1);     
            }
        }
        else if (tech_level>=6)
        {   
            // 2 transport
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_WarpPrism, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_WarpPrism, 1);     
            }
            // 4obs
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Observer, c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Observer, 1);     
            }
        }   
    if (IAI_AirGround) //Air1
    {   

    }
    else if (!(IAI_AirGround) &&(IAI_Ground == 1)) //Gnd1
    {   
        //Tech Level 0
        if (tech_level==0)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 16 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
        }
        //Tech Level 1
        else if (tech_level==1)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }   
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*4))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if (tech_level==2)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 25 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 6 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*6))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if (tech_level==3)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 5 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*10))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if ((tech_level==4)||(tech_level==5))
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 300, 200) && (AITechCount(player, c_PU_VoidRay , c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_VoidRay , 1);     
            }
            if (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter )>=FixedToInt(0.7*30))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if ((tech_level==6)||(tech_level==7))
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 200, 150) && (AITechCount(player, c_PU_VoidRay , c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_VoidRay, 1);     
            }
            if (AIHasRes( player, 400, 300) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }
            if (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter )>=FixedToInt(0.7*30))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else
        {   
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 200, 150) && (AITechCount(player, c_PU_VoidRay , c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_VoidRay , 1);     
            }
            if (AIHasRes( player, 400, 400) && (AITechCount(player, c_PU_Colossus, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Colossus, 1);     
            }   
            if (AIHasRes( player, 500, 500) && (AITechCount(player, c_PU_Carrier, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Carrier, 1);     
            }
            if (AIHasRes( player, 200, 200) && (AITechCount(player, c_PU_DarkTemplar , c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_DarkTemplar , 1);     
            }
            if (AIHasRes( player, 400, 300) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AIHasRes( player, 500, 500) && (AITechCount(player, c_PU_Mothership , c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Mothership , 1);     
            }
            if (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter )>=FixedToInt(0.7*30))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }           
        }

    }
    else if (!(IAI_AirGround) &&(IAI_Ground == 2)) //Gnd2
    {   
        //Tech Level 0
        if (tech_level==0)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 16 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
        }
        //Tech Level 1
        else if (tech_level==1)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }   
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*4))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if (tech_level==2)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 25 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 6 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*6))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if (tech_level==3)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 12 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 5 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if(AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter )>=FixedToInt(0.7*5))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if ((tech_level==4)||(tech_level==5))
        {
            if (AIHasRes( player, 125, 125) && (AITechCount(player,  c_PU_DarkTemplar, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_DarkTemplar, 1);     
            }
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 15 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 400, 400) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AITechCount(player, c_PU_DarkTemplar, c_techCountQueuedOrBetter )>=FixedToInt(0.7*10))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if ((tech_level==6)||(tech_level==7))
        {
            if (AIHasRes( player, 125, 125) && (AITechCount(player,  c_PU_DarkTemplar, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_DarkTemplar, 1);     
            }
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 15 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 400, 400) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AITechCount(player, c_PU_DarkTemplar, c_techCountQueuedOrBetter )>=FixedToInt(0.7*10))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else
        {   
            if (AIHasRes( player, 125, 125) && (AITechCount(player, c_PU_DarkTemplar , c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_DarkTemplar , 1);     
            }
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 15 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 150, 150) && (AITechCount(player, c_PU_Phoenix , c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Phoenix , 1);     
            }
            if (AIHasRes( player, 400, 400) && (AITechCount(player, c_PU_Colossus, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Colossus, 1);     
            }   
            if (AIHasRes( player, 500, 500) && (AITechCount(player, c_PU_Carrier, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Carrier, 1);     
            }
            if (AIHasRes( player, 200, 200) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AIHasRes( player, 500, 500) && (AITechCount(player, c_PU_Mothership , c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Mothership , 1);     
            }
            if (AITechCount(player, c_PU_DarkTemplar, c_techCountQueuedOrBetter )>=FixedToInt(0.7*10))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }           
        }
    }
    else if (!(IAI_AirGround) &&(IAI_Ground == 3)) //Gnd3
    {   
       
    }
        t = t+ 1;
        }

L33tGam3r

Sorry for the dumb question but i kinda' fail to understand where exactly  to put that  ???
"HOW TO INSTALL: Extract to: /Starcraft II beta/TriggerLibs/*.galaxy" 
Well I can't even find this  :-X

DarkZeros

Extract the files inside a folder named "TriggerLibs" in the main dir of Starcraft II, so it will look like this:

/SCIIDIR/TriggerLibs/ and inside some .galaxy files.

Astazha

It's not a dumb question.  Most of the people in here are editing AI themselves so it wasn't made clear.


-The .rar you downloaded contains two files protoss.galaxy and protossIAI.galaxy
-These files are only part of an AI.  You have to use editing tools to add them to something.


1) Download the latest Starcrack (or anything else you want.)
2) Download/extract the IAI Protoss files.
3) Download Ladik's MPQ editor and extract/install it to wherever you want.
4) Take the existing AI you want to insert this into and make a copy of it.  Just copy the whole folder from c:\program files\Starcraft II Beta\AI\Starcrack version blah blah to c:\........\AI\MYNewAIFolderName
5) Using Ladik's MPQ editor, open the AI archive in the folder you just created.  You will have to change the file filter to all files because the file doesn't have an .mpq extension. The file will be named base.SC2  Hit ok for the default options
6) Drill down to the TriggerLibs directory within the archive using the Ladik MPQ editor.  You should be able to see a file named protoss.galaxy
7) Hit Operations, Add File.  Browse to the location where you extracted IAI's protoss.galaxy and protossIAI.galaxy files, select them and hit ok.  Hit ok at the next screen that pops up.  Hit Yes, you want to overwrite.
8 ) At this point you're done.  You can close the archive if you want but it will work fine if you leave it open too.  Run your favorite launcher and select the new AI that you've created.  It should have Starcrack's AI for Zerg/Terran (or whatever you modified) and IAI for Protoss.


Hope that was clear enough and hope I didn't miss anything.  Holler if you get stuck.


Be aware if you play with modifiying those text files:


opening one, making changes, and saving it does not do anything on it's own except save a text file to your hard drive in the MPQ/Work directory.  You have to add the new version to the existing archive before it changes.


Maybe an already created MPQ archive could be created with IAI added to the latest Starcrack?  Would make it easier for the people who just want to enjoy your work.


DarkZeros

Quote from: ptanhkhoa on March 15, 2010, 01:34:29 AM
    I love your Ai, it can run Multi task at one and do it on its  own. Can I used it to develop my Cheating Ai script :P ? I let it have double mineral and gas, modified some process to use the resources well.  I have some problem in gas minerals, when expand a new town. It just placed a assimilator very far from the expanded town. Some time the Ai stop production, I don't know why yet ? So I just placed a While command for it to continue, it works some how.
   
t = 0;
    while ( t <= 100 )
        {
        if (tech_level>=3)
        {   
            // 1 transport
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_WarpPrism, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_WarpPrism, 1);     
            }
            // 2obs
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Observer, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Observer, 1);     
            }
        }
        else if (tech_level>=6)
        {   
            // 2 transport
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_WarpPrism, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_WarpPrism, 1);     
            }
            // 4obs
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Observer, c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Observer, 1);     
            }
        }   
    if (IAI_AirGround) //Air1
    {   

    }
    else if (!(IAI_AirGround) &&(IAI_Ground == 1)) //Gnd1
    {   
        //Tech Level 0
        if (tech_level==0)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 16 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
        }
        //Tech Level 1
        else if (tech_level==1)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }   
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*4))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if (tech_level==2)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 25 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 6 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*6))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if (tech_level==3)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 5 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*10))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if ((tech_level==4)||(tech_level==5))
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 300, 200) && (AITechCount(player, c_PU_VoidRay , c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_VoidRay , 1);     
            }
            if (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter )>=FixedToInt(0.7*30))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if ((tech_level==6)||(tech_level==7))
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 200, 150) && (AITechCount(player, c_PU_VoidRay , c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_VoidRay, 1);     
            }
            if (AIHasRes( player, 400, 300) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }
            if (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter )>=FixedToInt(0.7*30))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else
        {   
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 200, 150) && (AITechCount(player, c_PU_VoidRay , c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_VoidRay , 1);     
            }
            if (AIHasRes( player, 400, 400) && (AITechCount(player, c_PU_Colossus, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Colossus, 1);     
            }   
            if (AIHasRes( player, 500, 500) && (AITechCount(player, c_PU_Carrier, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Carrier, 1);     
            }
            if (AIHasRes( player, 200, 200) && (AITechCount(player, c_PU_DarkTemplar , c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_DarkTemplar , 1);     
            }
            if (AIHasRes( player, 400, 300) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AIHasRes( player, 500, 500) && (AITechCount(player, c_PU_Mothership , c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Mothership , 1);     
            }
            if (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter )>=FixedToInt(0.7*30))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }           
        }

    }
    else if (!(IAI_AirGround) &&(IAI_Ground == 2)) //Gnd2
    {   
        //Tech Level 0
        if (tech_level==0)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 16 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
        }
        //Tech Level 1
        else if (tech_level==1)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 4 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }   
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*4))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if (tech_level==2)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 25 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 6 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 50, 100) && (AITechCount(player, c_PU_Disruptor, c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Disruptor, 1);     
            }
            if (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter )>=FixedToInt(0.7*6))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if (tech_level==3)
        {
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 30 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 12 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 5 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if(AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter )>=FixedToInt(0.7*5))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if ((tech_level==4)||(tech_level==5))
        {
            if (AIHasRes( player, 125, 125) && (AITechCount(player,  c_PU_DarkTemplar, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_DarkTemplar, 1);     
            }
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 15 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 400, 400) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AITechCount(player, c_PU_DarkTemplar, c_techCountQueuedOrBetter )>=FixedToInt(0.7*10))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else if ((tech_level==6)||(tech_level==7))
        {
            if (AIHasRes( player, 125, 125) && (AITechCount(player,  c_PU_DarkTemplar, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_DarkTemplar, 1);     
            }
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 15 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 400, 400) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AITechCount(player, c_PU_DarkTemplar, c_techCountQueuedOrBetter )>=FixedToInt(0.7*10))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }
        }
        else
        {   
            if (AIHasRes( player, 125, 125) && (AITechCount(player, c_PU_DarkTemplar , c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_DarkTemplar , 1);     
            }
            if (AIHasRes( player, 100, 0) && (AITechCount(player, c_PU_Zealot, c_techCountQueuedOrBetter ) < 20 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Zealot, 1);     
            }
            if (AIHasRes( player, 125, 50) && (AITechCount(player, c_PU_Stalker, c_techCountQueuedOrBetter ) < 15 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Stalker, 1);     
            }
            if (AIHasRes( player, 200, 100) && (AITechCount(player, c_PU_Immortal, c_techCountQueuedOrBetter ) < 10 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Immortal, 1);     
            }
            if (AIHasRes( player, 150, 150) && (AITechCount(player, c_PU_Phoenix , c_techCountQueuedOrBetter ) < 2 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Phoenix , 1);     
            }
            if (AIHasRes( player, 400, 400) && (AITechCount(player, c_PU_Colossus, c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Colossus, 1);     
            }   
            if (AIHasRes( player, 500, 500) && (AITechCount(player, c_PU_Carrier, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Carrier, 1);     
            }
            if (AIHasRes( player, 200, 200) && (AITechCount(player, c_PU_HighTemplar, c_techCountQueuedOrBetter ) < 3 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_HighTemplar , 1);     
            }
            if (AIHasRes( player, 500, 500) && (AITechCount(player, c_PU_Mothership , c_techCountQueuedOrBetter ) < 1 ))
            {
                AITrain ( player, 1, c_townMain, c_PU_Mothership , 1);     
            }
            if (AITechCount(player, c_PU_DarkTemplar, c_techCountQueuedOrBetter )>=FixedToInt(0.7*10))
            {
                AIWaveMerge(player, c_waveMain, c_waveAttack);
                AISetAttackState(player, e_attackState_Attack);
            }           
        }
    }
    else if (!(IAI_AirGround) &&(IAI_Ground == 3)) //Gnd3
    {   
       
    }
        t = t+ 1;
        }

If you are going to take this as base I recomend you to take the new version. Because I made some new functions to make the code more clear (IAIBuild(), IAITrain(), ...) Also, it is easyer to make new openings for each race.
About the assimilator problem, I dunno, but it happened to me too, so i changed the code in the new version to check only the assimilator in the local town.

L33tGam3r

@Astazha


Ty for this damn fine guide.A person like me who has no exp in editing files and stuff like that got that thing working.TY  ;)


What can i say .. I own you a beer or two : :cheers: