[MODCOMP] - XML Cleanup & Expansion

Just wanted to mention for anyone using this DLL in their own mods that things are chaning quite a bit for the next version I'll release. I've learned a lot more about how to use the Code, and much of what I have done so far is pretty sloppy. I am in the process of cleaning it up and adding 25 INT values right now.
 
Neat, can't wait :)

P.s. Hope kael releases the ffh 2 0.32 dll quickly after he releases it so you can make this mod for it soon after it 0.32 is released!
 
Version 1.01 uploaded. I have incorporated another of Dom Pedro's MODCOMPs in this one, and I have some legwork done on my upcoming INT values for people interested in peeking at that as well.


The fields which I added with the Modcomp show up as Philosophical resulting in all of your units gaining 1 :hammers: from any unit they defeat, as well as double :culture: from them. Lions grant 1 :culture: and 2 :food: each time you kill one of them. I added 2 promotions: Courier & Scalper.

Courier is available to Naval Units and grants some :gold: and :hammers: to units which defeat the ship (so why would you spend your XP on gaining this? Who knows... it's just there for demonstration purposes... Maybe I should have made it grant +1 :move: as well. Later it will use some of my other fields to make it actually worth getting though).

Scalper makes the unit generate :food: and :gold: from any unit that it defeats, and is available to Recon Units with Combat 1.
 
Version 1.01 uploaded....

Great stuff! Err... Did I already say that?

I did.

Cool stuff!

I'm waiting for the FFH2 .dll and schema to stabilize sometime in Ice before doing anything with alternate .dlls... but it's getting hard to resist.
 
Looks nice. I don't really see why Philosophical should get a boost from defeating units though. I'm not a fan of those particular new promotions either, although I do plan to use their functionality for a few promotions of my own.

I'm thinking it would be better to add a "Scavenger" trait/promotion (which fits the Doviello very well) that grants hammers, maybe also culture, and gold (and double food) from combats. (I'd probably also make this promotion let units steal the weapons promotions from units they defeat. That would require implementing the schema/SDK changes that I convinced Grey Fox to put in Broader alignments, despite having nothing to do with alignments.)
 
Philosophical should have a boost becuase it is the first one in the file, and thus I used it for testing purposes :p

NOTHING I add to the game in this modcomp is meant to be useful, or make sense. I just place something in there from the top of my head which will allow people to see the formatting, or to play with the functionality I have added. If I wanted to keep it playable I would just do a Mod instead of a MODCOMP ;p
 
Philosophical should have a boost becuase it is the first one in the file, and thus I used it for testing purposes :p

Can you put in a negative number? Then it could be hammers lost due to time wasted spent arguing if all that killing served Truth and Beauty. :)
 
Yes, negatives are certainly allowed. Not sure if the game is equipped to reduce your culture range if you lose too much culture... also not sure how well it would handle having a negative value for your food storage or current Production total. I imagine in either case it will just add as much as you are supposed to gain the next turn and go on with life, you might lose a point of population if you remain at negative food storage when your next turn comes up though....

Another curiosity for me is what happens if you get a negative to Research on a tech which you already know. As it is that can't happen (can only get the Tech Affected if you do NOT know it yet yourself), but it would be interesting if you could cause people to forget a technology if they kill your units ;) (interesting, but NOT fun).

I've actually considered using the negative :gold: when a unit kills you as a field in a promotion, combined with a guarantee that you capture the unit. It would basically be that instead of killing you, they beat you up, then paid you to come to their side. Might be a fun addition to Mercenaries.
 
Version 1.02 posted.

Mostly Duration changes included this time. Already thinking that I may alter how one of them works though.

ChangeDuration was set up so that you could make a permanent unit become Temporary, but I realized that if you use this as a summon Perk to extend the duration of your summons it will cause your normally permanent summons to become temporary with a SHORTER DURATION than your normal summons! That's not quite exceptable, but I certainly want to be able to make permanent units become temporary. It is just far too enjoyable of a feature.

Thus there will be 1 more Duration Field eventually which will only affect units who already possess a duration.

Also started making small tweaks to the game display functions so that they are a tad more instructive.
 
I'm looking forward to the duration changes. If I hadn't decided to wait for 0.32, I might go ahead and include this in my modmod now.


The slave generation chance makes me wonder: did you remove the lines of code that make captured units have the same duration as the unit that captures it? Capturing slaves that only last for a turn (or worse, capturing equipment) can be quite annoying.



How long do you think it will be until you release a version of this modcomp for 0.32?
 
I did not remove the code to pass on Duration. It doesn't make much sense for that to happen IMO, so I think that I shall remove it now, unless someone provides good reason for it to remain.


I also just added in the mentioned Duration for only Temporary Units, as well as my new favorite field: <bEffectProm>

If set to 1, this will cause the Promotion to not show up in the Civilopedia, nor on the unit (not on the info screen nor the mouseover screen). With this added I no longer feel the need to add any fields to UnitInfos unless they are pre-req or otherwise affect creating the units :)

EDIT: Forgot to answer about .32: I would assume it won't take more than a day or 2. But it depends on how much Kael has changed.
 
Nice. I don't mind waiting a few days.

In answering you trivia question, I noticed that the werewolf promotion itself does nothing, since werewolf generation is handled purely though the unit defines now. Care to add <UnitConvertFromCombat>, <iUnitConvertFromCombatChance>, <UnitCreateFromCombat>, and <iUnitCreateFromCombatChance> soon?

If you are getting ready to add tags that take strings, I'd really like (Unit, BtS added State) Religion prereqs as well as Civ prereqs.
 
Pre-Reqs are cakewalk to add, learned that when I was tossing PreReqLevel in there. I wish all the checks were so straightforward. Though of course the game is set up to handle a lot of it wrong (like not allowing you to get Blitz if your base :move: is only 1... I changed that one so it only blocks it if your CURRENT move (plus the promotion giving you blitz) would be 1).

Not up to strings quite yet, but I already have the INT defined for the percent chance of Converting and Creating Units. Not much I can do with them until I load the strings up as well, but I am pretty sure that I am comfortable with doing Strings and Arrays both now. Nested Arrays maybe not quite yet... but possibly.

Found that I am branching out and will soon have to include the entire DLL folder with this mod. Quite a few things in the code to clean up and tweak. I'm just paranoid that WoC has already done too much of it, but merging with them is on semi-hold until Firaxis releases the next Official Patch.
 
Why do you want it that way? I could make the units display the Icon for their religion in a nice spot when you do a mouseover. I could add a field which will allow you to have bonuses against certain religions as well.

What other purposes would you have for it really? I suppose making a building guarantee that you get a religious Promotion? Then there is a problem with handling when you have 2 different religions being forced on a unit. Changing a unit's religion I suppose, but I can't think of when you would do that precisely and have it make much sense.

If you can argue a good reason for it I suppose I could, but right now I don't see a reason for doing all the work of rewriting what seems to work fairly well so far.
 
Well, it would allow you to make religions grant appropriate damage type resistances, terrain/feature combat bonuses, summon perks, etc. I don't think it matters that much though, so long as promotions can have religions as prerequisites (since spells already can).

If and when you let promotions allow different build orders it could be more useful, but, again, not really necessary. (Hmm...I guess we could used the delayed casting ability to mimic building if we wish.)
 
Along with what magister said if it were in a promotion it could go with the unit as it upgrades.

Religions do carry over when a unit is upgraded. This was fixed several patches ago.

Hmm...do they carry over when a unit is converted through a spell (Drown, Lichdom, etc) or converted/captured by spells/in combat? I'm not sure, but I'm thinking they don't. I think it probably should.

Edit: the Convert function does keep the religion intact, at least in 0.32
 
Reasonably certain that each of the cases you asked about passes through the Convert function. And I recall seeing that it strips religion off a unit when you use the function, so that would mean they do not carry religion through conversions.
 
Top Bottom