Regarding tools. IMO, it is essential to have a good text editor, preferably one with code-completion such as
Notepad++ or
SublimeText. Don't even think of using the ModBuddy text editor as your main editor, it is a waste of time. ModBuddy should really be used
ONLY to build your finalized mod into the package used for distribution. Even then all of that
can be done without it. But I digress.
Next after your editor is
SQLiteSpy. This is a very handy tool for looking through the game's database and seeing all the tables used to make the game. Additionally when you come to writing new SQL commands they can be trialled in the actual database without the need to start a game and see how they affect the game.
As all the code provided by Firaxis and by mods are only sets of commands, in either SQL or XML, to generate a database, you will find it easier to look at that database this way.
Have a look in the 'cache' folder under the
\Documents\My Games\Sid Meier's Civilization 5 folder.
All those files are databases compiled from the source code of the game. The two that you have control over with mods are:
Civ5DebugDatabase.db
Localization-Merged.db
The 'debug' database is the one that holds all the values that the game uses, such as the yields for wheat or floodplains. The Localization database holds all the in game text that is displayed, in all the languages the game is made for.
So let's use your original question about 'Wheat'.
The original Firaxis code creates a table called
Resource_YieldChanges with XML code like this:
Code:
<Resource_YieldChanges>
...
<Row>
<ResourceType>RESOURCE_WHEAT</ResourceType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>1</Yield>
</Row>
...
</Resource_YieldChanges>
(the ellipses are just to show that there was other code in this block, they're not part of the code)
Now to change that value you need to modify that table with new code, by writing a set of commands in XML or SQL to replace or update the values of the existing table. This is what mods do. They simply provide new commands to the game engine to update the compiled database.
The steps are this:
1) Game engine reads all the stock code from the original game plus the extensions and any DLC you have and it builds those databases.
2) Then it reads all the installed mods and makes a copy of that database and adds in the changes that the mods bring.
That's why in the 'cache' folder there are two files very similar, Civ5DebugDatabase.db and Civ5CoreDatabase.db. One of them, Civ5CoreDatabase.db is the unmodded game database and the other is with all the mod changes. ( using SQLiteSpy you can look through those files and see what goes where and how they use different tables to do different things)
Now CEP has changed that table to remove the initial 'Wheat' yield and it now no longer exists in that table. That was done with this:
Code:
<Resource_YieldChanges>
<Update>
<Where YieldType="YIELD_GOLD" />
<Set Yield="1" />
</Update>
[B]<Delete ResourceType="RESOURCE_WHEAT" />[/B]
<Delete ResourceType="RESOURCE_COW" />
<Row>
<ResourceType>RESOURCE_COW</ResourceType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
...
So to revert that change you need to give some commands to 'put it back'.
You could use XML, like the original Firaxis code. Or you could use SQL to insert it that way. Either way is fine. It just depends on what you are familiar/comfortable with.
As a general rule of thumb, CEP uses XML when creating something like a new building or unit and uses SQL to update existing values. Sometimes though, as with this example, XML is just simpler to use in structuring the command than SQL.
Next step for you is find some good online references for SQL & XML. By 'good' I mean ones that
you find easy to follow, not what others think tell everything. Happy googling.