-
Posts
859 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Articles
Posts posted by ReDBaroN
-
-
Got it, thanks cen.
So, since I used the uedp bec installer, do I now knock out the batch file call from the bec scheduler and just keep the shutdown command? Leave the physical start-up of both applications to firedaemon?
-
Let me know what happens when BEC fails to start or your server crashes :)
Hi, I also want to start using firedaemon as you are right, batch files combined with BEC don't cover the server exe crashing.
quick question, I have found the firedaemon tutorial for Bec and the one for Epoch but, what should I set to make them coexist? do you have one as a dependency on the other and add a delay?
Also, I want to keep BEC controlling the normal server restarts and only use firedaemon to cover the server exe crashing. Will firedaemon automatically try to restart the server if it is down for it's scheduled restart...?
Thanks for any help. :)
-
You should always put private variables in the private scope.
Thanks! :) I'll add those to the top of my treasure and military missions.
I'm hoping that may fix a problem I'm having with them where the crate despawns on time but the marker doesn't go and the event doesn't end for some time after that....
-
No, it's not possible to do on Enjin. You need a webserver where you can upload the files.
Thanks man. Thought it wouldn't be so easy....
I suppose that seeing as I'm running a dedicated box with apache installed I should do some reading and get migrated off enjin.
Any pointers as a good place for a beginners guide...?
-
Can anyone tell me how I can install Epoch Prices and is it possible to install if you're website is an enjin web?
Sorry, very n00b to web building etc.
-
This is a fairly involved subject and there are various approaches. I have tried a few and have come to my own conclusion in terms of what works best.
- Run everything from the HC. You can get most function to work, but a pure HC only implementation will not work properly with a lot of functions from the various mission systems. Especially when it comes to spawning objects into the game, and for those objects to persist. In some cases you can get around this using anti-hack tweaks but that will weaken your protection. This method also requires a lot of battleye exceptions, also not good.
- Run everything from server (ie, normal mission pack install) and use setOwner to assign the AI units to the HC. Played with this option briefly, but has some known game engine limitation, such as waypoints being lost.
- Hybrid. Run most code from HC, and offload certain tasks (such as spawning objects) to the server. I used this method with reasonable success for some time but ultimately is more complicated and error prone than the next option.
- Hybrid. Run the mission system from the server, and execute AI modules from the HC. This for me has been the most stable method by some margin and allows all typical features to be used. It requires very few (if any) anti-hack bypasses, all the mission logic runs on the server (which is usually as per the design of the mission pack) and only specific scripts are executed on the HC.
With the hyrbid options you do need to build a basic framework to enable the server and HC to work together well. This is what I have done at a high level:
On the server
- I took Goobers server side HC detection routine and adapted and simplified for my needs. His code was better in that it could cope with multiple HCs however it did have some bugs. Since multiple HC is a very niche requirement I decided to re-write it slightly but with the ability to detect only a single HC. This is not a problem unless you plan to have over 200 AI (maybe more) and also would suggest you are running HCs from various machines (as you can only really run 1 per windows instance easily).
- I installed and configured a mission pack of choice in the normal way in my server PBO. Currently for me that is Wicked AI 2.1.x.
- I then adjusted various elements of the mission logic so that it would check from the presence of an HC (see first point) and only start a mission if a valid HC existed. Hint, there is more to this than just having an HC connected to the server, you also need to know that the HC has had a chance to precompile the necessary scripts.
- I then modify all of the scripts that define the functions for spawning AI so that rather than actually doing anything, they parse all the parameters received from the original spawn request in the specific mission file and send it to the HC using <ID> publicVariableClient [spawn parameters]
- I also do something similar for certain functions such as those that clean up AI when missions end (this bit is more complex, but not that bad actually).
- You also should setup a routine on the server (mine runs every minute) that counts AI units controlled by the server and immediately deletes them. This is because if the HC crashes whilst managing AI, the AI will remain and their control passes back to the server, instantly killing you server FPS!
On the HC
- First, everything that runs on the HC does so via a specific client side addon (PBO) that I have signed with my own key. They key is enabled on my server, so in theory anyone could connect to my server and run my addon, but I dont release my signed addon to the public so its a non-issue (unless i get hacked of course. and by hacked this isnt an arma2 hacked, it would be a "proper" hack (well correct term is crack) of my dedicated server). This way, the only reference to my HC anywhere in the mission file that all players download is a single statement in the init.sqf that checks for a !hasInterface and runs \z\addons\macdogHC\init.sqf.
- First thing is to get the HC side of Goobers HC detection/management code installed in the custom HC addon described above working. This is to let the server know an HC is attached, and I have adapted it for my purposes somewhat.
- Then I install and configure the mission pack in my custom addon, making sure to set the configuration options that affect AI as I want them in the config file. Then disable the actual mission system, so when launched (ie, via \z\addons\macdogHC\WAI\init.sqf) doesnt actually start launching missions.
- I then setup a bunch of publicEventHandlers so that when the server executes a <ID> publicVariableClient spawn_group for example, the HC will run \z\addons\macdogHC\WAI\compile\spawn_group.sqf with the parameters originally specified in the specific mission definition running on the server.
- I have to do something similar for the mission clean up scripts as I alluded to in the server section above, but this is more selective.
And that's it really. It works very reliably IMO, yes very occasionally Arma2OA.exe can crash, and I don't have a monitoring system in place to detect and relaunch the client. So if I don't spot it (usually the case now as I have alomst zero time for epoch these days) there are no missions until next restart. I used to have the HC running as a service which did address this, but the move to steam only has really made running the client in a server like way much more difficult so I have to run the client interactively which is a shame.
I also have animated heli/c130 crashes running of the HC. They dont suffer from the stutter that you get when you run them server side, and are indistinguishable from player flown aircraft. I used to have jet crashes run this way, but it meant white listing them in my anti-hack. I could have edited infistars code to allow the jet crashes but still catch illegal jet spawns, but would require me tinkering every time he released a new version so was just too much effort.
Hey macdog, would you be able to release your version of the AI HC?
Thanks
-
Another helpful tip is to save a backup to a dropbox or other online storage to have easy access on your net connected devices. I hate having to RDP!!
So you can then use phpMyadmin locally....ok, will test that out too.
Cheers :D
-
Nice :D
Probably save that test to later today now as 3.30am for me.... :/
Thanks again for your help guys
-
That's great guys and working perfectly.. :D
Just a quick n00b question if you don't mind before we sign this off.....am I right in thinking that, when needed, I would just drag and drop the sql file into the query box in heidi or workbench, hit go and it restores on it's own from there..? Or, is there more to it when restoring?
Sorry, but new to this non managed/dedicated world
-
sure, here is the output:
C:\Windows\system32>SET BackupDir="D:\Backup_DB" C:\Windows\system32>SET mysqldir="C:\xampp\mysql\bin" C:\Windows\system32>SET mysqlschema=Epoch_Database C:\Windows\system32>SET mysqlpassword=xxxxxx C:\Windows\system32>SET mysqluser=db_backup C:\Windows\system32>SET housekeepafter=5 C:\Windows\system32>for /F "usebackq tokens=1,2 delims==" %i in (`wmic os get Lo calDateTime /VALUE 2>NUL`) do if '.%i.' == '.LocalDateTime.' SET ldt=%jset .' == '.LocalDateTime.' SET ldt=set .' == '.LocalDateTime.' SET ldt=set C:\Windows\system32>if '.LocalDateTime.' == '.LocalDateTime.' SET ldt=2014102702 set 051000+060 .' == '.LocalDateTime.' SET ldt=set .' == '.LocalDateTime.' SET ldt=set .' == '.LocalDateTime.' SET ldt=set C:\Windows\system32>datestamp=2014-10-27.02-12-00 'datestamp' is not recognized as an internal or external command, operable program or batch file. C:\Windows\system32>c: C:\Windows\system32>cd "C:\xampp\mysql\bin" C:\xampp\mysql\bin>mysqldump -u db_backup -pxxxxxx --databases Epoch_Database -- routines --events --triggers --quick 1>"D:\Backup_DB"\Epoch_Database_backup..sq l Warning: Using a password on the command line interface can be insecure. C:\xampp\mysql\bin>forfiles -p "D:\Backup_DB" -s -m *.sql -d -5 -c "cmd /c del @ path" ERROR: No files found with the specified search criteria. C:\xampp\mysql\bin>pause Press any key to continue . . .
-
Confirmed working for both UK and US time formats.
EDit: Noticed that it keeps overwriting the same .sql file
Well, this isn't working for me...well, not as expected anyway...
Using both regional settings it now creates the file OK but doesn't put the date in the filename, just .. So, then it overwrites itself...
EDIT: Sorry Rc_Robio, just seen your edit too... :)
So, yes can confirm the same result
-
can't believe that I'm the only UK dedicated that's using back ups... :unsure:
That would be great though Rimblock if it compensated for that before other folks run into probs when you get dished out with 1052. Congrats on that btw ... another Rimblock mod promoted to the core :)
-
:lol: ....sanity reigns....It worked!
Thanks guys, really appreciate your hard work and help :)
-
Thanks for all your help guys, I really appreciate it. :)
...where do I go from here then? Do I need to change my date settings on the server and to what?
-
Hey Rimblock, this is what I get from date /t:
C:\Users\Administrator>date /t27/10/2014 -
Here it is....
C:\Users\Administrator\Desktop>SET BackupDir="C:\Users\Administrator\Desktop\Bac kup_DB" C:\Users\Administrator\Desktop>SET mysqldir="C:\xampp\mysql\bin" C:\Users\Administrator\Desktop>SET mysqlschema=Epoch_Database C:\Users\Administrator\Desktop>SET mysqlpassword=xxxxxx C:\Users\Administrator\Desktop>SET mysqluser=db_backup C:\Users\Administrator\Desktop>SET housekeepafter=5 C:\Users\Administrator\Desktop>For /F "tokens=2-4 delims=/ " %a in ('date /t') d o (set mydate=%c-%a-%b ) C:\Users\Administrator\Desktop>(set mydate=-10-2014 ) C:\Users\Administrator\Desktop>For /F "tokens=1-2 delims=/:" %a in (" 0:04:38.37 ") do (set mytime=%a.%b ) C:\Users\Administrator\Desktop>(set mytime= 0.04 ) C:\Users\Administrator\Desktop>set hour= 0 C:\Users\Administrator\Desktop>if " " == " " set hour=00 C:\Users\Administrator\Desktop>set datestamp=-0/-01_0004 C:\Users\Administrator\Desktop>c: C:\Users\Administrator\Desktop>cd "C:\xampp\mysql\bin" C:\xampp\mysql\bin>mysqldump -u db_backup -pxxxxxx --databases Epoch_Database -- routines --events --triggers --quick 1>"C:\Users\Administrator\Desktop\Backup_ DB"\Epoch_Database_backup.-0/-01_0004.sql The system cannot find the path specified. C:\xampp\mysql\bin>forfiles -p "C:\Users\Administrator\Desktop\Backup_DB" -s -m *.sql -d -5 -c "cmd /c del @path" ERROR: No files found with the specified search criteria. C:\xampp\mysql\bin>pause Press any key to continue . . .
Any thoughts on whether it may have something to do with the read only check box not clearing properly?
-
tried both....
-
ok, I think we're getting somewhere....the folder has a small square in the read only box and says it only applies to files inside.
But, when I uncheck that and OK it, it reappears when I check the properties again...
I tried creating another folder and exactly the same thing happens...any ideas how I can make that check box clear and stay clear as I'm sure this must be the problem...
-
Looks correct from what I can tell. Only thing I would try is to create a new user in your database and give full permissions. I wouldn't suggest running anything as root. Double-check your database name, password, user. Should match your hiveExt.ini in your server. I'll setup a quick xampp on my test server and see if I run into the same problem.
Cheers man. I'll try that right now and report back.
EDIT: :( No joy. Just set up a user with full permissions called db_backup and stil get the specified path not valid message....
-
ok, thanks. Here is the my.ini:
# Example MySQL config file for small systems. # # This is for a system with little memory (<= 64M) where MySQL is only used # from time to time and it's important that the mysqld daemon # doesn't use much resources. # # You can copy this file to # C:/xampp/mysql/bin/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options (in this # installation this directory is C:/xampp/mysql/data) or # ~/.my.cnf to set user-specific options. # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the "--help" option. # The following options will be passed to all MySQL clients [client] # password = your_password port = 3306 socket = "C:/xampp/mysql/mysql.sock" # Here follows entries for some specific programs # The MySQL server [mysqld] port= 3306 socket = "C:/xampp/mysql/mysql.sock" basedir = "C:/xampp/mysql" tmpdir = "C:/xampp/tmp" datadir = "C:/xampp/mysql/data" pid_file = "mysql.pid" # enable-named-pipe key_buffer = 16M max_allowed_packet = 1M sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M log_error = "mysql_error.log" # Change here for bind listening # bind-address="127.0.0.1" # bind-address = ::1 # for ipv6 # Where do all the plugins live plugin_dir = "C:/xampp/mysql/lib/plugin/" # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. # Note that using this option without enabling named pipes on Windows # (via the "enable-named-pipe" option) will render mysqld useless! # # commented in by lampp security #skip-networking skip-federated # Replication Master Server (default) # binary logging is required for replication # log-bin deactivated by default since XAMPP 1.4.11 #log-bin=mysql-bin # required unique id between 1 and 2^32 - 1 # defaults to 1 if master-host is not set # but will not function as a master if omitted server-id = 1 # Replication Slave (comment out master section to use this) # # To configure this host as a replication slave, you can choose between # two methods : # # 1) Use the CHANGE MASTER TO command (fully described in our manual) - # the syntax is: # # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, # MASTER_USER=<user>, MASTER_PASSWORD=<password> ; # # where you replace <host>, <user>, <password> by quoted strings and # <port> by the master's port number (3306 by default). # # Example: # # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, # MASTER_USER='joe', MASTER_PASSWORD='secret'; # # OR # # 2) Set the variables below. However, in case you choose this method, then # start replication for the first time (even unsuccessfully, for example # if you mistyped the password in master-password and the slave fails to # connect), the slave will create a master.info file, and any later # change in this file to the variables' values below will be ignored and # overridden by the content of the master.info file, unless you shutdown # the slave server, delete master.info and restart the slaver server. # For that reason, you may want to leave the lines below untouched # (commented) and instead use CHANGE MASTER TO (see above) # # required unique id between 2 and 2^32 - 1 # (and different from the master) # defaults to 2 if master-host is set # but will not function as a slave if omitted #server-id = 2 # # The replication master for this slave - required #master-host = <hostname> # # The username the slave will use for authentication when connecting # to the master - required #master-user = <username> # # The password the slave will authenticate with when connecting to # the master - required #master-password = <password> # # The port the master is listening on. # optional - defaults to 3306 #master-port = <port> # # binary logging - not required for slaves, but recommended #log-bin=mysql-bin # Point the following paths to different dedicated disks #tmpdir = "C:/xampp/tmp" #log-update = /path-to-dedicated-directory/hostname # Uncomment the following if you are using BDB tables #bdb_cache_size = 4M #bdb_max_lock = 10000 # Comment the following if you are using InnoDB tables #skip-innodb innodb_data_home_dir = "C:/xampp/mysql/data" innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = "C:/xampp/mysql/data" #innodb_log_arch_dir = "C:/xampp/mysql/data" ## You can set .._buffer_pool_size up to 50 - 80 % ## of RAM but beware of setting memory usage too high innodb_buffer_pool_size = 16M innodb_additional_mem_pool_size = 2M ## Set .._log_file_size to 25 % of buffer pool size innodb_log_file_size = 5M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit = 1 innodb_lock_wait_timeout = 50 ## UTF 8 Settings #init-connect=\'SET NAMES utf8\' #collation_server=utf8_unicode_ci #character_set_server=utf8 #skip-character-set-client-handshake #character_sets-dir="C:/xampp/mysql/share/charsets" [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates [isamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout
This is the bat file with the password changed to xxxxxx:
@REM *** PARAMETERS/VARIABLES *** SET BackupDir="D:\Backup_DB" SET mysqldir="C:\xampp\mysql\bin" SET mysqlschema=epoch_database SET mysqlpassword=xxxxxx SET mysqluser=root SET housekeepafter=5 For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a.%%b) set hour=%time:~0,2% if "%time:~0,1%"==" " set hour=0%time:~1,1% set datestamp=%date:~10,4%-%date:~4,2%-%date:~7,2%_%hour%%time:~3,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 %mysqlschema% --routines --events --triggers --quick >%BackupDir%\%mysqlschema%_backup.%datestamp%.sql @REM - Housekeeping forfiles -p %BackupDir% -s -m *.sql -d -%housekeepafter% -c "cmd /c del @path" pause
Thanks for your help with this.
-
Post the batch file that you intend to use. And I'll take a look. Also post your mysql.ini.
Hi, thanks for your help.....maybe this is why I'm having a problem but, I don't have a mysql.ini
I have installed using xampp and phpmyadmin as per the Epoch installation instructions posted here:
-
You have your path pointing to MySQL workbench in which itself is another program. Needs to point to the server. Example: SET mysqldir="C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin"
Hi, I have also tried C:\xampp\mysql\bin as I'm using xampp but, that doesn't work either. I can confirm that is the folder where mysqldump.exe resides....
Any more suggestions?
-
Hi Rimblock,
I'm having problems setting this up.
Whenever I run the batch file I get this error with 'pause' added:
C:\Users\Administrator\Desktop>SET BackupDir="D:\Backup_DB" C:\Users\Administrator\Desktop>SET mysqldir="D:\Program Files\MySQL\MySQL Workbe nch 6.2 CE" C:\Users\Administrator\Desktop>SET mysqlschema=Epoch_Database C:\Users\Administrator\Desktop>SET mysqlpassword=xxxxxx C:\Users\Administrator\Desktop>SET mysqluser=root C:\Users\Administrator\Desktop>SET housekeepafter=5 C:\Users\Administrator\Desktop>For /F "tokens=2-4 delims=/ " %a in ('date /t') d o (set mydate=%c-%a-%b ) C:\Users\Administrator\Desktop>(set mydate=-10-2014 ) C:\Users\Administrator\Desktop>For /F "tokens=1-2 delims=/:" %a in ("21:24:45.87 ") do (set mytime=%a.%b ) C:\Users\Administrator\Desktop>(set mytime=21.24 ) C:\Users\Administrator\Desktop>set hour=21 C:\Users\Administrator\Desktop>if "2" == " " set hour=01 C:\Users\Administrator\Desktop>set datestamp=-0/-01_2124 C:\Users\Administrator\Desktop>c: C:\Users\Administrator\Desktop>cd "D:\Program Files\MySQL\MySQL Workbench 6.2 CE " C:\Users\Administrator\Desktop>mysqldump -u Epoch_User -pxxxxxx --databases root --routines --events --triggers --quick 1>"D:\Backup_DB"\root_backup.-0/-01_21 24.sql The system cannot find the path specified. C:\Users\Administrator\Desktop>forfiles -p "D:\Backup_DB" -s -m *.sql -d -5 -c " cmd /c del @path" ERROR: No files found with the specified search criteria. C:\Users\Administrator\Desktop>pause Press any key to continue . . .
I checked db user permissions and even tried root which has full access and still get the same error. I have checked the file paths and they are valid.
My copy of your batch file with password xxxxx'd out is :
@REM *** PARAMETERS/VARIABLES *** SET BackupDir="D:\Backup_DB" SET mysqldir="D:\Program Files\MySQL\MySQL Workbench 6.2 CE" SET mysqlschema=Epoch_Database SET mysqlpassword=xxxxxx SET mysqluser=root SET housekeepafter=5 For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a.%%b) set hour=%time:~0,2% if "%time:~0,1%"==" " set hour=0%time:~1,1% set datestamp=%date:~10,4%-%date:~4,2%-%date:~7,2%_%hour%%time:~3,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 %mysqlschema% --routines --events --triggers --quick >%BackupDir%\%mysqlschema%_backup.%datestamp%.sql @REM - Housekeeping forfiles -p %BackupDir% -s -m *.sql -d -%housekeepafter% -c "cmd /c del @path" pause
Am normally pretty good at following stuff like this and have gone over and over and double triple checked everything from your OP but, can't seem to get anywhere....
Any advice?
-
What is the use of this ?
Using that script the Event Markers will be reloaded every 30 seconds until the Event is finished!
So every player, regardless if he was on the Server when the Event started will have a marker on the map!
How to use it?
Delete your actual Create marker Section from your events and add this:
// Configurate Marker - Refresh Marker Script by *hs-s.com | waTTe - www.banditparty.de _markerRadius = 100; _markershape = "RECTANGLE"; _markercolor = "ColorBlack"; _missiontype = 1; //0=EPOCH_EVENT_RUNNING 1=SPECIAL_EVENT_RUNNING _refreshmarker = [_location,_markerRadius,_markershape,_markercolor,_missiontype] execVM "\z\addons\dayz_server\modules\refreshmarker.sqf";
Hey, thanks for this, I need to use with my treasure and Military epoch events.
Quick question, do I need to add _markershape, _markercolor, _missiontype & _refreshmarker to the private array at the top of my events?
Currently, they have _event_marker in the private array and the marker block looks like this:
_event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position]; _event_marker setMarkerShape "ELLIPSE"; _event_marker setMarkerColor "ColorYellow"; _event_marker setMarkerAlpha 0.5; _event_marker setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];
Sorry if I'm asking a daft question but, I'm not savvy with coding.... :/
Thanks
Fire Daemon help
in Server Install
Posted
Thanks again cen. So do you call this after the shutdown command from BEC? Like a second afterwards or something?