For a good amount of time now I have worked on creating a plugin that will enhance the space battle experience in the MUD "Legends of the Jedi", and other similiar MUDs a great deal.
In the MUD the space is viewed through simple commands:
"proximity" for checking your distance from other stellar objects,
"proximity velocity" to check the objects' velocity
and "radar" or the more elaborate "fleetradar" for their x y z coordinates.
A sample of fleetradar output:
In the script, the above is captured and turned into a visual representation: http://i.imgur.com/280X9.png
(If you have ever played Elite the image needs no explaining)
So far I've managed to automate listing new shiptypes (i.e Victory-Class Star Destroyer, Mark I Bulk Freighter and such) as the script comes across with them. It is also possible to change the color each shiptype is drawn in.
The table looks like this:
Before I can move to other features of the script I will have to make the script capture the stellar objects into tables in a table that'd look something like this:
Despite studying the Tables guide, I haven't manged to figure out how to manage, delete, get and add entries in that table of tables.
Help?
In the MUD the space is viewed through simple commands:
"proximity" for checking your distance from other stellar objects,
"proximity velocity" to check the objects' velocity
and "radar" or the more elaborate "fleetradar" for their x y z coordinates.
A sample of fleetradar output:
L[None ]:P[Central ] Venator-Class Star Destroyer 'Resolute' 0 0 0
L[None ]:P[Outer ] G-Type Light Shuttle 'MatteBlackTaxi13' 0 0 0
L[None ]:P[Outer ] A Pirated Scurrg H-6 Bomber 'Krakana' -1182 -1754 -446
L[None ]:P[Outer ] Mark I Bulk Freighter 'Imperceptus' -231 -231 231
L[None ]:P[Central ] Victory-Class Star Destroyer 'Exitus' 0 0 0
L[Victory-Class Star Destroyer 'Exitus']:P[Midguard] Victory-Class Star Destroyer 'Jomi' 0 0 0
In the script, the above is captured and turned into a visual representation: http://i.imgur.com/280X9.png
(If you have ever played Elite the image needs no explaining)
So far I've managed to automate listing new shiptypes (i.e Victory-Class Star Destroyer, Mark I Bulk Freighter and such) as the script comes across with them. It is also possible to change the color each shiptype is drawn in.
The table looks like this:
require "tprint"
tprint (shiptypes)
-->
"Venator-Class_Star_Destroyer"=16711680
"Victory-Class_Star_Destroyer"=16711680
"G-Type_Light_Shuttle"=16711680
Before I can move to other features of the script I will have to make the script capture the stellar objects into tables in a table that'd look something like this:
stellarobjects = {
1 = { "name"="resolute", "type"="Venator-Class Star Destroyer", ""leader"="None", "position"="Central", "x"="0", "y"="0", "z"="0"},
2 = { "name"="krakana", "type"="A pirated scurrg h-6 bomber", ""leader"="None", "position"="outer", "x"="-1182", "y"="-1754", "z"="-446"}
}
Despite studying the Tables guide, I haven't manged to figure out how to manage, delete, get and add entries in that table of tables.
Help?