Jump to content

[Release] Dayz.Epoch.3d.Editor.Live.Mission.With.Database.Interaction


Recommended Posts

Can this be used with snap building to make bases inside this editor with snap build to save sheeet loads of time? Will it give me the files needed when i save?

Unfortunately in the editor you can't press keys like up/down left right for the building option.

That's why I am starting the building process after 5 secs to the direction you are facing.

Otherwise yeah it would work. It saves the objects in the database like the normal server does

Link to comment
Share on other sites

07/17/2014 22:14:53 System.IO.FileNotFoundException: Could not load file or assembly 'Arma2Net.Managed, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e' or one of its dependencies. The system cannot find the file specified.


File name: 'Arma2Net.Managed, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8762987cc8e6095e'
at Arma2Net.Unmanaged.InvokeFunctionImpl(SByte* output, Int32 outputSize, SByte* function)
at Arma2Net.Unmanaged.InvokeFunction(SByte* output, Int32 outputSize, SByte* function)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

Something I had to do to get the Arma2Net.Managed.dll to load was to go into the @Arma2Net folder and unblock it (Right Click -> Properties, on Window 8.1 - x64).

 

I am getting an error reporting a missing sqf when loading the 3d.live.mission.Arma2Net mission in the editor (/dayz_code/compile/object_removeNet.sqf not found). No ill effects from what I can tell though.

 

Thanks for your work on this Sandbird, very, very cool.

Link to comment
Share on other sites

Something I had to do to get the Arma2Net.Managed.dll to load was to go into the @Arma2Net folder and unblock it (Right Click -> Properties, on Window 8.1 - x64).

I am getting an error reporting a missing sqf when loading the 3d.live.mission.Arma2Net mission in the editor (/dayz_code/compile/object_removeNet.sqf not found). No ill effects from what I can tell though.

Thanks for your work on this Sandbird, very, very cool.

 

Yeah, in some systems you have to unblock the dlls. I think it has to do with UAC in windows.

That sqf file was probably from a Tent removal script i forgot to remove after...or...are you sure you didnt overwrite player_removeNet in dayz_code\init\compiles.sqf ?

I got this in the github..so i dont know why its not finding it in your setup.

player_removeNet = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_removeNet.sqf";

:)

Link to comment
Share on other sites

  • 5 weeks later...

Sandbird, great job on this, was a huge fan of the non-db version and now this is just insane, is going to make my life so much easier now.

 

Quick question, I have everything running now (setup was a breeze), I have teleported around the map to each of the different traders and I cannot seem to interact with any of them. I do not get a scroll option to open the trader menu.

 

I am running against the latest db version of DayZ Epoch (version 1.0.5.1 at the time of writing). Any ideas?

Link to comment
Share on other sites

Sandbird, great job on this, was a huge fan of the non-db version and now this is just insane, is going to make my life so much easier now.

 

Quick question, I have everything running now (setup was a breeze), I have teleported around the map to each of the different traders and I cannot seem to interact with any of them. I do not get a scroll option to open the trader menu.

 

I am running against the latest db version of DayZ Epoch (version 1.0.5.1 at the time of writing). Any ideas?

 

Glad you like it :) It saved me hours and hours as well.

Hmm about the traders....Did you try to zoom in on them as well ?

 

Well if that doesnt work as well....then i guess the log files will tell us something....There are 2 of them...one for the whole custom SQL querry system and one for the normal dayz client log file.

Try the Arma2Net logs first...since the error is probably database interaction (maybe the new db scheme is different than the old one...might need to tweak the SQL queries for the traders a bit).

The Arma2Net log file (check per modified date in the folder) is either here:

c:/Users/YOURPROFILE/AppData/Local/Arma2NETMySQL or here :

c/Users/Sand/AppData/Local/Arma2NET

 

See at the bottom of the file if there are any error queries...if yes then check the structure of the query that it is trying to execute...does it match the tables / cells in the database ?

 

Also check your client log files here: c:/Users/Sand/AppData/Local/ArmA 2 OA/arma2oa.RPT

 

Does that say anything ?

Link to comment
Share on other sites

Glad you like it :) It saved me hours and hours as well.

Hmm about the traders....Did you try to zoom in on them as well ?

 

Well if that doesnt work as well....then i guess the log files will tell us something....There are 2 of them...one for the whole custom SQL querry system and one for the normal dayz client log file.

Try the Arma2Net logs first...since the error is probably database interaction (maybe the new db scheme is different than the old one...might need to tweak the SQL queries for the traders a bit).

The Arma2Net log file (check per modified date in the folder) is either here:

c:/Users/YOURPROFILE/AppData/Local/Arma2NETMySQL or here :

c/Users/Sand/AppData/Local/Arma2NET

 

See at the bottom of the file if there are any error queries...if yes then check the structure of the query that it is trying to execute...does it match the tables / cells in the database ?

 

Also check your client log files here: c:/Users/Sand/AppData/Local/ArmA 2 OA/arma2oa.RPT

 

Does that say anything ?

 

Nothing is immediately jumping out at me, here are the log files, would appreciate it if you could take a look as well:

Link to comment
Share on other sites

 

Nothing is immediately jumping out at me, here are the log files, would appreciate it if you could take a look as well:

 

 

Well....some errors i see...for example:

 

_playeruid ..... since the last beta patch there is no playerUID anymore (i think). Steam uses some other crap...so the player_login table is not the same with the old version.

Info: 16:28:47 - Received - Database: dayz_epoch SQL Query: INSERT INTO `Player_LOGIN` (`CharacterID`, `Datestamp`, `Action`) VALUES ('any', 'any', CURRENT_TIMESTAMP, '0')
Warning: 16:28:47 - MySQL error. MySql.Data.MySqlClient.MySqlException (0x80004005): Column count doesn't match value count at row 1

I dont see anything there about traders..(especially in the arma2net files). Are you sure these logs are the latest ?

 

oh crap i just realized something....how many objects do you have in the database ? I mean like, cars, buildings etc...

Cause maybe thats why the traders dont do anything....if you have like 200+ items then for sure you have to wait for the traders to get populated with stuff...because first the server tries to spawn all those things...and then it will take care of the traders...

Thats what i noticed when i was trying to set them up....till i realized thats the reason why they werent working.

If you do have alot of objects in your objects_data table...try deleting them and see if the traders work then.

Link to comment
Share on other sites

Well....some errors i see...for example:

 

_playeruid ..... since the last beta patch there is no playerUID anymore (i think). Steam uses some other crap...so the player_login table is not the same with the old version.

Info: 16:28:47 - Received - Database: dayz_epoch SQL Query: INSERT INTO `Player_LOGIN` (`CharacterID`, `Datestamp`, `Action`) VALUES ('any', 'any', CURRENT_TIMESTAMP, '0')
Warning: 16:28:47 - MySQL error. MySql.Data.MySqlClient.MySqlException (0x80004005): Column count doesn't match value count at row 1

I dont see anything there about traders..(especially in the arma2net files). Are you sure these logs are the latest ?

 

oh crap i just realized something....how many objects do you have in the database ? I mean like, cars, buildings etc...

Cause maybe thats why the traders dont do anything....if you have like 200+ items then for sure you have to wait for the traders to get populated with stuff...because first the server tries to spawn all those things...and then it will take care of the traders...

Thats what i noticed when i was trying to set them up....till i realized thats the reason why they werent working.

If you do have alot of objects in your objects_data table...try deleting them and see if the traders work then.

 

Yeah I saw that error, I meant that there was nothing relating to traders that jumped out at me. This is a fresh DB install, not one that I have populated with data from another server, and this is the first time of running it. There are only 50 entries in the object_data table. These are the latest log files.

Link to comment
Share on other sites

Yeah I saw that error, I meant that there was nothing relating to traders that jumped out at me. This is a fresh DB install, not one that I have populated with data from another server, and this is the first time of running it. There are only 50 entries in the object_data table. These are the latest log files.

 

hmm then i have no clue what is going on. These files were made for the latest epoch prior to the steam update...could be many things that could go wrong now.

Unfortunately i havent updated our clan's server files to the latest version and now we dont even have a server....so i dont know where to start to debug this.

I would suggest you start with the easy stuff...

in the dayz_server folder there are the trader files....do some diag_log entries there to see (in the client log file, you'll see the results) :

- Check if the items populating the trader are taken from the database. ...like diag_log the quantities or something....anything really to see if it gets data from the db.

- Try breaking an sql query (like changing a letter) to see if the arma2net log file brings errors...this way you'll know if the trader script is actually running.

- Open the fn_selfactions script and do a diag_log on the cursortarget where it says about the traders...to see if it recognizes the trader in sight as a trader or not....maybe thats why the menu doesnt pop up.

 

The best thing you could do is compare differences on the traders_data, trader_tid and server_traders between the old db and the new db....maybe they are different.

 

Like i said...i got no idea what changed since the last update. Cant really help much here :/

Link to comment
Share on other sites

  • 4 weeks later...

Hmm that query is actually wrong.

_key = format["INSERT INTO `Player_LOGIN` (`CharacterID`, `Datestamp`, `Action`) VALUES ('%1', '%2', CURRENT_TIMESTAMP, '%3')",_this select 0,_this select 1,_this select 2];
Should be

_key = format["INSERT INTO `Player_LOGIN` (`PlayerUID`,`CharacterID`, `Datestamp`, `Action`) VALUES ('%1', '%2', CURRENT_TIMESTAMP, '%3')",_this select 0,_this select 1,_this select 2];
That won't fix the issue though cause the any, any suggest it doesn't get the right vars.
Link to comment
Share on other sites

Hmm that query is actually wrong.

_key = format["INSERT INTO `Player_LOGIN` (`CharacterID`, `Datestamp`, `Action`) VALUES ('%1', '%2', CURRENT_TIMESTAMP, '%3')",_this select 0,_this select 1,_this select 2];
Should be

_key = format["INSERT INTO `Player_LOGIN` (`PlayerUID`,`CharacterID`, `Datestamp`, `Action`) VALUES ('%1', '%2', CURRENT_TIMESTAMP, '%3')",_this select 0,_this select 1,_this select 2];
That won't fix the issue though cause the any, any suggest it doesn't get the right vars.

 

 

hmm you are right that sql is wrong...I was sending the parameters from player_monitor.sqf

PVDZE_plr_LoginRecord = [_playerUID,_charID,0];
publicVariableServer "PVDZE_plr_LoginRecord";
if (!DefaultTruePreMadeFalse) then {
  [_playerUID,_charID,0] spawn dayz_recordLogin;
};

i gotta debug this, cant remember what i was doing there.

I do remember though that at some point i checked the player_login table and it was writing the proper data......i must have messed it up later on and didnt notice it.

I'll fix it tomorrow

Link to comment
Share on other sites

Yeah just went through your github. Be careful in comparing them to the current Epoch master which won't work. [player] call FNC_GetPlayerUID; is something new for 1.0.5.2 and does not work with 1.0.5.1. Use _playerUID = getPlayerUID player; instead

Link to comment
Share on other sites

Yeah just went through your github. Be careful in comparing them to the current Epoch master which won't work. [player] call FNC_GetPlayerUID; is something new for 1.0.5.2 and does not work with 1.0.5.1. Use _playerUID = getPlayerUID player; instead

 

What fresh hell is this ?

_playerUID = [player] call FNC_GetPlayerUID;

I just saw what this does....yeah, in the editor you cant get the playerUID...it doesnt exist....you have to make a fake one then use _playerUID = player getVariable ["playerUID", "0"]; instead.

 

I have to eventually convert this project to 1.0.5.2.

Link to comment
Share on other sites

Yeah I saw that error, I meant that there was nothing relating to traders that jumped out at me. This is a fresh DB install, not one that I have populated with data from another server, and this is the first time of running it. There are only 50 entries in the object_data table. These are the latest log files.

 

 

Hmm that query is actually wrong.

_key = format["INSERT INTO `Player_LOGIN` (`CharacterID`, `Datestamp`, `Action`) VALUES ('%1', '%2', CURRENT_TIMESTAMP, '%3')",_this select 0,_this select 1,_this select 2];
Should be

_key = format["INSERT INTO `Player_LOGIN` (`PlayerUID`,`CharacterID`, `Datestamp`, `Action`) VALUES ('%1', '%2', CURRENT_TIMESTAMP, '%3')",_this select 0,_this select 1,_this select 2];
That won't fix the issue though cause the any, any suggest it doesn't get the right vars.

 

 

Just posted a fix in the github.

2 files were changed:

https://github.com/Sandbird/Dayz.Epoch.3d.Editor.Live.Mission-with-Database/blob/master/missions/3d.live.DayzEpochTemplate.Chernarus/dayz_code/system/player_monitor.sqf

https://github.com/Sandbird/Dayz.Epoch.3d.Editor.Live.Mission-with-Database/blob/master/missions/3d.live.DayzEpochTemplate.Chernarus/dayz_server/init/server_functions.sqf

Link to comment
Share on other sites

Does the editor work with Overpoch? Or a different map like Taviana? Or Taviana AND Overpoch?

 

Might give the editor a shot. Seems like quite a work just to get it working but would save me a lot of time eventually.

 

No, not yet. I supports other maps though, like taviana, you just have to replace Chernarus references in mission.sqm (dayz_code, and dayz_server folder (if it needs in dayz_server)) with Taviana, and load THAT map whne you start the editor.

 

Overall the effort to load this and tweak it is minimal comparing debugging the old way. :)

 

I will be updating this project for the latest epoch and Overpoch.

Since the 1.0.5.2 is going to be released soon, i'll wait for that first...so i dont have to do the conversion all over again.

 

But if you want to use this for writing a simple mod or script, then you can just use it as it is....even if its using the old 1.0.4.2 version of epoch, 99% of the stuff should work for 1.0.5.2 as well.

Just write the addon you want and then copy/paste the folder in your current server (take note on the getPlayerUID 'bug' mentioned in the installation page).

It should work fine.

 

Since the @DayzEpoch folder would be now the latest one...some things might popup like "z/addons/blah blah/file.sqf" is missing in the editor. You can either ignore it, if it doesnt break your current addon, or get the old dayzepoch folder from dayzcommander and load that instead in the .bat file.

Link to comment
Share on other sites

Alright, thanks for the response. I have another question tho. Regarding the getPlayerUID 'bug'. Does this mean I have to change all the getPlayerUID's myself or have you done it already in your provided files? I know I have to keep an eye for that in future development but I'm just asking if I set it up now do I have to change it somewhere?

Link to comment
Share on other sites

Alright, thanks for the response. I have another question tho. Regarding the getPlayerUID 'bug'. Does this mean I have to change all the getPlayerUID's myself or have you done it already in your provided files? I know I have to keep an eye for that in future development but I'm just asking if I set it up now do I have to change it somewhere?

 

i've done it to the all the places need in the editor files...you just have to do it in the addon/script you are making for it to work inside the editor...when you are done with your script, and you move it to your server files...you just have to revert back to the original one

_playerUID = getPlayerUID player; will never work in the editor. To get the _playerUID you have to do this:
_playerUID = player getVariable ["playerUID", "0"];

and then change

player getVariable ["playerUID", "0"];    to  getPlayerUID player;
Link to comment
Share on other sites

 

i've done it to the all the places need in the editor files...you just have to do it in the addon/script you are making for it to work inside the editor...when you are done with your script, and you move it to your server files...you just have to revert back to the original one

 

All right got it, thanks. Will definitely give this a shot then. Seems like a must-have at this point.

Link to comment
Share on other sites

Okay so I set it up properly but I'm having slight issues. Firstly my RPT is being flooded with messages like:

_listTalk = ([_refObj] call FNC_GetPos) nearEntities ["zZombie_Base">
  Error position: <FNC_GetPos) nearEntities ["zZombie_Base">
  Error Undefined variable in expression: fnc_getpos
File z\addons\dayz_code\compile\player_zombieCheck.sqf, line 3
Error in expression <cle player;
_listTalk = ([_refObj] call FNC_GetPos) nearEntities ["zZombie_Base">
  Error position: <FNC_GetPos) nearEntities ["zZombie_Base">
  Error Undefined variable in expression: fnc_getpos
File z\addons\dayz_code\compile\player_zombieCheck.sqf, line 3
Error in expression <cle player;
_listTalk = ([_refObj] call FNC_GetPos) nearEntities ["zZombie_Base">
  Error position: <FNC_GetPos) nearEntities ["zZombie_Base">
  Error Undefined variable in expression: fnc_getpos
File z\addons\dayz_code\compile\player_zombieCheck.sqf, line 3
Error in expression <cle player;
_listTalk = ([_refObj] call FNC_GetPos) nearEntities ["zZombie_Base">
  Error position: <FNC_GetPos) nearEntities ["zZombie_Base">
  Error Undefined variable in expression: fnc_getpos
File z\addons\dayz_code\compile\player_zombieCheck.sqf, line 3

and


Error in expression <["_newX", "_newY", "_testPos"];
_newX = _posX + (_maxDist - (random (_maxDist * >
  Error position: <_posX + (_maxDist - (random (_maxDist * >
  Error Undefined variable in expression: _posx
File C:\Users\Martin\Documents\ArmA 2 Other Profiles\ROCU[]\missions\3d.live.DayzEpochTemplate.Chernarus\dayz_code\system\functions\misc\fn_findSafePos.sqf, line 90
Error in expression < BIS_fnc_isPosBlacklisted)) then
{
if ((_pos distance _testPos) >= _minDist) the>
  Error position: <_pos distance _testPos) >= _minDist) the>
  Error Undefined variable in expression: _pos
File C:\Users\Martin\Documents\ArmA 2 Other Profiles\ROCU[]\missions\3d.live.DayzEpochTemplate.Chernarus\dayz_code\system\functions\misc\fn_findSafePos.sqf, line 98

(I haven't edited anything so far)

 

Secondly, for some reason I always spawn inside a house in Novy Sobor. I'm using db for my character and changing the coordinates in the db doesn't have any effect. Which brings me to my 3rd issue (more of a question really).

 

How does one 'teleport around' in the environment like matt_d_rat mentions above? Is there an easy way to do that in the editor or something like that? Or should I just start installing tools that make that possible (Admin Tools etc)?

Link to comment
Share on other sites

Okay so I set it up properly but I'm having slight issues. Firstly my RPT is being flooded with messages like:

Secondly, for some reason I always spawn inside a house in Novy Sobor. I'm using db for my character and changing the coordinates in the db doesn't have any effect. Which brings me to my 3rd issue (more of a question really).

How does one 'teleport around' in the environment like matt_d_rat mentions above? Is there an easy way to do that in the editor or something like that? Or should I just start installing tools that make that possible (Admin Tools etc)?

 

1,2) Did you set up the database values properly ? What does these log say, located here :

C:\Users\Martin\AppData\Local\Arma2NET

C:\Users\Martin\AppData\Local\Arma2NETMySQL\logs

 

I got a feeling the code is not getting your coordinates from the database...thats why it spawns you inside the house in Novy...its a common bug when the player's spawn coords are messed up.

 

3) Yeah, you would have to install Admin tools. If you want to 'play' in a specific area and not install AT, then switch back to the default setup, move the character where you want him, then save the map, then open description.ext file and copy/paste those locations (of the player object) into the database....Then switch back to the db setup and you'll spawn there.

Link to comment
Share on other sites

1,2) Did you set up the database values properly ? What does these log say, located here :

C:\Users\Martin\AppData\Local\Arma2NET

C:\Users\Martin\AppData\Local\Arma2NETMySQL\logs

 

I got a feeling the code is not getting your coordinates from the database...thats why it spawns you inside the house in Novy...its a common bug when the player's spawn coords are messed up.

 

3) Yeah, you would have to install Admin tools. If you want to 'play' in a specific area and not install AT, then switch back to the default setup, move the character where you want him, then save the map, then open description.ext file and copy/paste those locations (of the player object) into the database....Then switch back to the db setup and you'll spawn there.

 

1,2) Umm, yes. I made a clean db and only imported my character's player_data and character_data.

 

Nothing special in Arma2NET logs, just a ton of things like:

09/10/2014 01:12:17 function: Arma2NETMySQLCommand ['dayz_epoch_test',"select ObjectID from object_data WHERE ObjectUID = '1611538491014'"]
09/10/2014 01:12:17 maxResultSize: 10239
09/10/2014 01:12:17 Result size: 10
09/10/2014 01:12:17 Result: [[["21"]]]
09/10/2014 01:12:17 function: Arma2NETMySQLCommand ['dayz_epoch_test',"select ObjectID from object_data WHERE ObjectUID = '1730321947075'"]
09/10/2014 01:12:17 maxResultSize: 10239
09/10/2014 01:12:17 Result size: 10
09/10/2014 01:12:17 Result: [[["20"]]]
09/10/2014 01:12:17 function: Arma2NETMySQLCommand ['dayz_epoch_test',"select ObjectID from object_data WHERE ObjectUID = '3205551612047'"]
09/10/2014 01:12:17 maxResultSize: 10239
09/10/2014 01:12:17 Result size: 10
09/10/2014 01:12:17 Result: [[["14"]]]

this should be the character sync:

09/10/2014 01:56:59 function: Arma2NETMySQLCommand ['dayz_epoch_test',"UPDATE `character_data` SET `Inventory` = '[["ItemFlashlight","ItemHatchet_DZE","ItemMap","ItemKnife","ItemMatchbox_DZE","ItemToolbox","ItemGPS"],["cinder_door_kit","cinder_door_kit","cinder_door_kit","cinder_door_kit","cinder_door_kit","cinder_door_kit","cinder_door_kit","cinder_door_kit","cinder_door_kit","cinder_door_kit","ItemBandage","ItemBandage"]]',`Backpack` = '["DZ_Patrol_Pack_EP1",[[],[]],[["Skin_GUE_Soldier_2_DZ","Skin_Bandit1_DZ"],[1,1]]]',`Worldspace` = '[44,[7097.3,7774.57,0.00152588]]',`Medical` = '[false,false,false,false,false,false,false,12000,[],[0,0],0,[374.042,228.165]]',`CurrentState` = '["","amovpercmrunsnonwnondf",36,[]]',`HeadshotsZ` = '0',`KillsZ` = '0',`KillsH` = '0',`KillsB` = '0',`Humanity` = '-22120', `DistanceFoot` = '3151', `Model` = 'Rocker4_DZ', `Duration` = '0' WHERE `character_data`.`CharacterID` = '1'"]
09/10/2014 01:56:59 maxResultSize: 10239
09/10/2014 01:56:59 Result size: 4
09/10/2014 01:56:59 Result: [[]]

 

Arma2NETMySQL\logs folder is empty

 

Edit// And I already tried exactly what u said - I got the coords from the bot you had @ NWA, altered it like 5m to the north and updated it to my character @ db.

Link to comment
Share on other sites

1,2) Umm, yes. I made a clean db and only imported my character's player_data and character_data.

 

Nothing special in Arma2NET logs, just a ton of things like:

Arma2NETMySQL\logs folder is empty

 

Edit// And I already tried exactly what u said - I got the coords from the bot you had @ NWA, altered it like 5m to the north and updated it to my character @ db.

 

I assume you set up your player's UID in the variables.sqf, the same as the one in the database right?

I see that it takes coordinates and put it in the db ([44,[7097.3,7774.57,0.00152588]]) is that where you are on the map ?

 

Which version of Epoch server/client are you using ?

Maybe 1.0.5.1 does break the mission, you might need to have a downgraded version as well....I have to convert the project to 1.0.5.2 when it comes out.

Link to comment
Share on other sites

Yes, the playerUID is the same in variables.sqf as it is in my database. 

 

Those coordinates aren't correct. They're the Novy Sobor ones. If I update my coordinates to something different I still spawn at Novy Sobor.

 

In my Arma2 OA folder I'm using Epoch 1.0.5.1 for server & client.

 

Edit// Also a quick question. Do you think Zupa's Single Currency script would work on your editor?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...