PROBLEM:
Units sometimes (what is "sometimes" I say later) dont go to refuel when they are out of fuel. Becouse the shooting ability is dependant on fuel (shot cost fuel), it happends mostly, that unit shoot/bomb on target and land on that place (!). And theres no way how to pick up them and get them from there (no response on move/refuel/attack.... cmds). They dont listen any other orders, until one of their favourite airpad is free.
OBSERVATIONS:
0) It started with new spring versions 84.0, 85.0.
1) It happends ussually to antiground planes (vashps, toads, hellfires, naplam guys,...) and to bombers (normal and adv. ones too). Air-vs-air planes are quite ok, but it happends to them, too.
2) Later I found that that bug is dependant on number of airpads - planes are using
3) Becouse observation 2), I think observation 1) is bullshit that bug is not type of plane dependant, but it more happends to units that spend more fuel in one "shot". Air-air fighters spend little fuel for fire (5-8... bombers 70-300), so they more often find free airpad until all fuel is depleted.
NEW 4) Im suspecting that airpads are lower now, so planes cannot reach them - that airpads, that are never used. (it not solve whole problem, but maybe part of it).
NEW 5) deleting of unit_refuel.lua doesnt affect thar problem.. only refuel button left, but aircrafts still use only 5-8 airpads and sit down without listening orders.
NEW 6) That 5-8 airpads are the nearest airpads from current position of first refueling plane, so there can be meaby some limit for queue of "find_closest_airpad". BUT If you build new airpads closer to aircraft position, sometimes new airpad is added as good one for refueling, sometimes not (ignored, never used).
Code: Select all
code deleted, becouse dont affect the problem
WHAT I'VE TRIED
1) Ive tried to change fuel stats in .fbi files of that units.. BUT becouse the problem is CMD based (i think, it has something to do with lookining for free airpads and making orders queue), it had only partly effect, becouse units with non-zero fuel had time to wait for some free airpad (but such changes may brake game balance)
2) Ive tried to change refuel line in COB script file of unit (order refuel), but theres some stupid name of variable and I really really dont know what does that UNKNOWN_UNIT_VALUE(93) mean.
Code: Select all
Refuel()
{
set UNKNOWN_UNIT_VALUE(93) to 0;
}
3) ive tried to change the params[0] of cmd refuel as i saw http://springrts.com/phpbb/viewtopic.php?f=23&t=12020 ... (-1, 1, 0) - no effect
4) old retreat code - no effect, its really old
5) delete unit_refuel.lua - no effect
6) change collision volume - no effect
7) I've tried to borrow unit_bomber_command.lua (unit_refuel still deleted) for testing from ZERO-K - it has ability to add comand buttons (rearm), but no other effect, problem still the same. (strange: ECHO commads - ON - in procedures does not seem executed)
SO, MY SILLY SOLUTIONS till now
-
The big problem is, most of the airfight is fueldependant, so whole game/mod is ruined by this. Im still big luanoob to solve it.
Here link for NOTA forum page - http://springrts.com/phpbb/viewtopic.ph ... 69#p509869
Here for my last version of nota1663.sdz - http://nota.googlecode.com/files/nota1663.sdz
BTW... when I was trying to fix the mod, when I use /luarules reload, all players loose all of their supplies and all income.. so its impossible to build anything. Is it correct way how it should work?