Good afternoon folks!
So. the /sql_query command is HUGE, but you're not going to realize this till you know how to use SQL queries and also know what data is actually inside of the world file and also how FAST these queries are.
So, to help the public out a bit, I wrote some how-to guides and detailed out the entire world file for you (well, a good part of it). So far I've been using my reference guide to do custom /sql_query commands to the server I admin for and..
1. Generate lists of ships and their locations which were created by or modified by a specific player or by a specific faction.
2. Track fleets movements and see who owns what fleet ships.
3. I built a script that easily grabs spacial coordinates for all the ships in a sector without having to send individual queries per ship, so it is lightning fast.
In the future, I will be building sets of scripts that gather information that was not possible previously or to perform queries that used to be too slow to be practical. For example, a new command may tell you if the ship a player is in is currently docked to another entity and if so, what the UID is. Another command will tell you ALL of the statuses of a sector, such as noindications, noexit, noenter, and nofploss. Right now admin commands can only reveal protect and peace, since these are the only two displayed in the /sector_info command.
To give an example of speed, I created a script that was as optimized as possible to detect the star in a system. This would take 0.5 seconds for centered stars. Typically around 8-12 seconds for double_star systems, and 30-36 seconds for void sectors. With a SQL query command, however, it ALWAYS takes less than 0.5 seconds. This is useful for an event engine I'll be creating which will have events happen near players randomly, but only in sectors that are far enough from a star to be safe for the player to travel to.
So here's a link to the google doc.
StarMade HSQL DATABASE DOCUMENTATION PROJECT
And here are some screenies:
So. the /sql_query command is HUGE, but you're not going to realize this till you know how to use SQL queries and also know what data is actually inside of the world file and also how FAST these queries are.
So, to help the public out a bit, I wrote some how-to guides and detailed out the entire world file for you (well, a good part of it). So far I've been using my reference guide to do custom /sql_query commands to the server I admin for and..
1. Generate lists of ships and their locations which were created by or modified by a specific player or by a specific faction.
2. Track fleets movements and see who owns what fleet ships.
3. I built a script that easily grabs spacial coordinates for all the ships in a sector without having to send individual queries per ship, so it is lightning fast.
In the future, I will be building sets of scripts that gather information that was not possible previously or to perform queries that used to be too slow to be practical. For example, a new command may tell you if the ship a player is in is currently docked to another entity and if so, what the UID is. Another command will tell you ALL of the statuses of a sector, such as noindications, noexit, noenter, and nofploss. Right now admin commands can only reveal protect and peace, since these are the only two displayed in the /sector_info command.
To give an example of speed, I created a script that was as optimized as possible to detect the star in a system. This would take 0.5 seconds for centered stars. Typically around 8-12 seconds for double_star systems, and 30-36 seconds for void sectors. With a SQL query command, however, it ALWAYS takes less than 0.5 seconds. This is useful for an event engine I'll be creating which will have events happen near players randomly, but only in sectors that are far enough from a star to be safe for the player to travel to.
So here's a link to the google doc.
StarMade HSQL DATABASE DOCUMENTATION PROJECT
And here are some screenies:
Attachments
-
8.8 KB Views: 4
Last edited: