stupid basic questions, be kind

micmc

Warlord
Joined
Apr 17, 2004
Messages
179
Location
atlanta ga usa
the Wiki-xml link wasn't working, I suspect I'd find most of my problems solved within it, but since not I need to bother you nice people.

I put a new building, got it to show up, do its job, only weird thing is on the city build screen it's listing as TXT_KEY_BUILDING_SILO, rather than simple Silo can anyone tell me which kitten I need to step on to fix this?

What is the syntax/use of <YieldChanges/>? By looking at how the Lighthouse handles sea squares, I thought it would be similar but
A. I couldn't get sea squares to modify Hammers & Trade also
B. For the regular <YieldChanges/> nothing seemed to work and kept giving error messages.

Last ?, is there a way to "terraform" with workers, I really liked the Plant Forest Mods out there, I was hoping to do the same kind of thing with deserts -> plains -> grasslands and/or Plant Crops (wheat etc) and/or turn peaks (modified somehow to be passable to the dynamite worker unit) into hills?

Since I'm more a sandbox player, I'm less worried about the AI using the abilities efficently and more worried about making utopia, but if some wise soul could point how to have the AI do the same things it would be golden nail in thier coffin (which is like a gold star in 1st grade, just more eternal)
 
micmc said:
the Wiki-xml link wasn't working, I suspect I'd find most of my problems solved within it, but since not I need to bother you nice people.

I put a new building, got it to show up, do its job, only weird thing is on the city build screen it's listing as TXT_KEY_BUILDING_SILO, rather than simple Silo can anyone tell me which kitten I need to step on to fix this?

The cutest one.

Actually, you might want to make a new file for your mod and put it in the mod's XML/Text directory. (Call it something like Civ4GameText_MyModName.xml. I'm not sure if the naming convention is required, but I'd rather not find out myself). Then, take a look at some of the Text xml files that came with Civ to get a general idea of how you should set up your new file. Basically, every tag (like TXT_KEY_BUILDING_SILO) will have at least one language (typically English, but at risk of looking like a langauge-ist) that gives the actual text to. Then, wherever in the game there would be TXT_KEY_BUILDING_SILO, they would replace it with what you put in the text xml file. Hopefully, it's "Silo". So, you might have:

Code:
<TEXT>
	<Tag>TXT_KEY_BUILDING_SILO</Tag>
	<English>Silo</English>
	<French>Silo</French>
	<German>Silo</German>
	<Italian>Silo</Italian>
	<Spanish>Silo</Spanish>
</TEXT>

If you're planning on just doing this mod for yourself, you'll only need the language you play in. If you're planning on releasing it, it helps if you place the other languages there, which (I would assume) makes it easier for translators since they just need to rewrite the word, not make all new brackets.

What is the syntax/use of <YieldChanges/>? By looking at how the Lighthouse handles sea squares, I thought it would be similar but
A. I couldn't get sea squares to modify Hammers & Trade also
B. For the regular <YieldChanges/> nothing seemed to work and kept giving error messages.

If it's error messages, you typed something wrong into the xml. Typically, a yield change looks something like this...

Code:
<YieldChanges>
	<iYield>0</iYield>  [b]<!-- Food change -->[/b]
	<iYield>0</iYield>  [b]<!-- Hammer Change -->[/b]
	<iYield>8</iYield>  [b]<!-- Commerce Changes -->[/b]
</YieldChanges>

The lighthouse only does yeild changes for food production, so it only has on iYield. I would just stick with doing it this way, even if all you're changing is the Food. It just makes more sense to me. You have an extra two lines of xml, but big deal.

Last ?, is there a way to "terraform" with workers, I really liked the Plant Forest Mods out there, I was hoping to do the same kind of thing with deserts -> plains -> grasslands and/or Plant Crops (wheat etc) and/or turn peaks (modified somehow to be passable to the dynamite worker unit) into hills?

Since I'm more a sandbox player, I'm less worried about the AI using the abilities efficently and more worried about making utopia, but if some wise soul could point how to have the AI do the same things it would be golden nail in thier coffin (which is like a gold star in 1st grade, just more eternal)

There are a few mods that you might want to check out, either in the mod pack or mod component sections, that do things LIKE this (I'll eat my hat if there's not a forest-planting mod somewhere). If you're not worried about the ai, this kind of stuff can probably be done in python using a tool like Action Buttons (search the mod component forum for it). Or, you can wait as I try to finish up my spells framework project that would be ideal for a project like this :P

MOST of the AI is done in the SDK, which isn't for the faint of heart. Even some of the AI callback functions in python are tough to understand what you actually are doing without knowing the context of the AI code. However, using your own version of the CvGameUtils file, you can change the AI_unitUpdate function to possibly check if it's on a plot that would seriously help out the player by planting a forest or doing some other terraform action. Figuring out how to translate the strategy to code is the tough part.

Good luck!
 
Back
Top Bottom