TUTORIAL: Create your own industrie model from a copy !

Discuss maps, trains and other modding topics
gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

TUTORIAL: Create your own industrie model from a copy !

Post by gforce » Mon Feb 26, 2007 4:50 pm

NOT EVEN 10 EASY STEPS TO BE FOLLOWED
The idea:
Create your own in-city industrie based on a copy
fe. you want to use the hospital building as a new industrie (let's say military basis, based on the transcontinental scenario)
- We want to create a whole new building, not overwriting the hospital!
- To keep it simple, the building will behave (grow) as the hospital building, it will use the same model, but we will change the texture(color), so we can see the difference between the military basis and a hospital building(=white) and so we will not change the original building
Follow these steps:
STEP 1 - Get all the files of the hospital building
- You will need to unpack the fpk file wich contain the hospital building
- Use a fpk-unpacker tool (Dragon UnPACKer 5)
- Load the package Industries0.FPK from \Sid Meier's Railroads!\Assets
- Unpack the files starting with the name hospital.* hospital_*.*
to a local dir
STEP 2 - Change the filenames
- Change all the filenames by replacing hospital by "your choice name"
- Be carefull, use a name that has the same length as the one you are replacing
in this case hospital (= 8 characters) SO fe milbasis (= 8 characters)
(this is important)
STEP 3 - Open the NIF-file and change references
- Use a NIF-viewer-editor program, use NIFSKOPE
- Open your nif-file "milbasis.nif"
- You will see the milbasis-model (=hospital model) (without a texture)
- Go to NiTexturingProperty (see screenshot)
- Change the references to the texture, specular etc files to your file-names
this is: milbasis_DIFF.dds, milbasis_NORM, milbasis_SPEC, milbasis_EMSK.dds
- For more information on those files, have a look at the tutorial textures
- Those references are all the references you will need to change in Nifskope
- Save
STEP 4 - Changing the references in the kfm file
- Use a Hexeditor (fe. WinHex)
- Open the milbasis.kfm file
- Change (overwrite) all the occurrences of "hospital" by "milbasis"
- Here's why the 8 character-length of your building name is important, do not press del but replace the characters by milbasis!
- Save
- All references are set!
STEP 5 - Changing the texture (color)
- Use a photo-program that can handle DDS files (use the photoshop dds plug-in)
- Open the milbasis_DIFF.dds file
- Change the color (or do more if you like)
- Save as DXT3 DDS File
STEP 6 - Check your result with nifskope
- Open your milbasis.nif file with nifskope to see the result
- Your model is ready, so let's use it!
STEP 7 - Place all your milbasis*.* files in the My Games\Sid Meier's Railroads!\CustomAssets dir
STEP 8 - Use xml Code so that your building will be used
<RRTIndustry>
<szName>MY_INDUSTRY</szName>
<szModel>milbasis.kfm</szModel>
<szGrowKFM>milbasis_BuildUp.kfm</szGrowKFM>
<fScale>1</fScale>
<bIsCoastal>0</bIsCoastal>
<bIsMountainous>0</bIsMountainous>
<bInCity>1</bInCity>
...
</RRTIndustry>

STEP 9 - Let's check the result in game
- Be sure that you've got already your industrie in a city, or add your industry by using the terrain editor ...
- Start your scenario and have a look
- HAPPY? (if it doesn't work, you probably forgot somewhere to change a reference to your milbasis or a typo, check that first)

- oef!, it works!!! :lol:
i did every step, while writing the tutorial, and yes i even had a typo on a filename :roll:

ps: yes, maybe it's not needed to copy all the files, but in this way you've got a complete building with all the files included
Attachments
unpack the fpk file with dragon (bubble bobble) unpacker
unpack the fpk file with dragon (bubble bobble) unpacker
Dragon Unpacker.jpg (110.92 KiB) Viewed 12213 times
Yes, there it is,<br />and yes the model looks different then in nifskope, this is because the building is small, it will grow later
Yes, there it is,
and yes the model looks different then in nifskope, this is because the building is small, it will grow later
In game result.jpg (42.02 KiB) Viewed 12214 times
hopefully you are better then I in editing the texture
hopefully you are better then I in editing the texture
Photoshop dds.jpg (139.89 KiB) Viewed 12214 times
change the kfm references in winhex editor
change the kfm references in winhex editor
Winhex editor.jpg (292.61 KiB) Viewed 12213 times
nifskope to view and edit
nifskope to view and edit
Nifskope texture references 1.jpg (139.69 KiB) Viewed 12213 times

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Mon Feb 26, 2007 7:22 pm

Looks great! Now, do you or someone else who has done this have a way to place these into an FPK file? ( as in SuperBowlExpress.FPK and SDSmods.FPK)
I'm correct 97% of the time..... who cares about the other 4%....

choobacca
Posts: 190
Joined: Wed Jan 24, 2007 7:46 pm

Post by choobacca » Mon Feb 26, 2007 9:16 pm

snoopy55 wrote:Looks great! Now, do you or someone else who has done this have a way to place these into an FPK file? ( as in SuperBowlExpress.FPK and SDSmods.FPK)
Google search PakBuild.exe. This tool builds FPK files (and unpacks them).

User avatar
atani
Posts: 293
Joined: Tue Dec 19, 2006 5:01 pm
Contact:

Post by atani » Mon Feb 26, 2007 11:54 pm

choobacca wrote: Google search PakBuild.exe. This tool builds FPK files (and unpacks them).
Here is a link to instructions on how to use the PakBuild.exe tool for Civ4, instructions should apply to RR as well.

http://forums.civfanatics.com/showthread.php?p=4592670

Mike

User avatar
karsten
Posts: 643
Joined: Sun Dec 17, 2006 8:49 pm

Post by karsten » Thu Mar 01, 2007 6:52 pm

Hi gforce, for my new scenario I need a hospital looking like an air force base, ie with some steel, glass, etc. and a newspaper building looking like a bank. Would you perhaps have time to help with that?
8)

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Thu Mar 01, 2007 7:15 pm

I'm sorry karsten,
i'm really bad at photoshop or textures so i'm surely not good on that, probably worse then you... :oops:
I myself, i will need 2 change also alot of industries, i think i will stay with changing colors or something simple, still alot of work, if my scenario is released, i'll let you know...

- I've decided now to work on the icons representing the new industries (they look all like a cookie for the moment)
- also if they must be buyable i will be changing their picture for the auction (but a screenshot for this could to the trick, if i changed and decided on the textures and model-reuse)
- i'll post it later, once i've done it myself...

User avatar
Kenster
Posts: 67
Joined: Sun Nov 12, 2006 4:15 am
Location: Shelton, Connecticut, USA

Post by Kenster » Wed Oct 24, 2007 3:23 pm

Ok.

I Give up.. :?

I can't unpack any stock .FPK files with either PakBuild or Dragon UnPACKer 5.

I can unpack custom .FPK files just fine.

Am I missing something? or can some one please send me all the stock FPK files after repacking them!

Thanks Ken

User avatar
atani
Posts: 293
Joined: Tue Dec 19, 2006 5:01 pm
Contact:

Post by atani » Wed Oct 24, 2007 3:58 pm

Are you getting an error when unpacking or?

Mike

User avatar
Kenster
Posts: 67
Joined: Sun Nov 12, 2006 4:15 am
Location: Shelton, Connecticut, USA

Post by Kenster » Wed Oct 24, 2007 8:08 pm

atani wrote:Are you getting an error when unpacking or?

Mike
Hi Mike

This is what I get on the bottom of Dragon UnPACKer 5;
_____________________________________________________
10/24/2007 4:00:29 PM : Opening "D:\Documents and Settings\Ken\Desktop\Temp RR\Industries0.FPK" file:
10/24/2007 4:00:29 PM : File format not recognized!
10/24/2007 4:00:29 PM : Starting HyperRipper...
_____________________________________________________

I don't get an error message at all with PakBuild v2.14 and it doesn't unpack any of the stock .FPK files either

But I can unpack all the user created .FPK files.

Thanks for your quick reply and any additional help.

Ken

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Wed Oct 24, 2007 8:31 pm

When you tried PakBuild, did you try it from PAK > Unpack ? Trying it from File > Open... doesn't work.
Also, be sure you have worked up a folder or set of folders to put it in.


:twisted:
I'm correct 97% of the time..... who cares about the other 4%....

User avatar
Kenster
Posts: 67
Joined: Sun Nov 12, 2006 4:15 am
Location: Shelton, Connecticut, USA

Post by Kenster » Wed Oct 24, 2007 10:43 pm

snoopy55 wrote:When you tried PakBuild, did you try it from PAK > Unpack ? Trying it from File > Open... doesn't work.
Also, be sure you have worked up a folder or set of folders to put it in.


:twisted:
Yes I was using the PAK button and tried to use the unpack from there and yes I did make a "Temp" folder within a "Temp RR" folder.

Like I said, all the custom FPK files are unpackable with either program, but the stock FPK don't work no matter what I try..

Unfortunately I have a headache for the past three days. I'm blaming it on looking at a bazillion XML files. :shock:

User avatar
atani
Posts: 293
Joined: Tue Dec 19, 2006 5:01 pm
Contact:

Post by atani » Wed Oct 24, 2007 11:00 pm

By chance is this a Steam version of the game? If so they might have some other form of encryption (put in place by Steam) which is preventing the tools from unpacking it properly.

If so, contact me on PM and we can work on a fix :)

Mike

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Wed Oct 24, 2007 11:04 pm

Something ain't right here..... :( I just did it, I unpacked Industries0.FPK. I pointed it to My Games and it made a folder called ...Industries0...
I also did it just now with DragonUnPacker 5. I didn't use Ripper, I just opened the file, clicked on 'Size' to be sure it had the files correct, highlited them all, right-clicked on them, went over to 'without convertion' and made a new folder for them to go into. Worked.
The PakBuild is V2.14.

Again, something ain't right here..... :(


:twisted:
I'm correct 97% of the time..... who cares about the other 4%....

User avatar
Kenster
Posts: 67
Joined: Sun Nov 12, 2006 4:15 am
Location: Shelton, Connecticut, USA

Post by Kenster » Thu Oct 25, 2007 1:47 pm

Atani is looking into it for me.

It seems it maybe an encryption deal with Direct2Drive game download. :(

I'm going to poke around a bit more and see if I can find anything. :shock:

I'll let you all know what the outcome is.

Thanks for all your help.
Ken

( I submitted a ticket with Direct2Drive, but I'm not going to hold my breath :P )

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Thu Oct 25, 2007 7:26 pm

This isn't the first time there has been trouible with Direct2Drive downloads of Railroads!.
I have an idea.......... 8)


:twisted:
I'm correct 97% of the time..... who cares about the other 4%....

Post Reply