Home » Stars! Clones, Extensions, Modding » Stars! Extensions » Planet mover (remapping tool)
Planet mover (remapping tool) |
Wed, 24 July 2013 15:55  |
|
XyliGUN |  | | Messages: 325
Registered: July 2004 Location: Russia, St.Petersburg | 
|
|
There are a bunch of games, which are played with remapped universe. But if you try to setup such a game, you will most likely have a difficulties, since Stars! itself does not allow stars moving, and can only place them in random location. Due to limitations, which currently available 3rd party tools has it could be a real pain and time consuming task to setup such a game. Even more the most popular tools allow you to move stars up and down and sometimes move them a bit left or a bit right, and once you need to significally move a HV, then you are in a real trouble. And if you need to have lets say 8 players start locations in the specific areas or place (see for example game like this) then you have to create a lot of test games until one will be more or less like one you need, then do some magic with moving stars up and down. And even when you pass thru all of these steps and found a good seed, move planets to more or less good location, you will then have some (pretty minor, but still) issues with your fleets initial location, their waypoints and with initial in game events pointers.
OK, one with the knowledge of the Stars! file structure can workaround all of these limitations, but even with these knowledge you have to manually edit about 20 blocks in each player m file, then edit about 20 blocks for each player in hst file, then make changes in xy file as well. I was doing such setup for Wheel of life IV and believe me that a lot of manual work. I was trying some available scripting alternatives, but they hardly can do what you really need to do.
At a time when Wheel of Life V was being created I finally come up with a tool (StarsPlanetMover), which just takes planet ID, target planet X and Y coordinates (which are not limited by height or width, other then size of universe of cause) and... moves it with all its' content to the new location, then updates all references to that planet (like orbiting fleets, waypoints, in game events). The game was remapped successfully and as far as I know it was played without any issues up to the end. Now I think its' time to publish this tool, may be within a week (just need to make some minor polishing like command line validation etc.), since it will make setup of such games much much easier. And this may open a lot of possibility to setup remapped games.
Some technical details: yes, tool works thru encryption (no passwords required either players or host, but SAH games have no host password anyway), and updates xy, m, hst files. As to security concern as I've already mentioned, while decompilation of such a tool is possible, but a smart beginner level developer can get decryption code from this forum much much easier within a minute or so (I can't give you more details, but Ron know what I'm talking about).
Comments, ideas, objections are welcome!
PS: If you need to remap some game right now, let me know.
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
Robert A. Heinlein, Time Enough For LoveReport message to a moderator
|
|
| | | |
Re: Planet mover (remapping tool) |
Sat, 27 July 2013 05:23   |
|
m.a@stars |  | Commander | Messages: 2765
Registered: October 2004 Location: Third star to the left | |
|
XyliGUN wrote on Wed, 24 July 2013 21:55OK, one with the knowledge of the Stars! file structure can workaround all of these limitations, but even with these knowledge you have to manually edit about 20 blocks in each player m file, then edit about 20 blocks for each player in hst file, then make changes in xy file as well. I was doing such setup for Wheel of life IV and believe me that a lot of manual work. I was trying some available scripting alternatives, but they hardly can do what you really need to do.
At a time when Wheel of Life V was being created I finally come up with a tool (StarsPlanetMover), which just takes planet ID, target planet X and Y coordinates (which are not limited by height or width, other then size of universe of cause) and... moves it with all its' content to the new location, then updates all references to that planet (like orbiting fleets, waypoints, in game events). The game was remapped successfully and as far as I know it was played without any issues up to the end. Now I think its' time to publish this tool, may be within a week (just need to make some minor polishing like command line validation etc.), since it will make setup of such games much much easier. And this may open a lot of possibility to setup remapped games.
Some technical details: yes, tool works thru encryption (no passwords required either players or host, but SAH games have no host password anyway), and updates xy, m, hst files. As to security concern as I've already mentioned, while decompilation of such a tool is possible, but a smart beginner level developer can get decryption code from this forum much much easier within a minute or so (I can't give you more details, but Ron know what I'm talking about).
You could publish the source-code to all but the encryption-related stuff, or at least the "knowledge of the Stars! file structure" you used to build the tool itself. 
There's a thread out there where such advanced and useful knowledge of all file structures could (and should) be posted. 
So many Stars, so few Missiles!
In space no one can hear you scheme!  Report message to a moderator
|
|
| |
Re: Planet mover (remapping tool) |
Mon, 29 July 2013 23:57   |
|
neilhoward |   | Commander | Messages: 1112
Registered: April 2008 Location: SW3 & 10023 | |
|
This sounds Awesome.
[Updated on: Mon, 29 July 2013 23:57] Report message to a moderator
|
|
| |
Re: Planet mover (remapping tool) |
Tue, 30 July 2013 13:10   |
|
XyliGUN |  | | Messages: 325
Registered: July 2004 Location: Russia, St.Petersburg | 
|
|
OK, here is a promised tool.
How to:
- first you have to create a game using Stars! with required universe size, planets density and all other settings as usual
- then once you have xy, hst & m files (they all should be located in one folder) you can start moving planets
- open a turn as usual, select a planet you would like to move and note a planet ID as it shown below the map (like "ID #67")
- note a map coordinates you would like to move this planet to (like "X: 1052, Y: 1057") and ensure there is no another planet at the same location
- type StarsHostTool <YourPathGoesHere>\<YourGameNameGoesHere>.xy /move 67 1052 1057
- tool will then update your xy, hst & m files to move specified planet to the new location.
Remarks:
After the move planet name and all of its' content should be the same, but planet ID will be different.
So, if you like to move the same planet again you will need to obtain its' new ID.
This tool was designed to be used in 2400, but should also work in any year.
It was not extensively tested, so please consider backing up your files before move.
Please let me know of any issues you found.
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
Robert A. Heinlein, Time Enough For LoveReport message to a moderator
|
|
| | | | | |
Re: Planet mover (remapping tool) |
Wed, 31 July 2013 10:08   |
|
Ron |  | Commander Forum Administrator Stars! AutoHost Administrator | Messages: 1231
Registered: October 2002 Location: Collegedale, TN | |
|
XyliGUN wrote on Tue, 30 July 2013 13:10OK, here is a promised tool.
How to:
- first you have to create a game using Stars! with required universe size, planets density and all other settings as usual
- then once you have xy, hst & m files (they all should be located in one folder) you can start moving planets
- open a turn as usual, select a planet you would like to move and note a planet ID as it shown below the map (like "ID #67")
- note a map coordinates you would like to move this planet to (like "X: 1052, Y: 1057") and ensure there is no another planet at the same location
- type StarsHostTool <YourPathGoesHere>\<YourGameNameGoesHere>.xy /move 67 1052 1057
- tool will then update your xy, hst & m files to move specified planet to the new location.
Remarks:
After the move planet name and all of its' content should be the same, but planet ID will be different.
So, if you like to move the same planet again you will need to obtain its' new ID.
This tool was designed to be used in 2400, but should also work in any year.
It was not extensively tested, so please consider backing up your files before move.
Please let me know of any issues you found.
Please add a switch that would output a simple parsable list of all planet names and IDs and their current coordinates in a game. I could use that to add Planet Move capability to Host Utility on Stars! AutoHost.
Ron Miller
Stars! AutoHostReport message to a moderator
|
|
| | |
Re: Planet mover (remapping tool) |
Wed, 31 July 2013 12:15   |
|
XyliGUN |  | | Messages: 325
Registered: July 2004 Location: Russia, St.Petersburg | 
|
|
LittleEddie wrote on Wed, 31 July 2013 19:35Well, this will make it much easier to set up a game,
Now if you can just add a switch to output each planet with it's value after being terraformed using Terraform +-11 for each player, like
Name P1 P2 etc....
LGM 2 100 -15
Excel 30 60
If we're going to make it easy, let's make it easy...
Are you talking about server side tool (i.e. to be able to export data of all of the planets and to be used by host), or client side (to be able to export only planets already penscanned by player)? Any hint on its' usage?
Btw, I was under impression that Stars can export the same data?
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
Robert A. Heinlein, Time Enough For LoveReport message to a moderator
|
|
| | | |
Re: Planet mover (remapping tool) |
Wed, 31 July 2013 22:51   |
|
Ron |  | Commander Forum Administrator Stars! AutoHost Administrator | Messages: 1231
Registered: October 2002 Location: Collegedale, TN | |
|
XyliGUN wrote on Wed, 31 July 2013 10:35Ron wrote on Wed, 31 July 2013 18:08Please add a switch that would output a simple parsable list of all planet names and IDs and their current coordinates in a game. I could use that to add Planet Move capability to Host Utility on Stars! AutoHost.
Hmmm. No problem I'll do, but do you think it would be useful for the game host to move planets after initial setup was done and game uploaded to the SAH?
Good point, probably not. But eventually, I'd like a way for hosts to use a web interface to upload .r files, set game conditions, and create the game directly on SAH. Then the ability for the game host to see the galaxy map and where homeworlds are, and move planets around would be nice.
Ron Miller
Stars! AutoHostReport message to a moderator
|
|
| | |
Re: Planet mover (remapping tool) |
Thu, 01 August 2013 10:25   |
|
m.a@stars |  | Commander | Messages: 2765
Registered: October 2004 Location: Third star to the left | |
|
Ron wrote on Thu, 01 August 2013 04:51I'd like a way for hosts to use a web interface to upload .r files, set game conditions, and create the game directly on SAH. Then the ability for the game host to see the galaxy map and where homeworlds are, and move planets around would be nice.
Graphical map display inside a browser isn't hard. My own tools already do it, and there's ways to include "picking" and "dragging" of things. I guess the end result would be a "script" file for the PlanetMover to execute. 
Another of my tools is the "Terraforming Report", so useful for Teams and Alliances, which should probably use a GUI too, and only needs "current" hab values to work. This tool could effectively perform a "whole universe pre-scan" for all races, provided it got a listing of "initial" planet values to digest.
So many Stars, so few Missiles!
In space no one can hear you scheme!  Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed Mar 22 08:09:42 EDT 2023
|