Arma 3
Simple Persist
114 Comments
Tad  [author] Sep 30, 2024 @ 3:28pm 
First up it will attempt to use the BIS_fnc_findSafePos function, if that returns an error or tries to send you to 0,0,0 then it now defaults back to the precise location which was saved before.

You should never be returned to 0,0,0 now basically.
Wiket Sep 30, 2024 @ 10:04am 
@Tad so does this instead spawn you exactly where you left off, or a location stored from a previous save? If ifs the first option, is there a way to disable BIS_fnc_findSafePos? So that you always spawn at the exact spot you logged?

Been doing some stuff on Cytech (underground, small corridors) and there is a chance the safe position is outside the confines of the map.

Thanks.
Tad  [author] Sep 29, 2024 @ 2:08am 
Updates out guys. Should fix the reported issue (Note I couldn't replicate the problem so testing didn't really show anything).

Updated fnc_setobjpos to fall back to last stored position if BIS_fnc_findSafePos fails.
This should stop randomly being sent to 0,0,0 because ARMA cant' find a safe position.
Tad  [author] Sep 26, 2024 @ 4:24pm 
Glad it's sorted Wiket :)

Im not sure what IMS needs btw, there shouldn't be any compatibility issues however?
Wiket Sep 26, 2024 @ 3:41pm 
Tad is a legend and got into Discord to help with my issue. It was user error and the mod is working great!
Wiket Sep 26, 2024 @ 11:47am 
@Tad I sent it over Discord, thanks in advance!
5201314 Sep 24, 2024 @ 9:17pm 
hi,My question is, is this module useful for IMS (Improved Melee System)? Because this module cannot work on saved tasks, they said they need persistent mods
Tad  [author] Sep 21, 2024 @ 4:23pm 
Wiket, if you can send me the Server log file i'll be able to take a look at whats happening
Wiket Sep 18, 2024 @ 5:31pm 
@Tad so I just tested with the unit, we logged in, ran around, changed gear. Then we all left. Then after rejoining some were naked, some spawned in the wrong spot (this wrong spot was the same for everyone, maybe map center?), and some spawned fine.

We do events with 60-70 people, is this why?
Tad  [author] Sep 16, 2024 @ 12:53pm 
Hullahopp has given me the run down of the issue on GIT, i've got a potential fix in the works, it just needs testing.
Tad  [author] Sep 16, 2024 @ 11:38am 
Hey @Wiket, the Mod won't save anything if the server is forcibly stopped. You could force disconnect your players prior to a shutdown, which would "save"
Tad  [author] Sep 16, 2024 @ 11:32am 
Christ guys cool this discussion, my comments don't need to be flooded like this. Take it to Discord and discuss it there.
Machine Gun Kelly Sep 16, 2024 @ 10:32am 
@Hullahopp - Thanks for the info! I have used this 'function' before, though not that often as my mod does not need to know such, but that is an interesting question: What happens if it can not find a safe spot? I did not know, that it 'defaults' to the center of the map. Kinda makes sense, though Bohemia could have just raised an Error Flag and returned doing nothing.

Interesting...

Thanks!

:)
Hullahopp Sep 16, 2024 @ 8:50am 
@Wiket That issue can be replicated. This mod looks for a safe position to put you in, using BIS_fnc_findSafePos. It's an odd choice, considering the player can't really be in a non safe spot.
Anyways, the function returns the center of the map if a suitable position could not be found.
To replicate this, disconnect on a position around a ton of objects. Or here's a script (copied from github and modified to work with your current pos) to test it quicker:
_safepos = [(getPos player),0,10,5,0] call BIS_fnc_findSafePos;
_safepos set [2, 0];
player setPosATL _safepos;
Kelly's right, it's up to Ted to fix this. I'll just open a ticket on github
Machine Gun Kelly Sep 14, 2024 @ 8:47pm 
@Wiket - And to be clear, as this IS text AND my statement COULD be seen in more than one way, to that end:

Just know I was not implying anything or 'being rude' when I mentioned 'I do not see your name on the Steam page' comment. For I am NOT 100% WHICH 'side of the fence' you are on. USER side or DEV side. I have seen 'hints' of BOTH from you.

As such, to ENSURE CLEAR COMMUNICATION, I SPECIFIED my comments are only for them. Though you can read them, it is up to Tad to address. As TAD is shown as the 'true' dev.

Nothing more and nothing less! Now, we are on the SAME PAGE! Success! ;)

:)
Machine Gun Kelly Sep 14, 2024 @ 8:14pm 
@Wiket - The DEVS check the data, NOT THE USERS! So you will know, ME, AN END USER, does NOT see YOUR name as the dev, rather 'Tad'.

TAD needs to do this.

And how? Save it, then read it back in and check! Wrong? Save again and check again!

Done! JUST THAT SIMPLE! ;)

BUT, my concern is WHY are 'bits dropping out'. My 'fix', while it WILL work, it is NOT the 'right solution'. As stated, my mod saves gear AND 11 OTHER OUTFITS TOO! I have ZERO 'data loss'.

As there can be hundreds of ways to do things in programming, this 'method' is NOT the 'best going' as you have seen by its 'failings'.

Another VALID question is, what ELSE might not be working too that is yet to be discovered?

This is a 'DEV issue' to be fixed/corrected, as I have no exact knowledge of the programming methods used.

My comments are based on knowledge, my mod doing the same thing with no issues, and this mod and it issues.

:)
Wiket Sep 14, 2024 @ 1:07pm 
Would saving to mission be better than .vars?
Wiket Sep 14, 2024 @ 1:05pm 
How can I begin to verifiy the data? Maybe its a script causing the issue? Id love to get it fixed. I thought getting a new .vars would do it but so far no luck. Thanks for the reply.
Machine Gun Kelly Sep 14, 2024 @ 11:13am 
@Wiket - While I can not answer EXACTLY what is happening, I can point you in area(s) that MIGHT be the cause.

As an example, this save routine pushes the items onto the stack in the following order:
ACE stuff
Weapons
Player body items
Vest
Backpack
Location

If SOMETHING goes 'awry', it COULD cause the items being pushed to be delayed or even ignored. OR the save could be happening right in the middle of a transition, which is not uncommon for cut-scenes. The 'save' might occur during such times (the switch).

Could a mod cause it? I would think it is NOT a mod issue. Test it! Load basic ARMA and go for it!

Either it will work or not and you will KNOW the answer!

However, this CAN BE CORRECTED by this mod via VERIFICATION OF THE SAVED DATA, which it is not. Why? Who knows. Mine mod does not suffer from such issues. You save it, it is ALWAYS SAVED. The devs can address the specifics on the 'fix'. It IS an 'easy fix' for verification.

Good luck!

:)
Wiket Sep 13, 2024 @ 3:18pm 
So, half the time players spawn in a set location on the map, like in the middle of it, same location for everyone. They have their gear but the location is wrong. Sometimes you are in the right spot. I just deleted and had a new profile.vars made and I am still having this issue. Could it be a mod conflict?
Wiket Sep 10, 2024 @ 10:58am 
@Machine Gun Kelly You are rude, you act weird, I recommend you chill out.

I have seen other persistence systems work by saving every 30-60 seconds. BOOM max you can roll back is 60 seconds.

Anyways cool it.
Machine Gun Kelly Sep 7, 2024 @ 9:43pm 
@Wiket - I prefer to deal with reality and facts; as opposed to 'fantasies' as you do.

To Wit:

'Rude' is SUBJECTIVE. However, your ignorance is NOT - It is FACTUAL. I used '60 seconds' as an EXAMPLE.

PER MY POST: "As an example: It saves the gear every 60 seconds."


And I dare you to show where I was I was rude as well, by UNIVERSALLY ACCEPTED STANDARDS.

Speaking the 'blunt truth' is NEVER wrong. And 'Labels/Titles' <> 'Name Calling'.


Making false accusations as you have, IS wrong.

And Mr. Liar, that is NOT how you would do it.


Easy And Quick Check:
You check backpack weight AND backpack item count. If EITHER have CHANGED, you save. ONE LINE OF CODE.

1 line to init 2 variables, and 1 line to actually 'do the check'.

The 'check' could be run every .25 seconds with ZERO IMPACT (should) to the player OR server.

DUH!

So hard is'nt it?



Ta-Ta!
:)
Wiket Sep 7, 2024 @ 3:50pm 
This comment section is wild, who is Machine Gun Kelly. He just is rude to every person who comments.
Wiket Sep 7, 2024 @ 3:47pm 
@Machine Gun Kelly you are wrong though, if a players hear was saved every 60 seconds then the most they could ever be put back was 60 seconds. Losing 60 seconds of progress its a lot less jarring than an entire events worth.
Hullahopp Sep 6, 2024 @ 9:53am 
At any rate, add me as friend and hit me up in a DM if you want to discuss this further. We've filled up this discussion thread with a bunch of useless info, I don't wish to continue it here. Don't think Tad would be happy with this xd
Hullahopp Sep 6, 2024 @ 9:42am 
@Machine Gun Kelly Since you're a beginner, I'll explain what this is. An assumption based event algorithm is a type of algorithm that uses events, and is based on assumptions.
In my provided example, we assume a container changes state when a player interacts with it. This may not always be true, but it's a lot better than periodic saving.
We conveniently have an event that triggers when a player closes it's inventory, and it returns what container it interacted with. So we can just save when this event is triggered.
We can, of course, extend this with other assumptions. Such as the ones you provided. An entity likely changed states when it gets created, or removed. And we have events for those.

You're also confusing entity events with UI events. You're right, UI events are a pain in Arma. But, most other events are based on an ID system, so we won't run into any issues. Our inventory event example is using an entity event, for example.
Machine Gun Kelly Sep 6, 2024 @ 7:43am 
And no Event Handler conflicts? Really? Did you just start programming in ARMA 3 recently?


"See my Multiple OnMapSingleClick script to allow you to add multiple events to the onMapSingleClick event. Some minor editing of the scripts would be required to use them in Arma." - Why? ISSUES AND CONFLICTS!
See: https://community.bistudio.com/wiki/onMapSingleClick


"Arma 3 doesn't have a feature to stack these event handlers, so if another mod (which I don't think there is much) uses the same method, it might cause conflicts."
See: https://steamcommunity.com/sharedfiles/filedetails/?id=3228741150


"Vehicle animation event handler? I'm trying to resolve a minor conflict between my helocast mod and the RHS assets."
See: https://www.reddit.com/r/armadev/comments/enhehw/vehicle_animation_event_handler/
Hullahopp Sep 6, 2024 @ 3:38am 
@Machine Gun Kelly It's only unreliable if your assumptions are incorrect. What you're describing is missing assumptions, which doesn't make this method unreliable, but incomplete.

There are event handlers for entity creations, so what you said is basically a non issue.

And as to scripts editing containers - you can't account for every man's weird code. Simple Persist should account for what's possible in base Arma, and should not care about mods. It's simply out of scope.
Machine Gun Kelly Sep 5, 2024 @ 11:41am 
@Hullahopp - As you stated 'ASSUMING'. Kinda makes saving stuff 'unreliable' when 'guessing'. ;)

BUT, what I was talking about is there are MANY ways, objects/things and reasons objects/things are on the map. Such as a script spawning in an ammo crate.

"inventoryClosed EH" would NOT work as you never use it when a crate is spawned in. What about when it is flown in? Or if it gets destroyed while in-bound or after delivery? Also, as in my mod, I can spawn stuff into and out of my backpack without EVER OPENING THE BACKPACK! - HIGHLY UNRELIABLE IN ALL SITUATIONS! This is currently an issue with GTA5 as well. There is a chance that something will be put into your inventory, somehow and it never gets saved. Fix? After picking it up or when you wished to FORCE a save, THEN you open your inventory. This kinda a 'old issue' with a lot of games.

Also, you are ASSUMING some other mod will not OVERRIDE your EH's...which can and DOES happen! ;)
Machine Gun Kelly Sep 5, 2024 @ 11:41am 
THESE are the 'hidden' things/issues/concerns I am talking about.

This mod saves BASICALLY, stuff in the backpack/health, and this is stated under 'Features' section.

My point is this does not save EVERYTHING 'user owned', rather SOME things and OTHER means must be used to save EVERYTHING.

In most ways, we ARE saying the SAME THING. You talked about '3 things', I talked about those 3 and 5 more... ;)

:)
Hullahopp Sep 5, 2024 @ 9:17am 
@Machine Gun Kelly I didn't miss that, it wasn't the topic of the conversation. Saving ground objects can easily be done with an assumption based event algorithm.
For example, assuming every ground inventory only gets changed when a player interacts with it, you can use the inventoryClosed EH to auto save any vehicle/container (ground litter included).
That is, of course, just my assumption. But anyone can extend it with their own assumptions. Scanning for every possible vehicle, and not not mention, saving them when the object literally hasn't changed states is, as you said, wasteful.

@Wiket When the server crashes, it can't run any code because.. well, it's no longer running lol
The mod should save when a player crashes though.
Machine Gun Kelly Aug 31, 2024 @ 6:19pm 
@Wiket - And one last thing too. If you read the comments, you will notice that you have been the only one to complain about this.

This indicates one of three things only:

#1 - You are the only person out of 4000 using this on a server and have discovered a true bug.

#2 - You are using it incorrectly, and/or have a mis-configured server, and/or have bad/corrupt/out-dated mods/ARMA core file.

#3 - Both #1 and #2.


That's it! This is about all it can be.

And, not to be mean, BUT, based on that you're the only one with this issue, almost 4000 people using it with you having the only server complaint, and the fact the dev created to be used ONLY A SERVER, would indicate to ME, that the error is on yalls end - NOT THE DEV's.

Just something to ponder on...

:)
Machine Gun Kelly Aug 31, 2024 @ 6:11pm 
@Wiket - You're wrong on what you THINK would work. You ARE thinking though! And in the 'right' direction! :)


As an example: It saves the gear every 60 seconds. Well, the player crashes at 30 seconds. Whoops! It can no longer save now as it has crashed! Oh my!

Fix:
It is the same as they do in GTA5 and I am sure a lot of other games. The PERSON'S gear is saved AUTOMATICALLY when ANY changes are made to the 'outfit'. THIS is when it is saved and this is HOW to do it. No save UNLESS a change was made.

Problems:
This 'fix' ONLY works of a PERSON'S GEAR. It will NOT 'touch' vehicles or what @Hullahopp missed, and this is stuff put on the ground/in houses/etc. The whole map would have to be 'scanned' for any dropped/placed items not being carried. And I am not too sure the performance 'hit' that would be taken by the server to scan the entire map for all objects every second, probably quite a bad performance hit.

:)
Wiket Aug 31, 2024 @ 3:45pm 
Well this could be fixed by saving every few mins or so. It even seems to fail saving as players crash or dsync they dont save or load.
Wiket Aug 30, 2024 @ 11:45am 
Doesnt seem to save if server crashes or is stopped.
Hullahopp Aug 28, 2024 @ 7:58am 
I'm not sure what I was wrong on, but you do you man

This mod is neat though. Any plans on upgrading it @Tad?
Machine Gun Kelly Aug 27, 2024 @ 8:49am 
@Hullahopp - Tell ya what, go get my mod, which was last updated a LONG time before my post (and my mod was created long before this mod too). Run it, and guess what you will find? The ability to SAVE AND LOAD your gear! I have this for YEARS!

Not only that, I have user-defined presets for up to 12 'outfits' which the user can switch to and re-config at will.

So, YES, I DO know 'something' about what I talked about.

Seeing how I wrote the code (not saying I 'invented' the means to do such) to do such, it is quite obvious that I do know something about saving and loading gear.

Is this mod better? Worse? Who knows! I know I do not care. So what if this mod may be 2ms quicker (or slower) than mine..rah...rah...like who will even notice such... ;)


In SOME PARTS, you ARE correct. For example, if the gear is on the player's unit, you're correct. It is as easy as '1-2-3' to save/load that gear. ;)


I will leave this, as it is.

:)
Hullahopp Aug 27, 2024 @ 2:31am 
@ExpensiveBeaver KAT is an ever evolving thing. Creating a KAT save system requires upkeep. It's not difficult difficult to save KAT values, but the way they store them is really stupid. It takes trial and error to find what needs to be saved and what can be ignored.

@Inferno | M.D.F Tad is saving the default Arma wounds, and reapplying them as ACE wounds on load. Saving stitched wounds is not difficult though, the var is a hashmap called "ace_medical_stitchedWounds", in case @Tad wants to mess around with it!

@Machine Gun Kelly We don't need to know every item to save them, Arma handles that. Even then, getting an item's classname is trivial. The whole inventory save/load logic can be summed up in just two lines of code.

I actually came here to read the source code, but then saw kelly throwing tantrums, so I thought I'd chime in :D
The ACE saving portion of this mod is a bit surface level, but it's understandable. Ace's became more complicated since the big medical rework :\
[PTH] Citizen Battle Jul 29, 2024 @ 11:42am 
Does this need to be loaded with each individual client? I imagine it does not as it says server-side. I just want to be sure.
Inferno | M.D.F Jun 13, 2024 @ 9:29am 
Ignoring the mega autistic rant below, is it possible to get stitched wounds to save as stitched? It saves the wound, but not that it is stitched.
ExpensiveBeaver Apr 15, 2024 @ 1:17pm 
Can you make this work with KAT medical
Mr. Goodcat Mar 6, 2024 @ 10:26am 
any chance you can add the unconscious/cardiac arrest states from ace?
Machine Gun Kelly Feb 5, 2024 @ 8:43am 
@Komodo - If you are playing SP, just use the save feature built-into ARMA!

:)
Komodo Jan 30, 2024 @ 5:07am 
if i play Apex solo and have this, can it save my progress and continue later on?
Tad  [author] Dec 17, 2023 @ 3:58am 
Nothing, you don't need to change anything for this to work.
i am vincent Dec 6, 2023 @ 4:23pm 
Hi for this to work, what do the mission respawn settings need to be set to?
Tad  [author] Nov 28, 2023 @ 9:17am 
Machine Gun Kelly Sep 18, 2023 @ 8:09am 
@Pvt.Franky - I will will let the dev answer which server it can run on.

The other? I can answer that.

Is everything saved? NO. The way he does it is to save variables. In order to save variables, YOU HAVE TO KNOW OF THEM. This mean, the dev would have to examine EVERY SINGLE ARMA MOD IN THE WORLD. And those variables would ONLY be valid up to that point in time. 30 seconds from then, ANOTHER ARMA mod is released which will NOT work with this mod.

It is the SAME THING with anti-virus programs. They are not 'current' too long... ;)

He HAS saved some "common mod's variables", not all of them.

So, the SHORT answer to your 2nd half of your question is: Does it save everything? Answer: NO.

Hope this helps a tad said in a different way!

:)
Pvt.Franky Sep 18, 2023 @ 7:05am 
Does this Mod work if you host a server yourself and will everything still be saved if you rehost again a couple days later?
Maddy Sep 7, 2023 @ 12:56am 
Hi Tad! Thanks for the Reply :D And ohh okay Ty :)