Jump to content
h34dup

Show/Hide Module elements not appearing after save/revert

Recommended Posts

I recently learned about the Show/Hide Object Modifier module and put it to use in a couple of my recent releases. Primarily, I saw it as a way to optimize CPU performance while having a lot of unit activity and scenes for effects (helos flying over, masses of enemy appearing without having to manually spawn w/ script and game logic, etc.). I didn't have any noticeable issues with it in my SOG PF scenario, Unexpected Guests, but for some reason, in other applications, such as my most recent scenario, SEAL TEAM HVT Elimination, it's showing some rather odd behavior. You can play and test it yourself, or see in the Steam workshop page a player reporting this w/ a screenshot.

 

It seems to happen always when reverting from an autosave, it also happens when creating a manual save and reverting: multiple different layers that are synced to their own Hide modules with no trigger (so, hidden at mission start) and synced with triggers to Show (with various conditions, all do not show) do not show after a player has reverted, or, layers that should be hidden are showing after a revert.

 

For example, I have a guard standing on the roof the player needs to spot from a sniper hide. Both the guard and the sniper hide are hidden using separate Hide modules. If playing from a reverted save, when the player arrives and the sniper hide and the guard are supposed to appear, they simply do not. If the player does not revert to a prior save, and they make it to this point, the sniper hide, the guard, etc. will all show up correctly. If the player saves after they successfully see the sniper hide and guard, then revert, all shown layers will still be visible. However, other layers that are still hidden (eg. a QRF that shows 30-90 seconds when the player is detected by OPFOR, players must board the evac Osprey for the mission to end), will not show in the case of the revert.

 

Another example, in my current project (which will rely primarily on Dynamic Simulation and spawning, rather than Show/Hide for CPU, using Show/Hide only for set pieces), the player's insertion has 4 helos, each are, of course, visible at mission start, and when the insertion is complete the helos withdraw over some mountains and hit a hide trigger. When I revert, the helos show back up, hovering just off the border over the waypoint that leads them into the hide trigger. I know I can just deleteVehicle etc. to get rid of these, and I will likely do that instead as the helos are not needed after insertion.

 

I've done a little hunting on my own but haven't seen this issue reported specifically. Can anyone help me figure out what's going on and if I can fix this without needing to re-do everything from scratch.

Share this post


Link to post
Share on other sites

Giving this a gentle bump, as I have continued searching through old threads, trying solutions suggested there, such as making the triggers synced to the show/hide modules "Server Only" to no avail. Has anyone else experienced this or seen a solution? Might try PM'ing a few of the scripting sages out of the blue if not. 

Share this post


Link to post
Share on other sites

Heya @h34dup

Modules are always less robust than scripted solutions. Maybe take a look at getMissionLayerEntities? You can use enableSimulation/hideObject commands in conjunction with it to do exactly what you want. You just need to set up your Eden layers correctly.

 

Lost track of you from the A2 days, I'll be checking out your new missions for sure!

Share this post


Link to post
Share on other sites
2 hours ago, Harzach said:

Heya @h34dup

Modules are always less robust than scripted solutions. Maybe take a look at getMissionLayerEntities? You can use enableSimulation/hideObject commands in conjunction with it to do exactly what you want. You just need to set up your Eden layers correctly.

 

Lost track of you from the A2 days, I'll be checking out your new missions for sure!

 

Thank you for the reply! I fell back into editing a little while ago. Hope you enjoy some of my A3 creations!

 

I organize all entities in EDEN into layers, so converting to script could work without having to replace all units with spawn points and waypoint game logics. I might give this a try. A couple questions, in case you happen to know it might save me some time:

 

  1. It seems like deleteVehicle is preferred for hiding things when they are no longer needed? hideObject and enableSimulation false is good for CPU management of things you want to keep using, but I shouldn't use these when I can just delete it? Using a hide module synced to a trigger was easier for my lazy ass than naming groups and writing deleteVehicle scripts. Guess it's just not a reliable enough way to do it.
  2. Should I use enableSimulationGlobal if the same scenario is intended for both singleplayer (primarily) and coop-6 instead of enableSimulation?
  3. I'll test it myself, but I assume I should delete the Hide modules? Or would the essentially redundant commands passed thru the modules make it more stable?
  4. A fellow editor friend suggested it might be conflicting with Dynamic Simulation, but I do not use that on the mission in question I just released. Are you aware of any issues with Dynamic Simulation and showObject / enableSimulation? 
  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, h34dup said:
  1. It seems like deleteVehicle is preferred for hiding things when they are no longer needed? hideObject and enableSimulation false is good for CPU management of things you want to keep using, but I shouldn't use these when I can just delete it? Using a hide module synced to a trigger was easier for my lazy ass than naming groups and writing deleteVehicle scripts. Guess it's just not a reliable enough way to do it.
  2. Should I use enableSimulationGlobal if the same scenario is intended for both singleplayer (primarily) and coop-6 instead of enableSimulation?
  3. I'll test it myself, but I assume I should delete the Hide modules? Or would the essentially redundant commands passed thru the modules make it more stable?
  4. A fellow editor friend suggested it might be conflicting with Dynamic Simulation, but I do not use that on the mission in question I just released. Are you aware of any issues with Dynamic Simulation and showObject / enableSimulation? 

 

1. If you're done with it, delete!

2. Yup, using global variants will keep you COOP/MP-compatible and won't impact the SP experience (depending on use case, of course).

3. No reason to keep them.

4. Objects hidden by module or script should not be overridden by Dynamic Sim, ever. However, if you unhide something, it will then fall under the Dynamic Sim's rules, so that's a possible point of conflict.

 

Major nostalgia, I almost want to reinstall A2 so I can play through your fantastic Lions of Kandahar again.

 

Good luck, have fun!

  • Like 1

Share this post


Link to post
Share on other sites
13 hours ago, Harzach said:

 

1. If you're done with it, delete!

2. Yup, using global variants will keep you COOP/MP-compatible and won't impact the SP experience (depending on use case, of course).

3. No reason to keep them.

4. Objects hidden by module or script should not be overridden by Dynamic Sim, ever. However, if you unhide something, it will then fall under the Dynamic Sim's rules, so that's a possible point of conflict.

 

Major nostalgia, I almost want to reinstall A2 so I can play through your fantastic Lions of Kandahar again.

 

Good luck, have fun!

 

Thanks a lot for answering the above and sharing your wisdom! Good luck getting any of my old campaigns running. I was able to get a few scenarios running using Merge, but sadly, due to issues with the Reshmaan province addon, you can only play shreds. I am currently working on a spiritual nod to Task Force 42 with a UKSF long range motorized patrol type of mission set in Syria which makes use of dynamic sim with fair amounts of units that are placed reasonably spaced apart (~500m), I have removed Show/Hide for now, and plan to add spawned units.

  • Like 1

Share this post


Link to post
Share on other sites

I just ran a quick test and it worked!

 

The takeaway: Show/Hide Object Modifier module is unreliable and as of this post can not be trusted to work. Organizing entities into Layers is key. You can then use getMissionLayerEntities in combination with hideObject and enableSimulation to essentially perform the same function using script, which is more stable. For example:

 

// To Globally Hide a Layer containing only Props
{ _x hideObjectGlobal true; } forEach ((getMissionLayerEntities "Layer Name") select 0);

// To Globally Hide/Disable Simulation for a Layer containing Units
{ _x hideObjectGlobal true; _x enableSimulationGlobal false; } forEach ((getMissionLayerEntities "Layer Name") select 0);

Shouts to Harzach for helping me figure this out, I will of course credit you in the next update. Thank you!

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×