Adding a Resource

Jimmyballz

Executive
Joined
Mar 26, 2008
Messages
582
Location
Syracuse, New York
Hi,

Can someone point me to a Tut/Reference on how to add a Resource?

I am trying to add 1 resource from another mod, so I put in the art files, edited three xml's (ArtDefines_Bonus, BonusInfos, & Text) --->then too many errors when trying to load the game.

In the ArtDefines, the new resource was pasted at the bottom. I edited the last line, as it seems to be in numerical order. (43 total resources)
Spoiler :
<FontButtonIndex>43</FontButtonIndex>

Do I have to tie this '43' to something else? Are there python or other files that have to be modified as well? :confused:

Or is this a very complex process and not really worth all the bother?:undecide:

thanks,
Jimmy
 
That's not a graphical error. You have some of your tags messed up in the XML. You are missing the <iAIObjective> tag which belongs before the <iHealth> tag. There probably is a tutorial, have you checked in the Tutorials Index (stickied) or done a search for "Resource" in Thread Titles only for this subforum?
 
That's not a graphical error. You have some of your tags messed up in the XML. You are missing the <iAIObjective> tag which belongs before the <iHealth> tag. There probably is a tutorial, have you checked in the Tutorials Index (stickied) or done a search for "Resource" in Thread Titles only for this subforum?

Thanks xienwolf - all the bonuses in the bonusinfos.xml didn't have the <iAIObjective> tag, only the new one that I put in had it.:)

That got me through the initial loading, showing no xml errors, etc, but after some globe-spinning loading, it crashes. I think it has something to do with the .dll, the 3.17, or the unofficial 3.17 that are already in.

Anyways, I searched the threads :scan: and finally put a request in a skicky.:salute:
 
FYI

One xml file I forgot to mention is the CIV4ImprovementInfos.xml. The particular resource I want to add would require a plantation, so it was added with 'bananas' and such.

Still getting a tremendous amount of errors, something to do with 'siblings' and 'allocated memory' :confused:

I'm gonna still keep pluggin away:hammer:. If I get it to work I'll write up a tutoral.:)
 
My advice would be to add things in one at a time to see where the issue is coming up. Siblings should be indicating that somewhere you placed an XML tag in the wrong spot.


Start off with just adding the new Bonus. Set it to use the same Art Define as one of the already existing bonuses initially, just so we can avoid dealing with artwork at this particular point.

Get that step right and it means that things are working properly in the game (yields, appearance locations and distances, etc). Ideally you are seeking to use a pre-existing bonus class, so we won't have to deal with that at all.

So next step would be to go into the Improvements and make one of the improvements connect your resource. Still keeping the same art setup as another resource which already exists.

Get that one right and you are ready to start changing the art up. I'd start with the TGA index and the DDS Button. Chances are fairly decent that most people won't have a unique in-game resource NIF anyhow, and those 2 are pretty simple to handle.

If you get those done, then all that is left is getting 3d art for a new resource on the map. That bit is out of my current areas of knowledge though :)


The big monkeywrench which can crop up on this would be when you add your resource to the plantations you MIGHT run into issues with the LSystem. If that does happen then you are in for quite a bit more of a nuisance, but basically just choose one of the resources which the plantation already connects that looks a lot like what your new resource is going to be, then go through the LSystem file and everywhere that there is mention of the Plantation and that other resource, add yours to the entry.

Ideally, you won't have to do that last bit, it can wind up being a headache, but it IS possible to work out with a couple of guess/check runs and a lot of cut/paste
 
I copy/pasted banana already in the game, and changed the newly pasted one to the new resource. -ArtDefines, BonusInfos, & ImprovementInfos. I also added the new resource under banana in the CIV4BuildingInfos under grocer and apothecary to be consistent. Added the 2 Gamefont TGA files.

...still same crash after getting through all initial loading.:crazyeye:

I noticed that in the mod(s), the CIV4BonusInfos have the <AIobjective>0<AIobjective>, and the CIV4BonusInfos in the game does not.:hmm: After adding the <AIobjective>0... to all the resources (per 1st posted error), the game loads through the xml parts...

My only question is what/where are the LSystem files? I looked around but couldn't quite locate.
 
Thanks for the reply-

Strangely enough, banana's are not in the PlotLSystem. In the mods that have this resource I want to add, the PlotLSystem doesn't include it either. The CityLSystem doesnt have any of these, including a planation.

I copied 'tobacco' everywhere it was in the PlotLSystem and chanded everything to reflect the new resource. Still I get through the initial loading, then the crash.

It looks like I am going to take a break on this for a bit, this type of modding is probably out of my league as of now. :rolleyes: :)
 
Top Bottom