Jump to content

How to keep Sam sites filled with Munitions indefinitely


Go to solution Solved by cfrag,

Recommended Posts

Posted

So I'm trying to create a multiplayer mission that can essentially run indefinitely. I use the Patriot, SA-10, and other sam sites to protect spawn points and keep players and AI from spawn camping other players and AI. However they (specifically the SA-10) can run out of ammo quickly and take hours to rearm via trucks (the SA-10 takes 2 hours!!), so I've been looking for a way to keep them filled. 

Since (as far as I know and PLEASE correct me if I am wrong) it is not possible to use scripts to modify ammo of ground units, I was thinking I could despawn and respawn these sam groups quickly every 10 or so minutes so they should spawn with full munitions each time.

Would it be possible to use MIST or something to accomplish this?

Posted

MIST has a respawn function I'm pretty sure. I'm not familiar with it though. Someone who is will probably show up eventually, but in case not you can use the addGroup function in a mission editor script:

https://wiki.hoggitworld.com/view/DCS_func_addGroup

The only potentially hard/annoying part is the group table. You can get one by opening a dummy mission with the group you want in it and then copying and pasting the table into your addGroup script, probably with variables inserted for things like position, etc.

If the addGroup has the same name as a group already in the mission, the newly spawned group just overwrites the old one.

I would provide a script for you but I haven't gotten around to writing one for respawns and I've got my hands full with other scripts. I do plan on writing one, but it might be months before I actually get to it.

Awaiting: DCS F-15C

Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files

 

  • Solution
Posted
13 hours ago, Ranger89 said:

Would it be possible to use MIST or something to accomplish this?

If by 'or something' you include DML, then yes, near trivially. Please see below demo mission. 

To use in your own mission, simply place the Trigger zone "Endless Respawn every 600 seconds" over the sam group that you want to regularly respawn. Note the trigger zone attributes that control the respawn details. It may look silly, but that's how DML works: no fiddling with Lua code, simply add trigger zones and some attributes that control how the stuff works inside the zone. The trigger zone below has a cloner and a pulser (timer) attached.

image.png

The cloner in Kutaisi is set up to clone all the units inside the trigger zone every 600 seconds (= 10 minutes, see 'time' attribute). 

Since you may want to change that set-up should the player manager to destroy the entire sam site before the timer (pulse! in DML) runs out and then no longer respawn all, I've added a slight variation on this (very common) design pattern that stops the timer (pulser) when all units from the last spawn have been destroyed. You'll find it near Kobuleti

DML trigger zones can copy/pasted and will not get in each others way. Note the START trigger that loads the required DML modules (dcsCommon, cfxZones, cfxMX, cloneZones, pulseFlag). That loads DML and no more scripting is required to configure anything after that - it's all done with trigger zone attributes.

 

Hope this helps,

-ch

 

 

autorespawn sams.miz

  • Like 1
  • Thanks 1
Posted
8 hours ago, cfrag said:

If by 'or something' you include DML, then yes, near trivially

Okay, I've never heard of DML before. This looks like a good solution from what you have said here. Thanks for the example and including a mission file, I will give this a shot and test it out once I've got some time. If this works I will mark this as the solution! 
I still cannot believe that there isn’t any sort of setting to set unlimited ammo for ground units or anything like that. 
 

Posted
9 hours ago, Kanelbolle said:

Would be much more effective to have a safe zone script, like this:

The safe zone scripts that you pointed out here do make sense to implement but I would rather use things like sam sites to deter aircrafts. It's like more of a "realistic" (but in my opinion more fun) deterrence method. If somebody can sneak past the defenses, then the more power to them, I enjoyed trying to penetrate air defenses. We like to make it a game to try and sneak past them to destroy an enemies support aircrafts
 

Posted
On 1/8/2024 at 7:28 AM, cfrag said:

To use in your own mission, simply place the Trigger zone "Endless Respawn every 600 seconds" over the sam group that you want to regularly respawn. Note the trigger zone attributes that control the respawn details. It may look silly, but that's how DML works: no fiddling with Lua code, simply add trigger zones and some attributes that control how the stuff works inside the zone. The trigger zone below has a cloner and a pulser (timer) attached.

Okay this works really really well! This is exactly what I was asking for. Thank you! I'm wondering though, is it possible to exclude aircraft from the reset, say if I wanted to make a zone that's the whole map wide to then reset all ground units on the map? Also I probably can't just put one large zone directly over an airbase since it may affect NPC and player aircrafts if they're parked or taxing correct? 

Posted
4 hours ago, Ranger89 said:

is it possible to exclude aircraft from the reset, say if I wanted to make a zone that's the whole map wide to then reset all ground units on the map?

The way DML cloners work is that they clone every group (units, and static objects) that have at least one unit inside that zone at mission start (that is when the clone template is created). You can copy/paste configured cloners in ME, so you can quickly place them over the groups that you do want to reset, and make sure that they do not extend to the groups that you want to leave out from the 'refresh'. Clone Zones support quad-based (i.e. non-circular) trigger zones, so you can shape them to avoid those groups that you do not want to be in the refresh cycle. To exclude units from cloning, make sure that no unit of their group is inside the clone zone when the mission starts.

Clone Zones do not support player aircraft, those groups will be skipped. NPC (AI) aircraft in non-player groups will be refreshed if at least one unit is inside the cloner's zone.

  • Like 1
  • 3 weeks later...
Posted
32 minutes ago, 609_Relentov said:

Can’t you simply park a couple of/few (supply) trucks near the launchers?  Wouldn’t the launchers then just rearm using the supply trucks when they run out of missiles? 

 I might be mistaken, but afaik SAMs take a very long time to get resupplied, like 30 minutes or so.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...