[MODCOMP] - XML Cleanup & Expansion

All my new fields are alphabetical.

Oh! Awesome.

Thanks.

And with Diplomacy working, almost any CityBonus which applies to Rivals ought to include a fDiplo value so that the AI will respond to it properly.

Good point. The activities of the unit with the "Schemer" promotion are supposed to be pretty much under the radar, so it should be a very small change. How does fDiplo work? (Cumulative per turn? A straight +/- the value while the unit's modifier applies? And is there a Diplomatic modifier for buildings? (Sometimes the unit helps Rivals via a building.))

EDIT: All right - "Schemer" and "Malaise" (Undead-unit promo that causes unhealth in nearby cities) loaded up and appear in the 'pedia! :)
 
For now, Diplo only applies on a per turn basis. So if you set it at a -0.5 Diplo, then you can use one schemer per city without any response from the AI in Diplomacy, but as soon as you have a second unit hit the same city as another one, you'll take a hit.


Need to see the fields used in action to decide precisely how it may need changed. For now I hitch onto the Diplomacy of Events, so I am not sure what delay the leaders are set to forget your actions with. It'll require some balance decisions on precisely how to use the field from there. It might be that we want the Diplomacy values to slowly build up and VERY slowly decay, in which case it'll store even 0.01 shifts each turn since that will matter. The way I picture it for now though is that we should aim for a very quick forget speed on each leader and large Diplo values. That way they will be VERY clear about wanting your units out of their territory or war will come SOON, but once they are out of the area they shall be appeased quickly and forget about the incident.


But anyway, rambling aside, for now you should probably want fairly low values, but anything under 1 in a single city means no effect at all.
 
For now, Diplo only applies on a per turn basis. So if you set it at a -0.5 Diplo, then you can use one schemer per city without any response from the AI in Diplomacy, but as soon as you have a second unit hit the same city as another one, you'll take a hit.

Hmm... interesting. There's a world-limit of 1 on the unit I'm working with, btw. But multiple promotions with Diplo modifiers would be cumulative? Right now some of the unit's spells cause war, some don't, and one may-or-may-not cause war. It might be better to have some cause diplomatic shifts instead. Given all the unit's capable off a -1 shift when he's around is probably a good idea, though. I'll try it.

I'm trying out a unit with a -1 Culture promotion and I'm not seeing a result - either in the accumulated culture each turn or on the city's info screen. The 'pedia/help text for the Promotion shows -1 Culture and -1 Gold. I know the gold isn't working yet - should the Culture be? It's set to apply to "Rivals" and the unit is in a city I've go no treaties with. Not at war, either. 041D. EDIT: Not seeing a Diplomatic modifier either. It's set to -1.

Just added a spell using "iExtraSupport". Works great.

But anyway, rambling aside, for now you should probably want fairly low values, but anything under 1 in a single city means no effect at all.

If the effect had range enough to reach more than 1 city would the diplo modifiers stack?

Also:
The "Malaise" promotion causes -0.5 Health with a range of 2 and a -0.25 decay rate. In the pedia that shows up as a -0.3/square decay. Do you know what value will be used when calculating the result?
 
If you are using the released 041D of FF, only Health & Happy work. If you are using the source I have posted for FF (compiled it yourself) everything should work, but some pieces won't display quite right (needed to touch up Python a tad bit for a few items). Culture wasn't one I had to tweak the Python for, so if you use the version where it works then a mouseover of the city will show them gaining the appropriate amount of culture (as well as the City Zoom indications on the Culture Bar)

Yes, all Diplo effects from all units store in the same place, so if you have a +1 and a -.01 hitting the same city, you should get no effect at all for the start of the next turn. Diplo modifiers right now are on a per city basis as well, pending review and balance decisions, so if a single unit has a range of 100 and a diplo of -.5 it will not cause any changes (unless the map was small enough that it wrapped around and hit a city twice of course)


I set things to show with either 0 or 1 place after the decimal initially, left myself a note to change that to 0 or 2, but hadn't gotten around to it yet. Hence .25 shows up as .3, but the game still uses .25 in calculations. I plan to change that next time I sit down with the code (but note, I planned to change it the last 5 times I sat down to code as well....)
 
If you are using the released 041D of FF, only Health & Happy work.

Ah - Ok, that'd be it.

a range of 100 and a diplo of -.5 it will not cause any changes (unless the map was small enough that it wrapped around and hit a city twice of course)

Heh. :)

Thanks for all the info.
 
By the way, in the course of this discussion I've convinced myself to go with Diplomacy "stacking up" on each player, such that even a -.01 will eventually cause a Diplomatic reaction from the "victim" of your actions. Decay will be pretty quick, but only after a short period of not changing their Diplomatic Views in the same manner (so no Negative Proximity for 2-4 turns means that they start clearing their memory of your actions fairly fast, probably 1 point per turn or so). And this will also wind up meaning that all cities stack their diplomatic modifiers together, so if you hit 5 cities each turn with a -.25 diplomacy, then you'll get an additional -1 "Your Forces are Disturbing Our Way of Life!" (or somesuch) each turn (well, 1 each turn for 3 rounds, then 2 for the fourth round, then 1 per turn for 3 more...)
 
By the way, in the course of this discussion I've convinced myself to go with Diplomacy "stacking up" on each player, such that even a -.01 will eventually cause a Diplomatic reaction from the "victim" of your actions.

I'm unsure about something: Is that -.01 eventually causing a reaction if enough units cause the modifier, or if a few units cause it for long enough? Or both?

***

Edit - tag request (either promotion or unit): Replace the boolean "die after combat" tag (forget what it's called) with an "i" tag allowing you to enter the % chance the unit dies. It'd be more flexible, but I don't know how much it'd be used... beyond the one unit of mine I know'd use it. :)
 
Quick question: Where is that one line of code I'd have to change in order to make dieing summons grant their summoners part of their xp not dependant on the summoning trait?
 
@Tarq: The stacking Diplo would be all modifiers on all cities, from all units, and for all turns. So if you continually apply a small effect on a single city, eventually you get a Diplomatic reaction. Or if you apply a lot of small effects on one/many cities quickly, you get a Diplomatic reaction.

As for the tag request, it is already in the code. That was one of the tags I initially planned to import from UnitInfos (bDieAfterCombat), but then I noticed we already have iKamikazeChance, which does precisely what you are asking for, that number is your percent chance to die after any combat.

@MC: It is in the CvUnit::kill function under the searchkey "Whiplash"
 
I noticed we already have iKamikazeChance, which does precisely what you are asking for, that number is your percent chance to die after any combat.

Where's it found? The only "kamikaze" tag I know of is "iKamikazePercent"... come to think of it, reversing how iKP works could be nice: Presently it says it applies it's bonus to the target unit, not the unit possessing it. The in-game text implies it's the other way around, though.

***

Do the Diplo. modifiers stack at X/turn... so that a -.25 modifier would be -2 after 8 turns?
 
Hrm. I guess I hadn't looked closely at the code when I came across that one (maybe it just had the name I wanted to use or something?)


Looking at it now, that is a % bonus to your combat strength, BUT if that is non-zero then you are flagged to be Suicidal (die after combat). So any value in that field means a boolean setting of Suicide. Guess I'll put the iChanceCombatDeath back in the development schema. Not a hard one to write at all though, other than if I want to program the AI to be hesitant to attack using a unit with a chance of insta-death.

Oh, and as written it is set to grant a bonus to the unit who possesses the Kamikaze tag.
 
Oh, and as written it is set to grant a bonus to the unit who possesses the Kamikaze tag.

Sort of - it gets the benefit, at least. The Scions unit "Honored Band" has a spell that uses it. Just tried it again. It shows up as a negative modifier in the promotion text. In the odds summary it appears as green-text - where you'd expect modifiers to the unit selected - but it actually applies to the target. "-20 for Self-Destruction" is what it said, IIRC. However, that -20% is applied to the target unit, not the unit with the promo. (Targeted unit with 5 strength showed as 4.6)

So it works, but the in-game description is misleading.
 
Added some Prereq fields. Now you can do very nifty things without resorting to Python like this:

Code:
		<PromotionInfo>
			<Type>PROMOTION_HAWK_RAVEN</Type>
			<bAutoAcquire>1</bAutoAcquire>
			<bEffectProm>1</bEffectProm>
			<bNoXP>1</bNoXP>
			<NewName>Parrot</NewName>
			<PrereqCivilizations>
				<PrereqCivilization>CIVILIZATION_BALSERAPH</PrereqCivilization>
				<PrereqCivilization>CIVILIZATION_LANUN</PrereqCivilization>
			</PrereqCivilizations>
			<PrereqUnits>
				<PrereqUnit>UNIT_HAWK</PrereqUnits>
			</PrereqUnits>
		</PromotionInfo>


This would cause all Hawks built by the Lanun or Balseraph to instead be called a Parrot, and there would be no Promotion showing on the unit to indicate that you did such a thing :) Same is easily done for things like renaming Infernal Champtions to be called Sect of Flies, or Balseraph Hunters to be Acrobats... ;)
 
Nice. When will this be released? I'm thinking I may may want to wait so I can use these new tags in my modmod.
 
FF 0.42 is for 0.33 though, isn't it? I was hoping to have a mod out by then as I won't have so much time once school starts again (the monday after 0.33 comes out). Oh well, I guess should get working now and save some of my plans for a later release.


The fact that your <PrereqAlignments> tag allows for multiple alignment got me thinking that you should slightly change the way Broader Alignments works. BROADER_ALIGNMENT_EVIL_MIN, BROADER_ALIGNMENT_EVIL_MAX, BROADER_ALIGNMENT_GOOD_MIN, and BROADER_ALIGNMENT_GOOD_MAX really should not be in GLobalDefinesAlt.xml (I've always considered using this file to be tantamount ot hardcoding). The boundaries for the alignments should be defines in C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Fall Further\Assets\XML\CIV4AlignmentInfos. That way, modmoders could add several levels of alignment in the spectrum between good and evil.

(I'm sure someone would like you to add support for a multidemensional (like good-evil + lawful-chaotic) alignment scale too, but I don't really plan to use that myself.)
 
Something along those lines will probably be how it is done when we get around to fully tweaking Broader Alignments, though you cannot simply add it to the AlignmentInfos file at the present moment since it is a BasicInfos file, and those are only allowed to have a Type and the Universal fields (Desc, Button, Help...). Once that is moved to being a full file there are a lot more things which can be done with it, hence a lot of thinking and dev process junk before doing such a thing so as to get it started on the right foot.

And yes, 42 is for 33.
 
Top Bottom