Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » The Bar » Possible new utility for creating testbeds
Re: Possible new utility for creating testbeds Mon, 23 February 2009 16:01 Go to previous messageGo to previous message
PaulCr

 
Chief Warrant Officer 3
Stars! V.I.P

Messages: 187
Registered: February 2007
Location: An Island that kinda look...
m.a@stars wrote on Mon, 23 February 2009 20:05

PaulCr wrote on Mon, 23 February 2009 18:56

If you run it against your .h and .m file the resulting files would probably make a better transfer format then the existing planet & fleet files since they can load them into stars and see everything, if people are interested I could write something to merge multiple players h and m files together, along with the app to strip info out it should make information sharing between allies a lot simpler.

But plaintext reports are easier to generate and edit, and there's already utilities to merge them. Deal

While you're at it, it would be great if you could bash together some kind of infodumper that outputs as text report the things not normally reported, such as salvage, minefields, packets and design-by-design info on all fleets. Teleport


You'd need a different report for every single object, dumping out a single xml file is a lot easier then creating 45 different text files all formatted differently. The XML dumper is basically just parses the stars structure into it's constituant blocks and then looks up the accompanying StructureXX.xml file and uses the bytes attribute on the 1st level elements to pull the required number of bytes and set the value, if you look at some of the XML files on my server you'll see the bytes attribute can sometimes get a fairly complex expression in it referring to previous element values and running mathematical expressions on them to figure out the byte size for that particular value, the bytes attribute was placed there specifically to be machine understandable for the parser I intended to write and anybody else who might have wanted to use the info, anybody capable of using the files should be able to understand what it means, if I want to add a new block type or update a block type with new info then I just amend the structureXX.xml file for that type and it's automatically applied.

It shouldn't be that difficult to write something to go through the resulting XML file for the info you want and redump it in any format, any language should be able to do it even if it doesn't support XML, even a .vbs file could be written to process it as text. I'll put together a simple script later tonight or tomorrow to pull ship design from the resulting .xml file into a .csv and post it.

m.a@stars wrote on Mon, 23 February 2009 20:05


Quote:

I'm also considering doing the reverse, ie generating stars files from xml although before that is made publicly available I'll have to do some testing to see what happens if you try to do invalid things in an x file, in all probability generating an x file will probably be limited, ie fleet movement shouldn't be a problem so a scouting bot could be written but waypoint orders, design changes or changing the production queue could be and therefore will need some experimentation to see what can be safely added.

That would be soooooo cool! Cool But lots of bad things could happen. Confused

You should probably start with an x-file "sanitizer" that checks all orders against the master hst and reports, fixes or nuls the wrong ones. Whip

And even that could be hard... Boxing

Writing something to do reverse from the XML to a binary stars file would be quite easy, it would however need testing as I mentinoed, ship movements look impossible to exploit so the could be made available almost immediately allowing people to write a scouting bot or to manage multiple year travel to minimise fuel, decrease travel time or to try and get w6 travel in without increasing travel time for those with CE, everything else would need testing before I add it, ie playing with the production queue to set objects in it to 99% complete and see how stars responds to that, changing ship designs when you have ships of that design already built etc.

Writing something to compare an x file against the .hst and checking for things like changing the design when something in that slot is already built or partially built, unloading or loading cargo that doesn't exist etc shouldn't be that difficult, if I write
...

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Revival of an interesting idea?
Next Topic: 0.2% Minimum Damage
Goto Forum:
  


Current Time: Tue May 14 08:52:26 EDT 2024