OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: myke13021 on 19 Oct 2007, 17:59:34
-
Hi all
i'm about to make a more realistic refuel routine which will include real-world fuel capacities of all vehicels and also a realistic fuel flow while refueling, so refuel a SU34 will take much longer than a UAZ.
To make it work properly, i need to "deactivate" all preplaced Fuelstations so that auto-refuel is no longer available. For sure i could just watch the map and collect all buildings manually, but this has the downgrade as i have to do this for all available islands and redo everytime a new island is released.
So my question, is it possible to scan the island config for these buildings and collect them in an array? It wouldn't need much info, in fact it's position would be enough.
If this is possible, i can make it work on any island without knowing it (future releases).
Any help welcome (glances to Mandoble :D )
Myke out
-
You cannot do config searches for buildings placed on the map because well they are not added into the configs. :(
You could do like an intensive nearestobject search for fuel stations and then record them in an array of sorts. The problem being is you would have to do this for each new island. You could make a helper mission which would run/find the nearest fuel stations, plop them into a dialog for easy cuting and pasting into an array.
Planck tells me the fuel stations are one of the few map objects in the configs :)
-
thx hoz
do you know how i could access to these? As i said, i just need the positions of them, collected in an array, thats all.
Myke out
-
I started to work on something last night but I haven't had a chance to day. Hopefully I can post something later this evening.
-
No hurry, as long as someone is working on an answer, i'm happy. Doesn't matter if the script is finished tomorrow or in 2 weeks...as long it works. :D
If it comes to config reading, i'm lost, so i'm happy someone took care.
Another throw in while i'm on it: i guess there is no way to adjust the fuel load (not cargo, what vehicles need to operate) by just using scripts (except maybe some fancy setfuel looped scripts) of any vehicles. Just to note: make an addon is not an option as i want to have it addonless.
Why i ask: i saw that if a vehicle carries external fuel pods (like UH-60FFAR and the AV8B Sidewinder) it is not implemented, means no matter if external fuel pods available or not, the fuel cargo (time to fly with) is completely equal. So i guess it's impossible to overwrite these fuel setting from the vehicles config to a custom setting only using scripts.
Myke out
P.S.
Shame on BIS they didn't made the fuel pods usable :D
-
Don't think you can script it in, just the same as you can't give soldiers more health, but you could have a script test fuel level every 15 seconds (say) and give a one-use instant refuel with the message "fuel pods utilised" or something. Alternatively, add a "use fuel pods" action for pilots that refuels you completely once, which would prevent the need for a script to monitor fuel levels. In either case, you'd need to have a variable set on the aircraft on every machine to prevent multiple people refuelling the same aircraft.
-
Thx Spooner, already guessed that. I don't think i'll script something like "fuel pods activated" since i try to use real world data to refuel these vehicles, it would be too messy to check if fuel pods are attached, then adjust max fuel cargo and according to this do refuel amount of X...blah.
I think i'll just go with the internal tanks and ignore the presence of the fuel pods.
Myke out
-
You cannot find the buildings via the configs unfortunately. I did come up with a little tool which helps you find and build arrays of particular objects. Hope to finish it tonight.
-
The issue of fuel availability definitely seems like an issue that comes up in many missions-- hopefully Bohemia will consider a global fuel toggle in a patch or in Armed Assault II. I would love to see the answer too. Here is a long shot idea:
Did you try using the Editor Update addon to identify the name of the gas station? Maybe you could try the trick of placing the gas station on the map on an otherwise empty mission, then go into mission.sqm and see what the object name is? Would that help in tracking it down within the config?
-
There are about 4 fuelstations, they all inherit from class "FuelStation".
So doing a search for anything that has a base class of "FuelStation" will give you a list of them all.
There is however something else that you can refuel from that is not a fuel station.
I'm sure you have all seen the large fuel tanks on sara, you can refuel from these as well, the smaller tanks do not do this however.
Just to complete the list:
Strategic:
FuelStation
Land_benzina
Land_benzina_schnell
Land_fuelstation
Land_fuelstation_army
Land_Fuel_tank_big
And there you have it.
EDIT:
Incidentally, the "Land_benzina" class is no good anyway, although the class has been declared and the model file has been pointed to in the config .... the model does not actually exist anywhere in the game.
Planck
-
I can find the objects, as long as I have the names and you can even use the config, but the config doesn't tell you the position of those fuel depots, you just have to use the nearestobjects command. Which can be taxing on the game if you do broad searches.
-
Just to note, you can refuel at barrels as well.