Logistics Question

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
hasler
Posts: 39
Joined: Mon Jul 31, 2017 8:28 pm

Logistics Question

Post by hasler »

I am new to the game and trying to learn the scenario editor. I am trying to figure out how to do proper logistics for a protracted scenario. I have noted that Ships will supply by returning to base or having a AOE/AO ship meet them, and that ship will automatically resupply its magazines when returning to port.

I have not found a way to do something similar to Air bases, and Ground units. Is Lua scripting the only way to conduct resupply operations on these? Base Resupply via Lua seems doable, but a large ground force via lua and all the checks for living units may be outside my skill set.

I have a vision right now of a scenario that combines the Sea battles in Red Storm Rising and Fleet Defender's North Sea Melee campaign, but in order to do that I need roughly 30 days of fighting, and red forces moving down Norway.
User avatar
Gunner98
Posts: 5880
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: Logistics Question

Post by Gunner98 »

hasler

That is an ambitious scenario for your first shot. I have built one that lasts 30+ days but I think I'm the only one that has - its not easy.

One way of getting around your basic question is to turn on 'unlimited magazines at air/naval bases'

The other methods are to start with enough ammo at each base to last the duration of the scenario - or via Lua, which is workable but on a scenario lasting 30 days may get tedious.

I would recommend however that you break the scenario into manageable bites, probably a half dozen scenarios all linked by the story line.

The only real downside of this is there is currently no way of transferring casualties from one scenario to another - but you can estimate and build a new start-state for each scenario.

If you check in the Community Pack, the first dozen or so Northern Fury replicate the campaign, if not the specific battles you're describing.

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
User avatar
CCIP-subsim
Posts: 467
Joined: Tue Nov 10, 2015 6:59 pm

RE: Logistics Question

Post by CCIP-subsim »

One method I've recently been trying with airbases is issuing randomized allocations of weapons daily via a Lua script - and basically copying it for every base, adjusting for size. It usually averages out and keeps things interesting!
User avatar
CCIP-subsim
Posts: 467
Joined: Tue Nov 10, 2015 6:59 pm

RE: Logistics Question

Post by CCIP-subsim »

Here's an example I used, which just happened to be annotated:

Code: Select all

 math.randomseed(os.time())
 
 --weapon allocations
 --first clear mags
 
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=88, remove=true, w_max=10000, number=10000}) --AIM9B
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=412, remove=true, w_max=10000, number=10000}) --Hydra 70mm
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=413, remove=true, w_max=10000, number=10000}) --Zuni 127mm
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=1166, remove=true, w_max=10000, number=10000}) --Mk81
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=6, remove=true, w_max=10000, number=10000}) --Mk82
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=409, remove=true, w_max=10000, number=10000}) --Mk83
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=339, remove=true, w_max=10000, number=10000}) --M117
 
 --then randomize weapon allocations
 dn_aim9b = math.random(16,48)
 dn_hydra = math.random(266,1330)
 dn_zuni = math.random(0,32)
 dn_mk81 = math.random (12,64)
 dn_mk82 = math.random(84,204)
 dn_mk83 = math.random(24,54)
 dn_m117 = math.random(16,72)
 
 --then fill mags
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=88, remove=false, w_max=10000, number=dn_aim9b}) --AIM9B
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=412, remove=false, w_max=10000, number=dn_hydra}) --Hydra 70mm
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=413, remove=false, w_max=10000, number=dn_zuni}) --Zuni 127mm
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=1166, remove=false, w_max=10000, number=dn_mk81}) --Mk81
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=6, remove=false, w_max=10000, number=dn_mk82}) --Mk82
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=409, remove=false, w_max=10000, number=dn_mk83}) --Mk83
 ScenEdit_AddWeaponToUnitMagazine({unitname='Da Nang AB', wpn_dbid=339, remove=false, w_max=10000, number=dn_m117}) --M117
 

In that example I emptied the magazines and basically re-set the weapon allocations every night to prevent "hoarding" of weapons, but if you want stockpiles to build up, you can skip that first step and just add to the pool [:)]

It's not a very sophisticated solution, but I found it simple enough for keeping the player at least thinking about aircraft loadouts.
hasler
Posts: 39
Joined: Mon Jul 31, 2017 8:28 pm

RE: Logistics Question

Post by hasler »

Thank you that will be very helpful.
It is an ambitious project. I know it sounds weird but I usually start learning by building and testing a large scenario. My work flow revolves around building it in pieces. I test each piece, see how it works with existing pieces, and then repeat process with next piece. This process, though time consuming, usually does a good job of teaching me a program. The final product is a kinda graduation exercise where I see how well learned the editor.
Post Reply

Return to “Mods and Scenarios”