Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Extensions » Fixing Stars!
Fixing Stars! Sun, 24 November 2019 02:21 Go to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
As I gain proficiency in manipulating Stars! files, it occurs to me it shouldn't be all that hard to fix some of the common concerns in .x files.

Any suggestions or tips as to what to fix? It occurs to me the colonizer still colonizing without a colonization module on it would likely be fairly easy to fix (famous last words) but looking at new ship designs in the .x file and resetting the "able to colonize" bit if the ship design doesn't actually have a colonization module on it.

The minefield dodge of looking to see if a waypoint is along the y (or in the case of speedbump x) axis (tho that sounds problematic, as you'd effectively have to outlaw moving in a straight line).

Things like that. Anyway, if anyone has pointers on what might be fixed along those conceptual lines. Bugs, tools, code, etc. The more specific the better.

Ideally a tool that scans .x files and just warns people there's a problem with the turn so they can't submit it to a hosting environment. Or something that actually flips the bits (as once you know what they are, changing them is relatively easy). The closer information is to "In this block, this thing can be broken, and it's byte [x]" of course Smile

Rick



https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Sun, 24 November 2019 23:50 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
Adding to the list (from StarsSupremacytool) : Currently checks for 22 or more superlatinum in a slot, prevents use of the 10th space dock for all races and prevents editing starbase design if there are partially completed ones in planet queue.

if (this.Races[num2].ShipDesigns[index] != null)
{
Design design = this.Races[num2].ShipDesigns[index];
foreach (DesignSlot slot in design.Slots)
{
if ((slot != null) && (((slot.CategoryID == Cool & (slot.ItemID == 11)) & (slot.Count >= 0x16)))
{
str = str + "You are not allowed to have 22 Superlatinum in one slot on the " + design.Name + " design\r\n";
}
}
}
index++;
}
while (index <= 15);
index = 0;
do
{
if (this.Races[num2].StarbaseDesigns[index] != null)
{
Design design2 = this.Races[num2].StarbaseDesigns[index];
foreach (DesignSlot slot2 in design2.Slots)
{
if ((slot2 != null) && (((slot2.CategoryID == Cool & (slot2.ItemID == 11)) & (slot2.Count >= 0x16)))
{
str = str + "You are not allowed to have 22 Superlatinum in one slot on the " + design2.Name + " design\r\n";
}
}
}

if (!this.Settings.AllowTenthStarbaseSlotToBeUsed[num2] && (this.Races[num2].StarbaseDesigns[9] != null))
{
str = str + "You are not allowed to use the 10th Starbase design slot\r\n";
}


if (!this.Settings.AllowDesignChangesToPartiallyCompletedItems[ num2])
{
int num6 = this.PlanetCount - 1;
for (int i = 0; i <= num6; i++)
{
Planet planet = this.Planets[i];
if (planet.ProductionQueue != null)
{
foreach (QueueItem item in planet.ProductionQueue)
{
if (((item.Completion > 0) && ((item.ItemID >= 0x20) & (item.ItemID <= 0x29))) && ((this.Races[num2].StarbaseDesigns[item.ItemID - 0x20] != null) && this.Races[num2].StarbaseDesigns[item.ItemID - 0x20].Dirty))
{
str = str + "You are not allowed to edit the starbase designs " + this.Races[num2].StarbaseDesigns[item.ItemID - 0x20].Name + " because one is already partially completed at Planet No " + Conversions.ToString((int) (i + 1)) + "\r\n";
}
}
}
}
}



https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Wed, 27 November 2019 00:23 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
OK, I can now correct for the Colonizer bug (if a ship is submitted with it, reset the values so it's back to a normal empty slot).

I can also at least warn/prevent someone from:
-submitting a turn causing the Space Dock Armor slot Buffer Overflow
-designing a 10th Starbase prompting the crash for 10 Starbases.


I'll get around to integrating into my hosting program eventually. If anyone wants a scrip that will detect all of these and report (useful if you've automated turn gen) let me know.




https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Thu, 28 November 2019 17:21 Go to previous messageGo to next message
Ron is currently offline Ron

 
Commander
Forum Administrator
Stars! AutoHost Administrator

Messages: 1231
Registered: October 2002
Location: Collegedale, TN
ricks03 wrote on Wed, 27 November 2019 00:23
OK, I can now correct for the Colonizer bug (if a ship is submitted with it, reset the values so it's back to a normal empty slot).

I can also at least warn/prevent someone from:
-submitting a turn causing the Space Dock Armor slot Buffer Overflow
-designing a 10th Starbase prompting the crash for 10 Starbases.


I'll get around to integrating into my hosting program eventually. If anyone wants a scrip that will detect all of these and report (useful if you've automated turn gen) let me know.


Yes, email it please.



Ron Miller
Stars! AutoHost

Report message to a moderator

Re: Fixing Stars! Sun, 15 December 2019 19:00 Go to previous messageGo to next message
mrvan is currently offline mrvan

 
Officer Cadet 1st Year

Messages: 220
Registered: May 2014
Would this also allow you/us to make changes to the files to do some rebalancing?

I could imagine e.g. preventing AR space deaths; replacing CA instaforming by cheap terraforming; removing the mineral 'tax' on packets; etc.

Report message to a moderator

Re: Fixing Stars! Sun, 15 December 2019 19:48 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
I can (with high degrees of effort if the bits aren't already known) modify .x files (the data going in) and .m files (the data coming out). I can't modify at all what's happening at actual generation.

So one could look at the data that went in, and the data that came out, and then modify it appropriately depending on the particular data. That would require knowing likely the .m and .x file from the turn pre-generation, and the .m file post generation, and then changing it. So you could look at the cargo of an AR race before the turn is generated, and then after the turn was generated, set it back. Fiddly, but doable.

I just want to control for cheats and bugs. Modifying the core game is not a task I'm interested in; I like the game as it is! The only thing I do when I play/host adjust the number of points for race submission.




https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Wed, 18 December 2019 20:15 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
From the Known Bugs (JRC3) - Player Exploitable Bugs / Features list, I'd try to detect and/or nerf Split Fleet Dodge, dodgy Mineral Upload, AR Starter Colony 'block', Prod Qs blocked due to lack of minerals, 'fleet targeting fleet' bugs, AR Mineral Fountain, SpaceDock 'infinite' refueling, CA hab Intel on non-Allies, the 512 fleet limit eating newly produced ships... Confused

Also, maybe lay the groundwork for external micromanagement/automation tools, which would need to insert/tweak lots of orders in the x file, and extract lots of actionable data from the m file. Rolling Eyes

Also 'shared' Intel tools, so a player can 'export' planet or fleet data, and give/sell it to others. Teleport


[Updated on: Wed, 18 December 2019 20:36]




So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Fixing Stars! Wed, 18 December 2019 20:34 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC


I do appreciate your enthusiasm. In the context that all of my work is focused on extending Totalhost:
-I don't consider split fleet/dodge a bug given the changes to the Patrol order in jrc4 (How you'd even fix that in .x files I have no idea).
-I plan on filtering for the "Stealth pick up pop", correcting much like the ability to colonize with colonizers with no colonization module that I can already fix.
-I plan on figuring out how to clear the queue for AR starter colonizers, but I don't know if it's possible from a .x file.
-I have no idea how to fix a queue blocked due to lack of minerals (and I don't consider it a bug - manage your queue).
-I believe I've already fixed for CA player info.
-I don't know how I'd calculate (or fix) for the 512 fleet limit. In a hosting context I could possibly review submitted files and figure out how many fleets there would be, and warn people. . . but I've already made a stab at fleet info, but I'm hindered by the block not being translated enough. That's probably more complicated than I care to bite off. Someone who helped out with that would make that process faster. . .
-For that matter, my code is on Github, so if you want a tool, either submitted code to me, or modifying the TH code and submitting it would also speed things up. TH includes a tool that will let you display the decrypted data for a block type. Patiently making changes to a file and noting the changes can lead to determining heretofor unknown block information.

For several things I plan on displaying notes/warnings on submitted turns, instead of making actual changes.


The groundwork for writing external management tools is the library/API raptor is building. Much of my work is leveraging that Java API into perl tools (just the tools that I want). Smile and I want to fix/detect/clear bugs, not change the game.






https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Thu, 19 December 2019 18:51 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
I'm thinking not only of stomping bugs, but also about enforcing special rules (such as IT allows Allies to refuel, but Gating is reserved for Friends...), and helping craft tools that simplify the management of empires with more than a few planets. Twisted Evil

For instance: changing Production Queues for planets that meet certain conditions. Sending fleets of interest to some particular rendez-vous. Check for simple yet dangerous mistakes. Automation. Cool



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Fixing Stars! Thu, 19 December 2019 22:53 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
I appreciate your enthusiasm.

I'll admit I'd love to see a filter that let you share fuel (backend) but not gating (front end). I look forward to your code contribution Smile




https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Fri, 20 December 2019 19:37 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Alas, no code yet. Rolling Eyes

I guess there's 2 ways to split Fueling from Gating:

1) Allow Fueling of Neutrals, by tweaking the m file. Teleport

2) Disallow Gating orders in the x file for Friends not on a special Permissions list. Such a list could be generated/maintained by sending coded/formatted messages to self, and include things such as minefields, exclusion zones, off-limits Gates, etc, etc. Twisted Evil



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Fixing Stars! Sat, 21 December 2019 02:46 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
I'd be more likely to rig it that if a move order was "Use Stargate" for an ally, delete it. (removing all ability to gate at an allies planet), and then make it a hosted game option.

tho the second is clever, and more interesting, if more complicated.



https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Sat, 21 December 2019 06:05 Go to previous messageGo to next message
mrvan is currently offline mrvan

 
Officer Cadet 1st Year

Messages: 220
Registered: May 2014
Is it also possible to create/alter .x files to automate more?

For example, I could imagine writing little scripts to automate mineral balancing, mass rerouting, setting gate+merge orders on slightly overweight ships, etc.

Report message to a moderator

Re: Fixing Stars! Sat, 21 December 2019 14:17 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
The only thing that's a factor is whether a block is completely mapped.

I have tools up on TotalHost that will let you view (and change) the output of a block. The API from Raptor has the block information that has been mapped so far (sort of).

So you can make a single change, submit a tun, and look at the output of a .x file. From there it's (painfully) possible to map blocks. It's made harder by the intense compression of stars. Even things like text use a clever algorithm to try to save space. Some blocks have two formats (long and short) depending on what data is stored within them. Often pieces of a byte are more than one tidbit of information, so you have to break it out in binary.


So it's "easy" to read and change values in a .x file to what you want, once they're mapped. Sky's the limit if the block is mapped.


[Updated on: Sat, 21 December 2019 14:47]




https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Mon, 23 December 2019 23:36 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
There are tools in the Totalhost suite to just list the block values for those patient enough to untangle them.


https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Wed, 22 April 2020 02:42 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
I've added the ability to "fix" the SpaceDock Overflow bug.

Given that the Armor total is stored in the Design Change Block, I'd hoped I could fix it by overwriting the Armor value with a recalculated value (also taking into account the potential for Croby and Langston). But when I replace the armor value in the .x file, the .HST recalculates it. Even closing and reopening the front end recalculates it.

So instead if you try to put 22+ Superlatanium on a spacedock when you have RS, I reset the number back to 21 and recalculate the armor value.

That puts me at a fix for the Colonization component bug, and a fix for Overflow. I can detect the "1st player with 10 starbases" and warn, but I don't see a good actual fix besides, "don't do that".

Stealth pop and the Minefield bugs both are reportedly fixed in JRC4, so no need to fix for those! (tho I wish I'd figured that out at least slightly earlier, but at least I made progress mapping the waypoint code).

Assuming there's enough data on the production queue block, I'll probably try to fix the AR starter colony bug next. hopefully just a matter of clearing the hidden order from the queue. that's hopefully easier than the next feature I want to try to "create", the ability to block gating to friends, and make it a game setting. (hmm, although if it's a game setting I could just make it a game rule and be done with it.)




https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Thu, 23 April 2020 18:51 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
AR Starter Colony bug not a problem in JRC4:
https://starsautohost.org/sahforum2/index.php?t=msg&goto =63820&rid=1532&srch=AR+Starter+Colony#msg_63820



https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Wed, 29 April 2020 02:59 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
I need more block maps for detecting/fixing more bugs!

Mineral Upload (UNDEFINED: ManualSmallLoadUnloadTaskBlock 1, UNDEFINED:ManualMediumLoadUnloadTaskBlock 2, UNDEFINED: ManualLargeLoadUnloadTaskBlock 25)
Starbase Friendly Fire (UNDEFINED: BattlePlan Block 30)
32k Fleet (UNDEFINED: MoveShipsBlock 23, UNDEFINED: FleetSplitBlock 24, FleetsMergeBlock 37)

(I'll hopefully eventually map them, but that takes time too, and I painfully do NOT grok binary.)



https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Sun, 03 May 2020 23:28 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
I can now detect the Cheap Starbase bug, fix it, and (the hardest part) see if a resubmitted .x file fixes the problem after an alert.

So I can detect, fix, and accept fixes (meaning an update to your .x file can clear the alert without having to delete it) for:
-Cheap Colonizer
-Spacedock SuperLatanium
-10th Starbase Design
-Cheap Starbase (requires .M or .HST file in addition to .X file to fully clear alerts for all cases)

Once I'm done testing I'll build into totalhost, but right now it's just a standalone utility if anyone is interested in it (and helping test it, the test grid has been a lot larger than initially expected). The standalone code is just my testbed before incorporating into totalhost, so it outputs a LOT of data (all player planet queues, ship designs, waypoints, fleets, etc) in addition to the alerts.







https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Tue, 05 May 2020 23:33 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
BattlePlan block MAPPED.

Add detecting (and fixing, and detecting fixing) for the Friendly Fire exploit!

Now if I can just get the LoadUnload blocks mapped, I can solve for FreePop and Mineral Upload...




https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Tue, 02 June 2020 12:14 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
Player Score block mapped (not that I have a plan for how to use that data).

Hmm, I could display the final score at the end of a game...



https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Wed, 11 November 2020 13:06 Go to previous messageGo to next message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
Can now display a graph of the game score(s) at the end of a game.

https://www.sinister.net/42bcb91f.png


[Updated on: Wed, 11 November 2020 13:10]




https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Re: Fixing Stars! Wed, 18 November 2020 23:53 Go to previous message
ricks03 is currently offline ricks03

 
Officer Cadet 1st Year
Creator of TotalHost and Stars! utilities
Created TotalHost and Stars! utilities

Messages: 222
Registered: January 2012
Location: NC
I have now mapped (well, mostly) Blocks 1/2/25 (Manual load), 3 (Waypoint Delete), 4/5 (waypoint add/change), 10 (Waypoint Repeat), and 19 (Waypoint Task). I've got Waypoint 20 partially mapped, but I don't care about it as much. I need

Those are relevant blocks for anyone interested in writing code to automate turns. . .



https://www.irelandbybicycle.com
http://totalhost.sinister.net:999
https://github.com/ricks03/TotalHost

Report message to a moderator

Previous Topic: Is starstat.exe the same as starstat.c
Next Topic: Modifying the universe
Goto Forum:
  


Current Time: Thu Mar 28 09:12:22 EDT 2024