You must be logged in to post messages.
Please login or register

Game Modifications
Moderated by alincarpetman

Hop to:    
Welcome! You are not logged in. Please Login or Register.7 replies
Rise of Nations Heaven » Forums » Game Modifications » Rare Resource Modding
Topic Subject:Rare Resource Modding
posted 07-24-04 06:05 PM EDT (US)         
First post, since I've just begun looking at modding in RoN. So, first, hello!

Anyway, I realize that Rare Resources are probably not high on the mod community's priority lists, but I was just wondering if any experimentation has been done with them before I go and re-invent the wheel. The first question I had was: can new ones be added? I think I've managed to activate the "scenario-specific" ones like Salmon and Gold by adding the <RANDOM_RARE_DROP> tag to each one, but, beyond that and modding the attributes, I don't see a way to add more.

The main question here is: I can see the tgas for each of the resources, but not where the tgas are called from. For example, I can see aluminum.tga and so on, but haven't found which file calls those (it may be hard-coded). Has anyone else found the call file? If that's found, new skins could be made for a wide variety of rare resources.

If anyone else has attempted to tackle this, and had a bit of advice, it would be appreciated. If not, I'm still plugging away myself, since I can think of more than a few specialized resources that would be of value to specific mods and time periods, so I'd like to crack the nut on this, if possible.

Also... if anyone hasn't looked at this before, but is interested in doing so, the pertinent files I've found so far are:

resourcerules.xml in the data folder (T&P is the one I'm working on)
iface_specialresource.tga in the art folder (original folder)
iface_spec_res.tga in the T&P art folder

[This message has been edited by Baryonyx (edited 07-24-2004 @ 06:31 PM).]

posted 07-24-04 07:01 PM EDT (US)     1 / 7       
NM... I found the call locations for the TGAs in the data\effects_graphics.xml under the GOODS heading. Now I'll be running a test to see if the game will take mods to that file and graphical changes to TGAs for rare resource icons.
posted 07-24-04 07:49 PM EDT (US)     2 / 7       
Well, it seems that you will eventually run into the same problem with rares as you would run into with Wonders and Nations: you cannot change the special abilities, because these get tied up in hashes.

Also, I had some issues getting the TGA to show up correctly after editing icons for rares. If someone more graphically inclined could get one of those tgas to work after editing, please let me know. In my test, I replaced the large and small icons for uranium in the specialresources.tga, and in game every icon in that file turned into a blurry mess.

I DID manage to change the physical representation of a rare resource on a map (changed Gypsum from Dye to Salt), meaning it should be possible to introduce new models for rare resources, edit the files referring to the models and the resource effects, and replace a bunch of resources with more age appropriate ones.

For example, papyrus isn't very appropriate in a Modern or Information Age scenario... but silicon would be. In a WW I era game, some more metals would be appropriate in place of the textiles, and so on.

Anyway, just wanted to update my own progress. That TGA issue is basically the major one that stands in the way of making modifications possible. If anyone is interested in looking at that, please give it a try!

And that's the last time I'll reply to myself so I don't get in trouble or anything...

[This message has been edited by Baryonyx (edited 07-24-2004 @ 07:51 PM).]

Seraph in Absentia
(id: One_Dead_Villy)
posted 07-24-04 10:36 PM EDT (US)     3 / 7       
if you work it all out and want to outline the steps and what the issues involved are we can put it in the Modding FAQ or if you have some time to make it fairly comprehensive we can create a feature article out of it for the Modding Library.
posted 07-25-04 10:25 AM EDT (US)     4 / 7       
Well, I'll gladly do something in-depth once I've got it all figured out. For example, in about a half-hour today, I've discovered that we can replace the TGA files for resource icons with PNGs (don't ask me why it works, it just did) to no ill effect, that you can change the Rare Resource availability on any and all maps, and now am trying to activate the "dead" rare resources of Seals and Lead, though Lead may be impossible since I haven't found any special abilities for it, meaning it won't be available as another option.

So, quick summary of what I've managed to do so far:
1.) Change icons of rare resources as they show up on the left side of the screen and in the Info window.
2.) Change the on-map appearances of rare resources.
3.) Change which rare resources are available in Scenario Editing mode and in Random Generation games.

Next up:
1.) Changing rare resource gather bonuses. (CHECK)
2.) Changing rare resource effect bonuses. (CHECK)
3.) Activating dead resources to expand the palette. (NO... there's no referents for Seal or Lead abilities)
4.) Making a (crappy) graphic for the flat T&P scenario (Gypsum, for example) ones to test if new graphics work. (CHECK)
5.) Making a (crappy) graphic for model T&P scenario rare resources (Cattle, for example) to test if new graphics will work on the models.
6.) Seeing if I can make Salmon a Sea-Rare as opposed to a Land-Rare. (Seems unlikely)
7.) Checking if obsolesence works for the Rares. (CHECK)

Just a little update... I am curious to see if people feel this is useful, though.

[This message has been edited by Baryonyx (edited 07-25-2004 @ 02:09 PM).]

Seraph in Absentia
(id: One_Dead_Villy)
posted 07-25-04 01:37 PM EDT (US)     5 / 7       
Well PNG also supports alpha channels, and the beta version of RoN uses PNG files not TGA.
posted 07-25-04 02:22 PM EDT (US)     6 / 7       
Ah, OK. Didn't know about that, thanks Angel (graphic standards aren't my strongest suit). On another note, I figured I should show at least one example of what I've done so far.

The picture is available here.

The picture shows the "scenario-resource" gold now active in a generic single-player game, and with a new model (from dye.bh3 to billboard, a generic flat model, a new (crappy, like I said) skin, and a twinkle, like titanium has. I didn't actually modify its stats for the picture (sorry), but it is feasible to change the prerequistes of a rare resource, which basic resources it gathers and how much, the bonus values it provides, and whether it becomes unavailable or not.

However, there are some very tight limitations on rare resources. In the files that concern rares, the rares are in a very specific order, and that order dictates which bonuses that resource will receive. For example, if I switched Papyrus and Incense locations in the pertinent files (will explain in more detail in the overview I'll do), then Incense would get the Science discount and Papyrus the Temple discount. Because of this, you cannot, for example, remove Incense to replace it with Silicon, whose behavior would be a late Age Papyrus. Replacing Incense with Silicon would give Silicon the Temple bonus.

Further, because of this strict sequence, the game also features (internally) a hard cap on the number of rare resources available. This means that you cannot ADD a resource at the end that simply matches the behavior of a previous one. Thus, you can't just tack on a resource block for Silicon and expect it to behave like Papyrus, since I've found no referent in the files to direct resource behavior, beyond the strict sequencing of the rares.

However, there is still room for modification, that can allow total modders to add an extra dimension of realism to their mods, by simply changing the present resources to match their eras and locations.I'll try and put together a more complete document with an example and all the important files soon. Thanks again!

[This message has been edited by Baryonyx (edited 07-25-2004 @ 02:31 PM).]

posted 09-09-20 02:27 PM EDT (US)     7 / 7       

I know I'm a bit late...but first of all how did you activate them to normal scenarios?
I could add the "y" flag to campagin only units, so in the editor now you (I) can place them by checking the SHOW UNIQUE units.

But in resourcerules I tried replacing the TEX_SPECIAL_RESOURCES to TEX_CONQ_RSRC but nothing happened.
You must be logged in to post messages.
Please login or register

Hop to:    

Rise of Nations Heaven | HeavenGames