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

Topics - hd

#1
Anyone have all of the upgrade strings for the missing upgrades?

For example, the Roach upgrade to move while burrowed, etc. is missing from the requirementsai file.
#2
I cannot, for the life of me, seem to get these built by the AI.

I'm using:
AISetStock(player, 1, c_TB_FactoryTechLab);
AISetStock(player, 1, c_TB_FactoryReactor);

They never build, ever.
#3
AI Development / Unit speed
March 11, 2010, 03:02:31 PM
Anyone know if there's a way to get unit speed besides me creating my own function that returns the values listed in the unitdata.xml?
#4
AI Development / AIDefenseThreat
March 10, 2010, 07:33:00 PM
Anyone know exactly how this function works?
#5
AI Development / Idea for AI unit detection...
March 05, 2010, 08:20:17 PM
So, I'm trying to make my AI identify enemy units/buildings when they become visible to my AI's units/buildings.

I'm thinking of adding it to the wave think

void AIWaveThinkZerg (int player, wave w, int type) {
    // hd: seeing if we can pick up opposing unit activity
    unitgroup found;
    unitgroup enemyGroup;
    int enemyCount;
    aifilter filter;
   
    AIWaveThinkDefault(player, w, type);
   
    for (int i = 0; i < AIWaveUnitCount(w); i++) {
        found = AIFindUnits(player, null, UnitGetPosition([cycle through wave units here]), [sight range of unit here], c_noMaxCount);
        // filter = AIFilter(player);
        //AISetFilterAlliance(filter, c_playerGroupEnemy);
        enemyGroup = UnitGroupFilterThreat(found, [wave unit], null, 0);
        enemyCount = UnitGroupCount(enemyGroup, c_unitCountAlive);
       
        if (enemyCount <= 0) { return; }
        else {
            // found something, add found enemy unit/building to an array of enemy units
            // set a priority system based off count of enemy units found / type of units
        }
    }
}


Now, obviously the above code won't work as is. I don't know how to cycle through each unit in a wave or to obtain the field of vision of a unit... but if we could get this solved, it would be really easy to make the AI very human like, make scouting mean something and setup reactive game play from the AI
#6
AI Development / Variable Arrays...
March 05, 2010, 03:46:41 PM
Anyone have a good grasp of how these function in Galaxy?

I've seen a few references to arrays but I'm not sure how to declare them, if you have to explicitly declare the size or if it's dynamic and why they're dotting the ends.

For example: "AreaArray[0].Radius";

Is the . refering to a sub variable of AreaArray[0] or is it calling a function to be run on the value of AreaArray[0]? If it's calling a function, is it array specific?
#7
AI Development / Could use some help...
March 03, 2010, 06:44:16 AM
Update: found aitechcount

So, I've been working on an AI and as of right now, I have it able to beat the 5.5 AI before late game kicks in.

But, unfortunately I can't seem to find information I need to make it more advanced.

If anyone can find a function for unit counting for the AI (especially counting a specific type) that'd be great. It would probably look something like AIGetUnitCount(int player, unit type); where type being left null will count all units. I know there's a function for counting peons (workers [scvs, drones, probes]).

We should probably compile a list of all the AI functions we can find.