Jump to content
code34

OO PDW - oriented object Persistent Data World

Recommended Posts

hello no statement,

 

can you please copy your pdw code where you call the save of your house ?

Share this post


Link to post
Share on other sites

Hello.

 

This is my initServer.sqf:

 

call compilefinal preprocessFileLineNumbers "oo_pdw.sqf";
        _name = "house3";
        _pdw = ["new", "inidbi"] call OO_PDW;
         _objects = ["loadObject", _name] call _pdw;
        hint format ["Restore all objects %1", _objects];
        
        call compilefinal preprocessFileLineNumbers "saveServer.sqf";

 

This is my safeServer.sqf:

 

_refreshTime = 360; // refresh every 5 minutes
 
// Loop forever
while {true} do
{
 
call compilefinal preprocessFileLineNumbers "oo_pdw.sqf";
 
_pdw = ["new", "inidbi"] call OO_PDW;
_name = "house3";
_object = house3;
_haus = ["saveObject", [_name, _object]] call _pdw;        

sleep 2;

 hint "Save Object";
// Wait the duration of _refreshTime
sleep _refreshTime;
};

Share this post


Link to post
Share on other sites

i test your script in local and it works. Where did you test it  on server or local client ?

Share this post


Link to post
Share on other sites

I test it on a server. I have test it with "saveobjects". This is working. Every Object have the right position and spawned at this.

Share this post


Link to post
Share on other sites

ok that is the reason :) you try to create an object at player position . Except player variable is unknown on server locality :)

Share this post


Link to post
Share on other sites

yes it s possible with marker or unit that are from allplayers, allunits etc. :)

Share this post


Link to post
Share on other sites

Hello.

 

Me again :unsure: . I have test it with a marker. That works fine. But for my project i really need the createVehicle position player command. 

I have test it with  createVehicle position player command and save all objects. That is working. The house is at the position where i have create it after loading.

Is the saveAllObject Function working with another kind of getPos like save one object?Do you have an idea for a script or a function change for my project?

Share this post


Link to post
Share on other sites

Hello.

 

Me again :unsure: . I have test it with a marker. That works fine. But for my project i really need the createVehicle position player command. 

I have test it with  createVehicle position player command and save all objects. That is working. The house is at the position where i have create it after loading.

Is the saveAllObject Function working with another kind of getPos like save one object?Do you have an idea for a script or a function change for my project?

 

hi

 

Is the saveAllObject Function working with another kind of getPos like save one object? yes

 

 

{

    if(name _x  == "yourplayername") then {

        house3 = createVehicle ["Land_i_House_Small_02_V2_F", position _x, [], 0, "NONE"];

    };

} foreach allunits;

Share this post


Link to post
Share on other sites

Oh my God. It works :D . Thank you very very much for your help and your time for me. You are great.

 

np dude :) was a pleasure :D

Share this post


Link to post
Share on other sites

Hey there,

 

I am unable to find if its possible to exclude certain objects from being saved and reloaded?
The trouble I have is I purely want to save objects that are moved around by R3F Logistics so that persistent FOB's can be created. Ideally I would also like to save players location aswell. Gear however is not important but would be nice.

 

Using the setup provided in the example mission works well for all of the above however the objects initially used at base lose their "AddActions".

How can I preserve this?

Share this post


Link to post
Share on other sites

hi :)

 

 


I am unable to find if its possible to exclude certain objects from being saved and reloaded?

 

can be add easily in the next version

 

for addaction, i don't think it s possible cause there is no command to retrieve all informations (text, command attached), and it s a local command :(

 

if you want to do, you should save informations, restore them, and build from scratch addactions on the good client side :(

Share this post


Link to post
Share on other sites

 

 

can be add easily in the next version

 

 

 

if you want to do, you should save informations, restore them, and build from scratch addactions on the good client side :(

 

 
Mmm I would very much appreciate for that option to be added in the next version, like a way to have it not sync editor placed objects and only sync stuff that is spawned in later such as objects from R3F.
 
As for how to do that. Would i need to do something like name all the objects I want to have add actions on, then after the objects have been loaded in by OO PDW add actions to them?

Thanks!

Share this post


Link to post
Share on other sites

@code34 - thanks for this system, it works very well.

One question, if i was to setup a save and load system for all map objects would the system save the contents of vehicles such as ammoboxes?

It would be great if we could select which objects to save. E.g. only empty vehicles and no AI.

Share this post


Link to post
Share on other sites

 

 
Mmm I would very much appreciate for that option to be added in the next version, like a way to have it not sync editor placed objects and only sync stuff that is spawned in later such as objects from R3F.
 
As for how to do that. Would i need to do something like name all the objects I want to have add actions on, then after the objects have been loaded in by OO PDW add actions to them?

Thanks!

 

 

yes there is certainly several way to do it, but it breaks the principle of pdw.

 

i have to think about it,  there s missing a piece in the puzzle.

Share this post


Link to post
Share on other sites

@code34 - thanks for this system, it works very well.

One question, if i was to setup a save and load system for all map objects would the system save the contents of vehicles such as ammoboxes?

It would be great if we could select which objects to save. E.g. only empty vehicles and no AI.

 

normaly, it shoud save the content of vehicle :)

 

Can you copy/paste an example of use case of a new method, you expected ?

 

I'm going to think about it for the next release.

Share this post


Link to post
Share on other sites

Maybe just have a code to use in any vehicles init which will exclude it from being saved to database? Sorry but i cant provide any examples.

Share this post


Link to post
Share on other sites

yes there is certainly several way to do it, but it breaks the principle of pdw.

 

i have to think about it,  there s missing a piece in the puzzle.

Mmm. It seems its capability is the tiniest bit off perfect for what i'm trying to use it for. The idea is i've got a persistent server up for both training and just general play for my community. I want them to be able to set up FOB and small bases that they can then use for assaulting objectives. Obviously with Altis and many other maps being so large this is a very nice mechanic. Currently I am using only the object saving feature of ALIVE to achieve this but It doesn't always work 100% with R3F moved and placed objects. Your system however is 100% accurate with where the objects place are placed down again and due to it detecting objects that are actually on the map, things that are put back inside R3F creation factories don't return on re-loading like it does with ALIVE.

Very hopeful you can figure something out to exclude objects from being saved. 

 

Maybe just have a code to use in any vehicles init which will exclude it from being saved to database? Sorry but i cant provide any examples.

Possibly an Array of object names? Or class names for objects, so if you wanted to not save certain types of objects you could.

Just ideas and not very sure how you would implement it.

Share this post


Link to post
Share on other sites

Mmm. It seems its capability is the tiniest bit off perfect for what i'm trying to use it for. The idea is i've got a persistent server up for both training and just general play for my community. I want them to be able to set up FOB and small bases that they can then use for assaulting objectives. Obviously with Altis and many other maps being so large this is a very nice mechanic. Currently I am using only the object saving feature of ALIVE to achieve this but It doesn't always work 100% with R3F moved and placed objects. Your system however is 100% accurate with where the objects place are placed down again and due to it detecting objects that are actually on the map, things that are put back inside R3F creation factories don't return on re-loading like it does with ALIVE.

Very hopeful you can figure something out to exclude objects from being saved. 

 
 

Possibly an Array of object names? Or class names for objects, so if you wanted to not save certain types of objects you could.

Just ideas and not very sure how you would implement it.

 

im not sure to understand completly the problem. Do you mean ALIVE restore function manage R3F object ? Does a exclude object function will resolve the problem ?

Share this post


Link to post
Share on other sites

Literally the only thing stopping me from using OO_PDW is the fact I can't exclude an object from being saved.

 

For example.

 

I have some ammo boxes at spawn with addactions on them [For members to load gear etc] when OO_PDW does it's save and reload process, these objects lose the addactions.

 

I also have a truck with an add action on it for R3F. I'd like to be able to do one of the two.

 

1) In the INIT field of the vehicles have something like a function or an exec that will stop OO_PDW from touching that object.

2) An array that can be defined with a list of names of objects that will not be saved. So have a script that you can add a list of objects you do not wish to have saved. ["object1","object2"] etc.

  • Like 1

Share this post


Link to post
Share on other sites

ROGER! :) that is pretty much clear !

 

im going to add it in next release

Share this post


Link to post
Share on other sites

ROGER! :) that is pretty much clear !

 

im going to add it in next release

AWESOME STUFF!

Can't wait!

Share this post


Link to post
Share on other sites

Can you please include 2 fixes in your update? I dont have the exact line numbers now but I can get them later if needed.

The code to add binoculars

player additem ""; player assignitem "";

Can u change that to player addweapon "";

Currently the binoculars dont get assigned and are left in your pack.

Also remove the code that adds gps to player.

Lookin forward to the update!

Share this post


Link to post
Share on other sites

Another interesting feature, however i'm not sure how difficult, would be if you could define it to not save objects in a certain radius of a marker or just what is within the markers rectangle or circle radius.

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

×