Jump to content

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


Recommended Posts

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.

 

 

So what do you think, should I downgrade from 1.0.5.1? Also could you answer the question I asked above.

 

I tried with client 1.0.5.0 and 1.0.4.2. All give me heaps of errors.

Link to comment
Share on other sites

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

 

yes

 

 

this is great!

But the force build which are u talking abot some posts before, doesent work.

he dont start to build :(

 

When the counter finishes what happens then ? Any log errors or something ?

Link to comment
Share on other sites

Does it matter what server Epoch files I use in my Arma2 OA folder? Also, what version are you running this with if you're suggesting me to downgrade.

 

I can't seem to get it working properly whatever I try. I tried 3 previous client versions, tried with db and without db. Still getting heaps of errors about player GUI, spawning, zombie check, damage check, etc.

Link to comment
Share on other sites

  • 1 month later...

Does it matter what server Epoch files I use in my Arma2 OA folder? Also, what version are you running this with if you're suggesting me to downgrade.

 

I can't seem to get it working properly whatever I try. I tried 3 previous client versions, tried with db and without db. Still getting heaps of errors about player GUI, spawning, zombie check, damage check, etc.

 

omg, i am so sorry about this...i didnt realize there was another post here....

I know i am late but....yeah

This was done for 1.0.4.2 files.

Changes in 1.0.5.1 arent that many...If you got a comparing tool like Ultracompare, you can compare the vanilla 1051 files with this...and change some functions and get it up and running.

Worst case scenario i re-release this for 1.0.5.1. I got it working for Overpoch now, and i remember it was a simple 10min comparing to upgrade to 1051.

Did you manage to get it working ?

 

And yeah, it should work fine with Zupa's currency

Link to comment
Share on other sites

  • 2 months later...

Well looks like traders are not working for me, I get a lot of rpt errors as well. When I load up the character, no character data is written to the database (If I does that). Not really sure what is wrong. The sql database is up and running. I used that little explorer put in the command you suggested to other people to use and I keep getting [[]]. I guess that makes sense since there is nothing in the database anyways. Not really sure what I am doing wrong. Also that game is saying that it cannot find the removenet.sqf.

Link to comment
Share on other sites

Alright so I downgraded to 1.0.4.2 and now I get the traders options, there is no missions sqf error now. I still keep getting .rpt errors stating that dayz_hunger is an undefined var. Now when I go to the trader, it just states loading items... I guess it is having problems getting the info from the database. (And yes I am using 1.4.0.2 as the database) When I put Arma2NETMySQLCommand ['dayz_epoch',"SELECT InstanceID FROM character_data LIMIT 1"] in it still gives me [[]]. So I guess it is still not writing the char ID to the database. But when I put in this Arma2NETMySQLCommand ['dayz_epoch',"SELECT id FROM traders_data LIMIT 1"] I get a response. 

Link to comment
Share on other sites

Alright so I downgraded to 1.0.4.2 and now I get the traders options, there is no missions sqf error now. I still keep getting .rpt errors stating that dayz_hunger is an undefined var. Now when I go to the trader, it just states loading items... I guess it is having problems getting the info from the database. (And yes I am using 1.4.0.2 as the database) When I put Arma2NETMySQLCommand ['dayz_epoch',"SELECT InstanceID FROM character_data LIMIT 1"] in it still gives me [[]]. So I guess it is still not writing the char ID to the database. But when I put in this Arma2NETMySQLCommand ['dayz_epoch',"SELECT id FROM traders_data LIMIT 1"] I get a response. 

 

Are you sure that :

  1. You put the proper instance number at the top of the init.sqf
  2. You imported all trader tables (there are 3 of them) in the database
  3. Tried with vanilla files and not your custom files first to get a 'working version' to build on
  4. Checked your client (there is no server log) log when you trade to see if any errors show up at that minute ?
  5. That character_data sql problem you are having .... did you try DefaultTruePreMadeFalse = true; in init.sqf, before trying to load your character from the db...(assuming you imported your character in the db, and changed all .sqfs needed to load your character in the first place....and that failed)
Link to comment
Share on other sites

1 - Ok. So I changed the instance number to 17. Being the default map as "DayZ_Epoch_17.Chernarus" (Was wondering why it was the 11 variant). However nothing changed.

2 - I used the default 1.4.0.2 database files. (Loaded them through workbench) So it should of placed all the correct tables.

3 - I am using what I got from you, there are no custom files atm.

4 - I am only getting a few errors here is a small portion. http://pastebin.com/XDp67Z9ZSeem to be mostly GUI related

5 - I do not have a 1.4.0.2 database to load up sadly. My server atm runs 1.5.0.1, so I do not have a character database to run. I was not sure if using the default settings with the default char would save to the database. (No worries on that one honestly, I was just wondering if it did)

 

Do you think a newer arma 2 would be the problem? I don't think it would, but I am not sure.

 

BTW Thank you for trying to help me, it means a lot to me.

 

Ok so I looked at the .bat file that was placed in the arma 2 oa base dir. It calls for a beta. I am not sure that the new update has a beta patch, I am not sure if that would matter.

Edited by Wootenstien
Link to comment
Share on other sites

1 - Ok. So I changed the instance number to 17. Being the default map as "DayZ_Epoch_17.Chernarus" (Was wondering why it was the 11 variant). However nothing changed.

2 - I used the default 1.4.0.2 database files. (Loaded them through workbench) So it should of placed all the correct tables.

3 - I am using what I got from you, there are no custom files atm.

4 - I am only getting a few errors here is a small portion. http://pastebin.com/XDp67Z9ZSeem to be mostly GUI related

5 - I do not have a 1.4.0.2 database to load up sadly. My server atm runs 1.5.0.1, so I do not have a character database to run. I was not sure if using the default settings with the default char would save to the database. (No worries on that one honestly, I was just wondering if it did)

 

To fix the dayz_hunger error...open dayz_code/init/variables.sqf.

Search for     dayz_preloadFinished

above it put: (i put dayz_thirst also cause probably that will be missing as well)

    dayz_hunger  =      0;
    dayz_thirst =       0;

This is my .bat starter if it helps. Just change the mods and folder paths if they are any different:

@echo off
::===============================================================================================================================================
::Configuration| Edit these to the proper file paths ==============================================================================================================================================
::---> ===============================================================================================================================================
:: YOUR Arma 2 Operation Arrowhead Directory
set arma2oapath=c:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead
:: YOUR Arma 2 Directory
set arma2path=c:\Program Files (x86)\Steam\steamapps\common\Arma 2
:: Required Mods [ Ex. @Taviana;@DayzOverwatch;@DayZ_Epoch1051; ]
set MODS=@Arma2NET;@DayzOrigins;@DayzOverwatch;@DayZ_Epoch;@Jon_EditorUpdate;@mbg;
::---> ===============================================================================================================================================
::===============================================================================================================================================
:: DO NOT EDIT ANYTHING BELLOW THIS LINE OR YOU WILL BREAK THIS FILE ==============================================================================================================================================
::===============================================================================================================================================
start ""  "%arma2oapath%\ArmA2OA_BE.exe" 0 0 -skipintro -noSplash -noPause -winxp -mod=%MODS% "-mod=%_ARMA2PATH%;EXPANSION;ca"
@exit

Here is the 1.0.4.2 version: https://s3.amazonaws.com/dayzepoch/DayZ_Epoch_Server_1.0.4.2_Release.7z

Try this...from your live database find your character entry in character_data table and export it in a mysql query. Only that one...you dont need other players.

Use the files from above and create a fresh database with the above sql files.(careful of the name...must be dayz_epoch or manually edit all necessary enties to a new name if you want)

Import your character you just extracted and use that UID the table has in all the necessary .sqf files i say in the installation.(also the description.ext with your character name)

Change the init.sqf to DefaultTruePreMadeFalse = false;

Use my .bat script and join the editor.

(If you are using instance 17 or 11 make sure in the server_traders table there are traders for those instances.)

 

If that doesnt work, then maybe your windows are blocking the arma2net dlls. Go to your root arma2OA folder inside the arma2net folders and right click/properties all the dlls you can find in there.

Check the Security tab to see if it requires you to give permission to the file to allow to execute.

Also try disabling your firewall/antivirus etc that might be blocking arma2net.

 

To test if arma2net is set up properly, go to \arma 2 operation arrowhead\@Arma2NET and execute Arma2NetExplorer.exe

Then in the query box bellow execute this:

Arma2NETMySQLCommand ['dayz_epoch',"UPDATE traders_data SET qty=51 WHERE qty<50;"]

See if that changes anything in the database table traders_data. It should change all values to 51 if they are bellow 50.

If that works, then arma2net is fine...

 

If after all this, you join the preview in the editor and traders still dont work...then :

a ) Are you sure you are waiting enough time for traders to respond ? (working in the editor is 10x times laggier than real server)

b ) When you access the traders, open this folder and check the latest log...see if there are any errors, or if any results come out from the sql queries

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

Link to comment
Share on other sites

Ok so when it comes to the dayz_hunger error and your fix.

 

I look at the variables.sqf and I find that dayz_hunger and dayz_thirst is there in the exact place you wanted me to place it. I overwrite the variables anyways with what you gave me, but I am still getting that error in my .rpt.

 

The .bat works, thank you, it loads up everything, except I removed the mods that I do not have such as dayz origins overwatch the jon_editorUpdate and the mbg. (I am assuming that I do not need those for this to work, just epoch 1.4.0.2)

 

I removed the old database and put a new schema in using your link. I saved my character data that was located in the character_data table of my server, (Making sure to only grab one entry, which was mine), and place it in my new database. I changed the init.sqf to what the tutorial at the beginning stated I should do if I wanted to use a character from the database, changed the userID. Also I made sure DefaultTruePreMadeFalse was equaling false now. I checked to see if the database supported 17 and it did.

 

After joining I got receiving for a little bit, which then I was greeted with a brand new character with the PlayerUID representing the one I put in the init.sqf. Confused I looked at my client rpt file and find this. http://pastebin.com/nxVSQB2K. Maybe the syntax is off? Also a lot of these errors seem to be related to undefined variables.

 

I tested the arma2net with the code you gave me and it did indeed change all the traders_data qty column to 51 when the values where lower then 50.

 

When I started the game I checked the log file and nothing was there, I guess because it is having errors there is never really anything being called.

 

I also tried this without my firewall on and anti-virus, same thing happened.

 

Not really sure what is going on. Going to do a full fresh re-install and see if that does anything. Will post back when I get the results.

 

 

Alright so I did a fresh re-install and I back to getting those errors with hunger. I tried it with and without loading from the character database, but I am still getting those errors, pasted above.

Link to comment
Share on other sites

Alright so I did a fresh re-install and I back to getting those errors with hunger. I tried it with and without loading from the character database, but I am still getting those errors, pasted above.

 

hmm those errors...its as if the SQL_RESULT is not bringing back anything..

What does the arma2net log file say ?

Its here: C:\Users\YOURWINPROFILE\AppData\Local\Arma2NETMySQL\logs\

 

I dont think that arma2net is connecting to your db from the mission. The arma2net explorer connects but not the mission.

The log file from arma2net will show the real reason...copy paste that log please.

Link to comment
Share on other sites

During my whole testing phase to find the error, there was never one thing that was written to a log in that folder. The only time a log appeared is when I tested the connection with the Arma2NetExplorer, which contained this:

 

Info: 21:13:31 - Logging started in directory: C:\Users\Sean\AppData\Local\Arma2NETMySQL/logs/
Info: 21:13:31 - Arma2NETMySQL Plugin Started.
Info: 21:13:31 - Version number: 0.1.0.0
Info: 21:13:31 - Loading databases...
Warning: 21:13:31 - Unable to find the Databases.txt file here: E:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead\@Arma2NET\Databases.txt
Info: 21:13:31 - Databases.txt file loading in from: C:\Users\Sean\AppData\Local\Arma2NETMySQL/Databases.txt
Info: 21:13:31 - Type: mysql Database: dayz_epoch IPAddress: 127.0.0.1 Port: 3306 Username: root Password: NotShownForSecurityReasons
Info: 21:13:31 - Received - Database: dayz_epoch SQL Query: select ObjectID from object_data WHERE ObjectUID
Info: 21:48:31 - 30 minutes of inactivity have passed.  Closing down MySQL connection.
 
Maybe nothing is showing up because the scripts are not talking to the dlls? I looked last night at the syntax of your custom scripts, they seem all fine, and would theoretically send the info to the .dlls
 
The errors that are placed in the .rpt file make sense and what you stated above, because what is being returned is nothing, but the script is expecting something in that variable. 
 
Do you think that an arma 2 update would cause this? I tried this without a firewall, and looked at the security of the .dlls all users have full access to these.
 
Also this was created when the steam update was not up, so do you think that would be the problem, it using a different player UID?
Do you think that because I only put something in the character_data but nothing in the player_data and the player_login it would not work? Just throwing out ideas.
 
Also on my main menu screen should I see the mod in my expansions list? I do not.
 
I edited my steam launch params and the @Arma2NET mod appeared, but sadly that did not fix anything.
 
 
Looking deeper in the @Arma2NET I noticed a monopaths file, which took it to the c drive. My sql server and my arma 2 game are located on different harddrives, the sql server being on the c drive and the arma 2 game being on my e drive.
Edited by Wootenstien
Link to comment
Share on other sites

 

Looking deeper in the @Arma2NET I noticed a monopaths file, which took it to the c drive. My sql server and my arma 2 game are located on different harddrives, the sql server being on the c drive and the arma 2 game being on my e drive.

 

 

Yeah thats what i am afraid of, that arma2net doesnt load in your editor to query the database.

I have my main hard disk on C, my apache/mysql on F as well..so its not that...its connecting to the local ip 127.0.0.1...it doesnt care where it is.

Also the part that the loading screen is wrong is also an issue. You should see the proper mods in the menu screen. Thats why i sent you my bat file..so we can be sure you are loading it properly.

The arma2 patch shouldnt matter really. I am not using getPlayerUID in the editor...because most multiplayer commands like this dont work there.

Thats why i did this whole project. Trying to get the multiplayer feautures work in the editor...so debuging scripts is easier. I converted my 3d.live.mission to 1.0.5.1 just by declaring some global variables properly (since that beta patch that made errors really strict). Thats why you are getting that dayz_hunger error..It was not properly declared in 1.0.4.2.

Unfortunatelly my 3d.live.mission has been changed so much, its beyond 'applying the changes' to this version, to give you a working copy. Most of my server's code is embeded in it that seperating it would be impossible..I'd have to start fresh.

 

Try this:

and give it another go.

Link to comment
Share on other sites

So I did what you ask for me to try and sadly I am getting the same thing I have been getting.

 

A question about the bat file you gave me, you wanted me to overwrite everything that was in the original 3d.life.mission.arma2net.bat with the paste you gave me right?

 

I checked my versions of .net and visual and they are above both of those. I downloaded them anyways and they gave me the message that my version was too high, so I guess that is not the problem

 

I am sorry that I am causing all of this trouble for you. I would like to give you a donation for all the work that you have put in this. Wish it could work. I will keep trying, maybe one day I will get it lol.

Link to comment
Share on other sites

A question about the bat file you gave me, you wanted me to overwrite everything that was in the original 3d.life.mission.arma2net.bat with the paste you gave me right?

 

Yeah

 

I am sorry that I am causing all of this trouble for you. I would like to give you a donation for all the work that you have put in this. Wish it could work. I will keep trying, maybe one day I will get it lol.

 

Nah its ok :)

Maybe we can set up a Teamviewer / Teamspeak session today to see if i can check it out and find the prob ?

I'll send you my email...just send me a message there when you are ready, and i'll send you a teamspeak server to join and sort this out.

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 months later...

I'm not sure if anyone is having this issue, but doing everything on the first post. After executing the bat file , Arma loads then crashes when I try and run the save mission. When I load it manually without using the BETA , it runs but I get this in the error logs: 

 

_foodVal = 1 - (dayz_hunger / SleepFood);
_thirstVal = >
  Error position: <dayz_hunger / SleepFood);
_thirstVal = >
  Error Undefined variable in expression: dayz_hunger
File C:\Users\hayward\Documents\ArmA 2 Other Profiles\[uNIT487]%20Mocha\missions\3d.live.DayzEpochTemplate.Chernarus\dayz_code\compile\player_updateGui.sqf, line 4
 
 
Either way, NO Zeds and NO loot spawn... I've got the database set up using Winamp and the password username combos are all checked and working :(  
 
Any ideas? 
Link to comment
Share on other sites

  • 1 year later...
Just now, WLF said:

Can this be remade for 1061?

It can, (wont be me, since i stopped playing dayz), but if you replace all the old global variables with the current ones and maybe apply any fixes that 10.6.1 has (although i dont think that is necessary),  I dont see why this wouldnt work.

For example dayz_hunger is a global variable, and as you can see from the post above it is undefined now...That means there is a new variable somewhere in 10.6.1 that holds the player's hunger value...Mass replace that variable with the new one (and maybe check from the addons files that the functions using this variable are still the same), and the rest should work.

All i did with this special mission file was to combine dayz_server and client files into one. I extracted some files from the epoch addon, and added some functions from the arma addon since the editor didnt have access to them, then replace all publicvariable_server commands to the local publicvariable one. Thats the biggest change i did to get this working.
I then added the mysql2arma files so that the editor can connect to the database and boom...it worked.
If you compare the files with the 10.5.1 server version, you'll see that the tweaks i did are minimum.

The only problem with the mission was that now both server and client are the same thing...So when you preview the mission in the editor it would spawn 2 characters...one for the server and one for the client.
That complicated things a bit, so all i had to do was somehow to check if there is already a player spawned on the map...if yes, then dont spawn another.
So i added a global variable to the player's instance...when he spawned that was set to true, so when the engine was gonna spawn the 2nd player, since that value was true, it didnt execute the script again.
Thats why there is a "if (isNil "oneTime") then {" check in init.sqf. If oneTime is set, that means the player has spawned already...so dont re-initialise the init.sqf.

 

Link to comment
Share on other sites

Awesome! Thanks salival!

Although i dont see dayz_hunger in the list, and i still see it being used in DZE_Hotfix_1.0.6.1A, at least its a start.
I wont lie to you guys....it might take you 5 minutes to convert this to 10.6.1, it might take you 5 days....All i know is that it's possible.
I kept all the filenames the way they were in the addon files....and at most cases i commented out the lines i edited...so you can still see the original lines above my addtions.
It will take someone who knows how to code to get this working...

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



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