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 Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top