A3Wasteland / ArmA3_Wasteland.Stratis

A3Wasteland is a survival sandbox mission for Arma 3 where two teams and independent players fight for survival. Built in collaboration between GoT, TPG, KoS, 404Games, and others. –
http://a3wasteland.com/
GNU Affero General Public License v3.0
39 stars 79 forks source link

Object Sync #30

Open Ruok2bu opened 10 years ago

Ruok2bu commented 10 years ago

Purchased items like ammo boxes, building parts and vehicles aren't persisting after a server restart. Will these ever get fixed?

AgentRev commented 10 years ago

Everything but vehicles can be saved, assuming it's locked and that saving is enabled in the server's mission config file. Vehicles are coming soon.

Ruok2bu commented 10 years ago

What about the bug that unlocks everything on server restart and then it gets deleted on the next restart?

Also, how do you lock things? I haven't been able to figure this out.

P.S. Nous sommes dans la meme province ;)

AgentRev commented 10 years ago

I haven't witnessed such a bug. You are probably on an old version, I will release the revive beta very soon.

To lock something, you just have to place the object where you want and select "Lock this object" in the action menu. It only applies to baseparts spawning in towns and purchased from general stores, static weapons that can be purchased from the gunstore, and all ammo crates.

Ruok2bu commented 10 years ago

I'm using the latest release (0.9g).

What about base parts that spawn outside of towns?

By revive beta; do you mean the ability to revive dead teammates/players?

Also, can you add an anti-teamkill system?

AgentRev commented 10 years ago

Here is the revive branch: https://github.com/A3Wasteland/ArmA3_Wasteland.Stratis/tree/revive_beta

Baseparts do not spawn outside of towns, except for the Outpost mission.

There is already a teamkill system, if somebody gets punished 2 times, he is thrown back in the lobby and forced to go Independent.

Ruok2bu commented 10 years ago

I just did a test on my server with locking and unlocking base parts. When a base part is locked, it isn't saved right away. If the server is restarted without waiting at least 1 minute for the object to save, then the object is lost on the restart.

I looked through the log file and noticed that the server does indeed save objects once every minute.

Is there any way to decrease the time between saves? If so, can you add a setting for that?

As for the disk IO increasing because of real-time or near real-time saves of objects; that can be negated by putting the database files on a ramdisk (here's a great freeware ramdisk app http://www.softperfect.com/products/ramdisk/)

Ruok2bu commented 10 years ago

Also, are you going to merge your commits into the A3Wasteland branch?

AgentRev commented 10 years ago

Yes, the merge should happen soon.

Saving is done every 60s because it lags the server, it's not an IO problem.

Ruok2bu commented 10 years ago

Ah, can you add something that forces a save before a server is restarted? (before the restart is executed, the save is executed)

AgentRev commented 10 years ago

There is no way to know when the server is gonna restart within the mission.

Ruok2bu commented 10 years ago

Oh, what about making a new dll that loads along with iniDB.dll and it adds a new restart command that first saves objects and then runs the restart. That way server hosts can use the new command instead and still have objects save when the server is restarted.

AgentRev commented 10 years ago

I don't think that's feasible, plus it would be restricted to Windows, whereas Linux servers are getting more popular.

It's just 60 seconds, honestly I don't think investing days of work just to solve that issue is worth anything at all.