Adjusting Fuel Load

Take command of air and naval assets from post-WW2 to the near future in tactical and operational scale, complete with historical and hypothetical scenarios and an integrated scenario editor.

Moderator: MOD_Command

Post Reply
User avatar
Sybaris
Posts: 56
Joined: Sat Mar 14, 2015 10:15 am

Adjusting Fuel Load

Post by Sybaris »

For the life of me I thought there was either a menu item or LUA script where you could adjust the fuel load of airborne aircraft. I have read where that was a update in a previous CMANO version. I can't find how to do that anywhere though. Any help much appreciated.
AndrewJ
Posts: 2450
Joined: Sun Jan 05, 2014 12:47 pm

RE: Adjusting Fuel Load

Post by AndrewJ »

You can do this if you load the scenario in the editor.

Editor > Unit Actions > Set Fuel Qty and Airborne Time

Image
User avatar
goldfinger35
Posts: 150
Joined: Thu Jan 01, 2009 4:59 pm

RE: Adjusting Fuel Load

Post by goldfinger35 »

You mean mission editor, select unit, top menu editor-unit actions-set unit fuel qty ?

edit: AndrewJ was faster [:)]
User avatar
Sybaris
Posts: 56
Joined: Sat Mar 14, 2015 10:15 am

RE: Adjusting Fuel Load

Post by Sybaris »

That's the one but it is grayed out and not functional in the menu when I have a unit hooked.

Nevermind. I was trying to do it to a formation but now I can't get them to regroup!

---------------

Got them to regroup. Apparently one or more wasn't detached from something else or something so I had to individually detach and regroup.
User avatar
stilesw
Posts: 1572
Joined: Wed Jun 25, 2014 10:08 pm
Location: Hansville, WA, USA

RE: Adjusting Fuel Load

Post by stilesw »

Sybaris,

You can also accomplish this "on the fly" using Lua. An example: [.... are used for spacing not in the code]

function Fillup3001( side, name )
{
u = ScenEdit_GetUnit({side=USA,name=name OR Guid})
if u ~= nil then
....local newfuel = u.fuel
....if newfuel.current < 300 [whatever the max fuel amount actually is] then
........newfuel.current = newfuel.max
........u.fuel = newfuel
....end
end
}

This function should be triggered at regular intervals, say every 15min.

-WS
“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)
Bashkire
Posts: 80
Joined: Mon Feb 23, 2015 6:28 pm

RE: Adjusting Fuel Load

Post by Bashkire »

ORIGINAL: Sybaris
...I was trying to do it to a formation...

I was today years old when I realised how to use this menu option. I've been doing it to groups all this time and I never even knew. Thanks for saying that, otherwise I'd have never known why that function wasn't working!
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Adjusting Fuel Load

Post by KnightHawk75 »

ORIGINAL: Sybaris

That's the one but it is grayed out and not functional in the menu when I have a unit hooked.

Nevermind. I was trying to do it to a formation but now I can't get them to regroup!

---------------

Got them to regroup. Apparently one or more wasn't detached from something else or something so I had to individually detach and regroup.
Just switch to unit view next time, no need to de-group them to select the individual unit.

Also floating around here is a refuel selected units script from me somewhere you can plop into a special action so you can also just select a bunch of units if you want and refuel what's selected. If you select a group, it'll handle doing each unit for you.
https://www.matrixgames.com/forums/tm.asp?m=4826182 (post #2 attachment)

In the Lua forums you can also find recent post by me that had code similar to #5 but if for application more widely based on a side... like go refuel all blue aircraft with DBID 12345.


Post Reply

Return to “Command: Modern Operations series”