Assorted modding questions

isnorden

Amnesiac Modder
Joined
Jul 6, 2012
Messages
608
Location
Madison, Wisconsin, USA
Here are a few ideas that I wanted to add to my current modding project, although I'm not sure how to code them or whether they've been used before. (If they have, I'd like to locate a snippet of the relevant code to use in my mod. :please: )

  1. Allowing a ship unit to complete trade missions with coastal cities, as if they were Great Merchants (but not getting the other perks of that GP type).
  2. Allowing a civilization to spawn Great Merchants at a faster rate.
  3. Lowering the cost of Great Prophets, Inquisitors, and Missionaries by a certain percentage.
  4. Granting +1 Faith every time a unit with a different religion is killed.
  5. Giving Great Prophets from one specific civilization the ability to boost other units' combat stats (the same as a Great General; I intend to use this as part of a trait for a militaristic/religious civ).
  6. Making conversion attempts by foreign Missionaries and Prophets less effective.
  7. Letting a civilization research one specific technology at a faster rate. The way I want this rule to work, each civ could get the bonus for one particular tech that matches their history and culture--for instance, Greece might learn Philosophy 25% faster, while Egypt might learn Engineering 50% faster.

If anyone can help with one or more of these rules, I'll give them credit for contributing to the mod. Many thanks as usual!
 
I tried the merchant ship thing prior to the one used in Phoenicia; Changing gold is fine, as that's in the XML for the unit, but I'd not found a way of changing the influence aspect.

#2 and #6 should be doable by updating the relavent XML data, if it's intended globally, I would have thought.
 
2) I typically only stick to the existing code and use what's available, so I can't help that much here. You would probably want to use the code behind the "GreatScientistRateModifier" column that Babylon uses and create your own which modifies merchants. I tried searching for it within the source files (and used some other search words as well), but I couldn't find anything that looked like the actual process of applying the modifier to the great scientist. Though, I'm not very knowledgeable of C++ and can only logically interpret things to a degree; maybe I missed it.

It's a real bummer how some of these elements are coded so rigid. I'd imagine it's quite intentional, as to enhance the value of their own products and limit more modders (not all of course). They're already mostly untouchable in the art department; few can create things of similar quality - especially 3D models and such, which even fewer can do. And equal quality leader scenes "are" pretty much unattainable. Why make the code harder to utilize too? :(

For example, the one used for Babylons could've been its own table where you can specify not only different modifiers for GP points, but also different types of great people. Another example is the one used by the Aztecs. It would've been nice to have a table where you can specify different yield types as well, instead of being stuck with culture. Oh well... sorry for the digression. I'm still grateful to our Firaxian overlords for everything else they provide, which allows even noobs like me the ability to modify the game. :lol:

3) This is another one where I may be able to help. Though, it'll be slightly different from what you wish for. Instead of a modifier which acts as a production discount to the unit's cost, this modifier will give a production boost to your city's rate when building the unit. It's located within CIV5Units.xml and the unused table is named Unit_ProductionTraits where you specify the unit type, trait, and modifier.

5) Outside of game balance, this one isn't too bad either (initially...). You would just create a new unit type with the prophet class that the civilization builds instead. Copy the existing prophet and add the great general promotion to it. Just compare the existing two units and add what you wish to your new hybrid unit. You'll want to give it the appropriate flavors, builds, and such.

Though, the bad part now is the AI. As in, how will you teach the AI how to use this new hybrid unit? :crazyeye: Simply giving the unit both UNITAI_GENERAL and UNITAI_PROPHET may seem like an easy solution, but I don't believe so. You'll probably have some very "interesting" behavior as a result of that. ;) Again, this one is beyond me at this point and perhaps others here have the answers. You'll probably have to write a new one; you can also call it UNITAI_WAR_PROPHET (sounds cool!). :D
 
Top Bottom