Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - az2

#1
AI Development / Re: Compile AI Info here
February 22, 2010, 04:43:35 AM
To modify tech build order you go to MeleeNotHardAI.galaxy and edit the function [RACE]TechUp.  For example to change protoss tech order you would make changes here:

//--------------------------------------------------------------------------------------------------
//    ProtossTechUp
//--------------------------------------------------------------------------------------------------
void ProtossTechUp (int player, int tier) {

    AISetStock( player, 1, c_PB_Gateway );
    AISetStock( player, 1, c_PB_Forge );
    AISetStock( player, 1, c_PB_Assimilator );

    if (tier >= 3) {
        AISetStock( player, 1, c_PB_RoboticsFacility );
        AISetStock( player, 1, c_PB_Stargate );
        AISetStock( player, 1, c_PB_TwilightCouncil );

        if (tier >= 4) {
            AISetStock( player, 1, c_PB_TemplarArchives );
            AISetStock( player, 1, c_PB_RoboticsBay );
            AISetStock( player, 1, c_PB_DarkShrine );
            AISetStock( player, 1, c_PB_FleetBeacon );
        }
    }
}
#2
AI Development / Re: Compile AI Info here
February 22, 2010, 04:27:35 AM
I've been looking through these files and if we can make a game with the very easy ai then we can play around making our own custom AI very easily!  Better yet it is all commented!

Edit the Tact[RACE]AI.galaxy to change the micro, and edit [RACE]0.galaxy to change macro.  For instance if you wanted to change when a disruptor uses its Hallucinate ability you go to TactProtAI.galaxy and find

static bool Hallucinate (int player, unit aiUnit, unitgroup scanGroup) {
    point here;
    order ord;

    // wait until fighting 5+ enemy units
    //
    if (!AIIsAttackOrder(UnitOrder(aiUnit, 0))) {
        return false;
    }
    if (UnitGroupCount(scanGroup, c_unitCountAlive) < 5) {
        return false;
    }

    ord = AICreateOrder(player, c_AB_Hallucinate, e_AB_Hallucinate_Zealot);
    if (!UnitOrderIsValid(aiUnit, ord)) {
        return false;
    }

    here = UnitGetPosition(aiUnit);
    if (AINearbyUnits(player, c_PU_Zealot, here, 5, 2)) {
        AICast(aiUnit, ord, c_noMarker, c_castHold);
        return true;
    }
    if (AINearbyUnits(player, c_PU_Stalker, here, 5, 2)) {
        ord = AICreateOrder(player, c_AB_Hallucinate, e_AB_Hallucinate_Stalker);
        AICast(aiUnit, ord, c_noMarker, c_castHold);
        return true;
    }
    if (AINearbyUnits(player, c_PU_Immortal, here, 5, 2)) {
        ord = AICreateOrder(player, c_AB_Hallucinate, e_AB_Hallucinate_Immortal);
        AICast(aiUnit, ord, c_noMarker, c_castHold);
        return true;
    }
    return false;
}


Here you can see you can make the function cast hallucinate by passing and order made by AICreateOrder() to AICast().

There is also code commented out that ran the dark pylon, argus link, proton charge etc that is no longer in the game in that file.
#3
Starcraft II Beta / Re: Debug console...
February 22, 2010, 12:25:27 AM
you can enable buttons using the dev console

try

set _root.DashBoard.m_navigationPanel.m_singlePlayerButton._disabled=false

also try

dump DashBoard

to take a look around the dash and all the pages there