How do I tweak these values?

isnorden

Amnesiac Modder
Joined
Jul 6, 2012
Messages
608
Location
Madison, Wisconsin, USA
Thanks to the SQL code that LeeS and Nutty wrote, I did some search/replace work to add three more "near-copycat" resources to my food-and-drink modpack (see the attached .rar archive). Most of the non-cosmetic stats for Moose, Reindeer, and Wild Boar should stay the same; but I do want to make them different enough to matter in game terms.

  1. Wild Boar should provide more Food value and Growth flavor; they should also favor forested areas. (Are forests "real" or "fake" terrain features in the code?)
  2. Moose and Reindeer should both favor higher latitudes than standard Deer; but Moose dominate in forests (and near lakes if the standard game allows it; they're better swimmers than other members of the deer family). I'd also raise the "Scale" value to match a moose's relative size, if the result didn't look strange onscreen.
  3. Reindeer, on the other hand, belong on tundra and snow; they wouldn't share the Moose's lakefront bias either.


    So how do I let the game "know" which values need changing? The only language I can code in by myself is XML; I know about <Row> and <Delete>, <Replace> and <Update>. What I'm unsure about is how to combine those functions in order to fix just the data that needs it.
 

Attachments

So how do I let the game "know" which values need changing? The only language I can code in by myself is XML; I know about and , and . What I'm unsure about is how to combine those functions in order to fix just the data that needs it.
[/LIST]

Those XML tags come from SQL functions. <Row>=INSERT, <Delete>=DELETE, <Update>=UPDATE, and <Replace>=REPLACE (which is actually shorthand for "INSERT OR REPLACE"). The syntax is different but they do the exact same thing, which is update a SQL database.

I'm pretty sure I shared this with you before, but either way, bookmark this sucker, it's incredibly helpful: Civ5 XML/SQL cheat sheet. You get both "languages" which you can compare side by side.

Anyway, the trick for updating only what you want is the same with XML updates: i.e., a WHERE clause.
 
Back
Top Bottom