Jump to content

Sven2157

Member
  • Posts

    46
  • Joined

  • Last visited

Posts posted by Sven2157

  1. I do not have moderation power obviously but for all of us, It is easy to ignore a particular person if you feel unhappy about their posts and don't see a point to try and resolve the issue via PM.

    I am still using your SQL db improvements and you are one of the few technical people responding in this thread, you're actually punishing us by leaving abruptly. I hope you'll reconsider your decision.

    Seriously? What has he contributed? I fail to see what he has given, with the exception of back seat driving and second guessing EVERYTHING! Everyone of his responses to mine belittle me. By basically saying I can't read, and insulting me. Now he is going to be a drama queen! FUCK THIS! Keep him...

  2. CREATE EVENT removeObjectOld
       ON SCHEDULE EVERY 1 DAY
       COMMENT 'Removes old objects and vehicles'
       DO
         DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 30 DAY)
     
    CREATE EVENT setDamageOnAge
       ON SCHEDULE EVERY 1 DAY
       COMMENT 'This sets damage on a wall so that it can be maintained'
       DO
         UPDATE `object_data` SET `Damage`=0.2 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
    
    I give this in my Sql event and the Problem see my Pitcure^^ Jahangirl13

    Is your server running when you run this? Shut down the server, and then from your SQL manager, run this script:

    DELETE FROM `object_data`
    WHERE `LastUpdated` <= DATE_SUB(NOW(), INTERVAL 14 DAY)
    AND `Classname` REGEXP 'wall|floor|door|ladder|stair'
    
    Hope that helps! ;)

    =170= Sven2157

  3. The error creates some weird situations.

    For example:

    -I get into a plane that I spawned, it isn't there for anyone else, they just see me stood there doing the 'get in' animation. But, they can see me fire weapons from it.

    -I build something, it's there for me but no one else and gone when I re-log.

    -I abort to the lobby, when clicking the button to continue I get 0kb/0kb for the mission file and it will not continue, requiring me to close the game to fix it.

    -I put an item in a vehicles gear, I go back and cannot take it out, and it is not there for anyone else.

     

    The console spam is:

     

     6:20:12 Server: Object 3:14 not found (message 99)

     6:20:12 Server: Object 3:16 not found (message 99)

      ...

     

    This spam will happen endlessly when I am on the server, and as soon as it starts, nothing I do will sync apart from movement.

    There doesn't really seem to be a trigger, it just happens at random I believe.

     

    Any help is much appreciated.

    Thanks!

    Just a quick thought here, but it sounds like you may have added things client side only:

    if (!isDedicated) then {
        < ... IS YOUR MOD CODE HERE? ... >
    };
    
    That would explain, why ONLY you see these things, and the server is spamming the "can't find..." message. Possible?

    =170= Sven2157

  4. Hey Sven

     

    I never tried that syntax as the documentation never really mentioned sql syntax. It all looked abstract with only vallues and  < > =.

    Yeah the documentation will cause your head to mushroom cloud. However, using it and the comments in the C++ code, it works like this:

    Think of the 500 calls this way:

    500 = change table access

    501/502 = data request

    503 = data status

    504 = data fetch row / data close

    Ok. So the first example:

    request the medical data for a specific character:

    _key = format["CHILD:501:dayz_epoch.character_data:[""Medical""]:""CharacterID"",""="",""%1"":[0,8]:", _playerID];
    CHILD:501 = Using 501 is synchronous to the server, so if there is a problem, it is immediately caught and displayed. If you used 502, then it is an asynchronous call, and higher priority queries will execute first. If there is an error, it will not display right away, or possible for several seconds/minutes, depending on how busy, fast the server is.

    dayz_epoch.character_data = This is a combination of the database name, and the table you are asking for data from.

    [""Medical""] = This is the column you are requesting data from.

    ""CharacterID"",""="",""%1"":[0,8]:", _playerID = Ok... :huh:

    This is what the query is based off of. Essentially, this is the WHERE clause. The first part is what the WHERE is looking at, then whether it is '=','>','<','<>','IS NULL','IS NOT NULL','NOT LIKE','LIKE','NOT RLIKE','RLIKE'. - The RLIKE is the equivalent to REGEXP 'something1|something2'

    The %1 is a formatted placeholder.

    This next one, [0,8], is interesting. According to the C++ source files this is a LIMIT.

    Lastly, you have data to base this query off of; in this case, it wants the Arma scripts to grab the player's ID.

    So when you combine all of this logic, you produce a SQL query:

    SELECT `Medical` FROM `character_data` WHERE `CharacterID` = '_playerID' LIMIT 0,8
    I am going through the C++ code right now, but I thought that may be, it would automatically recognize the SQL Statement, when it auto updates the database. I figured we could squeeze some updates/inserts in there. Oh well, it was worth a shot! ;)

    REGARDING TEAM COMMUNICATION

    I can offer my TeamSpeak 3 as a place to discuss and meet. If that is not acceptable, I highly recommend Razer Comms - imagine Skype, back when it was good, and if it had been made by Gamers. Lots more features than Skype, NO ADS( So far )!

    =170= Sven2157

  5. Hey Zupa,

    Have you tried inserting with a 501 or 502 at all? Would this not be the syntax?

    _key = format["CHILD:502:dayz_epoch.banking_data:[""UPDATE SET [""player_money""] = 900""]:""CharacterID"",""="",""%1"":[0,8]:", _playerID];
    Or:

    _key = format["CHILD:502:dayz_epoch.banking_data:[""INSERT INTO [""player_money""] VALUES ( '900' )""]:""CharacterID"",""="",""%1"":[0,8]:", _playerID];
    Something along those lines?

    =170= Sven2157

  6. On 999 calls.

     

    For securing 999 calls, various techniques could include

    • Locking down the sql query ('key' parameter) passed to server_functions.sqf by validating before firing to the DB much as you would to try and protect against sql injection attacks.
    • Further lock down the queries with only parameters being passed from the client calls in the key parameter to the server_hivereadwrite function and then that 'key' parameter is checked, verified and if seems valid is inserted in to canned sql queries in the server side functions to create the final sql query to be fired at the DB. Each server could have their own canned sql queries.
    Neither are particually hard to do and will give, if implemented correctly, a secure use of the calls. 

     

    Even without those restrictions, damage limitation can also be enforced by limiting the functions the Epoch DB user account has.  As standard it should not be able to do much more than UID (update, insert and delete) to a limited set of tables.  I read somewhere about people being concerned that 999 calls could be used to drop tables.  Why would the Epoch DB account have access to that command ?.  The only reason I can think of would be because the person setting up the account was not aware of best practices for secure application account creation and no guide seems to have been produced as part of the Epoch install.

    Everything you mentioned there, requires compiling a NEW DLL! As the saying goes, "either put up, or shut up!". Since the Epoch team and AWOL are not good enough to determine what is going on with their code, we should wait for your findings. Please keep cluttering this thread with absolutely ZERO contribution, back seat driving and second guessing.

     

    Whilst it is great that you are looking to expand the hiveext.dll for this project, I am looking to see how the hiveext.dll could be leveraged to provide better DB interaction for all mods without people needing to go to ARMA2NET.

    Why? Are you going to program and recompile that then? Why not just start now with the bank system? That way you can give out your "low hanging fruit", whilst you work on the other MOD's interaction with the database. I am the one that pointed out that ARMA2NET requires a Windows based hosting. So users renting game servers, wouldn't be left out; which is about 90% of the servers out there.

    This is completely out of the scope of this thread, and borderline thread hijacking.

     

    For custom calls, a more open solution would be

    • Being able to write parameters to a set table via one hive call and then calling a stored procedure with another. The stored procedure would then only take data from the table the first call writes to.
    This would depend more heavily on sql procedures for results which some are not so comfortable with but would lock the sql code away on the DB server rather than in scripts.

     

    Creating a custom call to modify only a set table is great but will you then be creating more custom calls for any other tables that any other mods would like as / when requested by other mod makers ?.

    What are you talking about? This is spoken like a true IT Manager. A bunch of big words, strung together, which make no sense. I have been a DBA, software/web developer for 25 years, and I have NO earthly idea what you think you are saying. Again if it is so easy, then have it!

     

    Last I read (which you linked to) was "If I have time, I could dust off my C++ skills..." which would indicate nothing has been done.  If you have started working on this then fantastic.  It would be good to see what progress you have made.

    Yep! Based on comments and people like you, I decide if my time is worth giving. More so, whether or not it is deserved. The gall and entitlement of the users of the Arma/DayZ community is staggering!

    Don't attack me like I am some kind of jerk, because you think you know what is best! In the future, if you have an issue or something to say to me, then do so privately!

    =170= Sven2157

  7. Re-reading with that thought in mind it would seem to be fairly obvious from the descriptions :D .  Damn, not sure how that was missed.

     

    Oh well. Good for reading static data.

     

    So the three current possibilities for DB access and storage of persistant values seem to be

    • Nest an array or repurpose a field for currency storage (already done).
    • Use the 999 calls (Already done but maybe insecure in current state).
    • Develop a new set of calls (nothing done on this yet).
    How do you figure all this?
    • VBAWOL and the Epoch team, have already added, then removed the 999 calls, as they are a big security issue.
    • Re-purposing fields is not a solution it is a band aid. You still have to use 999 calls to update the fields.
    • As for your third bullet point. HUH!? but can't get a solid answer.
    The biggest problem is that this thread is filled with promises of backing a project, wishlists of code not even thought all the way through yet, and circular discussions on the database access. The very little development contributions are all buried beneath all of that.

    Having said all that -

    I have my VS IDE setup, and over the next day or two, I will be trying to add a SPECIFIC set of functions to READ / UPDATE / DELETE data in a new relational table called:

    `banking_data`. <-- There I made a decision.

    Then you guys can code to that and its column names - to be listed shortly.

    =170= Sven2157

  8. First, could you please edit your post above, and wrap that code in spoiler tags? That way we don't have to scroll past all that:

    [spoiler] ... All that code ... [/spoiler]
    

    Ok now my players are reporting they cannot tow after restart.... Any idea why? Is it maybe where I positioned the init.sqf call?

    if (isServer) then {
         waituntil {!isnil "bis_fnc_init"};
         LHD1 call BIS_EW_fnc_createLHD;
    };
    
    //R3F Towing
    [] execVM "R3F_ARTY_AND_LOG\init.sqf";
    
    //Start Dynamic Weather
    execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";
    
    #include "\z\addons\dayz_code\system\BIS_Effects\init.sqf";
    
    
    This is the very bottom of my init.sqf

     

    Maybe someone can link the most updated version of the script? I will just fresh install it. Thanks!

    Next, you need to put that call at the VERY bottom of the init.sqf; Like so:

    if (isServer) then {
         waituntil {!isnil "bis_fnc_init"};
         LHD1 call BIS_EW_fnc_createLHD;
    };
    
    //Start Dynamic Weather
    execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";
    
    #include "\z\addons\dayz_code\system\BIS_Effects\init.sqf"
    
    // R3F ARTY & LOGISTICS
    [] execVM "R3F_ARTY_AND_LOG\init.sqf";
    
    If that doesn't address the issue, you may need to list ALL the mods you have installed, so we may better see if there are any conficlts.

    =170= Sven2157

  9. Oh, ok I was confused when that table wasn't present. And yes I have a dedicated server machine on fiber and I use XAMPP.

    I use WAMP myself, but XAMPP should have phpMyAdmin.

     

    Strangely, after editing the files I was unable to see the items in the traders inventories while in game. I gave the vehicle the same number as an aircraft dealer (152?) and set it to an affile of something to the effect of "...any_vehicle" (I apologize as I'm not able to access the machine at the moment that's the closest account I can give).

    It is most likely working. Is that Aircraft Dealer( 152 ) on the map you play? You can find out which TID you need by running this query in phpMyAdmin - click the SQL tab:

    SELECT * FROM `server_traders` WHERE `instance` = ADD.YOUR.MAP.INSTANCE.NUMBER.HERE
    Panthera map, is instance 16, Chenarus is instance 11. I use Panthera on my server, so I would use 16 there. The results returned will show ONLY the dealers on the map you play. Grab their TID and use that to insert your vehicle.

     

    At the moment I'm still learning how to operate PHPMyAdmin as I can't seem to locate any kind of executable but that's likely by design so after my final exam tomorrow I will dedicate some more time to understanding its use.

    And you won't find any executables. This is a database, and all it does is store data; much like a excel spreadsheet. However, it is much, much MORE powerful. Instead of functions, like Excel, it uses Standard( or Structured ) Query Language to retrieve the desired data.

    Here is a website that will help you understand how to retrieve data from a SQL database. W3 Schools SQL

    And of course, if you have any questions, post back! ;)

    =170= Sven2157

  10. Good job.

    When I don't have phpMyAdmin available, I use MySQL Workbench as it is free and is created by Oracle( the same people that make the MySQL database engine ).

    The `traders_data` table is the one that you are looking for. I believe that `traders_items` is from a previous version of Epoch.

    You should have access to phpMyAdmin though, which then negates Navicat and MySQL Workbench. Are you running this off your own computer with WAMP/XAMP, or is this a game server you rent?

  11. ...

    So far I've put the @POOK folder in the server directory and put the PBO file from the mod into @Dayz_Epoch\addons folder. I apologize in advance for my noobishness :) as I'm not entirely certain what it takes to make an ARMA 2 mod work with Epoch.

    Finally, someone that is willing to get their hands dirty, and not just 'expect' the community to do this stuff for them.

    Let me correct a couple things here:

    • The .PBO, should remain in the @POOK folder.
    • The @POOK folder should go into the root install of your server - with the @dayz_epoch_server, @dayz_epoch, @ibr_plants, @ibr_rn, etc, etc folders.
    • You need to add the @POOK folder to the .BAT file that you are starting your server with. Look for the above names, then add @POOK at the end.
      • "-mod=@panthera;@ibr_plants;@ibr_rn;@DayZ_Epoch;@DayZ_Epoch_Server;@POOK;"
      • - note that this is for a panthera map server, yours may be different.
    • Any player, or yourself, that wants to play, MUST have this @POOK mod as well, AND have it set to load with the game!
    Now to get this particular 22 into the game, you could go several ways. Seeing as you are a bit more Grasshopper than Sensei, let's try this route:

    This will add your new 22 to the Traders, where you can buy.

    Get that working, and then we can talk about how to make it spawn randomly.

    Hope that helps! ;)

    =170= Sven2157

  12. ... if anyone could help me script the folowing scripts id like to have on my server that be great. This would be scripts for DayZ Epoch Panthera

    I can help. What have you tried so far? What errors are you getting?

    =170= Sven2157

  13. First, Happy Birthday.

    Second, I am confused. So you have already compiled the new HiveExt.dll?

     

    • Official source files for epoch hive:

    https://github.com/vbawol/DayZhiveEpoch

    • Unofficial source files with 999 for epoch hive:

    https://github.com/rajkosto/hive

    • Unoffical compiled hive files (3files!):

    https://github.com/EpochSC/SingleCurrencyBanking999

    • Official compiled files:
    Why 999 calls, when they were already discussed and passed on? There is support for 50N calls, in the existing library, why not just use those? They are used exactly the same, but provide better security, through stored procedures. Why don't you just add the new calls, if you can compile it?

     

    I did not add any new collums or tables (simplicity). 

    Not sure I agree with this call.

    I feel that anything existing should not be touched. Unless you go through EVERY line, in EVERY script, you have NO WAY POSSIBLE, to say that they are not used. Also, if your scripts glitch, what impact does that have on the rest of the table? If the 999 calls are indeed, problematic, why give access to the real data of the server? Seems like a disaster waiting to happen.

     

    DONT be lazy and look in your goddamn server files ^^

    Not sure that was warranted ... :huh:

    =170= Sven2157

  14. I just want to say that you CAN reskin a VEHICLE without making others download crap.  I do not know about weapons but I am 100% sure about vehicles, PM me if you want more info.

    You can. But for others to be able to see the skin, THEY HAVE TO HAVE THE TEXTURE FILE ON THEIR SYSTEM! Otherwise they will just see a default texture. If you change it to something already in Arma2/OA/DayZ/Epoch, then YES, they will see it.

    IF you make a custom skin, then people will NOT see it, unless you add it to the mission or another PBO file.

  15. I am not promising anything here, but ...

    • What is the name of the proposed table?
    • What are the proposed Column Names?
    • What specific queries are being asked?
      • i.e. SELECT `column_name1`, `column_name2` FROM `table_name` ...
    • Is this table already setup, with proper relations?

    If I have time, I could dust off my C++ skills( if you want to call them that ), and try to add those to the Hive. Then recompile it.

    =170= Sven2157

  16. Thanks Sven, I will try yours. I do use Notepad++, that's how the script came when I downloaded it. Perhaps it was a bad link, or outdated one?

    Just be sure to SAVE as UTF-8 without BOM. Under the 'Encoding' Menu.

    =170= Sven2157

×
×
  • Create New...