[TUT] BaseBuilding 1.2 + Improvements 0.1 for Cherno 1.7.7.1

ZiaD68

New Member
Hey guys!

basebuilding 1.2 by daimyo21 and improvements by kikyou2 are the most awesome scripts ive ever seen for dayz ;) so i tryed myself in fixing that for cherno 1.7.7.1.
It is working for me (hosted by survivalserver, bliss, 1.7.7.1 cherno). i know, daimyo is already working on an update which could be released soon, but anyways...maybe someone want to have some fun with it ;) ive taken some parts from daimyo´s tutorial...

so, these are the things ive brought in:
tent and stashs are now also bound on player uid
tents & stashs also saved to db
rewritten routine to deploy tents and stashs based on player uid
database adjusted

Full featurelist of everything you will get here:
(the scripts are originally from damyo21 and kikyou2...so all credit go to them!)

http://opendayz.net/threads/release...r-and-editable-keycode-permanent-owner.12063/
https://github.com/Daimyo21/BaseBuilding-DayZ

so, lets start ;)




REQUIRED TOOLS FOR INSTALLATION TUTORIAL:

Navicat or an other SQL Workbench
Notepad++
Notepad++ Compare Plugin (Suggested)
PBO View
YOUR servers dayz_1.YOURWORLD.pbo mission file
YOUR servers dayz_server.pbo hive server file

Part 1 - Geting ready:

If you know how to unpbo and pbo your mission/server files, skip this step:
1. Open PBO View
2. Click Unpack at top (or Ctrl + U)
3. Browse harddrive for YOUR dayz_1.YOURWORLD.pbo mission file, select it and click open
5. Do this for YOUR dayz_server.pbo file too.
6. Now youll have YOUR server file and YOURWORLD mission file unpbo'd

Part 2 - The Basics:
Download the bundle from DOWNLOAD

Extract to a folder of your choice.

This file contais 3 folders.
Add_in
Full
Database

Add_in: All scripts in, which you use for implementing it
Full: A already installed version on vanilla dayz 1.7.7.1
Database: Updating Script for your Database.
 
Part 3 – Editing your dayz_1.world folder:

Simply copy the following files over from dayz_1.world TO YOUR dayz_1.YOURWORLD folders main directory:

-buildRecipeBook folder
-dayz_code folder
-fixes folder
-build_recipe_dialog.hpp
-build_recipe_list_dialog.hpp
-defines.hpp

People WITH Modified fn_selfActions.sqf; variables.sqf and/or compiles.sql:

If you are having addons like Bloodbag, you need to do this steps:
Please read the ReadMe.txt – custom.txt !!!


Modifying your dayz_1.world\description.ext:

Copy and paste this code at the top of your description.ext:

Code:
#include "defines.hpp"
#include "build_recipe_dialog.hpp"
#include "build_recipe_list_dialog.hpp"
 
Remove all this code from your description.ext or your mission will not load!
ONLY THIS CODE BELOW MUST BE REMOVED, DO NOT REMOVE ANY OTHER!
If you get stuck at WAIT FOR HOST, you did something wrong!
 
 
[CODE]
###REMOVE START###
class RscText
{
type = 0;
idc = -1;
x = 0;
y = 0;
h = 0.037;
w = 0.3;
style = 0x100;
font = Zeppelin32;
SizeEx = 0.03921;
colorText[] = {1,1,1,1};
colorBackground[] = {0, 0, 0, 0};
linespacing = 1;
};
class RscPicture
{
access=0;
type=0;
idc=-1;
style=48;
colorBackground[]={0,0,0,0};
colorText[]={1,1,1,1};
font="TahomaB";
sizeEx=0;
lineSpacing=0;
text="";
};
class RscLoadingText : RscText
{
style = 2;
x = 0.323532;
y = 0.666672;
w = 0.352944;
h = 0.039216;
sizeEx = 0.03921;
colorText[] = {0.543,0.5742,0.4102,1.0};
};
class RscProgress
{
x = 0.344;
y = 0.619;
w = 0.313726;
h = 0.0261438;
texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
colorFrame[] = {0,0,0,0};
colorBar[] = {1,1,1,1};
};
class RscProgressNotFreeze
{
idc = -1;
type = 45;
style = 0;
x = 0.022059;
y = 0.911772;
w = 0.029412;
h = 0.039216;
texture = "#(argb,8,8,3)color(0,0,0,0)";
};
 
###REMOVE END####

Modifying your dayz_1.world \init.sqf:

Change this line:
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";

to this:
Code:
call compile preprocessFileLineNumbers "fixes\variables.sqf";

post the following before:

Code:
progressLoadingScreen 1.0;

Code:
call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf";
call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf";
call compile preprocessFileLineNumbers "dayz_code\init\settings.sqf";

To get Admin override you have to change ADMINPLAYERUI to your Player_UID !
This step is also needet if you are using my already installed version.
Modifying your dayz_1.world \dayz_code\actions\player_remove.sqf:


Code:
if ((getPlayerUID player) in ["ADMINPLAYERUI1","ADMINPLAYERUID2"]) then {
call _func_ownerRemove;
};

Modifying your dayz_1.world \dayz_code\external\keypad\fnc_keyPad:

To get Admin override you have to change ADMINPLAYERUI to your Player_UID !

Code:
// Server Owner Overide Code
if ((getPlayerUID player) in ["ADMINPLAYERUI1","ADMINPLAYERUID2"])
 
Part 4 – Editing your dayz_server

Modifying your dayz_server\server_monitor.sqf:

Above this:

Code:
diag_log "HIVE: Starting";

add this:

Code:
// ####Copy START
// ### BASE BUILDING 1.2 ### SERVER SIDE BUILD ARRAYS - START
call build_baseBuilding_arrays;
// ### BASE BUILDING 1.2 ### SERVER SIDE BUILD ARRAYS - END
// ####Copy END

Above this:

Code:
if (count _inventory > 0) then {
//Add weapons

Add this:

Code:
// ####Copy START
// ##### BASE BUILDING 1.2 Server Side ##### - START
// This sets objects to appear properly once server restarts
//_object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true]; // Optional (REMOVE // lines before _object) May fix DayZ.ST issues, or issues related to Panel codes not working thanks nullpo
//the following is happening on every server restart
_code = _fuel * 1000; //it is necessary cause we get only the converted fuel variable from the database, so we got to calculate back to code format
_object setVariable ["Code", _code,true]; //set Code to the Object
_object setVariable ["Classname", _type,true]; //set Classname to the Object
_object setVariable ["ObjectID", _idKey,true]; //set ObjectID to the Object
_object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true]; //set ObjectUID to the Object
if ((_object isKindOf "Static") && !(_object isKindOf "TentStorage")) then {
_object setpos [(getposATL _object select 0),(getposATL _object select 1), 0];
};
//Set Variable
if (_object isKindOf "Infostand_2_EP1" && !(_object isKindOf "Infostand_1_EP1")) then {
_object setVariable ["Code", _code, true]; //changed to _code instead of _worldspace call dayz_objectUID2
};
 
 
// Set whether or not buildable is destructable
if (typeOf(_object) in allbuildables_class) then {
diag_log ("SERVER: in allbuildables_class:" + typeOf(_object) + " !");
for "_i" from 0 to ((count allbuildables) - 1) do
{
_classname = (allbuildables select _i) select _i - _i + 1;
_result = [_classname,typeOf(_object)] call BIS_fnc_areEqual;
if (_result) then {
_requirements = (allbuildables select _i) select _i - _i + 2;
 
_isDestructable = _requirements select 13;
diag_log ("SERVER: " + typeOf(_object) + " _isDestructable = " + str(_isDestructable));
if (!_isDestructable) then {
diag_log("Spawned: " + typeOf(_object) + " Handle Damage False");
_object addEventHandler ["HandleDamage", {false}];
};
};
};
//gateKeypad = _object addaction ["Defuse", "\z\addons\dayz_server\compile\enterCode.sqf"];
};
// ##### BASE BUILDING 1.2 Server Side ##### - END
// This sets objects to appear properly once server restarts
// ###COPY END


Modifying your dayz_server\init\server_functions.sqf:

Change this:

Code:
_allowedObjects = ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ", "TrapBear", "Wire_cat1", "StashSmall", "StashMedium"];

To this:

Code:
_allowedObjects = ["Land_Fire_DZ", "TentStorage", "Hedgehog_DZ", "Sandbag1_DZ", "TrapBear", "Wire_cat1", "StashSmall", "StashMedium", "Grave", "Concrete_Wall_EP1", "Infostand_2_EP1", "WarfareBDepot", "Base_WarfareBBarrier10xTall", "WarfareBCamp", "Base_WarfareBBarrier10x", "Land_fortified_nest_big", "Land_Fort_Watchtower", "Land_fort_rampart_EP1", "Land_HBarrier_large", "Land_fortified_nest_small", "Land_BagFenceRound", "Land_fort_bagfence_long", "Land_Misc_Cargo2E", "Misc_Cargo1Bo_military", "Ins_WarfareBContructionSite", "Land_pumpa", "Land_CncBlock", "Misc_cargo_cont_small_EP1", "Land_prebehlavka", "Fence_corrugated_plate", "ZavoraAnim", "Land_tent_east", "Land_CamoNetB_EAST", "Land_CamoNetB_NATO", "Land_CamoNetVar_EAST", "Land_CamoNetVar_NATO", "Land_CamoNet_EAST", "Land_CamoNet_NATO", "Fence_Ind_long", "Fort_RazorWire", "Fence_Ind"];

Change this:

Code:
if ((typeOf _object) in _allowedObjects) then {

to this:

Code:
if ((typeOf _object) in _allowedObjects || (typeOf _object) in allbuildables_class) then {

continue Part 4 in next post.....
 
copy the following at the very end of your server_functions.sqf
copy direct below
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fa_hiveMaintenance.sqf";

Code:
// ### COPY START
// BASE BUILDING 1.2 Build Array
build_baseBuilding_arrays = {
 
// ################################### BUILD LIST ARRAY SERVER SIDE ######################################## START
/*
Build list by Daimyo for SERVER side
Add and remove recipes, Objects(classnames), requirments to build, and town restrictions + extras
This method is used because we are referencing magazines from player inventory as buildables.
Main array (_buildlist) consist of 34 arrays within. These arrays contains parameters for player_build.sqf
From left to right, each array contains 3 elements, 1st: Recipe Array, 2nd: "Classname", 3rd: Requirements array.
Check comments below for more info on parameters
*/
private["_isDestructable","_classname","_isSimulated","_disableSims","_objectSims","_objectSim","_requirements","_isStructure","_structure","_wallType","_removable","_buildlist","_build_townsrestrict"];
// Count is 34
// Info on Parameters (Copy and Paste to add more recipes and their requirments!):
//[TankTrap, SandBags, Wires, Logs, Scrap Metal, Grenades], "Classname", [_attachCoords, _startPos, _modDir, _toolBox, _eTool, _medWait, _longWait, _inBuilding, _roadAllowed, _inTown, _removable, _isStructure, _isSimulated, _isDestructable];
_buildlist = [
[[0, 1, 0, 0, 1, 1], "Grave", [[0,2.5,.1],[0,2,0], 0, true, true, true, false, false, true, true, false, false, true, false]],//Booby Traps --1
[[2, 0, 0, 3, 1, 0], "Concrete_Wall_EP1", [[0,5,1.75],[0,2,0], 0, true, false, true, false, false, true, false, false, false, true, false]],//Gate Concrete Wall --2
[[1, 0, 1, 0, 1, 0], "Infostand_2_EP1", [[0,2.5,.6],[0,2,0], 0, true, false, true, false, false, false, false, false, false, false, false]],//Gate Panel w/ KeyPad --3
[[3, 3, 2, 2, 0, 0], "WarfareBDepot", [[0,18,2], [0,15,0], 90, true, true, false, true, false, false, false, false, true, true, false]],//WarfareBDepot --4
[[4, 1, 2, 2, 0, 0], "Base_WarfareBBarrier10xTall", [[0,10,1], [0,10,0], 0, true, true, false, true, false, false, false, false, false, true, false]],//Base_WarfareBBarrier10xTall --5
[[2, 1, 2, 1, 0, 0], "WarfareBCamp", [[0,12,1], [0,10,0], 0, true, true, false, true, false, false, false, false, true, true, false]],//WarfareBCamp --6
[[2, 1, 1, 1, 0, 0], "Base_WarfareBBarrier10x", [[0,10,.6], [0,10,0], 0, true, true, false, true, false, false, false, false, false, true, false]],//Base_WarfareBBarrier10x --7
[[2, 2, 0, 2, 0, 0], "Land_fortified_nest_big", [[0,12,1], [2,8,0], 180,true, true, false, true, false, false, false, false, true, true, false]],//Land_fortified_nest_big --8
[[2, 1, 2, 2, 0, 0], "Land_Fort_Watchtower", [[0,10,2.2],[0,8,0], 90, true, true, false, true, false, false, false, false, true, true, false]],//Land_Fort_Watchtower --9
[[4, 1, 1, 3, 0, 0], "Land_fort_rampart_EP1", [[0,7,.2], [0,8,0], 0, true, true, false, true, false, false, false, true, false, true, false]],//Land_fort_rampart_EP1 --10
[[2, 1, 1, 0, 0, 0], "Land_HBarrier_large", [[0,7,1], [0,4,0], 0, true, true, true, false, false, false, false, false, false, true, false]],//Land_HBarrier_large --11
[[2, 1, 0, 1, 0, 0], "Land_fortified_nest_small", [[0,7,1], [0,3,0], 90, true, true, true, false, false, false, false, false, true, true, false]],//Land_fortified_nest_small --12
[[0, 1, 1, 0, 0, 0], "Land_BagFenceRound", [[0,4,.5], [0,2,0], 180,true, true, false, false, false, false, false, true, false, true, false]],//Land_BagFenceRound --13
[[0, 1, 0, 0, 0, 0], "Land_fort_bagfence_long", [[0,4,.3], [0,2,0], 0, true, true, false, false, false, false, false, true, false, true, false]],//Land_fort_bagfence_long --14
[[6, 0, 0, 0, 2, 0], "Land_Misc_Cargo2E", [[0,7,2.6], [0,5,0], 90, true, false, false, true, false, false, false, false, false, true, false]],//Land_Misc_Cargo2E --15
[[5, 0, 0, 0, 1, 0], "Misc_Cargo1Bo_military", [[0,7,1.3], [0,5,0], 90, true, false, false, true, false, false, false, false, false, true, false]],//Misc_Cargo1Bo_military --16
[[3, 0, 0, 0, 1, 0], "Ins_WarfareBContructionSite", [[0,7,1.3], [0,5,0], 90, true, false, false, true, false, false, false, false, false, true, false]],//Ins_WarfareBContructionSite --17
[[1, 1, 0, 2, 1, 0], "Land_pumpa", [[0,3,.4], [0,3,0], 0, true, true, true, false, false, false, false, true, false, true, false]],//Land_pumpa --18
[[1, 0, 0, 0, 0, 0], "Land_CncBlock", [[0,3,.4], [0,2,0], 0, true, false, false, false, false, true, true, true, false, true, false]],//Land_CncBlock --19
[[4, 0, 0, 0, 0, 0], "Hhedgehog_concrete", [[0,5,.6], [0,4,0], 0, true, true, false, true, false, true, false, false, false, true, false]],//Hhedgehog_concrete --20
[[1, 0, 0, 0, 1, 0], "Misc_cargo_cont_small_EP1", [[0,5,1.3], [0,4,0], 90, true, false, false, false, false, false, false, true, false, true, false]],//Misc_cargo_cont_small_EP1 --21
[[1, 0, 0, 2, 0, 0], "Land_prebehlavka", [[0,6,.7], [0,3,0], 90, true, false, false, false, false, false, false, true, false, true, true]],//Land_prebehlavka(Ramp) --22
[[2, 0, 0, 0, 0, 0], "Fence_corrugated_plate", [[0,4,.6], [0,3,0], 0, true, false, false, false, false, false, false, true, false, true, true]],//Fence_corrugated_plate --23
[[2, 0, 1, 0, 0, 0], "ZavoraAnim", [[0,5,4.0], [0,5,0], 0, true, false, false, false, false, true, false, true, false, true, true]],//ZavoraAnim --24
[[0, 0, 7, 0, 1, 0], "Land_tent_east", [[0,8,1.7], [0,6,0], 0, true, false, false, true, false, false, false, false, true, true, true]],//Land_tent_east --25
[[0, 0, 6, 0, 1, 0], "Land_CamoNetB_EAST", [[0,10,2], [0,10,0], 0, true, false, false, true, false, false, false, true, true, true, true]],//Land_CamoNetB_EAST --26
[[0, 0, 5, 0, 1, 0], "Land_CamoNetB_NATO", [[0,10,2], [0,10,0], 0, true, false, false, true, false, false, false, true, true, true, true]],//Land_CamoNetB_NATO --27
[[0, 0, 4, 0, 1, 0], "Land_CamoNetVar_EAST", [[0,10,1.2],[0,7,0], 0, true, false, true, false, false, false, false, true, false, true, true]],//Land_CamoNetVar_EAST --28
[[0, 0, 3, 0, 1, 0], "Land_CamoNetVar_NATO", [[0,10,1.2],[0,7,0], 0, true, false, true, false, false, false, false, true, false, true, true]],//Land_CamoNetVar_NATO --29
[[0, 0, 2, 0, 1, 0], "Land_CamoNet_EAST", [[0,8,1.2], [0,7,0], 0, true, false, true, false, false, false, false, true, false, true, true]],//Land_CamoNet_EAST --30
[[0, 0, 1, 0, 1, 0], "Land_CamoNet_NATO", [[0,8,1.2], [0,7,0], 0, true, false, true, false, false, false, false, true, false, true, true]],//Land_CamoNet_NATO --31
[[0, 0, 2, 2, 0, 0], "Fence_Ind_long", [[0,5,.6], [-4,1.5,0], 0, true, false, true, false, false, false, false, true, false, true, true]], //Fence_Ind_long --32
[[0, 0, 2, 0, 0, 0], "Fort_RazorWire", [[0,5,.8], [0,4,0], 0, true, false, false, false, false, false, false, true, false, true, true]],//Fort_RazorWire --33
[[0, 0, 1, 0, 0, 0], "Fence_Ind",  [[0,4,.7], [0,2,0], 0, true, false, false, false, false, false, true, true, false, true, true]] //Fence_Ind --34 *** Remember that the last element in array does not get comma ***
];
// Build allremovables array for remove action
for "_i" from 0 to ((count _buildlist) - 1) do
{
_removable = (_buildlist select _i) select _i - _i + 1;
if (_removable != "Grave") then { // Booby traps have disarm bomb
allremovables set [count allremovables, _removable];
};
};
// Build classnames array for use later
for "_i" from 0 to ((count _buildlist) - 1) do
{
_classname = (_buildlist select _i) select _i - _i + 1;
allbuildables_class set [count allbuildables_class, _classname];
};
 
 
/*
*** Remember that the last element in ANY array does not get comma ***
Notice lines 47 and 62
*/
// Towns to restrict from building in. (Type exact name as shown on map, NOT Case-Sensitive but spaces important)
// ["Classname", range restriction];
// NOT REQUIRED SERVER SIDE, JUST ADDED IN IF YOU NEED TO USE IT
_build_townsrestrict = [
["Lyepestok", 1000],
["Sabina", 900],
["Branibor", 600],
["Bilfrad na moru", 400],
["Mitrovice", 350],
["Seven", 300],
["Blato", 300]
];
// Here we are filling the global arrays with this local list
allbuildables = _buildlist;
allbuild_notowns = _build_townsrestrict;
 
// ################################### BUILD LIST ARRAY SERVER SIDE ######################################## END
 
};
//##### COPY END

Modifying your dayz_server\server_publishObject.sqf:


Change this:

Code:
private ["_class","_uid","_charID","_object","_worldspace","_key"];

to this:

Code:
private ["_class","_uid","_charID","_object","_worldspace","_key","_code","_fuel"];


above this:
Code:
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"

Add this:

Code:
// BASEBUILDING start
_fuel = _this select 4;
_code = _this select 5;
// BASEBUILDING end

Change this:

Code:
if (!(_object isKindOf "Building")) exitWith {
deleteVehicle _object;
to this:

Code:
// BASEBUILDING start
//if (!(_object isKindOf "Building")) exitWith {
//deleteVehicle _object;
//};
// BASEBUILDING end
Change this:

Code:
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];

To this:

Code:
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], _fuel, _uid];

Change this:

Code:
_object setVariable ["ObjectUID", _uid,true];

To this:

Code:
// BASEBUILDING start
_code = _fuel * 1000; //would be only necessary if we wouldn't pass the code from player_build.sqf
_object setVariable ["Code", _code,true]; //set the Code to the Object
_object setVariable ["ObjectUID", _uid,true]; //set ObjectUID to the Object
_object setVariable ["Classname", _class,true]; //set Classname to the Object
// BASEBUILDING end
 
Part 5 – Update your Database
This step is also needet if you are using my already installed version.


update_database.sql can be found in „Archieve\SQL“

In MYSQL Workbench (or whatever you use to manage DB):
Set your default schema (the database you want to execute scripts on)
Make sure you backup your Database before executing the sql file. It overrides the „Deployables“ table aswell clearing the whole „Instance_deployables“!
Go to:
File >> Open/Execute SQL scripts >> and find/open
update_database.sql
Execute this script.


Hope this helps some people gettin it working....! it should also be addable in other mods...its up to you to check that out ;)
sorry for my english....but if anyone needs a hand....and if ive got some time....ill give a hand
 
First off I want to thank you for the work you did putting this all-in-one tutorial together. It is very well done and easy to follow. I am having a slight problem though with deployables not saving to the data base. I have been working on this for the last week and a half tweaking and looking for my mistake but for the life of me cannot figure out where I went wrong. I have been trying to get this to work on an Overwatch server which is where I am running into the issues. Your code works perfectly for standard 1.7.7.1 Chernarus but when I try to use Overwatchs fn_selfActions I just cannot get it to save to the data base. Is there anything you specifically changed to get it to save to the data base and if not can you maybe tell me where I should look to find my mistake. Thank you.
 
hey ;)
glad to see that it works :cool:


i have changed the "save to" and "delete from action", which changed from 1.6.x - 1.7.x. and ive also changed my database structure because the variables didnt match anymore.
you should take a look in your hive.log if the action for publishing is working.....if so, there should be an error.

- if his error appears,
its a part of your database structure to accept the stuff which will be pusblished. most issues of 1.7.7.1 cherno are because the database structure is set to specific locations, which you change with basebuilding. it is because of changing from your survivor - table_id to your profile - player_uid. search for your "foreign keys" and edit them that it suits.
also the fuel table changed.....because the edit code would be written as decimal. my database didnt accepted this on start ;)

-if you dont get this error in hive.log,
it is about the publishing values. ive changed the publishing value
from "dayzPublishObj" to "PVDZ_obj_Delete"
and the delete value
from "dayzDeleteObj" to "PVDZ_obj_Publish".
you have to open all the basebuilding files, and search the documents for these values and have to change it ;)

well, i dont know how your publish_object_sqf in day_server.pbo works. maybe its a different variable to publish or a diffrent method. if nothing helps, you should compare the original overwatch file with the edited....and take a look whats the variable ;)


let me know ;)
 
Thank you Zia, this has solved many problems for me. But now after using your server and mission .PBO from tutorial/full and running the database.sql. Tents work, but I have the following problem.

Buildables will write to server, after restart the code will no longer work and when I change the code it removes the object from database with this error.

2013-10-02 19:21:22 HiveExt: [Error] Error executing |CHILD:308:1:0:0:8952521:[241.883,[14202,14140.8,0.00166321]]:[]:[]:8.268:1420201414080242:|

I am using Reality .46 with dayz 1.7.7.1-103718

Sadly I've just started learning ARMA scrpiting and I have no idea if I should be looking at the database, a .pbo, or a bad hiveext.dll

Any help would be much appreciated.
 
Well, I think I tracked down the error regarding the items being removed when changing the code and generating an error to...

Code:
_fuel = _numberInput / 1000; //calculate fuel to make it ready for database
_object setVariable ["Code",_numberInput,true]; //set the code again to be sure its set to the object
_object setVariable ["characterID",dayz_playerUID,true]; //set the playerUID again to be sure its set to the object
PVDZ_obj_Publish = [dayz_playerUID,_object,[_dir,_location],_classname,_fuel,_numberInput]; //prepare global array to pass variables to the publish function
publicVariableServer "PVDZ_obj_Publish";
if (isServer) then {
PVDZ_obj_Publish call server_publishObj; //recreate the database entry with the new code stored in the fuel field
};

But I still can't figure out why the codes wont be accepted on a server restart.

After further investigation. EVERYTHING works, until server restart. Then I get that error and keycodes no longer work.
 
hey ;)
i dont know why this happens to you, but i think it is maybe a database writing and reading error. check your database, if there is everything ok.
i mean you should check, if the variables which were generated (looks on first look ok), suits in your database. also, it could be, that you are using a other database structure which cant get loadet....
there were some fixes for moving objects, i dont know if that code could be taken for that.
or it is simply something wrong addet in the code - have you rechecked all your changes? ;)
 
Hi! I checked all my changes twice and to be extra sure I reloaded using your /full .PBOs with no mods added. Same problem. I manually deleted my database/deployables and database/instance_deployables and then used your "update_database.sql". Still nothing.
 
:eek: OOOOOOOOH!!
...Im using reality instead of bliss!
I feel so stupid now v.v
:oops:

.... I'll try finding the 1.7.7.1 Bliss server package (I only have 1.7.6.1) v.v

-edit-
using the 1.7.6.1 Bliss build with reality shema updates to .46
It's working! Now im having issues with survivor inventory saving on restart >.<

So will rebuild database with 1.7.6.1 server setup to schema .39, then try again later.
 
Ok no luck with 1.7.4.4 of Bliss. Had some luck with Reality 1.7.6.1 But, can't figure out how I got the items to work on restart. So back to nothing. Very frustrating. Is there anyway I could get a copy of your Database you used to get this to work? Also if you could explain what server you were using?
 
Back
Top