Simple Saving Scripts - Page 4 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 02-23-2020, 03:50 PM   #31
AYcoo
Junior Member
 
Join Date: Oct 2018
Posts: 12
Default

[QUOTE=newMissionStr = IntegratedserializeWithCycles("SaveUnits",SaveUnits) --save the Table as a serialised type with key SaveUnits
writemission(newMissionStr, "SaveUnits.lua")--write the file from the above to SaveUnits.lua
SaveUnits={}--clear the table for a new write.
--env.info("Data saved.")
end, {}, 1, SaveScheduleUnits)[/QUOTE]

tried to put trigger do script but didn't work

i have moose in my mission but i don't know how
AYcoo is offline   Reply With Quote
Old 02-24-2020, 05:50 PM   #32
AYcoo
Junior Member
 
Join Date: Oct 2018
Posts: 12
Default

up
AYcoo is offline   Reply With Quote
Old 02-25-2020, 12:15 AM   #33
Pikey
Veteran
 
Pikey's Avatar
 
Join Date: Sep 2009
Location: Reading, UK (GMT)
Posts: 4,080
Default

Sorry teaching you Lua is beyond the scope of forum work. You have to delete the save file as I said. its in your DCS folder. I've provided you with what you need to know, but I'm not customising the script for you!
__________________
___________________________________________________________________________
SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * PLAYLIST
===========
Pikey is offline   Reply With Quote
Old 02-25-2020, 02:25 AM   #34
AYcoo
Junior Member
 
Join Date: Oct 2018
Posts: 12
Default

just want to know if there is alternative ok got that ty
AYcoo is offline   Reply With Quote
Old 03-26-2020, 12:24 AM   #35
Pikey
Veteran
 
Pikey's Avatar
 
Join Date: Sep 2009
Location: Reading, UK (GMT)
Posts: 4,080
Default

SimpleStatic Saving has been reworked as per 2nd post. I've fixed unit headings in SGS also.


I wanted to scribble my mad findings about statics as it's taken me the best part of the entire day to workaround the seemingly endless issues DCS has. But I learned something worth sharing.


1. Farps. Jeez-Ohh.
Farps (and rigs), as statics refuse to obey normal DCS static conventions in some of the methods you can use on them. In this way, I found it better to treat them as Airbases, since they reliably work in that manner. I've now excluded them fairly easily from attempting to be manipulated by checking if the name of the static is also an airbase. Mad scientist workaround, but its perfect. Farps and Rigs will not be touched. I've never destroyed one either, but just know that the script will not persist farps, or try to do anything with them. This means they stay in all of your missions through restarts. Which is what you want.


2. Other statics like "Effects".
Effects like Bigsmoke are fairly new to DCS and do not observe all of the characteristics of other statics. They are always dead, getDesc() and other requests for type, heading do not work, but they end up included as a Static by moose. I've filtered these with nil checks also.


3. Ships
For some reason ships always return that they are alive when asked. This absolutely puts the kaibosh on this script and there is nothing you can do about it either. I'd recommend only using ships as static units when you are decorating and couldnt give a rat's arse about their persistence. Statics will always work as cheap alternatives and visual fillers very nicely so are important because scaling multiplayer missions is vital. However ships are one to avoid for statics.

4. Cargo was fine and I tested the "Barrage Balloon" in the assets pack too. You have to remember that not all statics have a destroyed model. So you can bomb the DCS airshow crowd all you want and they will carry on cheering.


The other issue to touch on is the error that occurs when a static object is spawned. I use the core scripting method rather than SPAWNSTATIC because it's the only way I can spawn a dead object. I have a feeling FlightControl hated statics with a pasison and they litter moose with SET issues, filtering issues and bugs, just by the nature of them having had bugs and quirks.
The error is caused when the event handler for the birth of a dead static object is attempted to be added to the MOOSE DATABASE. It's a lot of error lines in the log, but it's entirely of no effect to either the game, Moose or the progressing of the script. Moose just can't deal with it because there is a missing index on the birth event, probably caused by the static itself being missing something from the event data. I'm choosing to ignore it for now as fixing it has no benefit to anyone once they know what it is. However, I've written code comemnts so you can choose to comment out the part of the script that replaces live statics with dead models of itself after a restart. If someone knows what they are doing, then they might have a care to do that and can. Someone that doesn't understand the error message, has no reason to ask how to remove it, since they should have read this or the known issues part and would also have desanitised their mission environment modules and are likely a danger to themselves and others with the copy/paste shortcut.
__________________
___________________________________________________________________________
SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * PLAYLIST
===========
Pikey is offline   Reply With Quote
Reply

Tags
campaign, daws, mission persistence, save mission

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 03:33 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.