Snippet PlayerAllianceAdv

Nestharus

o-o
Reaction score
84
We already covered that the optimizer is busted (can't be used with AI natives). Until the optimizer is fixed, the var names stay ;p
 

tooltiperror

Super Moderator
Reaction score
231
I don't get it.

Which of those can't be triggered?
 

tooltiperror

Super Moderator
Reaction score
231
>implying the world cares about .0003 seconds
 

Nestharus

o-o
Reaction score
84
It's a lot more than .00003, especially with

JASS:

native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer


Those 2 are hardcore to code from scratch.

This one can't even be done
[ljass]native GetUnitBuildTime takes integer unitid returns integer[/ljass]

This one would be a lot slower (huge enum, lots of dynamic code)
[ljass]native GetPlayerUnitTypeCount takes player p, integer unitid returns integer[/ljass]

It's not just about speed here, it is also about simplicity. A huge cumbersome lib for retrieving unit costs or the natives. A group enum + a filter method for retrieving unit type count (with a global read, code gets messy) or a simple native call...
 

Bribe

vJass errors are legion
Reaction score
67
If you just get an MPQ editor (dime a dozen) and just manually correct the naming of the AI natives and any ExecuteFunc or TriggerRegisterVariableEvent, your problems are solved. Best of both worlds - readable variable names and speed.

That's the best solution to this problem.
 

Bribe

vJass errors are legion
Reaction score
67
Sanely better solution that requiring you to study the code for loads longer than necessary in order to find out what it does. MPQ editor every time you OPTIMIZE the map. How often does that happen? Not nearly as often as you find yourself debugging the thing or having a user figure out how it works, I can assure you of that. Optimization should be only for publicly-released maps, and maybe for benchmarks.
 

tooltiperror

Super Moderator
Reaction score
231
Better yet, make another function that returns UnitAlive. It's one function call slower, but then you just correct the UnitAlive inside of it.
 

tooltiperror

Super Moderator
Reaction score
231
While this has uses, I don't think it is worth its own system. Using PlayerAlliance should be good enough, unless you're a nitwit.

I'm going to graveyard this for now, as it is too map specific.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    363 bots on the forum been like that for about a month this is the most bots we have ever consistently hosted
  • The Helper The Helper:
    and we are on cloud flare too right?
  • Stephen Stephen:
    Probably stupid AI garbage. It's harvesting our Nuon knowledge.
  • Stephen Stephen:
    The bots I mean.
  • The Helper The Helper:
    I suspect AI Bots as well
  • The Helper The Helper:
    Happy Saturday!!!
    +1
  • The Helper The Helper:
    I reorganized the forums somewhat but I doubt anyone would notice
  • The Helper The Helper:
    Happy Friday!
    +1
  • The Helper The Helper:
    Happy Saturday!
    +1
  • The Helper The Helper:
    The forum software says we have 554 members online now. We did not have that many unique visitors the whole day today. Too many bots and the disconnect between the forum counts and the stats.
  • Varine Varine:
    Currently it says 413 guests and 2 members
    +1
  • Varine Varine:
    Aww
  • The Helper The Helper:
    That is going to be mostly bots
  • The Helper The Helper:
    527 (members: 2, guests: 525)
  • The Helper The Helper:
    Happy Saturday!
    +1
  • V-SNES V-SNES:
    Happy Saturday!
    +1
  • The Helper The Helper:
    622 (members: 2, guests: 620)
  • The Helper The Helper:
    666 (members: 4, guests: 662) :)
    +1
  • Varine Varine:
    609 (members: 4, guests: 605)
  • The Helper The Helper:
    I was posting that last one because the 666 users online :)
    +1
  • The Helper The Helper:
    Happy Wednesday Night!
    +1
  • The Helper The Helper:
    Happy Thursday!
    +1
  • The Helper The Helper:
    Marathon watching The Expanse!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    leaving for the weekend in San Antonio will be gone until Sunday afternoon
    +1

    The Helper Discord

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top