Hex editor for more output

Creating and editing buildings and Commodities.
Tycoon+1
Hobo
Posts: 11
Joined: Sun Jan 15, 2023 8:11 pm

Hex editor for more output Unread post

I did this a long time ago but now I've forgotten it. I used a Hex editor to increase the annual production of some buildings for example an oil well. I don't remember which file I edited and the name of the hex editor.

Can someone provide a working link to an editor and instructions on what to edit?
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Hex editor for more output Unread post

Just be careful with increasing outputs because it can unbalance the game. From your questions in another thread I get the impression you would be better concentrating on figuring out tactics and strategy first. ;)

I use HexEditorNeo: https://www.hhdsoftware.com/free-hex-editor
There's a free version available, and it's pretty decent (I should get around to getting another "Standard" paid license at some point, because it is quite cheap and its functionality is brilliant).

Some people use HxD: https://mh-nexus.de/en/hxd/

And I just noticed this one, which looks promising: https://imhex.werwolv.net/
I haven't tried it yet, but it's worth looking into. I'll give it a run at some point.
Tycoon+1
Hobo
Posts: 11
Joined: Sun Jan 15, 2023 8:11 pm

Re: Hex editor for more output Unread post

Ok, thank you. Which file do I edit?
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Hex editor for more output Unread post

TBH I can't remember at the moment. It's either the .bca or the .bty, but RoR will know. :)
User avatar
RulerofRails
CEO
Posts: 2061
Joined: Sun Dec 08, 2013 1:26 am

Re: Hex editor for more output Unread post

Actually you can modify overall production rate in the bty file but it doesn't display accurately in the UI. The proper way is using the bca file.

Code: Select all

BCA file specs
===================
HEADER  (55)
PRODUCTION ENTRIES (x*188)
FOOTER (169)


HEADER  (55)
--------------
000	:     4	:   int	: bcaStart : F203 = 1010
004	:    30	:  char	: filename
034	:     4	:   int	: base price
038	:     2	: short	: start year
040	:     2	: bytes	: q0 = CCCC = {-52 -52}
042	:     4	: float	: cargo loads transformation / year  (demand only or supply only don't count here)
046	:     4	: bytes	: q1 = CCCC CCCC = {-52 -52 -52 -52}
050	:     1	:  byte	: building group
051	:     4 :   int	: number of supply/demand/production entries (eg: 0 for ports/warehouses, 16 for houses, 4 for tool&die)
055

PRODUCTION  (188)
---------------
000	:     4	:   int	: 1 (demand only) or 0 (rest)
004	:     4	: float	: output qty. (if output only, this is loads/year ; if input=>output, this is relative output)
008	:    24	:string	: output cargo name or "{demand only}"
032	:     2 :   int	: start date
034	:     2	:   int	: stop date
036	:     4 :   int	: q0 = 0
040	:     4 :   int	: q1 = 0     (02 = hide chain) <---------------UPDATE
044	:     4 :   int	: number of input cargo's needed (0-5)
048	:    24	:string	: input cargo 1 name
072	:     4	: float	: input cargo 1 qty. (rel or loads/year)
076	:    24	:string	: input cargo 2 name
100	:     4 : float	: input cargo 2 qty. (rel or loads/year)
104	:    24	:string	: input cargo 3 name
128	:     4 : float	: input cargo 3 qty. (rel or loads/year)
132	:    24	:string	: input cargo 4 name
156	:     4 : float	: input cargo 4 qty. (rel or loads/year)
160	:    24	:string	: input cargo 5 name
184	:     4 : float	: input cargo 5 qty. (rel or loads/year)
188
......

The values we need to change are different depending if it's a resource producer or a conversion industry.
You mentioned changing the Oil Well. The value you need to change is the second item in the production entry. The easiest way to find this is to note that that the 3rd item is the output cargo name. We know that this is Oil, so we look for this in the file. Then look at the 4 bytes just before it.

Using the last one Gumboots linked to: https://imhex.werwolv.net/ (default settings).

edit production in bca.jpg

The orange arrow is showing the byte we want to click on (4th one before "Oil").

Then you want double-click the value that is circled in yellow. This is an understandable number that you can edit as you desire. Pressing Enter will update the file. (Remember to save the file).

If you want to edit a conversion industry, that's in the header of the file. You should go to 42nd byte, the hex editor uses hexadecimal, so that value will be at hexadecimal address 2A. You should be able to tell if you have the right value. Edit it in the same way.
Tycoon+1
Hobo
Posts: 11
Joined: Sun Jan 15, 2023 8:11 pm

Re: Hex editor for more output Unread post

Thanks RoR!
Post Reply