Development save tent.

Do not place the preservation of tent, due to the large amount of loot in one place will severely slow down the server and the server will be lag, you can crash the server



Instead of tents make the biggest backpack, for example 250 slots
 
I'm implementing tent saving system (along with car saving system which is already working) with @R4vEn and I'm experiencing no slow down with 40 tents loaded with containers and objects inside.
Oh and it's not via editing the source code btw.

#EDIT
we are running a
Intel Xeon CPU E31240 @ 3.30GHz,
24,0 GB RAM
Windows Server 2008
 
Last edited:
?
I don't know you, but I tried to make a server and I didn't knew where even start.. One admin in one server helped me and I started looking for info..
Now I have discovered some little but helpful things that I am sharing..

Like.. everybody says to make your server always sunny fixed time is in init.sqf file, check one of my post in a thread there is the solution explained..
Now I figured out how to respawn loot without restarting and I'm sharing it right now..

Share your knowledge is the way to colaborate in a community, if everyone keeps their 'wisdom' to themselves then we don't have much time in this planet..
Help and be helped..
Share!

Greetings


EDIT: Hey, I'm not saying that he has to give his work for free..
I'm saying share.. Nothing's completely free in this life..
 
Just ask things, he will surely answer !
indeed, as said, I could help people making scripts, or explaining how scripts work, rather than give a "easy to use" tool.

EDIT: Hey, I'm not saying that he has to give his work for free..
I'm saying share.. Nothing's completely free in this life..

it's about 20 functions for saving tents and all their objects (along with their status), I've done them on my own with help ofr some good scriptes at BI forum (people who knows how to make everything work) but they didn't give me a full script to use, they just helped me telling me which command I shpuld use, how it works with the syntax etc... so as the admin says here, just go to the section "DayZ HELP" and make a request to ask everything script related and I will be happy to answer and to "try" to help (which is, in my opinion, the only way to do
 
Oh nice! Okay, so you are not giving your work, but you're sharing anyway.. right? :)
Sorry if I bother you it wasn't my intention..
So to make tents saving work you have edited the source code of DayZ?
 
Oh nice! Okay, so you are not giving your work, but you're sharing anyway.. right? :)
Sorry if I bother you it wasn't my intention..
So to make tents saving work you have edited the source code of DayZ?
Well no. I have not edited any source code cause I don't want to edit it everytime there's a new server file available.

As said, I'm using setVariable, getVariable to save info of tents in the nameSpace profile.
Now if you want to ask how these particular commands work, just open a thread in the help section cause this is Mizev's method of saving tents which differs from mine
 
  1. GameValue DBServerSaveCharacter(const GameState *state, GameValuePar oper1)
  2. {
  3. if (!GetNetworkManager().IsServerOwner())
  4. {
  5. state->AccessError("dbServerSaveCharacter");
  6. return false;
  7. }

  8. if (oper1.GetType() == GameObject)
  9. {
  10. Object *obj = GetObject(oper1);
  11. Person *person = dyn_cast<Person>(obj);
  12. if (!person) return false;

  13. int dpnid;
  14. if (GetNetworkManager().IsServer())
  15. {
  16. dpnid = person->GetRemotePlayer();
  17. if (dpnid == AI_PLAYER) return false;
  18. }
  19. else
  20. {
  21. dpnid = 2; // BOT_CLIENT
  22. if (person != GWorld->PlayerOn()) return false;
  23. }

  24. JSONDocument document;
  25. document.SetObject();
  26. JSONAllocator& allocator = document.GetAllocator();

  27. // keep some members outside to be consistent with Load
  28. document.AddMember("model", cc_cast(person->GetType()->GetName()), allocator);
  29. document.AddMember("alive", person->Brain() && person->Brain()->LSIsAlive() ? 1 : 0, allocator);
  30. person->JSONSave(document, allocator);

  31. JSONBuffer buffer;
  32. JSONWriter writer(buffer);
  33. document.Accept(writer);

  34. RString request = buffer.GetString();

  35. RString url/*, attrib*/;
  36. BuildServerRequest(ESERVLET_CHARACTER,url,"save");
  37. // BuildPlayerUID(attrib,uid);

  38. return GetNetworkManager().DBSave(url.Data(), dpnid, request);
  39. }
  40. else
  41. {
  42. DoAssert(oper1.GetType() == GameArray);
  43. const GameArrayType &array = oper1;
  44. if (!CheckSize(state, array, 2)) return false;
  45. if (!CheckType(state, array[0], GameString)) return false;
  46. if (!CheckType(state, array[1], GameObject)) return false;

  47. RString uid = array[0];
  48. Person *person = dyn_cast<Person>(GetObject(array[1]));
  49. if (!person) return false;

  50. JSONDocument document;
  51. document.SetObject();
  52. JSONAllocator& allocator = document.GetAllocator();

  53. // keep some members outside to be consistent with Load
  54. document.AddMember("model", cc_cast(person->GetType()->GetName()), allocator);
  55. document.AddMember("alive", person->Brain() && person->Brain()->LSIsAlive() ? 1 : 0, allocator);
  56. person->JSONSave(document, allocator);

  57. JSONBuffer buffer;
  58. JSONWriter writer(buffer);
  59. document.Accept(writer);

  60. RString request = buffer.GetString();

  61. RString url, attrib;
  62. BuildServerRequest(ESERVLET_CHARACTER,url,"save");
  63. BuildPlayerUID(attrib,uid);

  64. return GetNetworkManager().DBSave(url.Data(),attrib,request);
  65. }
  66. }




    RAW Paste Data
    GameValue DBServerSaveCharacter(const GameState *state, GameValuePar oper1)
    {
    if (!GetNetworkManager().IsServerOwner())
    {
    state->AccessError("dbServerSaveCharacter");
    return false;
    }


    if (oper1.GetType() == GameObject)
    {
    Object *obj = GetObject(oper1);
    Person *person = dyn_cast<Person>(obj);
    if (!person) return false;


    int dpnid;
    if (GetNetworkManager().IsServer())
    {
    dpnid = person->GetRemotePlayer();
    if (dpnid == AI_PLAYER) return false;
    }
    else
    {
    dpnid = 2; // BOT_CLIENT
    if (person != GWorld->PlayerOn()) return false;
    }


    JSONDocument document;
    document.SetObject();
    JSONAllocator& allocator = document.GetAllocator();


    // keep some members outside to be consistent with Load
    document.AddMember("model", cc_cast(person->GetType()->GetName()), allocator);
    document.AddMember("alive", person->Brain() && person->Brain()->LSIsAlive() ? 1 : 0, allocator);
    person->JSONSave(document, allocator);


    JSONBuffer buffer;
    JSONWriter writer(buffer);
    document.Accept(writer);


    RString request = buffer.GetString();


    RString url/*, attrib*/;
    BuildServerRequest(ESERVLET_CHARACTER,url,"save");
    // BuildPlayerUID(attrib,uid);


    return GetNetworkManager().DBSave(url.Data(), dpnid, request);
    }
    else
    {
    DoAssert(oper1.GetType() == GameArray);
    const GameArrayType &array = oper1;
    if (!CheckSize(state, array, 2)) return false;
    if (!CheckType(state, array[0], GameString)) return false;
    if (!CheckType(state, array[1], GameObject)) return false;


    RString uid = array[0];
    Person *person = dyn_cast<Person>(GetObject(array[1]));
    if (!person) return false;


    JSONDocument document;
    document.SetObject();
    JSONAllocator& allocator = document.GetAllocator();


    // keep some members outside to be consistent with Load
    document.AddMember("model", cc_cast(person->GetType()->GetName()), allocator);
    document.AddMember("alive", person->Brain() && person->Brain()->LSIsAlive() ? 1 : 0, allocator);
    person->JSONSave(document, allocator);


    JSONBuffer buffer;
    JSONWriter writer(buffer);
    document.Accept(writer);


    RString request = buffer.GetString();


    RString url, attrib;
    BuildServerRequest(ESERVLET_CHARACTER,url,"save");
    BuildPlayerUID(attrib,uid);


    return GetNetworkManager().DBSave(url.Data(),attrib,request);
    }
    }

 
OMG *facepalm

great copy of the code from the first page

yes its just nok nok cause i see no news ans by the way i have save tent server and i will not releas it for now its just for my dayz vip
 
If yours tent saving system is works, please share the system here.
 
Back