zorrobyte 30 Posted February 12, 2015 (edited) This is the problem I set out to solve. I've learned much about locality and scripting today and wish to share: Remote units that are enablesim false are pretty much invisible to local AI This script only has one very specific use: Server+ONE HC with players NEVER being enablesim false on locality running AI. Someone could take this idea and run with it and have a nice specific solution to remote AI performance issues. It's very important for me to test things further before releasing them as "complete", even if I'm super excited to get it out there & get feedback. I like to think that the Arma community are tinkerers but I wouldn't want to waste somebody's time that just wanted a solution and wouldn't tweak/test the code. For those interested, this is what happens between two groups of AI each on their own headless client with each other's group enablesim false on each other's locality (also note that the player is enablesim false all but 4 times a minute on AI's locality): http://youtu.be/U1k-Omg5eUI I'm abandoning this specific script/solution and will return to work on ZBE_Cache and a AI distribution method. If anyone finds this thread and benefits from it, it was worth the effort :bounce3: License: As this specific script does not do what I have intended it to do, I am re-releasing it as public domain so others can learn from it without any restrictions. https://creativecommons.org/publicdomain/zero/1.0/ Download FSM version (for educational purposes) Download V1.1 Download updated SQF V1.2 version (with trigger/condition fix, for educational purposes) https://www.dropbox.com/s/1x39ntzo0r8217y/zbe_aiDistributionv12.7z?dl=0 Edited February 13, 2015 by zorrobyte Share this post Link to post Share on other sites
Guest Posted February 12, 2015 Release frontpaged on the Armaholic homepage. ZBE HCCache v1.0 ================================================ We have also "connected" these pages to your account on Armaholic. This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! Share this post Link to post Share on other sites
Zriel 12 Posted February 12, 2015 Haven't had time to see. Does it dynamically detect where is AI and applies? Share this post Link to post Share on other sites
Rockhount 21 Posted February 12, 2015 Here is a fixed version of your script. It should have more performance and less errors. Download Rockhount Share this post Link to post Share on other sites
--mastermind-- 10 Posted February 12, 2015 wait did this dude release an update or go over all your stuff.....ill test this on my dedicated server with Alive.....see what happens.....alive already caches and virtualizes units...but this whole virtualize players thing or whatever it is you got going on sounds like sexy voodoo magic and im gonna try it all out! Share this post Link to post Share on other sites
zorrobyte 30 Posted February 12, 2015 Here is a fixed version of your script. It should have more performance and less errors.Download Rockhount Wow, I'm astounded at the simplicity and elegance in your solution. You have inspired me to read more of my Pragmatic Programming book I picked up last week and I had no idea about the local command. wait did this dude release an update or go over all your stuff.....ill test this on my dedicated server with Alive.....see what happens.....alive already caches and virtualizes units...but this whole virtualize players thing or whatever it is you got going on sounds like sexy voodoo magic and im gonna try it all out! Rockhunt rewrote the FSM to make it more efficient and reliable. The FSM is addon/script agnostic and should provide some benefit (in theory) to any Dedicated Server running any mission with the largest gains on severs using AI and HCs. Share this post Link to post Share on other sites
Zriel 12 Posted February 12, 2015 Wait a moment. Are you sure this is usefull? I mean, I think that simulations are done everywhere for physx for example, which are hard to reproduce using only network. Maybe that's the simulation that is kept everywhere, and disabling it would be bad. Also, if you are correct, a more elegant solution would be the eventHandelr "local". Whenever you can, use an eventhandler instead of a loop. ---------- Post added at 17:24 ---------- Previous post was at 17:19 ---------- Still, you would need a loop to add eventhandlers to every unit and new units ..ouch! Share this post Link to post Share on other sites
spartichris 17 Posted February 12, 2015 Will this have any effect in Arma 2 OA? I know it does not have PhysX but I just want to clarify. Secondly, can this be used in conjunction with your ZBE_Cache script or is this an all in one? Hope I'm not asking dumb questions. Share this post Link to post Share on other sites
Rockhount 21 Posted February 12, 2015 You have to be very careful with this script. If a Trigger/Condition on the Dedicated/HC depends on Units/Vehicles, which are not local on the Dedicated/HC, then those Triggers/Conditions will not work, because the Units/Vehicles will be frozen on the Dedicated/HC. Rockhount Share this post Link to post Share on other sites
zorrobyte 30 Posted February 12, 2015 (edited) Will this have any effect in Arma 2 OA? I know it does not have PhysX but I just want to clarify. Secondly, can this be used in conjunction with your ZBE_Cache script or is this an all in one? Hope I'm not asking dumb questions. Not dumb at all, it *should* work in Arma 2 OA as the commands used are in A2. This is not all in one and should work just fine with ZBE_Cache, I decided to release separately as it's experimental. Wait a moment.Are you sure this is usefull? I mean, I think that simulations are done everywhere for physx for example, which are hard to reproduce using only network. Maybe that's the simulation that is kept everywhere, and disabling it would be bad. This was a test in ZBE_Cache. Units enablesimulation false can still receive damage and position would be updated by remote locality. http://youtu.be/kq-7tolEB3w?t=33s It's unknown how local AI react to remote cached player units as of yet, I'll test that now. You have to be very careful with this script. If a Trigger/Condition on the Dedicated/HC depends on Units/Vehicles, which are not local on the Dedicated/HC, then those Triggers/Conditions will not work, because the Units/Vehicles will be frozen on the Dedicated/HC. Interesting, thank you. It would be very useful if BIS introduced a Physx command to enable/disable (to fall back to old simulation model from A2) - carx -> car for example. The remote AI are still sending network position updates, it's just the the position isn't being updated for local objects. setPOS wouldn't work as the command is global (or would be very hacky) and I could create "ghost" gamelogics for example and attachTo remote unit or something.. but the global variable would already be used. Ugh, headache. Edited February 12, 2015 by zorrobyte Share this post Link to post Share on other sites
Zriel 12 Posted February 12, 2015 ok. So I understand this would be done in the context of cached units? I thought it was for all units, no distance dependant. Share this post Link to post Share on other sites
Guest Posted February 12, 2015 New version frontpaged on the Armaholic homepage. ZBE HCCache v1.1 ================================================ We have also "connected" these pages to your account on Armaholic. This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! Share this post Link to post Share on other sites
Zriel 12 Posted February 12, 2015 OK...reread script...I'm at work. XD I have reread the check for Clients/HC/Server Share this post Link to post Share on other sites
whiztler 137 Posted February 13, 2015 Would be great if integrated in ZBE_caching. All in one package :) Share this post Link to post Share on other sites
zorrobyte 30 Posted February 13, 2015 (edited) I just thought of a solution, if it works. setPOS is global so if it works for remote units that are enablesimulation false'd then triggers/conditions would work. Another potential would be to enablesim/disablesim every cycle to update pos without additional packets as the remote units are still sending location updates via network to local. Would be great if integrated in ZBE_caching. All in one package Eventually I'd like to combine cache, this and AI load balancing into a single package for a AIO solution but much testing needs to take place to be sure things are working as advertised ;) EDIT That's the solution, I can just enablesim once a cycle http://youtu.be/jXCo4es57N4 Edited February 13, 2015 by zorrobyte Share this post Link to post Share on other sites
Rockhount 21 Posted February 13, 2015 Here again is a fixed version of the fsm v1.1 script. Download Rockhount Share this post Link to post Share on other sites
--mastermind-- 10 Posted February 14, 2015 Link is down! was gonna test new RockHount version. i have V1.1 lets see if this screws with Alives Caching system....lmao Share this post Link to post Share on other sites