Paladin1cd Posted February 26, 2023 Posted February 26, 2023 Just as I started working on mission making and having a couple of missions I wanted to share persistence came out in force and it popped my balloon. I'm ready to get back, but I want to start with persistence in mind and making the missions multiplayer server persistent. I want to be able to use some other scripts such as Air to Air Dispatcher with it so the nice but designed to be simple script I saw in a search. So I'm asking for some help. First, to point me to a persistence script that I could use and maybe answering dumb questions along the way for me to bounce ideas off of as I fill in the targets, story, radio calls, etc. or something with some documentation. I am not a script dude but I've been muddling through with some great folks hitting me with some baseball bats along the way when I get stuck. Is there a discord or anything where I can find what I'm looking for?
Surrexen Posted February 28, 2023 Posted February 28, 2023 You will probably need to explain a bit more about exactly what you want to do, as in exactly what you want in the mission to be persistent. That said, the place to start would be Pikey's Simple Group Saving script, which will keep a record of everything that is alive in the mission. When using this, the script will remove all units from the map at mission start and replace everything as per what was recorded as alive, including coordinates and facings etc. This method is best if you are planning to use dynamically spawned ground units. Alternatively you can look at what I did in Operation Snowfox. It is basically Pikey's script in reverse, it will only record units that were killed, and remove dead units from the mission at mission start. This method is only for when you are going to hand place everything in the editor and not use dynamic spawns for ground units. Either method will require you to modify MissionScripting.lua to allow the saving of lua files (which will contain the list of alive/dead units etc). It's hard to answer further without knowing exactly what you are intending to do. There are lots of ways to skin this cat, so to speak. 1
cfrag Posted February 28, 2023 Posted February 28, 2023 (edited) On 2/26/2023 at 2:52 PM, Paladin1cd said: So I'm asking for some help. First, to point me to a persistence script that I could use and maybe answering dumb questions along the way for me to bounce ideas off of as I fill in the targets, story, radio calls, etc. or something with some documentation As @Surrexen pointed out, there are at least two big obstacles to achieving persistence, both major. The first is that for valid security concerns, three modules in Lua are walled off from access in a standard DCS installation and at least one of them ("lfs") must be enabled for persistence to work. Until we get a usable substitute from ED to save and retrieve text (perhaps a method 'persistence.readString(name)' or 'persistence.writeString(name)' (note: those two do not exist, I merely suggest them), any mission that you create will require that your users modify (and in a certain degree compromise) DCS's integrity, and this may reduce your mission's attractiveness. After overcoming that hurdle, you should keep in mind that currently, DCS's game engine is not prepared to deal with situations where a mission is continuing; the game engine always assumes that when a mission starts, it's a fresh start: all units are at full health (there currently is no way to reliably reduce a unit's health by script) have all munitions restored, and are heading for waypoint 1 in their routes. Time-wise, the mission starts at the time that you designate in the weather panel, so if you design a mission to start at pre-dawn and save it at noon, and then re-start the mission, the restarted mission's time of day is again pre-dawn. Now, if all these considerations did not scare you off, there are packages available that can give you tolerable persistence with little effort. Pikey's approach is a good first step, as is of course Surrexen's. There are others (blatantly tooting my own horn here: DML's persistence capability that gives you near-instant persistence for free, including all units that spawned dynamically from within DML's spawners and cloners). Ultimately, though, all these approaches are still flawed because without foundational support from ED, all we can do are stop-gaps until a mission has provisions for units to resume their actions in addition to the existing start their actions. Since the (announced and allegedly coming) dynamic campaign module from ED will have to support some kind of carrying over mission states from a previous mission, I'm hoping that this will bring some enhanced capabilities to elevate current persistence script's abilities from 'tolerable' to 'acceptable'. Edited February 28, 2023 by cfrag 1
Surrexen Posted February 28, 2023 Posted February 28, 2023 (edited) Indeed. The real question is do you want to become a heretical charlatan like the rest of us or not. Edited February 28, 2023 by Surrexen
Paladin1cd Posted February 28, 2023 Author Posted February 28, 2023 I don’t think there is another option at this point lol. 11 hours ago, Surrexen said: Indeed. The real question is do you want to become a heretical charlatan like the rest of us or not.
Grimes Posted February 28, 2023 Posted February 28, 2023 A 3rd method is that nothing exists at mission start via group probability is set to 0%. Whenever needed you spawn each group in via scripting and it builds a group table based on information from the saveState. Works best with a bubble script or anything that conditionally spawns in groups so that absolutely everything isn't always active all the time. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
AKA_Clutter Posted March 1, 2023 Posted March 1, 2023 Interesting read. I am so fricking far behind the curse it's ridiculous. ---------------- AKA_Clutter Win 10 Pro, Intel i7 12700k @4.6 GHz, EVGA RTX 3080 FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, HP Reverb G2, TM Warthog HOTAS with Virpil warBRD base, MFG Rudder Pedals, Virpil TCS Rotor Base with AH-64Dcollective, TrackIR 5 Pro w/Vector Expansion, PointCTRL.
cfrag Posted March 1, 2023 Posted March 1, 2023 12 hours ago, AKA_Clutter said: I am so fricking far behind the curse it's ridiculous. Don't worry. Writing missions will teach you cursing real good 1
kira_mikamy Posted March 4, 2023 Posted March 4, 2023 in my persistent server i use DSMC script for state saving, also some moose module like a2a dispatcher, caz, are pretty ready to go for persistent mission. others like ctld or skynet need personalization to aquire persistence working good
Paladin1cd Posted March 16, 2023 Author Posted March 16, 2023 (edited) Where can I find that one? Sounds like just the ticket. I like working with a2a dispatcher and skynet. On 3/4/2023 at 5:44 PM, kira_mikamy said: in my persistent server i use DSMC script for state saving, also some moose module like a2a dispatcher, caz, are pretty ready to go for persistent mission. others like ctld or skynet need personalization to aquire persistence working good Oh... And what is caz? Sorry folks, work has been thrashing me a lot of late so getting back here with a clear enough mind has been tough. Edited March 16, 2023 by Paladin1cd
kira_mikamy Posted March 17, 2023 Posted March 17, 2023 9 ore fa, Paladin1cd ha scritto: Where can I find that one? Sounds like just the ticket. I like working with a2a dispatcher and skynet. Oh... And what is caz? Sorry folks, work has been thrashing me a lot of late so getting back here with a clear enough mind has been tough. CAZ is the moose capture zone, allow you to set some zome to be dinamically pass trough blue or red control https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.ZoneCaptureCoalition.html
Paladin1cd Posted March 17, 2023 Author Posted March 17, 2023 (edited) Thanks! I'm trying to get DSMC installed and am failing so far but I'm reached out on the discord. Maybe I can get it running. What aircraft mods does it not work with? A4 I know, but what about the Herc and UH60? Edited March 17, 2023 by Paladin1cd
Recommended Posts