Mod-Modders Guide to Fall Further

Xien - thanks. I'll try that whenever I get my coding fingers ready to take on something of a greater magnitude than tweaks and whatnot.
 
New fields added to GoodyInfos:

<PromotionAdds> & <PromotionRemoves> - Promotions listed will be granted to (revoked from) the unit popping the goody, or to any unit created by the goody instead (for free units or Barbarians). If promotion is being given to the unit who popped the result then it must be a valid promotion for the unit (ie - proper unitcombat)


<iMinTurnsElapsed> & <iMaxTurnsElapsed> - Earliest and Latest in the course of a game that the goody can be granted. Weighted by gamespeed


The first set is hopefully going to stop the "sticky interface" issues for good. The second is for keeping you from getting a map after you already have Omniscience, or a Death Knight before you have diapers to soil.


EDIT: Not possible without DLL modification or Python prereq layout Valk. The Abandon code specifically checks the same requirements as are listed to build the unit. So if you hide the prereq in python, the DLL doesn't know it needs to check it (to bypass some abandon checks). To add an extra check you would need a PyPerTurn check on the unit, which tends to slow things down a bit if you get too many of them.
 
Is it possible to use a promotion to change a unit's Unit Category - in this particular case, a leader trait's free promotion that shifts all Disciple class units to Arcane units? If it's not possible I'll need to go think on other ways to get it done or drop the idea, I suppose... but I've been accused of not being the sharpest knife in the drawer.
 
Is it possible to use a promotion to change a unit's Unit Category - in this particular case, a leader trait's free promotion that shifts all Disciple class units to Arcane units? If it's not possible I'll need to go think on other ways to get it done or drop the idea, I suppose... but I've been accused of not being the sharpest knife in the drawer.

<TempUnitCombat> should be what you want. Only know about it myself because I've been looking at each field in the first few posts here today. ;)
 
Aye, there are a TON of new fields, so it's easy not to be familiar with all of them :) TempUnitcombat will work nicely, but you have to be careful with when/how you apply the promotion. Before the promotion applies they are the standard unitcombat, after it applies they are the new unitcombat. This seems silly, but it is potentially problematic.


Most routines done with promotions or anything else are done from the first listed to the last listed. So if you were to have a leader who applies this promotion to all Disciple units and nothing else, you are pretty well off. But if you also had Spiritual (applies Potency to Disciples, right?) then it becomes tricky. If spiritual is listed in the XML before your new trait, then your disciple units will be born as Potent Arcane units. If however Spiritual was listed AFTER your new trait, then it wouldn't ever apply the Potency promotion to anybody.

Now if you have your new trait apply 2 promotions to Disciple type units, then you have to be careful of how the XML files list promotions. If you wanted Disciples to be Weak + Arcane, and listed Arcane before Weak in the XML then Arcane hits and they become no longer a Disciple type of unitclass, so they won't get Weak.


Complications can be listed for quite a while, but I think you get the point at this stage, or are lost :)
 
That is exactly what I needed! And yeah, I went through the list of codes and stuff in the FF/FFH modmodders guides but didn't see what I needed. I thought i'd seen it done before, though.

EDIT: It makes me feel a little better that the only place this field seems to be used is in the example test/template promotion :D so I didn't overlook it.

EDIT to avoid doubleposting:

New question - where in the Python is the codework for postCombatMimic? I'd like to double it and set it up so that the unit that will have the second copy can ONLY steal Divine from a defeated unit... but I've been through all of the Python and unable to pull up anything that lists that function.

EDIT 3: The racial promotions seem to be getting in the way of letting the Usurper trait promotion change anything regarding unitinfos. The percentage bonuses work - but the units are all still disciples... :( Still trying to puzzle on this one. If I move the new promotions to the top everything goes way out of whack, with haunted land stuff appearing on units anywhere and units going totally crazed. 0_o
Nix that, any other added promotion fouls it up... I may have to come up with a more roundabout solution. Crud.

Are there Python commands for 1) Reading if a unit has a promotion and 2) forcing a unit's UnitCombat ?
 
Hmmm. Mayhaps I should have doubleposted to bump the thread.:D
 
Is it possible to use a promotion to change a unit's Unit Category - in this particular case, a leader trait's free promotion that shifts all Disciple class units to Arcane units?

What's the final result you want, Iceciro? (Disciple units can be built, but their unit-combat is Arcane rather than Disciple?)
 
That's precisely what I want. Some background to better understand...

I have a leader in my game who is Charismatic/Usurper. For a while he was Intolerant, but I wanted to represent the ability to twist the religions his people follow.
In a perfect world Usurper would be working as such (aside from giving the benefits of Conqueror and -1 culture in all cities) - whenever he builds a Disciple unit, it receives the Charlatan promotion, which changes its UnitCombat to Arcane, and makes it lose Divine. Because t2/t3 priests get Channeling, this means his priests are really mages in disguise - they use the tricks and spells to keep the people in line and worshiping. (The object of thier worship being not say, Junil or Kilmorph, but the leader in actuality.)

This culminates at Divine Essence where any level 10 Preist unit drops Charlatan and picks up Thief of the Divine, granting him the Divine ability and he can now cast Divine spells too.

That's the idea, anyways. Implementation is proving to be a lot trickier. Right now, when a unit is built under him as the Cabalim, it works fine... until the unit picks up any other type of promotion, at which point it reverts back to being a disciple. When I load him up as the Scions, the undead promotion the Legates/et-al get is enough to stop the changeover. In a Worldbuilder test this remains the case with pretty much any promo regardless of what it does, including Channeling (destroying the whole point!)
 
Ok, the explanation that they do go Arcane, but then upon getting another promotion revert to normal makes it pretty clear that the problem is in my code. I tested that the unitcombat changes, not sure I ever tested that it STAYS. :)

Mimic is located in the Assets/Python/Entrypoints/SpellInterface.py, the specific function name is listed in the Mimic's XML under the PyPostCombat field.


Having a promotion you add to the top of the XML list screw other things below it up generally means that you are trying to use the same TYPE_??? name as something else already uses. That messes up the enumeration for the second and third readpass, resulting in a lot of promotions shifting their data (it was why Werewolves weren't upgrading for a while)
 
Appreciate the help with the mimic, in any case, and now I know that for the time being the unitcombat change idea, through the promotion itself, won't work. I'll have to puzzle up something else.
 
Hello there!

I really like the dynamic state name mechanics; thus I searched for it in the files and I eventually found the xml ones. I have some questions: 1) Is there a python file that manage the changes? I remember that there is one for the original Dynamic Civ Name component that came with Revolution.

2a) Is there a tag that tell if a civ has a vassal? Is there one that tell how many vassals the civ got?

2b) Is there a tag that tell how many owned cities were aquired through conquest rather than through founding?

3) If there isn't such tags, how could I create them?

4) Is it possible to use any tags in the CIV4StateNameInfos.xml file? Or are usable only those listed in the first post?

5) If not, how could I make them usable? For instance, I would like to have <bFemale> usable.

Finally, I must apologize if any of these questions is silly. I searched through the Fall Further forum and used the search functions but I didn't find much information...
 
I really like the dynamic state name mechanics;

I'm happy you like it. We didn't get much feedback on this feature, but I suppose that's ok for a for-flavour-only-feature. ;)

1) Is there a python file that manage the changes? I remember that there is one for the original Dynamic Civ Name component that came with Revolution.

No, there is no Python file, I decided to rewrite the dynamic civ names system completely to be more in line with how things are handled in Vanilla Civ4, to make it faster and to make it modable more easily (to a degree) by people which aren't familiar with Python.

2a) Is there a tag that tells if a civ has a vassal? Is there one that tell how many vassals the civ got?

2b) Is there a tag that tell how many owned cities were aquired through conquest rather than through founding?

No, sorry, not in the current version.

3) If there isn't such tags, how could I create them?

To create new ones is difficult. You would have to change the SDK to make them work. That's the way it is with all tags in Civ4. This said, I'm always open for suggestions and would be happy to add new tags if the need arises.


4) Is it possible to use any tags in the CIV4StateNameInfos.xml file? Or are usable only those listed in the first post?

Only the eight tags mentioned in the first post.

5) If not, how could I make them usable? For instance, I would like to have <bFemale> usable.

This one is going to come. I just forgot to implement it, when making the first version of the state name system.

Finally, I must apologize if any of these questions is silly. I searched through the Fall Further forum and used the search functions but I didn't find much information...

No, no need to apologize, your questions are definitely not silly. :)

Give me some examples, which names you would like to see in the game and I'll try to tell you, what's possible and what's not.
 
Jean Elcard:

Like Valkrionn said, I would like to be able to count vassals and/or the number of cities the civilization conquered to bestow or not the title "Empire". I thought of adding "Federation" but I don't know what would make one yet.

Otherwise, I wanted to use <bFemale> for Queendom; or Matriarchy for, say, a female leader of Clan of Embers rehabilitating it by having both Theocracy and Religion civics. By the way, I would like to be able to have <PrereqLeader> too. Given the different personnalities of the leaders, it would be nice to create some variation inside the same civ.

At first, I just thought of creating more "flavoured" state names. I think a lot is doable, given, again, the diversity of the mod. Most are based on civics, civilization or religion, though; thus no help needed here.

To sum up, here are the tags I miss, ordered by "necessity":
<bFemale>
<PrereqLeader>
<bColony> (is or not a colony)
<bMaster>/<iVassal> (number of vassals)
<iCitiesAcquired> (number of cities taken from other civs)

Of course, this is just a thought. Well, I already began working on some names, but, basically, a thought.

Edit: I already successfully added "Motherdom" to the Archos civilization. I think we could put a lot of emphasis on their Mother-cult by expressing it in their state name. I'd also do something about the magic-structured Amurites.
 
Jean Elcard:

Like Valkrionn said, I would like to be able to count vassals and/or the number of cities the civilization conquered to bestow or not the title "Empire". I thought of adding "Federation" but I don't know what would make one yet.

Federation could be City States, with a number of vassals.
 
Question - what's the simplest way to tone down the numbers of barbarian stacks that spawn and gatecrash player/AI cities? I love the pillaging packs of barbs, but I hate the sheer number of stacks that can come to any one civ at a single moment, severely ******ing the growth of their current picking, player or AI.
 
Top Bottom