Modders Guide to FfH2

You are brilliant!
Ok, for now how do I do that?

I will need to create a dummy tech for them to start with and is it all XML from there?
 
Oh, you could do it with a Unique Starter tech I suppose. I was still thinking DLL and hooking into that feature, but having a tech like Seafaring that they start with would work well if they are supposed to never have the resource all game long. Though I am not certain what happens if you have a tech obsolete before it is even revealed. It should work out though.
 
Oh, you could do it with a Unique Starter tech I suppose. I was still thinking DLL and hooking into that feature, but having a tech like Seafaring that they start with would work well if they are supposed to never have the resource all game long. Though I am not certain what happens if you have a tech obsolete before it is even revealed. It should work out though.
Yes, they are to be forbidden from ever getting the resources or using them in any other way. I hope it works.
 
I ran into a weird issue last night with my still-in-progress mod. When starting a custom game, the drop down list for choosing civilizations is blank for the first 3 or 4 lines! What files should I look at to figure out this cause of this problem?

Edit -Solution found: Turns out the first few entries in civilizationsinfo.xml had been garbled. I'm kind of surprised that the game even started.
 
Hey, I'm having this weird issue with changing existing leaders in the modular XML. Basically, whenever I try to modify a leader to have different traits, I end up being unable to remove the traits they had previously.

Take, say, a leader with Ingenuity. I set the leader to have Defender instead in my modular XML (being sure to remove Ingenuity in the process.) When I get to the main game, though, the leader has both Defender AND Ingenuity. Is there a way to get around this, or do I have to modify the XML files directly, without using the modular system?
 
Hey, I'm having this weird issue with changing existing leaders in the modular XML. Basically, whenever I try to modify a leader to have different traits, I end up being unable to remove the traits they had previously.

Take, say, a leader with Ingenuity. I set the leader to have Defender instead in my modular XML (being sure to remove Ingenuity in the process.) When I get to the main game, though, the leader has both Defender AND Ingenuity. Is there a way to get around this, or do I have to modify the XML files directly, without using the modular system?

Since you're working on RifE, you're using the WoC modular system. Which means the question isn't valid in the standard FfH thread (Will likely make a modmod thread in the RifE forum when we release the next version, quite a few of them have been popping up lately).

That said, what you want is the <bForceOverwrite> tag. Basically, any modular entry without that tag can add or change stats, but cannot remove them. By setting the ForceOverwrite tag to 1, you can remove tags, but now have to add the ENTIRE entry rather than just the changed lines. ;)
 
Since you're working on RifE, you're using the WoC modular system. Which means the question isn't valid in the standard FfH thread (Will likely make a modmod thread in the RifE forum when we release the next version, quite a few of them have been popping up lately).

That said, what you want is the <bForceOverwrite> tag. Basically, any modular entry without that tag can add or change stats, but cannot remove them. By setting the ForceOverwrite tag to 1, you can remove tags, but now have to add the ENTIRE entry rather than just the changed lines. ;)

Ohhhhh. That makes sense-- so all I have to do is include the original traits, but just change the bHasTrait tag (or whatever it's called) for them to 0, or use that ForceOverwrite tag. Thanks! :D And sorry about the mistaken posting; I didn't realize that the WoC system was RiFE only.
 
Ohhhhh. That makes sense-- so all I have to do is include the original traits, but just change the bHasTrait tag (or whatever it's called) for them to 0, or use that ForceOverwrite tag. Thanks! :D And sorry about the mistaken posting; I didn't realize that the WoC system was RiFE only.

It's not RifE only, it's in FF, RifE, and Wild Mana.

Yeah, hadn't thought about being able to set bHasTrait to 0; That should work, and is easier.

If it doesn't work, and you have to use ForceOverwrite, you need to include the entire entry, which is a pain for leaders. ;)
 
Since you're working on RifE, you're using the WoC modular system. Which means the question isn't valid in the standard FfH thread (Will likely make a modmod thread in the RifE forum when we release the next version, quite a few of them have been popping up lately).

That said, what you want is the <bForceOverwrite> tag. Basically, any modular entry without that tag can add or change stats, but cannot remove them. By setting the ForceOverwrite tag to 1, you can remove tags, but now have to add the ENTIRE entry rather than just the changed lines. ;)

Ohhhhh. That makes sense-- so all I have to do is include the original traits, but just change the bHasTrait tag (or whatever it's called) for them to 0, or use that ForceOverwrite tag. Thanks! :D And sorry about the mistaken posting; I didn't realize that the WoC system was RiFE only.
 
Any suggestions for how I can try and debug issues causing hang-ups (Waiting on other Civs)? I'm not getting any exceptions or python or XML errors, the game just hangs. I tried to run debug through Visual Studio but I couldn't get it to work.
 
workers and settlers have no unitcombat, thus no experience.

If you have a debug DLL you can set breakpoints to narrow down a WoC. Many WoCs involve CvUnitAI::AI_update so that's usually a good place to start.
 
I assume you're talking about the code in CvCity::addProductionExperience which check if the unit can get a(ny) promotion and add experience only if it can.

Are you sure they're not getting experience due to difficulty level? (would apply only if you're watching an AI civ / running AIAutoPlay). This experience is gained regardless of if the unit can gain promotions or not.


Units without a unitcombat can gain experience just fine. They just can't use it to promote as there's no promotions available to them. No promotions available --> no leveling --> no use for XP.
 
Are you sure they're not getting experience due to difficulty level? (would apply only if you're watching an AI civ / running AIAutoPlay). This experience is gained regardless of if the unit can gain promotions or not.

Yes. I am watching an Autoplay game. And I am in cheatcode mode as well. So workers and other units that can't gain experience are still actually gaining experience behind the scenes in regular games? It's just not displayed to the user?
 
on higher difficulties AI units get some free XP. Unless they buy promotions from it you won't notice it though and workers/settlers can't buy promotions.
 
Which lines in LeaderheadInfo control:

1. The selection of Slavery as a civic?

2. The "You treat your people poorly" modifier?

Basically, I'm trying to make a custom leader who is Neutral but humane, but somewhere I went wrong because he keeps selecting Slavery and is not upset when other leaders select Fend for Yourselves or worse.
 
I'm still on patch j (but have the latest SDK source), so I could be wrong about these. But I doubt it's changed that much.

1. The selection of Slavery as a civic?
None. The XML files has nothing to do with it other than leaders having a favorite civic. It's mostly in the SDK with some code in CvGameUtils.py, cannotDoCivic

2. The "You treat your people poorly" modifier?
I can't find any reference to this other than a text file. Does this modifier even exist anymore?
 
Back
Top Bottom