Had some questions about creating custom facilities

Have a question about how to mod something? Or have an issue with one of our mod tools? Post here.

Moderators: Balthagor, Moderators

Post Reply
Cdiplayer
Colonel
Posts: 430
Joined: Aug 21 2012
Human: Yes

Had some questions about creating custom facilities

Post by Cdiplayer »

Is it possible to add custom facilities to the game? I've been wanting to add some new buildings, but I haven't found any documentation on how. What are the limitations for modeling new facilities and the like? Also, how would I go about creating new technology that follows from, let's say the Trump Ideology as an example, and then that tech would allow you to build these new custom facilities? Lastly, is there any way to make facilities region specific?
Thanks.
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: Had some questions about creating custom facilities

Post by evildari »

You can add new facilities to the game - but not with a new function which is not already in the game.
i.e. you can add another industrial goods factory which has only 10% output of the small industrial factory, but does not use ie. electricity (kind of manual labor sweatshops like at the start of industrialization)
Easy way to do this:
(very first - import the .unit file into a spreadsheet program, to make life EASY)
1. copy the whole Line of your source facility, which function you like to use a base
2. insert it ie. to the next line
3. change its ID to the next free number
4. if its a production facility : scroll down to the end of file to the &RAWPROD section (just to not forget this important step)
5. copy the "original" entry, change its id, and (if thats what you like to do) change its production modifier.
6. go back to the unit entry: scroll to the right and change any parameters you like to change. (for my example you would get to the uBuildClassMask and subtract the value for electricity (which i dont have in my mind right now))

If by modeling new facilities you mean graphic changes - its the same as with other units:
define the picnums, make an edit to the picnums file, place the .x files and textures in the \meshes folder
If you meant to have total new functions like - a facility that increase the rate of fire of your artillery in the same hex (for whatever weird reason) then no that is not possible.

There are 2 tech requirement fields, if you set there a (or both) tech number(s) then you can place a restriction there. Look at air-defenses as an example
I think the only way to make facilities region specific is to use the regional codes like in the units:
So you could ie. make an Eiffel Tower and set region code to France.
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
Cdiplayer
Colonel
Posts: 430
Joined: Aug 21 2012
Human: Yes

Re: Had some questions about creating custom facilities

Post by Cdiplayer »

evildari wrote: Apr 20 2020 You can add new facilities to the game - but not with a new function which is not already in the game.
i.e. you can add another industrial goods factory which has only 10% output of the small industrial factory, but does not use ie. electricity (kind of manual labor sweatshops like at the start of industrialization)
Easy way to do this:
(very first - import the .unit file into a spreadsheet program, to make life EASY)
1. copy the whole Line of your source facility, which function you like to use a base
2. insert it ie. to the next line
3. change its ID to the next free number
4. if its a production facility : scroll down to the end of file to the &RAWPROD section (just to not forget this important step)
5. copy the "original" entry, change its id, and (if thats what you like to do) change its production modifier.
6. go back to the unit entry: scroll to the right and change any parameters you like to change. (for my example you would get to the uBuildClassMask and subtract the value for electricity (which i dont have in my mind right now))

If by modeling new facilities you mean graphic changes - its the same as with other units:
define the picnums, make an edit to the picnums file, place the .x files and textures in the \meshes folder
If you meant to have total new functions like - a facility that increase the rate of fire of your artillery in the same hex (for whatever weird reason) then no that is not possible.

There are 2 tech requirement fields, if you set there a (or both) tech number(s) then you can place a restriction there. Look at air-defenses as an example
I think the only way to make facilities region specific is to use the regional codes like in the units:
So you could ie. make an Eiffel Tower and set region code to France.
Thanks! All I really wanted to do was add some new tourist attraction type buildings, like the 7 Wonders of the World, and allow you to build them if you research the proper custom technology. Do you know how to create a custom technology?
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: Had some questions about creating custom facilities

Post by evildari »

you just add an entry to the .ttrx file in the maps\data\ folder
then you can use this tech as a requirement for your structure
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
Post Reply

Return to “Modding Issues & Support”