Jump to content

RimBlock

Member
  • Posts

    1140
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by RimBlock

  1. I added uiSleep30; in server_playerLogin on line 6, worked a few times then hung on loading.

     

    In the server_monitor there is a variable at the bottom.

     

    allowConnection = true;

     

    Seems this is not stopping connections whilst server monitor is still loading.

     

    How about sleeping until that variable is true (check every 30 seconds or so with a "waiting for server to be ready message).  Not sure where it is being set unless it is in the variables.sqf.

     

    Edit:

     

    The player_monitor.fsm also references it based on the Github search.  FSM files are hard to read without the correct tool so will have to wait until I get home to take a proper look.

  2. Current state.

     

    Before abort

    ["M4A1_AIM_SD_camo","amovpercmstpsraswrfldnon_gear",42,[]]
     
    After Abort
    ["M4A1_AIM_SD_camo","amovpercmstpsraswrfldnon_gear",42,[]]
     
    After re-login
    ["M4A1_AIM_SD_camo","amovpercmstpsraswrfldnon_gear",42,[]]
     
    After abort (after second abort counter counted down).
    ["M4A1_AIM_SD_camo","amovpercmstpsraswrfldnon_gear",42,[]]
     
    Seems when you click abort has little affect on current state.
     
    Note I didn't have any issues logging in during these tests.
  3. Zupa has been very kindly helping iwth spotting a couple of bugs.  He has found the safe combination issue and an issue with ownershup of upgrades (which also affects downgrades).  I will amend the files and re-upload the new files tonight.

     

    For those that just want a quick fix rather than downloading a new set of files...

     

    Player_upgrade.sqf (upgrades were saved with the plot pole owners ID not the original objects ownerID - doesn't really make any difference but for the sake of keeping in line with the Epoch mod...).

     

    Find

       _objectCharacterID = _obj getVariable ["CharacterID","0"];

    change to

       _objectCharacterID = _obj getVariable ["CharacterID","0"];
       _ownerID = _obj getVariable ["ownerPUID","0"];

    Do the same search and replace for player_buildingdowngrade.sqf

     

    For the vault combination issue.

     

    In Player_lockvault.sqf.

    Find

    _holder setVariable["CharacterID",_ownerID,true];

    Change to

    _holder setVariable["CharacterID",_characterID,true];

    Do the same for player_unlockvault.sqf

     

    Note these have not been tested by me yet but should be good.

  4. I have a few observations from looking at the server and the code.

     

    1st observation, when you got to abort there is a second timer running behind/underneath the abort menu. What is the purpose of this? Is the server using the second timer and client is observed by the server as aborting early and messing up the Currentstate value? 

     

    Has anybody that is having the issue waited for the second abort timer to count down before they abort to see if it has any effect on the Currentstate value or the ability to relog?

     

    I reported this around a week ago on the Epoch Git.  I have not dug deeper as I have been busy debugging my new mod version so have not been able to say if it is related or not to this login issue.

     

    Have had a bit of a browse though the thread with the work MGT and others have been doing to try and track this down.  Would be great if we could get a summary of where it now seems to stand. 

     

    What I have picked up from the thread is that it is believed to revolve around the currentstate DB values and changing these will mainly correct the issue apart from on server restart.

     

    What value currently is known to stop the login process completing correctly (need to know how to consistantly reporduce the issue) ?.

    What value seems to correct the problem (["","",42,[]]  works for all but restarts) ?.

     

    I am sort of wondering if it may be a timing issue.  Anyone tried to put a delay in the login sqf to pause the script for XX seconds and then continue to see if that helps ?.

     

    I have noticed the "player has no identity" type message in my own test server logs and have got this login issue now and then.

     

    I will have a look at the code now to see if anything pops out and will have a go testing tonight as well to see if I can add anything to what MGT has already discovered.

  5. And it seems after installing this i have been experiencing some weird bugs like quite a few players are complaining that their main character doesn't spawn and things like after restart their character gets reset ect.

     

    Might not be related to this mod but it may be.

     

    Also this server_monitor thing, i just made the changes by comparing and i left mine in my server PBo is that alright?

     

    Player not spawning is a bug and there is a big thread on it

     

    Character getting reset is usually because they are changing from the BIS PlayerUID -> SteamID.  Check the Character_data table for that player and see if they just changed.  This mod has nothing to do with the character load process.

     

    If the player is loading in and then goes back to the lobby after a bit fo time then, if possible, check their client RPT file.  Look for the line "mission ended".  I had this when there was an error in he server_monitor.sqf (or it couldn't find the server_monitor.sqf) but this will affect all the players, not just one or two, until it is fixed.  The files in dropbox and GitHub should be fine but something may have snuck in if you are modifying your own files rather than using those.

     

    I'm not totally sure the majority of people complain they can't and some say they can but they don't unlock most of the time correctly.

     

    Surely if you unlocked the safe you should be able to lock it so say a group wants to share a safe they can lock it if the owner isn't online?

     

    Where possibly, get the owner to open the safe, get it cleaned out (nothing in the gear), pack the safe and then place the safe again.  That will put the safe down with the correct information saved to the DB.  If the reports are inconsistant then it is probably due to old safes data in the DB.  I will check tonight just to confirm though.

     

    You can check the save code in the DB.  Ask the players what code they are using and look for a vault locked in the DB with that code in the object_data.characterID field.  That should confirm if there is a safe available with the code they are using.

     

    Problem is that if some players report problems and others see it and then enter the incorrect code, they may also think it is a bug rather than the fact they have just entered the incorrect code.  This situation then tends to just feed on itself and get bigger even if the number of people affected (if any) is actually very small.  THere are also those who will try to take advantage and get you to change the code for other peoples safes claiming their code is now not working.

  6. I have no idea why Rim decided to move server_monitor.sqf to mission pbo. Just make the changes in the file, leave it in server pbo and don't touch init.sqf.

     

    The dedicated build leaves the server_monitor.sqf on the server side only (not in the mission).  The hosted build is for people with hosters that have no access to the server folder and so cannot place it serverside.

     

    The dedicated has the server_monitor.sqf in a folder rather than in the dayz_server.pbo as I would think people would rather I concentrate on fixing bugs than writing a gide on how to extract a file from a pbo, what software to use, how to load it back in and then troubleshoot issues that arise concerning whatever PBO extraction package people use and the process of getting the file out and loading a new file in. 

     

    Changing it in the server.pbo also changes the signiture which did not seem to cause any issues when I tried but may in future or possibly with one for the antihack set of scripts which I do not use.

     

    Tl;Dnr: Easier to support, troubleshoot and amend the server_monitor.sqf on the server outside of the pbo.  Can concentrate on bug fixes rather than unpbo support.  Put it in the pbo if desired.  Will work fine and change the link in the init.sqf.

     

    As this should be going in to the core Epoch build it will be in the dayz_server.pbo file in the end anyway :) .

  7. Ahh nuts.  Sorted out the tag_friendly.

     

    The fn_damageactions.sqf is still referencing the standard version.

     

    Find

    _action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\compile\player_tagFriendly.sqf", [], 0, false, true, "", ""];

    Replace with

    _action = _unit addAction ["Tag as friendly", "Custom\PlotForLifev2\player_tagFriendly.sqf", [], 0, false, true, "", ""];

    Note: I am now seeing remove issues: False alert.  Remove works fine   :).

  8. So it stores it in the DB worldspace column like this now?

     

    SbfqD2M.png

     

    And we have to run SQL every restart or something?

     

    Yes.  Has no issues with SteamID length.  Lots of room available (more than 150 charactersusable after worldspace details are saved) and easy to split out and reference.  This also leaves the characterID column free for switching back to the vanilla system and no clashed with other mods using the same characterID field for other things.  Lockables can now also have an owner etc.

     

    The sql is for a one time alignment of steamIDs to the correct place in the worldspace field for stuff already built before you applied the mod..  Once done for all your players, no need to run again. 

     

    Looks to be working after death, I can still upgrade objects.

     

    I don't get any option to remove built objects though, is that still an outstanding issue?

     

    What version are you running (2.2.1 Hosted / Dedicated is the most recent).  I am pretty sure remove was working as the last release was to fix upgradables not being able to be removed after downgrading (i.e. upgrade a door with a lock.  Downgrade the door and remove the lock and then you could not remove the door - fixed in 2.2.1).

     

    If you are using the current version, what are you trying to remove that is not working (if not everything) ?.  Will test tonight.

     

    I have bought it yes aswell as PMC

     

    Also any ETA on the tagging and what about the whole only the owner can acces their safe as my players do not like that

     

    Thanks

     

    Did you run it before copying the files to the server ?.  TBH this is more of a server install issue than something with this mod.  Post up a question on the server install forum and someone should be able to dig in to it a bit more for you.  I need to get working on the tagging ;) .

     

    I will start on the tagging tonight.

     

    Only the safe owners being able to access their safes is the way it was done for Epoch, although I am not sure if it worked correctly.  I may add in friendlies as an option the server owner can turn on for safe opening but as there is no way to remove friendlies once tagged that runs the risk of an old friendly still being able to unlock the safe even if you have fallen out with them.  There is the friendlyto option which allows only friendlies that have looked at you since login to open the safe (same method used in Epoch for building at a friendlies plot pole).

  9. Hi Hardened,

     

    Thanks for your reply. I am running 2.2.1 now and I am still getting the issue.

     

    can you point me in the right direction to fix this.

     

    Thanks again,

     

    Mike.

     

    Can you post up the DB entires for the current plot pole and what you get when you place a new plot pole.

     

    That will help to try and work out what the scripts are using.

     

    Thanks

  10. How would i get that expansion working on the server? I am using Vilayer

     

    If you get time to answer it would be appreciated

     

    Ok, I have all the expansions and when installing I just copied over the ARMA II AO folder and then copied the ARMA II\Addons folder in to it.  That got rid of all my errors like that.

     

    You have bought the BAF expansion for ARMA II OA haven't you ?.

  11. I used to have the old Plot pole for life installed.

    Since moving to this one I can't login, I get this error:

     

    13:00:14 "ERROR: Cannot Sync Character [u.M.P] Cannon as no characterID"

     

    I've Deleted the old characters out the DB and tried removing the old function I had added to the DB (text to digit conversion) but still no joy...any idea what I'm doing wrong.

     

    Interestingly I resorted my DB to v1.1 in order to test the conversion sql and got the same error.

     

    I reinstalled the mod again and it just worked.  What I saw at the end of the client RPT file was "mission ended" which usually indicates an issue reading the server_monitor.sqf file.

     

    If using the dedicated install, have a look in the server RPT file and search for "Plot".  Debug is still on at the moment in those files to help with debugging any issues.  You should be able to find something like...

    12:33:09 APlotForLife
    12:33:09 "[_serverMonitor: custom\APlotForLifev2.2.1\server_monitor.sqf]"

    I left that in to make sure the server side custom server_monitor.sqf is found.  

  12. Ok, from looking through the building maintenance code, I do not believe this mod will affect it at all.  It just grabs any valid buildings (listed in DZE_maintainClasses) within range (DZE_maintainRange) that have a damage equal to or more than DZE_DamageBeforeMaint.

     

     

    Neither of the two scripts used for this function call the characterID object variable to check.

  13. Ladies and gentlemen.

     

    vbawol will allow it to be included as part of the standard Epoch build after I have converted it so it can be turned on or off via a variable  :D .

     

    I need to finish the debugging, add the maintenance, optionise it (turn it on or off via a config variable), testing etc and then I will push it to the DayZ Epoch build so everyone will have it as standard and can choose to turn it on or off as they prefer.

     

    There is a bit of work to do so don't hold your breath and please continue with this mod build for now.  It will also help to iron out some of the bugs before merging.

  14. I used the old Plot Pole for Life so maybe something has changed, but after installing this, I placed some items and they all have my Character ID in the CharacterID field. I thought the UID (Steam ID) was supposed to go there or are the items tracked some other way to determine ownership?

     

    PlayerUID (i.e. SteamID) is now stored as an extra field in the worldspace field in the DB allowing the characterID to be stored in the characterID field so you can switch back and forth (between vanilla or this mod) and need no change in the DB.  It also means there is no clash with any other usage of the characterID field in the DB (keys, safe codes, or other mods) and there is no need to truncate the steamID to fit.

     

    This is what I wanted to do for v2 anyway but Steam just forced my hand.

     

    Here is some select SQL that will display any object ownerships that can be changed automatically (i.e. where the objects characterID matches a playerUID in the characterID table.  It is limited to 15 character playerUIDs so should only pick out the SteamID matches.  This will just report and will not change anything.

    select CD.playerUID, OD.characterID as Characters_characterID, OD.characterID as Objects_characterID, OD.worldspace as Current_worldspace, INSERT(OD.worldspace, (char_length(OD.worldspace)), (char_length(concat('\,\"', CD.playerUID, '\"\]'))), (concat('\,\"', CD.playerUID, '\"\]'))) as new_worldspace from object_data as OD, character_data as CD
    where CD.characterID = OD.characterID
    and not locate('"', OD.worldspace)
    and char_length(CD.playerUID) > 15;

    If that looks good the following code will insert the ownership values to the worldspace field for this mod.  

     

    Please test first.  It works for me but your config may be different.  Always backup the DB first (see the end of this post for a Windows .bat script to do a backup).

     

    If you are in triple figure characterIDs this may cause problems with safe / door code or vehicle key clashes.  Check the precheck above carefully.

    SET SQL_SAFE_UPDATES=0;
    
    start transaction;
    
    Update object_data
    inner join character_data as CD on (CD.characterID = object_data.characterID)
    set object_data.worldspace = INSERT(object_data.worldspace, (char_length(object_data.worldspace)), (char_length(concat('\,\"', CD.playerUID, '\"\]'))), (concat('\,\"', CD.playerUID, '\"\]')))
    where CD.characterID = object_data.characterID
    and not locate('"', object_data.worldspace)
    and char_length(CD.playerUID) > 15;

    Check the results and if they look good

    Select * from object_data where locate('"', object_data.worldspace);

    If something looks wrong

    rollback;
    
    SET SQL_SAFE_UPDATES=1;

    If all looks good 

    commit;
    
    SET SQL_SAFE_UPDATES=1;

    Mysql generally defaults to safe updates which means you need to specify, in this case, each objectID you want to update.  As we are updating many objects we turn it off before the update and then turn it on after.  If you are happy to leave it off then don't run the "SET SQL_SAFE_UPDATES=1;" command at the end.

     

    If you want to update just one characterID then you can add "and characterID = [characterID to affect here];" before the last ';'

     

    i.e.

    SET SQL_SAFE_UPDATES=0;
    
    start transaction;
    
    Update object_data
    inner join character_data as CD on (CD.characterID = object_data.characterID)
    set object_data.worldspace = INSERT(object_data.worldspace, (char_length(object_data.worldspace)), (char_length(concat('\,\"', CD.playerUID, '\"\]'))), (concat('\,\"', CD.playerUID, '\"\]')))
    where CD.characterID = object_data.characterID
    and not locate('"', object_data.worldspace)
    and char_length(CD.playerUID) > 15
    and object_data.characterID = 5;

    The above code would only affect items in the object_data field with a characterID of 5.

     

    If you know the players steamID and old value in the object_data.characterID field (maybe the old playerUID) then the following code should work.

     

    Change [steamID of player] x 2 and [Current value of object_data.characterID field] x 1 to actual values without the [].  Search for '[' to make sure you have changed them all. 

    SET SQL_SAFE_UPDATES=0;
    
    start transaction;
    
    Update object_data
    set object_data.worldspace = INSERT(object_data.worldspace, (char_length(object_data.worldspace)), (char_length(concat('\,\"', [SteamID of player], '\"\]'))), (concat('\,\"', [SteamID of player], '\"\]')))
    where not locate('"', object_data.worldspace)
    and object_data.characterID = [Current value of object_data.characterID field];

    After you check using the above check code then just commit or rollback as above.

     
    Put the following in to a Windows batch file on your server (.bat file), amend the details and run it to backup the DB.  I have put a read at the end so the cmd box stays and you can see any errors.  You can take it out if you want once the backup is running ok.  You can also add it to Windows scheduler once working for automatic DB dumps.  You may need to check with your provider for the Mysqldir path where "mysqldump " is located.
     

    The backups will be in the form of a .sql file that you can load and run from a SQL client to rebuild your tables and data.  The files will be housekept.  Any older than 5 days will be removed (I have this backing up every 15 minutes).  To change this, just change the "-5" in the forfiles line at the bottom to a number of days you prefer.

    @REM *** PARAMETERS/VARIABLES ***
    SET BackupDir="[Put the path to dump the DB to here]"
    SET DatabaseName="[Put your DB name in here]"
    SET mysqldir="C:\Program Files\MySQL\MySQL Server 5.6\bin"
    SET mysqluser=[Put your MySQL userid in here]
    SET mysqlpassword=[Put your MySQL password in here]
    SET datestamp=%date:~-10,2%-%date:~-7,2%-%date:~-4,4%_%time:~0,2%.%time:~3,2%.%time:~6,2%
    @REM *** EXECUTION ***
    @REM Change to mysqldir
    c:
    cd %mysqldir%
    @REM dump/backup ALL database, this is all in one line
    mysqldump -u %mysqluser% -p%mysqlpassword% --databases %DatabaseName% >%BackupDir%\%DatabaseName%_backup.%datestamp%.sql
    
    @REM - YOU ARE DONE!
    
    
    forfiles -p %BackupDir% -s -m *.* -d -5 -c "cmd /c del @path"

    The code above can be changed in may ways to do a DB dump every day and then just specific table dumps every 15 minutes or so but as my DB is quite small, this seems to work fine for me.

     

    Backup first, be careful and enjoy.  Report any issues and I will re-examine and revise the code.
  15. I'm not sure what you done is related to 

     

    Causes some players to not be able to connect  and some base objects dissapearing

     

    Nope on the first one.  Looks like you do not have the British Armed Forces (BAF) expansion resources on the Server.  

     

    For base objects disappearing, it sounds like some sort of housekeeping.  Epoch has this and it can be majorly annoying but without any sort of housekeeping the object_data table will just grow and grow with peoples base parts never being removed.  You could write a custom script / sql event to clear them up to replace the Epoch SQL triggers that currently do it.

     

    Hi Rimblock, from my experience of two hosts, some will give access to those files and some won't. For instance, Vert let you get back to that level but, a previous hoster didn't when I used to use them.....

    Thanks for the info ReDBaroN.  Hopefully most people can use the dedicated version of the mod and keep the server_monitor code on just the server.

     

     

    A suggestion for the files for this mod. Instead of including an entire compiles.sqf, just have a compiles.sqf with the new lines, then in init.sqf, set up a custom line for your second compiles.sqf. I do this for variables.sqf as well.

     

    Whilst I am dead set against repeated code due to efficiency reasons, the big advantage of your suggestion is that the mission file will be smaller and as we all know, smaller mission file is generally better.  It will also make it clearer for people to install with other scripts. I am all for simplicity, especially when supporting the mod  :D .

     

    I reconfigure to use this method.  Thanks for the suggestion.

×
×
  • Create New...