sarogahtyp 1093 Posted June 8, 2016 *********************************************** Sarogahtyps Spawn Script Creator - SSSC Alpha 0.5 the easy way to cache ur units, vehicles and their waypoints by Sarogahtyp Gives mission designers the ability to delete and spawn their editor created units, vehicles and waypoints as often as they want and at the time they wanna. Its partially very similiar to Jebus - Just Editor Based Unit Spawning written by @dreadpirate but has complete different way of using and of course very different scripting methods. Actual version: Alpha 0.5 Key Features: units and vehicles spawn with the same behavior, damage, loadout (and so on) as they had before they were deleted waypoints are synced with other waypoints and triggers as they were before they were deleted every spawned object has the same group assignement as prior deletion see the full list of what is stored and reset after spawning in spoiler: Units: 0 class name 1 position ASL 2 vector dir 3 vector up 4 level of ability (skill) 5 aimingAccuracy (skill) 6 aimingShake (skill) 7 aimingSpeed (skill) 8 endurance (skill) 9 spotDistance (skill) 10 spotTime (skill) 11 courage (skill) 12 reloadSpeed (skill) 13 commanding (skill) 14 general (skill) 15 behaviour 16 combatMode 17 getFatigue 18 captiveNum 19 unitPos 20 damage 21 expectedDestination 22 leader 23 rank 24 name 25 rating 26 stopped 27 getSuppression 28 vehicle array index (-1 if not inside a vec) 29 assignedVehicleRole [role, path] 30 getUnitLoadout 31 vehicleVarName 32 getUnitTrait 33 getAllHitPointsDamageVehicles: 0 class name 1 position ASL 2 vector dir 3 vector up 4 damage 5 fuel 6 isEngineOn 7 velocity 8 is in flight 9 vehicleVarName 10 groups assignment (addVehicle) 11 getAllHitPointsDamage 12 getBackpackCargo 13 getItemCargo 14 getMagazineCargo 15 getWeaponCargoGroups: 0 side 1 formation 2 groupId 3 vehicles assigned to group (addVehicle) 4 currentWaypointWaypoints: 0 waypointPosition 1 waypointName 2 waypointBehaviour 3 waypointCombatMode 4 waypointCompletionRadius 5 waypointDescription 6 waypointFormation 7 waypointHousePosition 8 waypointLoiterRadius 9 waypointLoiterType 10 waypointScript 11 waypointShow 12 waypointSpeed 13 waypointStatements [condition, expression] 14 waypointTimeout [min, mid, max] 15 waypointType 16 waypointVisible 17 attached vehicles 18 synchronizedWaypoints 19 synchronizedTriggers How to apply this script to your mission: Download and unpack the .rar file. copy the content of the folder "SSSC" to ur mission root. If u already have a description.ext then integreate the one in SSSC to your own description.ext If u have a whitelist for remote execution of commands in your mission then you have to ensure that the following commands are whitelisted because they are remotely executed (HowTo): setVehicleVarName How to use this scripts functions in your mission: everey function returns true if it is ended. thats usefull for checking if its ended when using spawn instead of call. ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. you have to mark one unit of each group which should be handled (saved, deleted, spawned) at the same time: saroSSC_fnc_mark [_unit, _index] call saroSSC_fnc_mark; _unit is those one unit of the group which should be handled. _index is a number chosen by you to differentiate sets of groups to handle. Example: if u have 2 groups ( A and B ) which should be deleted at start of mission and another group ( C ) which should be deleted after its done something then u mark like this: In the init field of one unit of group A and one unit of group B: [this, 0] call saroSSC_fnc_mark; In the init field of one unit of group C: [this, 1] call saroSSC_fnc_mark; now group A and B r marked with index 0 and group C with index 1 ----------------------------------------------------------------------------------------------------------------------------------------------------------------- saroSSC_fnc_save [_index] call saroSSC_fnc_save; Use this function at the time u want to save the actual behavior of ur prior marked groups. At this point all information is saved and your groups will be spawned later with the behavior of this point of time. [0] call saroSSC_fnc_save; [1] call saroSSC_fnc_save; ----------------------------------------------------------------------------------------------------------------------------------------------------------------- saroSSC_fnc_delete [_index] call saroSSC_fnc_delete; Use this function at the time u want to delete all objects and waypoints of ur prior marked and saved groups. [0] call saroSSC_fnc_delete; [1] call saroSSC_fnc_delete; ----------------------------------------------------------------------------------------------------------------------------------------------------------------- saroSSC_fnc_spawn [_index] call saroSSC_fnc_spawn; Use this function at the time u want to spawn all objects and waypoints of ur prior marked, saved, and deleted groups. Ensure that there is a small delay after using this function until all objects are spawned. This is neccessary because this scripts contents are spawned (scheduled environment) and run parrallel to other stuff. This is the only function which uses scheduled environment because it needs some more time/performance. [0] call saroSSC_fnc_spawn; [1] call saroSSC_fnc_spawn; ----------------------------------------------------------------------------------------------------------------------------------------------------------------- saroSSC_fnc_destruct [_index] call saroSSC_fnc_destruct; Use this function at the time u dont need the information stored with saroSSC_fnc_save before to free some memory. After using this function u could use saroSSC_fnc_save, saroSSC_fnc_delete and saroSSC_fnc_spawn again on the same marked sets of groups. [0] call saroSSC_fnc_destruct; [1] call saroSSC_fnc_destruct; ----------------------------------------------------------------------------------------------------------------------------------------------------------------- saroSSC_fnc_unmark [_index] call saroSSC_fnc_unmark; Use this function at the time u dont like to do anything with ur prior marked set of groups. After using it u have to mark again first before u can save, delete and spawn. [0] call saroSSC_fnc_unmark; [1] call saroSSC_fnc_unmark; ----------------------------------------------------------------------------------------------------------------------------------------------------------------- saroSSC_fnc_update_triggers call saroSSC_fnc_update_triggers; This function is needed only if mission designer creates triggers by script during mission. It should be run after such scripted trigger creation to update known triggers. Thats neccessary because SSSC gets all triggers at mission start only. no arguments and no return value. ----------------------------------------------------------------------------------------------------------------------------------------------------------------- saroSSC_fnc_set_options This function can be used to choose which options should be saved and restored. This is useful if u dont want to save everything which is featured. Less saving means more performance. See fn_set_options.sqf header for further informations. this function has to be called before saroSSC_fnc_save. it will destroy all allready saved information because of array structure changes. ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Planned features: implement option to pass mission designers custom code for execution after spawning (like EHs) store and reset units trait - DONE store and reset units hitparts - DONE store and reset vehicles hitparts - DONE store an reset vehicles loadout - DONE add killed EH for group leaders to ensure group handling works after leader died - DONE add function to update known triggers (if someone creates triggers during mission) - DONE add options array to switch storing of specific info on/off - DONE relase BETA version add function to copy the whole spawn script to clipboard. with this feature mission designers are able to create their own spawn script without saving all information to memory during mission. release FINAL version armaholic release page Script Download (Dropbox) Example Mission (Dropbox) Known issues: 1. A set of group with e.g. index 0 cant interact with waypoints or triggers of a set of groups marked with 1. If u need to interact groups with the same waypoints and trigger then you have to ensure that they are marked with the same index. 2. Found a bug if a group waits at a join (or join and lead) waypoint for the other group and then using save, delete and spawn methods at this situation. Both groups r double spawned if that bug encounters and after that they behave weird. I think I know why that happens and will fix it soon. Changelog: V 0.5 Alpha - 07.06.2017 fixed a bug with editor given variable names (thx for report @gavc) added saving of stuff in backpacks, vests and uniforms inside of vehicle inventories. added saroSSC_fnc_set_options - now u r able to set saving options for units and vehicles. see fn_set_options.sqf header for further informations. this function has to be called before saroSSC_fnc_save. it will destroy all allready saved information because of array structure changes. added support for setFace and face added support for setNameSound and nameSound added support for setPitch and pitch added support for setAmmo and ammo added support for setBleedingRemaining and getBleedingRemaining added support for getOxygenRemaining added support for unitRecoilCoefficient restructured some array for faster handling V 0.4 Alpha - 13.06.2016 added new function saroSSC_fnc_update_triggers to update known triggers added vehicle loadout support substituted some forEach with count to speed up things a bit did some clean up work on scripts added killed eventhandler to leaders to get script also working if a leader dies added support for partial hitpoints of units and vehicles. V 0.31 Alpha - 09.06.2016 fixed a bug with muliple deletions and spawns, it was not working - now it is added handling of units trait (medic, engineer, explosiveSpecialist, UAVHacker, camouflageCoef, audibleCoef, loadCoef) V 0.3 Alpha - 08.06.2016 Initial Release Enjoy! *********************************************** Development Section in this section u can get information about the progress since the latest release and you can get a downloadable dev version with an own changelog and an own dev version number, too. I added that section because I want to give mission designers the ability to add all new features as soon as possible without bothering foxhound everytime I added 2 or 3 commands to the scripts.next steps: global: fix bug desribed in known issues (double spawning maybe caused by group unification and seperation) add function to pass custom code which will be executed after spawning. that could be EHs or disable AI commands or whatever u like. add support for allVariables, getVariable and setVariable units: add support for getObjectTexture and setObjectTexture vehicles: add support for setCollisionLight and isCollisionLightOn add support for getFuelCargo, getAmmoCargo, getRepairCargo add support for isLightOn and setPilotLight add support for locked and lock add support for lockCargo and lockedCargo add support for lockDriver and lockedDriver add support for lockTurret and lockedTurret add support for canUnloadInCombat and setUnloadInCombat add support for getObjectTexture and setObjectTexture groups: add support for setGroupIdGlobal instead of setGroupId release: release Beta version actual dev version: noneChangelog since latest relase: none download link: none 7 Share this post Link to post Share on other sites
Guest Posted June 8, 2016 Release frontpaged on the Armaholic homepage. Sarogahtyps Spawn Script Creator - SSSC v0.3 Alpha Share this post Link to post Share on other sites
dakaodo 52 Posted June 9, 2016 I found Murklor's/Wolfy's editor spawn script last month and have been learning how to use it. I just caught up on your pre-release thread, and I really appreciate the goal of your script and your method for caching. Editor placement and subsequent caching allows for a lot of detail (and obsession) in putting units where the mission designer wants them. There's a place both for large scale spawning and caching like ALiVE as well as caching on this very detailed scale. I hope to experiment with it to see how much I can do with it, this weekend. Thank you! 1 Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 9, 2016 I found Murklor's/Wolfy's editor spawn script last month and have been learning how to use it. I just caught up on your pre-release thread, and I really appreciate the goal of your script and your method for caching. Editor placement and subsequent caching allows for a lot of detail (and obsession) in putting units where the mission designer wants them. There's a place both for large scale spawning and caching like ALiVE as well as caching on this very detailed scale. I hope to experiment with it to see how much I can do with it, this weekend. Thank you! thank u very much for ur reply because i m a little bit sad bout no one seems to notice that release until ur reply. but this release has not such shiny videos and pics as other ones so i understand that... Initialy I had the idea for this script because I looked for murklors editor spawn script as an arma 3 version but i did not found it. Also I had some issues as I used it with arma 2 so I decided to write something similar myself. I beg u to give me feedback after ur tests because I know its not perfect at this time and I m motivated to fight bugs and write new features to get it as comfortable as possible for mission designers to use. 1 Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 9, 2016 Sarogahtyps Spawn Script Creator - SSSC Alpha 0.31 RELEASED first post updated 1 Share this post Link to post Share on other sites
Guest Posted June 9, 2016 Thank you very much for informing us about the updated release :) New version is up on the frontpaged on the Armaholic homepage. Sarogahtyps Spawn Script Creator - SSSC v0.31 Alpha Share this post Link to post Share on other sites
1para{god-father} 105 Posted June 9, 2016 Neat idea ill give it a try and feedback when i can ! 1 Share this post Link to post Share on other sites
dakaodo 52 Posted June 9, 2016 Still 2 days away from having time for Arma 3 (Saturday), but I can tell you right now that your index structure makes it much easier to reference multiple AI groups. I don't have to manually name each group leader, and I don't have to sync a trigger to each group. These are solid and useful differences from Murklor's script. Wolffy edited an Arma 3 version of Murklor's script (available on Armaholic). Here's the Arma 3 version, I think: http://www.armaholic.com/page.php?id=26909&highlight=MURKLOR 1 Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 9, 2016 Neat idea ill give it a try and feedback when i can !Thx for ur Post. I appreciate every Feedback. It ll Push the project forward. Still 2 days away from having time for Arma 3 (Saturday), but I can tell you right now that your index structure makes it much easier to reference multiple AI groups. I don't have to manually name each group leader, and I don't have to sync a trigger to each group. These are solid and useful differences from Murklor's script. Wolffy edited an Arma 3 version of Murklor's script (available on Armaholic). Here's the Arma 3 version, I think: http://www.armaholic.com/page.php?id=26909&highlight=MURKLOR Thx a lot for this link and ur opinion bout the index idea. I try to Archive to get it as easy to use as possible.I took a look at wolffys Script and I think I have faster methods in my Script because BI changed a lot since the last year. Also I m saving more information and have other methods to setup vehicle crews. I won't blame murklors/wulffys Script but it's not updated for one year and that is a long time. And im happy that I wrote it all on my own instead of updating murklors one. The reason is that I don't need to complete understand someone else work and fight against his probably inconveniant thoughts/methods. As I said I won't blame Simone elses work. I really am thankfull for murklors idea and that I could use his Script in arma 2. Edit: I decided to create a dev section to the first post because I wont bother foxhound with new releases everytime I added 2 or 3 commands. the dev section will contain a dev version number and an own changelog since latest release. of course it will have a download link for the brand new dev version. my next post should inform u bout the fact that i ve added those section. 2 Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 11, 2016 Development version added to the end of the first post Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 13, 2016 Sarogahtyps Spawn Script Creator - SSSC Alpha 0.4 RELEASED first post updated Share this post Link to post Share on other sites
Guest Posted June 13, 2016 Thank you very much for informing us about the updated release again :) New version is up on the frontpaged on the Armaholic homepage. Sarogahtyps Spawn Script Creator - SSSC v0.4 Alpha Share this post Link to post Share on other sites
ArmaFiend 122 Posted June 14, 2016 Are units in a group spawned on the leader or there original placed location? Looking to use a dostop command on group members to have a group spread out independent of a formation. Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 14, 2016 (edited) Are units in a group spawned on the leader or there original placed location? Looking to use a dostop command on group members to have a group spread out independent of a formation. Everything is stored as it was. Every unit will be spawned at the place where the save function was used. Ur doStop should also be saved. EDIT: Just tell me if its not working as intended for u and I ll try to fix it. Another thing I ll implement within next weeks is to pass code which will be executed after spawning. U can pass a doStop then and it will work for sure... Just tell me ur needs and give me feedback because thats the only way how I can move that project forward to be as usable as needed. Edited June 14, 2016 by sarogahtyp 1 Share this post Link to post Share on other sites
johnnyboy 3613 Posted June 14, 2016 This is super sweet SaroghTyp! I will definitely use this on my next mission. And I may retrofit it into Property of Mabunga as well. Thanks much for publishing this. 1 Share this post Link to post Share on other sites
tortuosit 485 Posted June 15, 2016 Hey don't be sad, some things may turn out to be useful for someone... after years. Do your thing and don't wait for applause. This kind of stuff is not what millions of ArmA players want. If you want fame, create beauty boxes for the Life folks. 1 Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 15, 2016 Hey don't be sad, some things may turn out to be useful for someone... after years. Do your thing and don't wait for applause. This kind of stuff is not what millions of ArmA players want. If you want fame, create beauty boxes for the Life folks. yeah I know that, it was frustrating first because nobody replied. but now everything is ok and yeah i ll do my thing anyway applause or not :-) This is super sweet SaroghTyp! I will definitely use this on my next mission. And I may retrofit it into Property of Mabunga as well. Thanks much for publishing this. Thx for ur very cool replay. I m very happy if this could be useful for ur missions. As I always say: just feedback if u need other features than I already thought bout. Share this post Link to post Share on other sites
Ilias48rus 32 Posted June 18, 2016 does it saving uniforms, vests in cargo space of vehicles? Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 19, 2016 does it saving uniforms, vests in cargo space of vehicles? currently supported r weapons magazines items and backpacks. i think uniforms and vests r items so it should be saved. just test it and if something is missing then tell me and i ll add support for it. Share this post Link to post Share on other sites
Ilias48rus 32 Posted June 19, 2016 currently supported r weapons magazines items and backpacks. i think uniforms and vests r items so it should be saved. just test it and if something is missing then tell me and i ll add support for it. *items in uniforms, vests which in object Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 19, 2016 *items in uniforms, vests which in object idk what u exactly mean but i guess u mean stuff inside of vests backpacks and uniforms. thats currently not supported but i ll add it to my todo list... Share this post Link to post Share on other sites
Ilias48rus 32 Posted June 19, 2016 idk what u exactly mean but i guess u mean stuff inside of vests backpacks and uniforms. thats currently not supported but i ll add it to my todo list... yes, thanks, would be helpful to see it, warning you what i guies i found what save it for uniforms and vests is unposible Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 20, 2016 yes, thanks, would be helpful to see it, warning you what i guies i found what save it for uniforms and vests is unposible actually i m working on that feature and I guess it is possible. I already saved the stuff inside of vests and uniforms using the everyContainer command. What I ve to do now is to put it back in it after spawning but I think that can be done. I think I ll add a dev version to first post within some days featuring it. Share this post Link to post Share on other sites
sarogahtyp 1093 Posted June 21, 2016 Yeah, I did it. stuff which is in vests, uniforms and backpacks which r inside the inventory of a vehicle is now saved and respawned... just test it :-) but actually in dev version only... Share this post Link to post Share on other sites
Ilias48rus 32 Posted June 22, 2016 Yeah, I did it. stuff which is in vests, uniforms and backpacks which r inside the inventory of a vehicle is now saved and respawned... just test it :-) but actually in dev version only... ok, thanks, good job, will check it Share this post Link to post Share on other sites