Jump to content

RimBlock

Member
  • Posts

    1140
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by RimBlock

  1. Ok, after a quick check for differences I have found nothing significant so far.

     

    The following files have differences between 1.0.4.2 and 1.0.5 in areas that affect this mod but the differences are pretty minor (as noted above the 'search for' needs "and" changed to "&&") and should be easy to sort out;

    tagfriendly

    player_updategui

    fn_damageactions

    fn_selfactions

     
    I will put together a 1.0.5 zip file now for people to test on a new Epoch 1.0.5 install without other mods (or just install first).
     
    I will update the install instructions probably over the weekend.
  2. Just replaced my Razer Blackwidow keyboard with an Armageddon Black Hornet after a spillage put the former out of action.  Since then I have been seeing some strange issues (repeating keys sometimes but not always, in Epoch the gear menu switches from working normally to opening and then instantly closing, in WIndows explorer shift locks on now and again - not caps lock etc) so I was looking at a rebuild of my desktop but I noticed last night that there is  raptr.exe (or something like it) crashing on shutdown and I suspect some old Razer software may be running in the background still causing issues with the new keyboard so may be able to track it down and just remove.

     

    Tl;Dnr - Old keyboard software affecting new keyboard causing testing of Epoch modes to be problematic.

     

    If that is it and it is fairly easy to resolve then I can take a look at sorting this mod out tonight but it may take a day or two as there are quite a high number of changes over multiple files.  I will probably release a test copy asap and once validated will put out the full version.

  3. A custom hiveext.dll means people need to have server access where they can replace this file.

     

    Best solution would be to get 500 -> 505 calls working.  I took a quick look at the C++ code last night and have some theories as to how it may be working but need to look further and then do a bit of testing.

     

    AFAIK, config based traders are pretty static and revert to baseline on server reboot.  Should be no reason with some modification why there cannot be a hybrid trader where their data is stored in the DB but the rest are config based only.  The real question is how best to store it.

     

    Storing currency amounts can be done already using the standard hive calls and just nesting inside another field just like the tag friendly script does for other players friendly to your player.  I will be using the same technique for assigning ownership to buildables without messing with the characterID field and I know of at least one other person who has already done this. 

     

    So, to my mind, the real questions are;

    1. What is more important, compatibility or finding the best ultimate solution.
    2. How to stop client side scripts just injecting loadsamoney in to their characters records. 

     

    The only realistic way is to have the currency tracked by the server and for it only to be generated by trade or player loot (i.e. not spawned loot which is not server tracked).  The server could then do some accounting but you would have to be aware of the extra load this could bring to the server.

     

    Even with that, someone is bound to try and inject some extra cash in to a dead bodies inventory for them to pickup and so then you need to work out how to handle that. 

     

    Personally, if I was going at this on my own, I would look at piggybacking on one of the character_data fields (dont have access to the Epoch sql files or my system at the moment so cannot say which one), get the system going which should be pretty easy and then build and improve from there.  That way, everyone gets something and those that want more advanced functionality may need to run a dedicated server.

     

    I do like the idea of a money broker in the trader cities who, potentially, could also be a loan shark, sending the bandit boys after you if you don't meet your dues (loan shark collection contracts for player missions maybe).  Not so keen on the ATM / lockboxes for magically storing money safely.  I like the idea of the risk associated with moving the cash back and forth to the money broker when need be (bandit ambushes etc).

     

    Anyway, I will wait for someone to get in contact on this project whilst getting my plot pole for life mod sorted out for the recent 1.0.5 Epoch release

  4. Trying this out on 1.0.5 here in a few. So far nobody I know has been able to get it work but I don't have any more info than that sadly.

    Edit:

    One thing on the instructions... all "and" are now "&&". Just finished the install time time test.

     

    The && was introduced in ARMA II OA 1.62 so changing 'and' to '&&' is just a code update to the most recent, and hopefully faster, method of doing the same thing.

     

    I downloaded the mod last night but will need to windiff the old and new versions of all the files this mod touches to find the differences and then find the best way to account for them.

  5. My understanding is that OtterNas is busy with 'real life' this week but should be back in the land of Epoch next week sometime.

     

    I would expect some feedback from him at that point.

     

    I have not looked at the new code yet but will be concentrating on my own Plat for Life mod first if any problems pop up with that and then can maybe offer some suggestions.  Unlikely to be before the weekend though.

  6. I believe you can drive in a lot if not all DayZ Mods.  Building is limited to a few and Epoch is, subjectively, the best :D .

     

    You only need to download the epoch mod (DayZ mod is included inside already) and put it in your ARMA II OA game folder.  You will then need to activate it by running ARMA II OA Beta -> Expansions -> make sure the Epoch option is enabled -> OK -> restart

     

    What issues are you seeing ?.

  7. Working on it on and off along with other projects. 

     

    I suspect I need to do a desktop reinstall though as I am getting strange things happening which may not be related to ARMA (after playing for a while the backpack opens and loses instantly).

     

    One of the other modders here is also working on a GUI for the refueling and I would like to build that in to the mod rather than write the mod without it and then code it in as it is a waste of efforts.  Fine tuning the mousewheel menu, with two levels is a right royal PITA.

     

    Most of the fuel truck refueling I have had working fine.

     

    I have also been working on Sandbirds 3D editor with DB access for testing but although I can get ARMA2NET working, when going from the 3D deitor, ARMA II locks up and ARMA2NET GPFs.

     

    A clean desktop install may help fix these things.

  8. Two words.... Fire Engine.

     

    Hard to find, not available at the vehicle traders, fairly slow moving, doubly so cross country, noisey, has a ladder for getting in to bases, a great focus for clan vs clan battles.  A modern take on the seige engines of old.

     

    He who has the Fire Engine rules the world....

     

    I presume there are no fire engine models in Epoch so is anyone up to the task ?.

  9. HI Rimblock,

     

    Thanks for putting your time and effort into this.

     

    ...

     

    I see you have had to do it this way because of the addition of the timestamp column. Personally, I'm not that interested in 'when' they change their name but, would like to see on one row all the names that a player has used, is using and the original name they had before changing it for the first time. What also be really fantastic would be if the ID changed every time there was some sort of change so it kept the name changers to the top of the list when the column is sorted by ID...

     

    However, rather than me getting a bespoke service, I suppose it's up to the wider community to comment.. :) But, what do you think...?

     

    Yep it will grow a lot hence the tweekable housekeeping included.  If there are people you do not wish recorded it is also very easy to exclude them from being reported on.

     

    On the 4th June someone reported a player called "BigPants" was causing massive problems destroying peoples cars for no reason.  You find 3 players have used the "BigPants"alias on your server.  Which one do you take action against or do you do nothing.

     

    With the method I have put together you can track which of those players were using that alias on that date and what their current alias is.  Makes it a lot easier to reconstruct events.

     

    The sql needed would just be

    select * from player_alias where playername = "BigPants";

    Not really much different from the sql needed to quest the table the way you have it.  It may be the tool you are using is writing the sql in the background but it is sql getting the info out.

     

    Going a bit further you can find out which players changed playernames between a set timeframe, how often players are changing their playernames, which are the most popular playernames, who is using playernames that break the server rules ("Admin") for example and keep notes on who, under which playername and when someone got a warning or was banned that all admins would have access too.  No need to trawl through emails or shared google docs etc.

     

    Bottom line is that is it two different ways to resolve a problem.  Yours is fairly easy and simple to maintain.  Mine offers more possibilities but may require a bit more work.  Different people are likely to prefer one or the other depending on how they want to setup[ their server.  Now they have two options.

     

    For your query, the better way if you are keeping to one row per playerUID is to add a timestamp column, a first username column (not sure why you would want this) and then just change the timestamp each time the alias changes.  Changing the id would mean deleting the row and inserting as new row and if the changes are as regular as you say you will be burning through ids quite quick.  Updating a row is likely to be much more efficient.

  10. Ok, so here is a first round of code.

     

    It adds an old & new row per playeruid / alias.  There is also a note column.  The code does not care if that playerUID / alias entry already exists or not.

     

    As always, test before using on your live data.  There may be possibilities that have not been considered.

     

    Create the player alias table

    DROP TABLE IF EXISTS `player_alias`;
    
    
    CREATE TABLE IF NOT EXISTS `player_alias` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `tstamp` datetime, 
      `action` varchar(3),
      `playeruid` varchar(255) DEFAULT NULL,
      `PlayerName` text,
      `notes` text,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

    Create new trigger

    DELIMITER ;
    DROP TRIGGER IF EXISTS `updateName`;
    
    DELIMITER //
    CREATE TRIGGER `updateName`
    BEFORE UPDATE ON player_data
    FOR EACH ROW
    BEGIN
      INSERT INTO player_alias (tstamp, action, playeruid, PlayerName, notes) select now(), "old", PlayerUID,playerName, "" from player_data where PlayerUID = NEW.playerUID;
      INSERT INTO player_alias (tstamp, action, playeruid, PlayerName, notes) VALUES (now(), "new", NEW.PlayerUID,NEW.PlayerName, "");
    END//
    DELIMITER ;
    What you should get is something like the following in the new player_alias table.
     
    ID        tdate            action  playerUID    playername     note
    1    2014-06-22 12:36:00    old    999999999    Armchair        ""
    2    2014-06-22 12:36:00    new    999999999    Right Angle     ""
    3    2014-06-22 12:36:00    old    111111111    Hairy Harry     ""
    4    2014-06-22 12:36:00    new    11111111     Awesome         ""
    5    2014-06-22 12:36:50    old    999999999    Right Angle     ""
    6    2014-06-22 12:36:50    new    999999999    Avacado21       ""

    The table can grow rapidly depending on how often players change their names (and how many players you have).

     

    A housekeeping script will keep the number of entries down.

    DROP EVENT IF EXISTS `housekeepName`;
    DELIMITER ;;
    CREATE EVENT `housekeepName` ON SCHEDULE EVERY 1 DAY COMMENT 'Housekeeps the player_alias table' DO DELETE FROM `player_alias` WHERE `tstamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 30 DAY) 
    ;;
    DELIMITER ;

    This will run every day and delete any entries older than 30 days.  Change the '30' in the command to increase or decrease the number of days.

     
    You can then run sql to find all the playernames used by a playerUID without the need to chop up a text filed.  You can see when the name was changed, what it used to be, what it was changed to and any notes put in by, presumabily admins, relating the that playeruid and playername.
     
    From the above example, playerUID changed their playername from "Armchair" to "Right Angle"and then to "Avacado21"

     

    Any issues then let me know here or via PM.

     

    I will be adding one of these for the object_data table allowing historical worldspace tracking of players and objects saved to the DB along with inventory changes, lockable code changes, key changes, the whole lot.  This will obviously have a DB impact but the advantages it could give are big.

  11. Works wonderfully by the way. Only issue is that it broke elevators as they still look for charachter Id. I'm having issue adjusting the code so it can see the changes.

     

     

    Ok, so the part of the code that checks the players id and the items owner id is this

    // Find owner
    _ownerID = _nearestPole getVariable["CharacterID","0"];
    // diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];
    // check if friendly to owner
    if(dayz_characterID == _ownerID) then { //Keep ownership

    OwnerID gets the characterID of the object (currently changed to the PlayerUID after conversion to just numbers).

     

    dayz_characterID is a variable sert elsewhere to match the players characterID.  It is this one we need to replace and it should all fall in to place.

     

    Add a new variable in the Private line at the top of the file called .

    find 

    Private ["_

    At the end of the line before the closing '];' add

    ,"_playerUID" 

    Find

    _findNearestPole = [];

    Change to

    _findNearestPole = [];
    _playerUID = [player] call convertPlayerUID; 

    Find 

    if(dayz_characterID == _ownerID) then { //Keep ownership

    Change to

    if(_playerUID == _ownerID) then { //Keep ownership

    That should be it (based on the code snippet you provided).

     

    You may need to check AC_fnc_swapObject and I would search all of the code for dayz_characterID and use the mothod above to get and replace dayz_characterID with _playerUID (same technique as above).  Axemans elevator script seems to be using a set of functions for common tasks (medic action and call zombies for example) which is by far the smarter way to do it but as they are non standard I have no visibility.

     

    Hope this helps. 

  12.  

    Hey guys, I was just looking into getting this set up on our server and I can create the table fine but making the trigger is giving me troubles.

     

    I may be going about it wrong but I created the player_alias table by executing an sql file with the first block of code.

     

    Then when I try to add the trigger using the same method I get an error back that reads:

    [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 1
    [Err] DELIMITER ;
    [Msg] Finished - Unsuccessfully
    --------------------------------------------------
     
    I am running a MySQL database through Navicat Lite.
     
    Am I completely missing how to add this trigger properly or has something changed since the code was released?

     

     

    Have a look at the post in my

     

    MGM was having the same problem with navicat and delimiters.  scroll down for for suggestions in that thread to fix. 

     

    I suspect it is Navicat 'helping'users causing the issue.  As an alternative, take a look at MySQL Workbench which is free and comes with MySQL.

  13. I don't mind helping on the DB back end stuff if needed but as you can see from my sig there are a few other things in my own queue not including sorting out the vault dupe problem, the player inventory dupe issue and putting together a proof of concept for verified client / server coms for important communication (inventory saves for example).  There is also the Epoch based youtube mini-series I am also looking to do with a lot of it scripted / cut scenes interspersed with game footage that fits the story line.

     

    The other thing I didn't mention about the arma2net usage is once you start using it and finding it so easy, it is hard to tear away when developing new mods but if you use it for mods then any server owners would also need to install it and take on the third party dependencies in order to use your mods.

  14. Hey Rimblock,

    But, just for this code in this thread, we don't need a front end just my 2 changes (enter original player name when creating a new row and only listing the same name once) and your one change (having a notes column to add additional info) would be superb!

     

    No need for a web front end on this. Are you mixing up your thoughts on the other thread on duping into this one...?   :)

     

    Those three items are all I will be really looking at.  If someone wanted to plug in to the notes field (Epoch Admin Tools for example) then they should be able to do so quite easily.

  15. Whilst not using the Godmode is good, how to prevent players killing you whist you are testing or fixing or performing some other admin action rather than playing ?.

     

    I do like Cens direction with transparency for the user base and think this is a great way to build up trust.  In a way the player base can also police the admins and report to the server owner should someone be abusing their powers.

     

    I can fully understand owners not trusting admins, especially when starting out, as their credentials and trustworthyness may not have been proven.  One rouge admin can do a lot of damage and some people can go off on a pretty radical tangent if they feel slighted sometimes.  Best solution really is to make sure you have decent, regular backups :D

×
×
  • Create New...