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 - Kernel64

#46
Any updates? release? I've been checking this thread like every hour.
#47
SC2 Tools / Re: StarCraft II Launcher Plugin Pack
April 02, 2010, 01:35:29 AM
Dude!

You're awesome man.
#48
Updated the opening post with the entire codes I'm working on right now.

It's all zerg atm, but everything can be copy-pasted for the other races. It needs to be fed with commands on what to do, when, etc., but the system is working.
#49
SC2 Tools / Re: StarCraft II Launcher Plugin Pack
March 31, 2010, 12:35:44 AM
Seconded.

It would be great to have that. Moving from 6xspeed down to fast (not fastER) is alright, but having

normal = faster
fast = 3x
faster = 6x

is sure win.
#50
if ( AwesomenessEval(MWAIE) > PureAwesome) {
     Kernel64("NoseBleed", AwesomenessEval(MWAIE) ) == true;
}
#51
I've got this already. IntToFixed on those numbers.

A value of 40 (fixed) is about the radius of LostTemple's high ground starting locations. It can be controlled now, and here's what I'm using atm:

Quote
void CommandQueen(int player, int CTown, string StructHatch){
order ord;
point OTarg;
unit Queen;
unit nearbyHatch;
region r;   
       
        nearbyHatch = AIGrabUnit(player, StructHatch, c_prioScriptControlled, AIGetTownLocation (player, CTown));
        Queen = AIGrabUnit(player, c_ZU_Queen, c_prioScriptControlled, AIGetTownLocation (player, CTown));
        r = RegionCircle(UnitGetPosition(nearbyHatch), IntToFixed(20));
        //OTarg = UnitGetPosition(nearbyHatch);
        OTarg = AIGetTownLocation (player, CTown); //AIRandomSpawnPoint (player, r, 500, 1000, 3);
       
            ord = AICreateOrder(player, c_AB_Move, 0);
            OrderSetTargetPoint(ord, OTarg);
       
        if (UnitOrderIsValid(Queen, ord)) {
            AICast(Queen, ord, c_noMarker, c_castHold);       
        }
        else {}
}

Maybe if I get more time, I'll give hatcheries/lairs/hives an AIThink so they will grab queens closer to them.

This is important since anyone can kite queens to their deaths atm.  :)
#52
void AISetStockUnitNext (int player, int count, string aliasUnitType, bool when);

this stock will only be stocked given bool is true.

Say you give When as:

(AITechCount(player, c_ZU_Queen, c_techCountCompleteOnly) > 1) == true

whatever aliasUnitType you put up there will only be stocked once our when here is true.

It's like a setstock with an if.

You can have say:

AISetStockUnitNext (player, 2, c_TB_Armory, AIHasRes(player, 500, 100) );

which will stock an armory when the AI gets >= 500 minerals and 100 gas.
#53
Well, if that's the case, at least it's good that we can specify where the techlab goes. Be it for a rax or factory. At least we can work with it, and count techlabs vs rax+fac. But then again, that's where issues come pumping in.

I don't know. Haven't done terrans yet.
#54
Is there any other techlabs processing on another structure like a barracks?

I'm guessing it's possible that barracks techlabs may make the second condition false, so maybe that's where the problem is?
#55
AI Development / Update
March 25, 2010, 05:34:26 PM
System has been tested.

So far, reaction is faster, and more immediate. I may be able to provide the first version soon.
#56
AI Development / Re: Galaxy precompiler
March 23, 2010, 05:27:12 PM
This is nice. I've been looking for something that's not as complicated and would just allow me to check lines of codes for syntax errors.

A nice feature would be to have something that checks variable names for specific problems like lower/upper case stuff.
#57
Thanks man. I just thought thing I knew about the states were all wrong.

Turns out something went messed up due in part of not having to exit SC2Launcher and run it again once changes have been made to the code.

So, it might be a good thing to keep this in mind -- that to test changes properly, one must at least be sure that everything has been loaded properly and all up to the current version of what's being worked on.

I'm currently looking for something that checks blocks of codes for simple errors like case-sensitivity, and all the minor stuff.

Again, thanks.
#58
What's a substate?

e_mainSubState_GndA I've seen this used through:

AISetMainState(player, state, e_mainSubState_GndA);

Is there a time limit for the AI?
#59
After 7 mins, the AI tends to slow down. I say this because

UIDisplayMessage(PlayerGroupAll(), 3, StringToText("status: " + CBlockStatus));

doesn't show up on the screen as fast as it did before this time. It slows down then takes some speed again.

Then, at 12 mins everything else stops besides this:

Quote
time = AIGetTime();
Itime = FixedToInt(time);
minutes = 0;
while (Itime >= 60) {
    Itime = Itime - 60;
    minutes = minutes + 1;
}
msgTime = IntToString(Itime);
minutesTime = IntToString(minutes);

UIDisplayMessage(PlayerGroupAll(), 2, StringToText("Time Elapsed:                " + minutesTime + ":" + msgTime));

Which shows the time.

What's happening here?

Obviously, some codes are executed. I still get this displaying "List Empty"  on the screen:

UIDisplayMessage(PlayerGroupAll(), 3, StringToText("status: " + CBlockStatus));

But then, all the other codes, like this one:

Quote
        if ( (TotalUnit(c_ZB_Spire, player) == 1) && //military manager muta prototype
             (TotalUnit(c_ZU_Drone, player) >= 14) &&
             (FreeFood(player) >= 4) &&
             (AIHasRes(player, 100,100)) &&
             (HowManyCanWeProduce(c_ZU_Mutalisk, 1, player) >= 1)){ //&&
             //(CBlockStatus != "InProgress") ) {
                QInUnitPB(c_ZU_Mutalisk, 1, MaxUnitFreeFood(c_ZU_Mutalisk, 2,player) , c_townOne);
            if(AIGetBuildingCountInTown (player, c_townTwo, c_ZB_Hatchery_Alias, c_techCountCompleteOnly) >=1 ) {
                QInUnitPB(c_ZU_Mutalisk, 1, MaxUnitFreeFood(c_ZU_Mutalisk, 2,player) , c_townTwo);
            }
        }

isn't getting passed by the AI.

Does the AI go somewhere after 12 mins? How do I keep the AI running  ZergOpenGnd0 stuff until 30 mins?
#60
The idea is utilizing how the AI engine loops within a state like OpenGnd0, for example.

By making a variable loop from 20 to 0, and resetting at will, the Queen can be ordered to move between the two bases.

Having a third base may not work with this code. But as a prototype, this is somewhat a good start.

Here's the code used to order the Queen around:

Quote
void CommandQueen(int player, int CTown, string StructHatch){
order ord;
point OTarg;
unit Queen;
unit nearbyHatch;
region r;   
       
        nearbyHatch = AIGrabUnit(player, StructHatch, c_prioScriptControlled, AIGetTownLocation (player, CTown));
        Queen = AIGrabUnit(player, c_ZU_Queen, c_prioScriptControlled, AIGetTownLocation (player, CTown));
        r = RegionCircle(UnitGetPosition(nearbyHatch), 4);
        //OTarg = UnitGetPosition(nearbyHatch);
        OTarg = AIRandomSpawnPoint (player, r, 50, 100, 3);
       
            ord = AICreateOrder(player, c_AB_Move, 0);
            OrderSetTargetPoint(ord, OTarg);
       
        if (UnitOrderIsValid(Queen, ord)) {
            AICast(Queen, ord, c_noMarker, c_castHold);       
        }
        else {}
}

Here's how it is used within OpenGnd0:

Quote
        if (loopTimer < 20 && loopTimer > 10 ) {  //queen management prototype
            CommandOvie(player, c_townOne);
            CommandQueen(player, c_townOne, c_ZB_Lair);
            CommandQueen(player, c_townOne, c_ZB_Hatchery);
        }

        if (loopTimer < 10) {                    //queen management
            CommandOvie(player, c_townTwo);
            CommandQueen(player, c_townOne,c_ZB_Lair);
        }
        if (loopTimer < 1) {
            loopTimer = 20;
        }

Obviously, this can be developed further. And as you can see, even if c_townOne is used at both cases, the queen will still be ordered to move to c_townTwo.

I have no idea what's going on with that.