"missing" industries

Discussion of Pop Top's last release of RRT.
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

It sounds like the easiest way to change the buildings would be to copy the BTY file from the building you want to use, renaming it the same as the one you want to replace and then removing the original? Or is there a reason not to do it that way? Is there a reference between the buildings in game name and the file names in the BTY?

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: "missing" industries Unread post

Look for PJay and Milo's notes on the file formats, found elsewhere on Hawk's site. They describe what's to be found inside a BTY (and any other) file. Speaking purely from memory, as I am at work now, I think that the BTY file itself contains its in-game name, so you have to get in there and hex-edit that, you can't just rename the BTY file. If you want to use existing assets, like say the IronMine_Body.3dp file for a Quarry, there is a place to edit that reference; you can use that 3DP file, but mix-n-match with a different skin if you want a unique look. But all of this is done via hex editing.
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

Thanks WP, I just did an experiment and found out that the BTY references the in game name.You get a "clean" swap of the buildings, but you see the copied BTY buildings' name in the build roster. Does it also dictate the cargo output? It was Iron when I swapped the IronMine BTY for the Quarry, so I am assuming that is the case.

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: "missing" industries Unread post

The BCA file takes care of cargo input ad outputs.

BTY file spec (41827 bytes)
=============================
000 000 : 4 : EC03 0000 : 1004
000 004 : 30 : String : UNIQUE identifier (if not unique, strange things will happen)
000 034 : 30 : String : Building Category (bca-file name)
000 064 : 60 : String : start of 3dp-file name (*.3dp is attached), also used for the picture in the small window.
000 124 : 60 : String : Mipmap name (tga, jpg or dds file name)
000 184 : 3 : ? : ?0 : 060630
000 187 : 4 : int : ?1 : 0 or 500
000 191 : 4 : float : ?2 : 0 (?1=0) or 1.5 (?1=500)
000 195 : 4 : int : architect style
000 199 : 4 : int : ?3 : 0
000 203 : 2 : int : track-section X pos
000 205 : 2 : int : track-section Y pos
000 207 : 36*48*24 = 41472 : occupied data
041 679 : 4 : int : ?4 : 0
041 683 : 4 : int : ?5 : 0 or 1
041 687 : 12*5 : ?6's
041 747 : 30 : string : fertilizer increases this farm's output for...
041 777 : 4 : int : ?7
041 781 : 46 : 00000000000 ....


---------

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
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




FOOTER (169)
--------------
000 (-169) : 4 : int : buildable (? is a fertilizer factory not-buildable ??)
004 (-165) : 4 : int : buyable (? why hotel, post, saloon, restaurant, ... ??)
008 (-161) : 4 : int : upgrade price?
012 (-157) : 4 : float : q2 (0 or 0.5 or 1)
016 (-153) : 4 : int : upgradable ?
020 (-149) : 61 :string : building name
081 (-088) : 1 : byte : on-the-rails type
082 (-087) : 4 : int : q3 (1830)
086 (-083) : 4 : int : q3 (1850)
090 (-079) : 4 : int : q3 (1900)
094 (-075) : 4 : int : q3 (1950)
098 (-071) : 4 : int : q3 (2000)
102 (-067) : 4 : float : passengers : (commercial 0.5, house 1, hotel museum 2, church cinema deptstore 3, stadium 5)
106 (-063) : 4 : float : passengers : (commercial 0.5, house 1, hotel museum 2, church cinema deptstore 3, stadium 5)
110 (-059) : 4 : float : mail : (commercial 2, house 1)
114 (-055) : 4 : float : mail : (commercial 2, house 1)
118 (-051) : 4 : float : troops : (barracks 1)
122 (-047) : 4 : float : troops : (barracks 1)
126 (-043) : 1 : byte : is... ? restaurant(0) hotel(1) saloon(2) post(3) customs(4)
127 (-042) : 1 : byte : isPort?
128 (-041) : 1 : byte : isWarehouse?
129 (-040) : 40 : : zeros
169 (-000)
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

So it looks like the BTY references the BCA , which has the detailed cargo instructions. I wasn't looking forward to trying my hand at hexadec coding but it looks like it is inevitable if I would like to spruce up 1.06. *!*!*! And here I had just gotten proficient at XML unit parameter coding for Blitzkrieg before I got hooked on RT3!

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: "missing" industries Unread post

Like I said, if you tell me the changes you want, I can do the files in a few minutes.
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

Thank you for the offer, I will take you up on that Ned. I know enough right now to swap some files to experiment. I will check out which building I would prefer to replace the warehouse placemarks and make a list by tomorrow. :salute:

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: "missing" industries Unread post

The hex editing is easy - I'm no computer programmer, but I was surprised at how straightforward it was to just change a text reference in a file. Just find where it says "Iron" and type over it to say "Ore" instead, for instance. That part is super-simple. The more difficult hex editing is when you want to change production formulae, or make something available 20 years earlier, that kind of thing. But just referencing an alternate set of assets is easy. Give it a try!
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

I did my first BTY mod experiment with success! I changed the bty of the 1.06 MachineShop from a warehouse to the Weapons Factory skin, keeping the MachineShop.bca. Looks much better than another warehouse on the map! The Machinery cargo/ recipe is still flawed though. The building can be built in 1800, but the required recipe cant be had until 1860. I think changing the recipe from 1oil+1Steel+1Ingots=3Machinery to 1Iron+1Ingots=2Machinery would be the ticket. Machinery is generally made with cast iron rather than steel anyway, and a fair amount of non-ferrous metals go into ways, bearings, and bushings(and later electric motors), so this formula makes sense.There is no use at all for Ingots except for the MachineShop/Machinery recipe on the entire map. Something like a dedicated "Copperworks" or "Brass Foundry" that has a 1 Ingots=1 Goods recipe would be a good addition to utilize this cargo better. Is there a tutorial for changing the bca files?

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
WPandP
Engineer
Posts: 762
Joined: Tue Sep 11, 2007 5:16 pm
Location: Cincinnati, Ohio
Contact:

Re: "missing" industries Unread post

http://wpandp.com/BuildingPlannerMRR.zip

This is an Excel file I created as I was getting into BCA/BTY editing. One worksheet in it is just basically a transcription of what is contained in PJay's notes; as a graphically-oriented architect, I wanted to be able to "see" the guts of a BCA in a more sensible way. I think it's exactly what you're looking for; if not, it will at least answer some questions.
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

Great work, thank you Michael that spreadsheet really helps clarify things. :salute:

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: "missing" industries Unread post

I just looked at the Machine Shop bca and the first two entries start in 1800.

Since I'm not playing 1.06, take my comments for what they are worth. What I am doing is working on the cargo chain for TM, and many of the changes that people are opining about 1.06 are already taken care of in TM. So my caution to you is to think 3 times about every cargo decision you make. I think it sent coruscate batty.

Before changing an industry, you have to keep in mind that users will have to install it on their systems to play it, and it will thus affect every other scenario that they play. So think about the possibility of any effect your changes can have on other games. Adding an industry won't affect other scenarios.

Thus changing the bca for the machine shop is highly discouraged, but adding another facility would be a much better choice. You can copy the files and rename them very easily. Mind you, if you're going to make a new addition, at least make a new skin for it. :) (that way I can scoop it up for TM)

As obiter comments, I think that ingots should have been called alloys, and then used for such things as making goods, and other things possibly.
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

Thats right, machinery starts in 1800, but it cant be made until 1860, because the formula require Oil for some odd reason.Not that machines dont have Oil, but its more like a quart per carload of iron ratio than 1:1, it should maybe demand a small amount of oil, but have the production be 1Iron+1 Ingots = 2 Machinery

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: "missing" industries Unread post

Now I see what you mean. But I would still recommend adding a new industry to fill the gap.
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

Agreed, but I dont want to go into an endless spiral of "modding" My goal is to make what already exists function as it should. If that requires adding something and I am able, perhaps I will

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

I see what your saying about making "new" industries rather than changing the existing ones Ned, that makes sense. If I assemble a 1.06 "BandAid" that just fixes the buildings used for the new 106 industries that are skinned as warehouses, and then ADD a few industries to fill in some gaps this would work with existing scenarios.

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
KevinL
Dispatcher
Posts: 315
Joined: Tue Dec 04, 2007 9:57 pm
Location: Orange County, CA
Contact:

Re: "missing" industries Unread post

I'm definitely on board with any plan to replace the warehouse skins for the new buildings in 1.06 with actual building skins. Please continue guys! !*th_up*!
Computer: 3.2GHz i3, 6.0GB Ram, 1.5TB HD, Win7, RRT3:1.06, SMRR:1.10
Currently playing: RRT3 - Campaign Scenerios
Currently creating: RRT3 - Southwest scenerio
User avatar
Orange46
Dispatcher
Posts: 394
Joined: Sun Nov 12, 2006 12:49 pm
Location: NW of Chicago

Re: "missing" industries Unread post

The machine shop and ingots need to be fixed. In my latest scenario, useless machine shops and gold appeared long before they could be used. The machine shop took up huge valuable real estate in Baltimore and the gold just sat in Pittsburgh. Personnally, I would prefer a new and smaller structure for the machine shop and construction and other warehouse types. Although a machine shop might be large, a construction firm could be just a small office building or a trailer. Construction firms don't do their constructing at the office, and I doubt that they store much there either, as inventory is expensive and these firms usually are short on cash.

As it now exists, the machine shop rarely produces much for me on its own. It is more of a TM type industry that needs lots of human tender loving care.

On a different matter, is it possible to modify or create new service structures? I was thinking that adding water and sand to the maintenance shed would speed service delays and both current facilities are programmed to stop and service passing engines for either 1 (maint) or 2 (water, sand) functions, so why not all 3?
Quality is Job 1.01
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: "missing" industries Unread post

Here's the Bandaid I made for 1.06 that changes out the warehouse skinned structures used for new industries. They are replaced with existing buildings, so any maps you make using this Bandaid will be compatible with all 1.06 users. The download and a better explanation are here:viewtopic.php?f=5&t=1549&start=60

Also, I am nearly done with my King Coal "patch" which fixes the exact items in 1.06 you have listed, and adds a couple of other new industries to fill in the "non use" gaps for some new 1.06 cargoes. King Coal will also be backwards compatible with all existing 1.06 maps, but any map made using King Coal will require King Coal to play it, as it employs new industries. You can check out information on KC on that same thread.

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
User avatar
Orange46
Dispatcher
Posts: 394
Joined: Sun Nov 12, 2006 12:49 pm
Location: NW of Chicago

Re: "missing" industries Unread post

Thanks. I will be looking foward to King Coal.
Quality is Job 1.01
Post Reply