Modding The Tech Tree

Bunch of helpful stuff.

1. I can see why this makes sense for the Buildings section, as it's less visual clutter, but what about in a section like Buildings_YieldChanges? Say I'm removing growth and production from the watermill and adding gold. If I just do this...

Spoiler :
Code:
[Buildings_YieldChanges]

		<Replace>
			<BuildingType>BUILDING_WATERMILL</BuildingType>
			<YieldType>YIELD_GOLD</YieldType>
			<Yield>1</Yield>
		</Replace>

[/Buildings_YieldChanges]

...would modbuddy understand that I'm trying to replace both YieldTypes? I always use the Delete function in instances like this to ensure that all types are removed before adding the new stuff.

2. Replaced all icons with Courthouse for now.

4. I can never remember which resources use an 'S'. Banana(s), Fur(s), Truffle(s), etc. Kinda irks me that some have the 's' and some don't. Fixed.

5. Fixed.

6. After reverse engineering a mod and seeing that you could get away with doing this, I chose the lazy route lol. Fixed.
 
The suggestion for #1 was for primary tables such as <Buildings>, <Units>, etc. It will also work for <Rows> in <Language_en_US>. Perhaps I should have been a bit more clear.

----------------------------------------------------------------------------------------

Don't use <Replace> in 'child' tables because <Replace> does not work for them -- <Replace> needs a unique element to match to, and there are no unique elements to match to in tables like <Building_YieldChanges> as 'unique element' (Type, ID, Tag) are defined within XML and SQL.

---------------------------------------------------------------------------------------

The method you are employing of <Delete> then re-state in <Building_YieldChanges> is fine for tables like that which are 'child' and not 'primary' tables.

The problem with doing this with tables that have ID and Type as columns is that the game tracks all such <Row>s in primary tables by their ID #s, and this can get corrupted when you delete a <Row> from a primary table. Table <Buildings> can end up with a 'hole' in the ID assignments where BUILDING_GARDEN used to be, for example, and this is not necessarily cured by the new version of BUILDING_GARDEN that you might re-add directly after deleting the old version out of the <Buildings> table. This is because the game might give the new version of BUILDING_GARDEN an ID# 1 higher than the highest already-used ID#, not necessarily the ID# that had been assigned to BUILDING_GARDEN before you deleted it from the <Buildings> table.
 
Gotchya. I have a (perhaps unfixable) issue I wanted an opinion on. There's a UI error in the tech tree now that I've made sailing's prereq tech agriculture and scooted it over on the X axis. Screenshot and mod included (in case it is easily fixable).

http://imgur.com/DU1E4PZ
 

Attachments

@LeeS: Thanks for the code! My mod is an extension of a second mod by ptrick; that one adds the old G&K-style Theater back into BNW (and keeps it separate from Zoos). Cinemas will require a Theater in the same town; Film Studios will require Cinemas. Building a Cinema in every city will unlock the Film District national wonder (think Hollywood/Bollywood, as opposed to the independent Studio producers). Grauman's Chinese Theater is going to be a world wonder.

P.S. The Photography quote (being genuine) is fine, but I've chosen these for the other two --

Motion Photography tech: "All right, Mr. DeMille, I'm ready for my closeup." -- Sunset Boulevard

Grauman's Chinese Theatre:

"It's a world of kings and queens
Up there on that movie screen
It's a picnic crossin' River Kwai
The movies are great medicine
Thank you, Thomas Edison
For givin' us the best years of our lives"

-- Statler Brothers, "The Movies"
 
Back
Top Bottom