Jump to content

Mutiegenesis

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Mutiegenesis

  1. To best utilize this, use github. Edit a local copy, push to your github. On server restart, have your start script clone it into place for an always fresh message.
  2. edit <installDir>/data/scripts/server/server.lua modify the following bits: function onPlayerCreated(index) local player = Player(index) Server():broadcastChatMessage("Server", 0, "Player %s created!"%_t, player.name) -- welcome mail local mail = Mail() mail.money = 1500 mail.sender = "Mutant.Enterprises" mail.header = "Welcome!" mail:setResources(2000, 100, 10, 0, 0, 0, 0) mail.text = "Welcome to the Free Realms! Here's a starting package to boostrap your exploration. This is a dangerous galaxy, don't go alone! Don't forget to check out https://avorion.mutant.enterprises/ for maps and more!" player:addMail(mail) end function onFactionCreated(index) end function onPlayerLogIn(playerIndex) local player = Player(playerIndex) Server():broadcastChatMessage("Server", 0, "Player %s joined the galaxy"%_t, player.name) Server():broadcastChatMessage("Server", 0, "Visit https://avorion.mutant.enterprises/ for maps, Discord info and more!") player:addScriptOnce("headhunter.lua") player:addScriptOnce("eventscheduler.lua") player:addScriptOnce("story/spawnswoks.lua") player:addScriptOnce("story/spawnai.lua") player:addScriptOnce("story/spawnguardian.lua") player:addScriptOnce("story/spawnadventurer.lua") matchResources(player) end function onPlayerLogOff(playerIndex) local player = Player(playerIndex) Server():broadcastChatMessage("Server", 0, "Player %s left the galaxy, and will be missed."%_t, player.name) end
  3. Due to popular demand, I've started putting some of my mapping scripts on github. Warning though, there is more to it than simply running a script. You need mysql, gnuplot, cron, and more. AvorionMaps on GitHub Additionally, they are almost guaranteed to increasingly abuse your server over time - you have been warned ;) See them in action here
  4. Howsabout this for the server side? A type of custom user-created shipyard which can read a local folder of XML ship files, and using some magic foo like /price to set the value. Forget about getting the files onto the server and in place, that's the easy part. New ship uploads would probably not be available until nightly/weekly restart.
  5. vi can be Virtually Impossible for many. Here is an option for the vi impaired: # grab the current crontab to a new file crontab -l > ./crontmp # append the new conr rule echo '0 */3 * * * sh /home/gameservers/SteamCMD/avorion/restart.sh' >> ./crontmp # pull the file back into crontab and make it live crontab crontmp verify with: crontab -l or, as an easy one-liner: crontab -l > ./crontmp;echo '0 */3 * * * sh /home/gameservers/SteamCMD/avorion/restart.sh' >> ./crontmp;crontab crontmp YMMV - .MutieG.
  6. never mind, I figured out how to do the equivalent on player join, and via mail when new users are created.
  7. I'd be nice if an admin could drop a text file into place, to be read at server start or periodically, and displayed to users when joining and again at defined intervals. MOTD file would contain simple text like discord info,website, upcoming maintenance events, etc. .MutieG.
  8. would you mind sharing your code? Great question! I had been thinking about that, but the code is kind of a mess at the moment. It didn't start out to be a big project (or a project at all really) - was just me poking to see what I could do. Generating the maps is not cpu or disk friendly, and there has been no shortage of 'bash-foo' involved. Here's the nutshell howto (maybe more of a rant as to the hows and whys): Parse the XML files from the sectors folder, they are the ones ending in 'v' insert to mysql call a script to create a gnuplot script, and the data files, then run that that's just to capture the basic sector info (x,y,factionIndex,crafts,wrecks,asteroids,stations). Hmm, that worked. what to do next? A political/faction map! To get the faction names I had to parse the binary sector files (the ones without the 'v'), but since I want to be able to use specific gnuplot point types for specific types of factions, I had to find those... more parsing through binaries then some eyeballing to identify the types (24 of em so far). Put em in another table. Now, create another script to make another gnuplot script and data files (one data file per faction) each faction gets it's own data file, and when you run the gnuplot script all the data points are layered on top of the galaxy map each with a uniq (currently random) point type and color. Point size is determined by SUM(crafts + wrecks + stations) Hmm... that worked too. I wonder.... Parse it all again a different way to get the resources for the resource maps (108 uniq resource maps so far) and store that data in another mysql table. With that in hand, instead of stacking the gnuplot, I do a for-each on the resource recordset and create unique gnuplot script / data file pairs for each resource, and run those. End result is about 110 images of 3600x3600 pixels, at about 1mb each, via cron jobs running about every 20 min. Also, remember that the galaxies are 1000x1000 sectors, so 1,000,000 sectors (max) and each sectors file is scanned everytime the database is updated. In the meantime though, while I'm cleaning the scripts and prepping them for github, they are a nifty and unique attraction for my server ;) In a perfectly funded world, I'd run the maps jobs, mysql, etc each on a dedicated instances. .MutieG. http://avorion.mutant.enterprises
  9. My mapgen scripts were pretty rough and eating more cycles than I expected, so I had to make some server upgrades this evening. Game host (not the website) changed to freerealms.mutant.enterprises
  10. Upgrades completed. Twice the CPU and RAM, and a change to the host IP. Use the hostname: freerealms.mutant.enterprises and /sethome is in place
  11. I've been watching players come and go for a couple of days and it is clear that the current system will not meet the demand (and the maps). So, I'm going to be performing some server stuff tonight. If all goes well I'll be doubling the server capacity (proc and cpu). I may leave the concurrent players alone and see how that goes. When? About midnight MTN, or close to it. how long? Shouldn't take even an hour, but let's call it that. At some point down the road I may need to spin up an on-demand micro a few times a day for churning the maps.
  12. thats pretty cool :D how do you do that, parse the binary data files directly? Yeah, there is no shortage of parsing going on, but overall not too hard on the instance. Working on consistent legends for the faction types (Democratic, Empire, Guild, Pirates, etc) as well as colors for aggression, and blip scaling for empire size.
  13. Something like I have implemented at the Free Realms Avorion server? On the website I currently have maps for: Explored Sectors (5min updates) Faction Strength (5min updates) Resources!! (15min updates)
  14. Many map, much WOW! 8) I've met some nice people on the server, so I threw together something special - the all new Resource Maps! https://www.mutant.enterprises/display/AFR/MAPs+-+Resources+by+Type Cya 'round the Realms!
  15. Free Realms Dedicated US-east 24/7 PvEvP with Online Maps (non-beta) WebSite: https://avorion.mutant.enterprises/ Game Host: freerealms.mutant.enterprises Available to all players: /sethome /price /selfinfo /invite /join /leave /leader and over 100 Hi-Res Online Maps (2500px x 2500px): Political - https://www.mutant.enterprises/display/AFR/MAP+-+Political+Data Explored - https://www.mutant.enterprises/display/AFR/MAP+-+Explored+Sectors Resource - https://www.mutant.enterprises/display/AFR/MAPs+-+Resources+by+Type In-Game chat is visible on the website. Discord: https://discord.gg/y4jfUmd ... more details ...
  16. Free Realms Dedicated US-east 24/7 PvEvP (non-beta) Game Host: freerealms.mutant.enterprises Website: https://avorion.mutant.enterprises/ Hi-Res Online Maps (2500px x 2500px): Factions - https://avorion.mutant.enterprises/images/FreeRealms-th_Factions.png Explored - https://avorion.mutant.enterprises/images/FreeRealms-th_explored.png Discord: https://discord.gg/y4jfUmd Random start sector. No handouts. Fairly Vanilla server with the following config tweaks: maxPlayers=14 // might bump this up a bit depending on server behavior Difficulity=1 // min -3, default 0, max 3 sameStartSector=false // random start location InfiniteResources=false // not running in creative, work for it
×
×
  • Create New...