
Originally Posted by
jayban
1. How does one add a new resource? What files are involved?
By "Resource" you mean "Trade Good" right? To add a new trade good, navigate to your MTW folder, then open up the folder named "campmap", in there open up "startpos" - Here you will find all of the Eras in MTW and VI. You should have text files named "EARLY", "HIGH", "LATE" and if you have VI you'll find one named "VIKING" - you'll also find "TUTORIAL" which is, as one would expect, for the campaign tutorial. Open up the era that you want this new trade resource to appear.
In my example, I'll be using the High era to add the trade resource "Fine Wine".
Open High.txt and scroll down to "Declare the tradable goods for this campaign." section (Pressing ctrl+F and copying/pasting that into the box will get you there quicker). You'll find the resources available to this era listed here along with their base values. Copy/Paste the line that declares "WINE" and paste it at the bottom of that list and change the "WINE" part to "FINEWINE" without spaces, I'll also want to increase it's value slightly as the name suggests, it's finer than regular wine. It should look like this.
Now scroll down to the Set Region Resources section of that text file. Press ctrl+F and copy/paste this into the box and hit enter: "//Region Goods Available". Here it lists what resources and trade goods are available to a particular region. You'll note that it sets two things here:
"SetResources::" refers to raw mineral deposits such as copper and iron.
SetTradableGoods:: refers to, well... tradable goods such as silk and cotton. This is the one you want.
I'll be adding the Fine Wine goods exclusively to Burgundy. Scroll down to the line that says "SetTradableGoods:: ID_BURGUNDY", you'll also note here that it already has access to the standard wine trade good. We don't want it to have two trade goods otherwise France would be super powered, so we'll change it, delete the "WINE" part and add "FINEWINE" instead. It now should look like this:
Save the changes and exit HIGH.txt. Your done there for now. Head backwards from .../campmap/startpos/ and navigate to .../loc/eng/. Open up the text file named "DEFAULT_REGION_SPECIFIC", if you were modding the Viking era, you'd open "VIKING_REGION_SPECIFIC", but we aren't. So anyway scroll down to the line "@["goods_names"]", here it shows the names of trade goods back in HIGH.txt (and EARLY and LATE as well) in order. So for example, the first tradable good declared in the startpos was GLASSWARE, you'll note that Glassware is also the first here, so add Fine Wine to the bottom of the list, since it's last declared. You can add spaces too, as here it shows the name that will be seen in-game, the other name (with all capitals) is used internally by the system. Don't forget to add the @ sign and enclose the words in curly braces and quotes. It should look like this:
Now scroll down a touch further and you'll find the descriptions for each of the trade resources (also in order). Add a description for Fine Wine at the en of the list, make sure it uses the same things like the others (at sign and braces etc). It doesn't have to be too flash or really long, I just added:
@{"Extremely fine wine is produced here. It can be sold for a large profit."}
Save the changes and exit. Your pretty much done, just one last thing to add. Back out of .../Loc/Eng/ and head to Textures/campmap/goods/, here it lists the graphics files used to represent the trade goods in game. Merely copy and paste the file "WINE.bif" and rename it "FINEWINE.bif" and ensure the ".bif" part at the end is still there.
Start up a new campaign in High as the French and right click on the province of Burgundy, it should now have the Fine Wine tradable good. Hope that's what you asked for. If not, it helped my typing skills.
Bookmarks