Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Starting Diesel Submarine/Ship Fuel Level

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Starting Diesel Submarine/Ship Fuel Level Page: [1]
Login
Message << Older Topic   Newer Topic >>
Starting Diesel Submarine/Ship Fuel Level - 8/6/2020 2:59:15 AM   
boogabooga

 

Posts: 165
Joined: 7/18/2018
Status: offline
I might have missed this, but in the editor, is there a way to set the starting fuel level of non-nuclear ships and submarines, similar to what can be done with aircraft via the airborne time? That is, without using LUA?

I noticed that the Submarine Tutorial 1.3 has reduced starting fuel loads, but I can not figure out how to do that myself.
Post #: 1
RE: Starting Diesel Submarine/Ship Fuel Level - 8/6/2020 3:34:29 AM   
Rory Noonan

 

Posts: 2634
Joined: 12/18/2014
From: Melbourne, Australia
Status: offline
I set the reduced starting fuel level using Lua.

In that particular scenario, you can use the following code:

quote:

--Input
local unit = ScenEdit_GetUnit({name='B-237 Rostov-on-Don', guid='4779747a-a270-4412-897a-32fa9952f431'})
print (unit.fuel)

quote:

--Output
>> { [3001] = { type = 3001, name = 'DieselFuel', max = 215000, current = 120000 }, [4001] = { type = 4001, name = 'Battery', max = 8000, current = 500 } }

We can see here that there are two types of fuel, with their maximum and current values. To change the fuel:
quote:

--Input
local unit = ScenEdit_SetUnit({name='B-237 Rostov-on-Don', guid='4779747a-a270-4412-897a-32fa9952f431', fuel={{'DieselFuel',12000}}})
print (unit.fuel)

quote:

--Output
>> { [3001] = { type = 3001, name = 'DieselFuel', max = 215000, current = 12000}, [4001] = { type = 4001, name = 'Battery', max = 8000, current = 500 } }


After writing that all out, it is a bit complicated. I'll see what we can do to add ships to that GUI functionality

< Message edited by apache85 -- 8/6/2020 3:37:14 AM >


_____________________________


(in reply to boogabooga)
Post #: 2
RE: Starting Diesel Submarine/Ship Fuel Level - 8/6/2020 4:16:00 AM   
boogabooga

 

Posts: 165
Joined: 7/18/2018
Status: offline
I sort of get that you can set via LUA, but I don't see that particular code in the Event Action Lua scripts, which made me think that there was an easier way to do it...

Where is the Lua 'hidden', or how is that scenario able to do it?

(in reply to Rory Noonan)
Post #: 3
RE: Starting Diesel Submarine/Ship Fuel Level - 8/6/2020 6:12:34 AM   
Rory Noonan

 

Posts: 2634
Joined: 12/18/2014
From: Melbourne, Australia
Status: offline
I just set it once through the console and then saved the scenario. Those tutorials don't have any Lua in the actual scenarios themselves (from distant memory) but a lot was used to get things right during the build stage.

_____________________________


(in reply to boogabooga)
Post #: 4
RE: Starting Diesel Submarine/Ship Fuel Level - 8/6/2020 7:44:13 AM   
boogabooga

 

Posts: 165
Joined: 7/18/2018
Status: offline
Ahh, I see thank you.

(in reply to Rory Noonan)
Post #: 5
RE: Starting Diesel Submarine/Ship Fuel Level - 8/7/2020 1:37:50 AM   
KnightHawk75

 

Posts: 690
Joined: 11/15/2018
Status: offline
Yes would be great if was added to editor gui. Till then I use this generic script if you doing a bunch of units which I uploaded for someone some months back if it helps. You can set the specific amount of fuel in any tank on a unit (except aircraft with greater than 2 tanks because there was a bug at the time).
http://www.matrixgames.com/forums/fb.asp?m=4829336





< Message edited by KnightHawk75 -- 8/7/2020 1:38:43 AM >

(in reply to boogabooga)
Post #: 6
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Starting Diesel Submarine/Ship Fuel Level Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.117