Cargo in Scenario Design

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
kahta
Posts: 543
Joined: Sat Sep 21, 2019 6:42 pm
Location: Arkansas

Cargo in Scenario Design

Post by kahta »

Here is what I am trying to do:

This is the first phase of a large and long scenario involving the convoy system of the Atlantic Ocean during a hypothetical World War III.

Soviets have captured Iceland, but their defensive supplies have not fully arrived yet. At the start of the scenario, there is a small but risk-heavy window where NATO can strike hard before Soviet defenses are set up.

Soviet supplies are en route via air and sea. NATO can make the risky choice of sending aircraft (with tanker support) deep into the Norwegian sea to strike the supplies, but if the strike fails to destroy the transport ships, the longer-term mission becomes more difficult because the Soviets will be able to launch Backfire raids against convoys and replenish submarine tenders from Iceland with heavy SAM defenses at their base of operations.

Is there a way to easily unload all cargo as it is delivered to an airfield without using the Delivery mission? I am not having luck with using "transfer" to cause an item to be unloaded either directly onto the map or into the magazine of an airfield. It just sits in the cargo of the airfield or forms a forward operating base.

Secondly, is there a way to transfer cargo from a port to an airfield? For example, a ship loaded with SSMs or large ASMs unloading, and then the SSMs/ASMs move to the magazine of the respective unit.

Thirdly, is there a solution in place right now for transferring cargo (missiles & ground units) that are too large to fit into a container?
User avatar
Gunner98
Posts: 5940
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

Re: Cargo in Scenario Design

Post by Gunner98 »

So if I understand the situation correctly, all of this is happening on an AI side. If that is correct making the nuance of the cargo system work is irrelevant and I would revert to lua and teleport using standard event mechanics to create the effect needed.

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/
kahta
Posts: 543
Joined: Sat Sep 21, 2019 6:42 pm
Location: Arkansas

Re: Cargo in Scenario Design

Post by kahta »

Gunner98 wrote: Fri Jan 13, 2023 3:27 pm So if I understand the situation correctly, all of this is happening on an AI side. If that is correct making the nuance of the cargo system work is irrelevant and I would revert to lua and teleport using standard event mechanics to create the effect needed.

B
Yes, you are correct. Your scenarios have been an inspiration to this undertaking :)

For example, what you are suggesting would be as follows:

What I am trying to do:
Ship A carrying SAM B and Supply C (destined for airfield E) arrives at Port D
SAM B deploys to preset waypoint using a mission
Supply C transfers from the port D to Airfield E using a mission

If the ship is destroyed en route, the cargo goes down with it.

What you are suggesting:
Ship A arrives at port D

An Event Fires & does the following:
SAM B appears on the map (either through Lua or teleport)
Supply C gets added to Airfield E magazines (via Lua)

Under what you are suggesting, if the ship was destroyed en route, the event would not fire because the ship was destroyed.
User avatar
Gunner98
Posts: 5940
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

Re: Cargo in Scenario Design

Post by Gunner98 »

kahta wrote: Fri Jan 13, 2023 3:37 pm
Under what you are suggesting, if the ship was destroyed en route, the event would not fire because the ship was destroyed.
Exactly. Since the player only needs to see the effect of the transport arriving, you can short circuit the delivery mechanism. If you want to employ a time delay (which will be messed up if the ship is sunk in port) there is an old fashioned way of doing that as well, although I know the Lua wizards are able to do this very well with code I revert to the basics:

Ship arrives in port. Triggers a teleport of a marker unit into a box on a non-visible side, on the other side of the world.
A unit remains in area trigger(s) is(are) tied to that marker, so lets say 2 hours for the ammo and 4 hours for the SAM
After the marker has been in the area (and the ship has been in port) for 2 hrs, use that to trigger the ammo add to the magazines, after 4 hrs you lua or teleport the SAM unit in.

A good rule of thumb is to ask yourself - what will the player see - if they will see it than spend the effort to make it right, if they won't, make it simple.

The new cargo rules just announced will probably cause me to go back and change a bunch of stuff on the player side - shifting of ammo etc, because that will now be under the player control much more. But for the AI side, it makes no difference.

Thanks for the kind words.

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/
Craigkn
Posts: 190
Joined: Thu Jan 27, 2022 12:06 am
Location: Central Maryland

Re: Cargo in Scenario Design

Post by Craigkn »

I implemented nearly the same setup via LUA and events. In my example, air transport units were shuttling ordinance from rear depots to forward air bases. For anyone curious on how to do it, here is how:

1. Set a ferry mission between depot and forward air base. Assign an appropriate transport aircraft.
2. Set event trigger - a box around the forward air base, to trigger when the transport aircraft enters.
3. Set event action - when the resupply event is triggered, a LUA script adds specified ordinance to the forward air base magazines.
5. The ferry mission is set to cycle, so once the transport aircraft is ready, another cycle begins.

Hopefully this is helpful to someone trying to implement the same logic.
User avatar
Gunner98
Posts: 5940
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

Re: Cargo in Scenario Design

Post by Gunner98 »

One point to note is that it needs to be a 'Unit enters area' trigger. I've tried several times to make 'Units remain in area' triggers work to impose a delay for different things but something happens when the aircraft transitions from the air to either the ground or the ship and the time counting doesn't track.

Also make sure your 'box' is big enough, it has to be larger than the base itself to allow the AC to enter in the air. This gives a slightly false feeling that the cargo is delivered ultra quick but it does work.
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/
Post Reply

Return to “Mods and Scenarios”