Jump to content

jahangir13

Member
  • Posts

    518
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jahangir13

  1. I think for the windows version there should be other posts. But that should have been solved as far as i know. If iam right there is an solution by axecop in the other forums here. Maybe you try that.
    But i think that happens due to your custom stuff. Add the 2 diag_log lines as i have them at the end of the server_playerLogin.sqf to check the values for _isNew and _isInfected. Isnew needs to be true and isInfected 0 to get the gender selection. If you have this values if you die and respawn you might have an timing issue as axecop described it.
    or set _isNew = true; and _isInfected = 0; additionally to the place where the diag_logs from above are placed. So you would always get the gender screen (just for testing). If it does not show up or too short look to axecops post as mentioned.


    @deanreid: yes you are right (EDITed the link in the OP). This from an earlier post which fixes for me that all players have more or less exactly the same time when they join the server. So its not still night for some and already day for others.
    nobody ever answered to that ;) so maybe i am the only who had this pribem or who cares ;)
    so i thought i let it in here. Just comment it out. I add a remark in the post when i'm home. Thanks.

    Again:
    The op can only be seen as a workaround until devd adapts how players/characters are written to the db and cache files.
    I also tried to create a workaround to be able to play as a zombie.
    problem is that the information which i can get from the medical string in xxxxx-char.sqf in the player cache directory is needed already in server_playerLogin.sqf but will be read in server_playerSetup.sqf where it's already too late.
    A workaround here would be too much to change and confusing i guess. Maybe i find an easier way which is worth to be posted.
    I dont know yet for what the second value (false) is used in the xxxxx.sqf player cache file. Maybe thats used for that.

  2. Thanks for the reply!!

    Leave out questions which are not for you and fell free to include different ones.

    That was just a proposal ;)

    Scripts work the same way than under windows. The only difference that i see here is that the mission needs to be packed into a pbo file.

    have running all 'known' ones. Pm me if you have a question...but should as shown in the normal tutorials...so something else might be wrong.

  3. Hm, then I am to blind to see that maybe ;))

    For me it's in the while loop which does the checks and closes the dialog if someone is not allowed to have a look into this. And if the condition 'if ( _skip && _if ) then {' gets true in this while loop we wait 60 seconds which stops the loop for 60 seconds until new checks will take place and dialog closing and so on. Yes, in the if condition is only the message but the while loop stops there for this time if I am not totally blind now.

    Where is my error here? Hm ;)) To many brackets perhaps.

  4. I guess nobody who does not also want this would invest hours to script, test, script, test,...until that works just to present you a working code on the tablet ;)

    And being a noob does not hurt...what hurts is taking the time to read a lot and learn scripting with trial & error. If you don't want that or don't have the time I'm afraid you need to wait until someone also find this interesting enough.

  5. Hi all,

     

    I am very interested who and how many people are using this linux port of the Epoch server.
    There is not too much participation in this forum so I am wondering if it's only a handful of people maybe or a bigger number.

    Therefore I opened this topic to gather a bit of information and thoughts to get an idea here ;)


    Some example survey questions / maybe you have some other things to tell here...

    Are you using the Epoch linux server port as a test server or productive (or one-time trial attempt)?

    For how long are you using it now?

    What is your experience regarding performance of this solution?

    What are the positive and negative aspects/experiences with it so far?

    Which additional mods/scripts are you using and which do not work properly due to this version?

    Is the installation tutorial detailed enough to get this easily installed and working (and what is maybe missing here)?

    Who was using this server already and decided to change back to a Windows server and why?

     

    Any other comments?


    I am doing this cause I like Devd's idea for realising this port and to get some thoughts what others may think here: experiences, what could be improved/fixed or additionally added, things like that.
    I am happy for any answer from you which helps to improve this, make it more popular and keep it living.
     

    Regards,

    jahan.

  6. Hm, I've set _infected in server_playerLogin.sqf to 1 and the DZE variable you mentioned to true. I got a zombie.

    After logginf out and logging in again I still was the zombie. I don't know how this is determined. I just saw that the original epoch sql files contain a comumn infected in table Character_data which we do no have.

    Is this determined by the model?? (pz_doctor I currentlx have). Do you know that?

  7. Hi,

     

    Here I provide a fix/workaround for the Gender/Character Selection Screen issue which does not shop up in the Epoch Linux Version.

    I call it Workaround as I hope that Devd will take a look into this and update the LInux Server files so that this is not needed anymore. Until this happens I am using this as it is working very well so far.

     

     

    gender_selection.jpg

     

    Reason is that the condition in dayz_code.pbo / player_monitor.fsm for showing the screen (_isNew = true and _IsInfected = 0) is always not met in our version.

     

    As always: Take a backup of your mission.pbo and your dayz_server.pbo as well as of the database and cache files before you change anything!!

     

    This cannot be mentioned often enough...I am also very lazy and crashed my server completely yesterday and needed 2h to figure out that the problem was ;)

     

     

    Instructions:

     

    1.)

    This is the link to the modified server_playerLogin.sqf (which can be found in dayz_server.pbo in folder compile):

    http://pastebin.com/9Y1fMgwp

     

    Copy this over the original one and repack the pbo and upload it to the server.

     

    2.)

    I did not update/change anything in the code of the writer.pl and I hoped that this will not get neccessary. However, I've changed 2 things on the files Devd provided on the file system:

     

    a.)

    The start gear/custom loadout in the constants section of writer.pl I've changed to the following:

    INVENTORY => '[[],[]]',
    BACKPACK  => '["",[],[]]',
    MODEL     => '"Survivor2_DZ"'
    
    

    b.)

    In the cache/players directory I've changed the content of default.sqf to the following (I've kept default-char.sqf as it was):

    ["PASS",false,"1",[],[[],[]],["",[],[]],[0,0,0],"Survivor2_DZ",0.96]
    

    3.)

    To define a custom loadout/start gear I've used the settings the normal Epoch server provides for that. The code is in the server_playerLogin.sqf already, so why not use that.

    Open your init.sqf file from your mission pbo and enter the following lines somewhere in the variables section.

    // loadout
    DefaultMagazines = ["ItemBandage","ItemSodaCoke","FoodCanBakedBeans"]; 
    DefaultWeapons = ["ItemCompass","ItemRadio","ItemToolbox","ItemMachete"]; 
    DefaultBackpack = "DZ_TerminalPack_EP1"; 
    DefaultBackpackWeapon = "";
    

    Change the values to your liking. This is the custom loadout the player will get if he dies and respawns newly.

    Repack the mission pbo and upload it to the server.

     

    This should be everything needed. Restart the server to load and execute the modified pbo files.

     

    I needed quite a bit of time to figure out how it's possible to achieve this and I still have some problems to understand e.g. why 2 default sqf files in the cache/players dir are needed and in which order what is called. To be honest...I do not really understand why cache files are needed at all. So there is always a better way, I guess, but this works for me.

     

    How I've tested this:

    I stopped the server by killing the process and deleted the directories in the cache/players dir where the player information is stored (the folders, NOT the files default.sqf and default-char.sqf).

    I've also emptied the tables Character_Data, Player_DATA and Player_LOGIN in the database to avoid issues from existing data.

     

    Tests:

    1.) Logged in, got the gender selection screen...start gear was there. I consumed a coke and logged out to desktop. Logged in again and the inventory was as expected.

    2.) I found some Zeds to kill me, went back to the lobby and logged out completely again. I logged in again, after the lobby the gender selection appeared. Inventory was the defined custom loadout as expected. I drank a coke again, packed some stuff into the backpack and logged out again.

    3.) Relogged, everything regarding inv still ok. Was looking for some zombies to kill me. This time I went back to the lobby and entered the mission again from there (without logging out completely). This also worked.

     

    I did this for both man and woman.

     

    Issues:

    1.) I am using a mechanism which takes me automatically back to the lobby after dying (without pressing ESC and pressing Abort in the main menu). I am not 100% sure but if I remember correctly something with the inventory went wrong here. I need to check this again.

    --> Works

     

    2.) I did everything with a 'fresh install'. As I said...deleted player cache files and player/character DB entries. If someone is using the server from scratch this works very well.

     

    I am not sure if everything works correctly if changing the files as mentioned above and already having entries in the Character_DATA table ad cache files. I don't have a second server whith the old setup.

    Maybe someone can send me a screenshot (or in text) how an entry in Character_DATA in the original version on GitHub looks like if a player dies and the player logged out afterwards.

     

    With the changes above this now looks like this:

     

    Character_DATA1.jpg

     

    I use one of the empty fields ("[]") to check if the player is new or not. I do not exactly know which one that is (in server_playerLogin.sqf it's "_isNew =         count (_primary select 3) < 1;").

     

    If a player dies and logs out you can see a new line in the Character_DATA in the database with Alive=1 (The old line with the dead Character has then been changed to Alive=0).

    I am not 100% sure if existing character data causes issues but I think so. I've created a trigger which changes the values for a new Character_DATA line if Alive=1 to change the other values so that it's looking like in my screenshot above.

    The trigger could be used until all the players died once. I think after that everything should be ok and the trigger can be deleted again.

     

    I use phpMyAdmin and to create the trigger, login, select your database, click on table Character_DATA, then go to the sql tab and enter the code of the trigger and press ok.

    DELIMITER ;
    DROP TRIGGER IF EXISTS char_gender_fix;
    DELIMITER $$
    CREATE TRIGGER char_gender_fix
    BEFORE INSERT ON Character_DATA
    FOR EACH ROW BEGIN
    DECLARE oldCharacterID INT;
    DECLARE oldHumanity INT;
    IF (NEW.Alive = 1) THEN
    	
    	SELECT CharacterID, Humanity INTO oldCharacterID, oldHumanity
    	FROM `Character_DATA` 
    	WHERE PlayerUID = NEW.PlayerUID
    	AND Alive = '0'
    	ORDER BY CharacterID Desc
    	LIMIT 1;
    	SET NEW.Inventory = '[[],[]]';
      	SET NEW.Backpack = '["",[],[]]';
      	SET NEW.Worldspace = '[]';
      	SET NEW.Medical = '[]';
      	SET NEW.KillsZ = 0;
      	SET NEW.HeadshotsZ = 0;
      	SET NEW.DistanceFoot = 0;
      	SET NEW.Duration = 0;
      	SET NEW.CurrentState = '[]';
      	SET NEW.KillsH = 0;
      	SET NEW.Model = '"Survivor2_DZ"';
      	SET NEW.KillsB = 0;
    	IF (oldCharacterID IS NOT NULL) THEN
              SET NEW.Humanity = oldHumanity;
            ELSE
              SET NEW.Humanity = 2500;
            END IF;
    END IF;
    END$$
    DELIMITER ;
    

    Every time a new line is inserted here now with Alive=1 the above code will be triggered and changes the values before the insert takes place.

    To check if the trigger has been created execute the sql statement.

    SHOW TRIGGERS
    

    To test the trigger you can execute the following sql statement:

    INSERT INTO `Character_DATA` (`CharacterID`, `Alive`) VALUES (xxx,1);
    

    ...where xxx is a characterID you need to enter which is a number higher than the ones you already have there. You will see that the other values in the new line will be filled as shown above by the trigger.

     

    In phpMyAdmin you can also find the trigger (which is bound to a table) here:

     

    phpmyadmin_trigger1.jpg

     

    It's needed that someone tests this on a test server with existing Character and Cache data.

     

    Please give me some feedback if that works for you!

    Feel free to ask any questions and I will try to help here.

     

    Regards,

    jahan.

     

    P.S.: if you just want to get the selection screen you can change the condition in the file player_monitor.fsm in dayz_code.pbo / system (make it custom and add it to your mission);

    class New_Character
            {
              priority = 5.000000;
              to="Gender_Selection";
              precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
              condition=/*%FSM<CONDITION""">*/"_isNew && _isInfected == 0"/*%FSM</CONDITION""">*/;
              action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
            };
    

    to:

    class New_Character
            {
              priority = 5.000000;
              to="Gender_Selection";
              precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
              condition=/*%FSM<CONDITION""">*/"!_isNew && _isInfected == 0"/*%FSM</CONDITION""">*/;
              action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
            };
    

    ("!" before _isNew ...it's bad to see). But you will get the gender selection screen now everytime you login, if you are dead or not which is not like it is intended.

  8. I sometimes have the problem that I have a lot of PHP processes in 'ps aux' because server was not started when cron executed the restart scripts (e.g. if I shutdown the server for changes or something).

     

    I check now in my files if the pid is existent under which the server is running (e.g. 2302.pid file in the server dir), if not I exit the scripts.

     

    I've added an additional entry in the 'config.php' for the pid file and the code below the variables:

    <?php
    define("address","localhost");  // server address
    define("port","2302");  // server port
    define("password","*****");   // battleye password
    define("pidfilename","/home/dayzepoch/server1042/2302.pid"); // pid file of server (in server directory. e.g. 2302.pid)
    
          // check if pid file exists
            $filename = pidfilename;
            $pid = file_get_contents($filename);
            if ( $pid == "" ) $pid = "0";
            $isrunning = false;
            $isrunning = posix_getpgid(intval($pid));
            if ( $isrunning ) {
                    echo "Server running. Go on...\n";
            } else {
                    echo "Server not started? Exit.\n";
                    exit(0);
            }
    ?>
    
    

    This prevents executing the say command if server is stopped.

     

    EDIT: Hm, I am still getting the Sleeping processes in ps...but however, it was maybe a good idea to stop the execution if the server is not running ;)

  9. At first I do that for the linux version. Devd already added a custom sql stament for me into the parser to change the characterID for objects.

    I mean you had nearly everything already in place...the only thing missing I guess is time to do it. That's also my problem :(

  10. Yes !!!

     

    Good that you ask again. I've invested now 2 hours to figure that out. But do not ask how I did it, but I get a character selection screen now ;))

    I need to sort out what I did, then I will ask you to please reproduce this as I've changed a lot of things now.

     

    So far I can say:

     

    In player_monitor.fsm /dayz_code.pbo) there is the condition which decides if the screen should be displayed or not:

    class New_Character
            {
              priority = 5.000000;
              to="Gender_Selection";
              precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
              condition=/*%FSM<CONDITION""">*/"_isNew && _isInfected == 0"/*%FSM</CONDITION""">*/;
              action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
            };
    

    So _isNew and _isInfected are the variables here. I've put in 2 diag_log commands in server_playerLogin.sqf to see what the values are (found that in a forum post somewhere).

    In dump.log I've seen that _isNew is always false for us...for whatever reason.

     

    I've changed that now directly in the file and I get the Character/Gender selection screen ;)

     

    The question for me is: why is it like that (and I saw that also people using the windows version are having this problem sometimes).

    What consequences does that have if I overwrite the value.

     

    As I said, I will sort that out...please a bit patience ;) And I will open a new post with a fix for that soon.

     

    EDIT: I hope that I find a solution here. As I#ve set this value 'hard' now, I always get the character selection screen even if not dead before.

    Or is that the normal behaviour? I guess not. I am still at work, will have some more time this evening.

     

    @DEVD: is that maybe something you need to sort out and fix on YOUR version if the server. I did still not get everything how that works with the cache files (e.g. default-char.sqf) which makes it really difficult to figure out issues like that ;)

    Problem is you are always very short on words explaining something ,)

     

    In server_playerLogin.sqf, this lines:

    //Process request
     

    //Process request
    _newPlayer = 	_primary select 1;
    _isNew = 		count _primary < 7; //_result select 1;
    _charID = 		_primary select 2;
    

    Is that something YOU commented out here (_isNew line) or people from Epoch team?

     

    Best regards,

    jahan.

     

    P.S.: Next question for me is why we can not play (if someone wants that) as a zombie when dying with an infection. I've seen that the column infected is missing in our character_DATA table but which is available in the original epoch sql. I think that's something DEVD needs to answer...if there is a specific reason for that or if he is just using an old sql file for creating the database ?!

  11. @ Sandbird: you can find these things in the linux version (Epoch Linux Forum) if you download the server.pbo from there...as all these things (objects, players, inventories) are handled by 'cache' files.

     

    If you use a tool to search in all the files of dayz_server.pbo for "cache" you see all the files where cache files are loaded from the file system to put them into the game again.

     

    Greets

  12. Yes sorry, was too late ,)

    I also tried a lot yesterday...in file dayz_server/compile/server_playerDied.sqf are the messages to see when a player dies and from whom he was killed. I also did not understand why I wasn't able to call the same form another file. Need another free evening to figure that out. I am sure that this should work somehow without using any other additional files, hm.

  13. You could maybe create a sensor for the areas in description.ext like in the safezones (You are now entering safezone abc).

    And if the sensor triggers you execute a script which counts up or down a public variable. If the variable is > or < x then change the custom marker you have there. Something like that could be working I guess.

×
×
  • Create New...