[MODCOMP]Broader Alignment

Yeah, if it counts towards the conquerer's alignment that could cause problems. I'm thinking that destroying a building should have the opposite alignment effect as building it (the same for killing units).

I'll probably merge this with the Abandon City/Raze Building mod (and the Unit Stats FfH modmod) as a basis for my modmod, in which case you would be able to raze the evil buildings yourself (or even the entire city) to make you less evil (of course razing the city would make you more evil instead.) (I should probably check to make sure that cities razed this way still effect alignment, grant manes, etc.)

I don't suppose you'd want to include those in this modmod to begin with, to save me a little work, would you?

Edit: (The abandon city mod is actually just a few python files that don't even replace anything FfH uses. It is already compatible with FfH and I think it worked fine with UnitStats, although for some reason it stopped working when I used it with the DLL I compiled based on UnitStats. The only merging work you (or I) would really have to do is to merge yours with UnitStats.)

I guess I might as well do it myself though, as there are a few other changes I'd really like to make too. In additon to the things I've suggested here already, I want to add the <PyPerTurn> tag/function to CIV4UnitInfos.xml instead of just CIV4PromotionInfos.xml, to add the <PythonPostCombatLost> and <PythonPostCombatWon> tag/function to CIV4PromotionInfos.xml instead of just CIV4UnitInfos.xml, to allow HN units to capture/spawn units (but not capture cities), to allow unowned Forests to sometimes (but more rarely) turn Ancient, to make units unload all their cargo before their limited duration kills them, to allow units with cargo to also be cargo, to allow birds to rebase like they did in vanilla instead of BtS, to be able to liberate individual cities as colonies instead of needing multiple cites on a separate continent from your capital (I found a code that supposedly lets you do this, but when I added it to the FfH DLL it made liberating colonies completely impossible. Most people on that thread seemed to have had the same result in their mods), and to include the SDK portions of Vehem's Doviello Icehouse modmod (but use different python calls an an Illian UB)
 
Here's the current changelog so far. Come with suggestions before I release it. (I might have forgotten to add some stuff here)

Spoiler Changelog for version 1.1 :
______________________________________________

Changelog
______________________________________________
Version 1.1 - Started 04/08/2008

Additions:
- Added an alignment meter to the interface.
- Added BROADER_RAZE_BASE_MODIFIER to the Defines. Defines how much razing a city changes your alignment.
- Added BROADER_RAZE_MODIFIER to the Defines. Defines how much razing a city changes your alignment per every other population point (this*population/2).
- Added BROADER_POPRUSH_BASE_MODIFIER to the Defines. Defines how much poprushing changes your alignment.
- Added BROADER_POPRUSH_MODIFIER to the Defines. Defines how much poprushing changes your alignment.
- Added iAlignmentModifier to CIV4UnitInfos.xml, CIV4PromotionInfos.xml, CIV4SpellInfos.xml, CIV4BuildingInfos.xml, CIV4ProjectInfo.xml, and CIV4TechInfos.xml
- Added iPrereqBroadAlignment to CIV4UnitInfos.xml, CIV4PromotionInfos.xml, CIV4SpellInfos.xml, CIV4BuildingInfos.xml, and CIV4ProjectInfo.xml
- BROADER_RAZE_BASE_MODIFIER set to -2
- BROADER_RAZE_MODIFIER set to -1
- BROADER_POPRUSH_BASE_MODIFIER set to -1
- BROADER_POPRUSH_MODIFIER set to -1
- SPELL_CONSUME_SOUL iAlignmentModifier set to -3
- SPELL_FEAST iAlignmentModifier set to -3
- Added BUILDING_DEMONIC_CITIZENS as a Define, used at Raze calculation. (Will ignore the cities with Demonic Citizens)
- Started adding game text.

Changes:
- Set USE_ON_UPDATE_CALLBACK to 1 in PythonCallbackDefines.xml
- Put some Screen update code in onUpdate() to show the change in alignment as it changes.
- LEADER_SABATHIEL iAlignmentModifier set to 370
- LEADER_CAPRIA iAlignmentModifier set to 330
- LEADER_VARN iAlignmentModifier set to 310
- LEADER_ETHNE iAlignmentModifier set to 290
- LEADER_EINION iAlignmentModifier set to 300
- LEADER_BASIUM iAlignmentModifier set to 400
- LEADER_GARRIM iAlignmentModifier set to 185
- LEADER_BEERI iAlignmentModifier set to 185
- LEADER_CARDITH iAlignmentModifier set to 320
- LEADER_ARENDEL iAlignmentModifier set to 180
- LEADER_THESSA iAlignmentModifier set to -20
- LEADER_AMELANCHIER iAlignmentModifier set to 20
- LEADER_ARTURUS iAlignmentModifier set to 150
- LEADER_KANDROS iAlignmentModifier set to 150
- LEADER_SANDALPHON iAlignmentModifier set to -10
- LEADER_FALAMAR iAlignmentModifier set to 40
- LEADER_CASSIEL iAlignmentModifier set to 0
- LEADER_RHOANNA iAlignmentModifier set to 50
- LEADER_TASUNKE iAlignmentModifier set to -50
- LEADER_VALLEDIA iAlignmentModifier set to -60
- LEADER_DAIN iAlignmentModifier set to 60
- LEADER_HANNAH iAlignmentModifier set to -160
- LEADER_AURIC iAlignmentModifier set to -180
- LEADER_CHARADON iAlignmentModifier set to -220
- LEADER_MAHALA iAlignmentModifier set to -175
- LEADER_KEELYN iAlignmentModifier set to -190
- LEADER_PERPENTACH iAlignmentModifier set to -290
- LEADER_JONAS iAlignmentModifier set to -230
- LEADER_SHEELBA iAlignmentModifier set to -200
- LEADER_FAERYL iAlignmentModifier set to -300
- LEADER_ALEXIS iAlignmentModifier set to -330
- LEADER_FLAUROS iAlignmentModifier set to -310
- LEADER_TEBRYN iAlignmentModifier set to -365
- LEADER_OS-GABELLA iAlignmentModifier set to -360
- LEADER_HYBOREM iAlignmentModifier set to -400
- LEADER_BARBARIAN iAlignmentModifier set to -245
---------------------------------------------------
- RELIGION_THE_ORDER iAlignmentModifier set to 512
- RELIGION_OCTOPUS_OVERLORDS iAlignmentModifier set to -256
- RELIGION_RUNES_OF_KILMORPH iAlignmentModifier set to 256
- RELIGION_THE_EMPYREAN iAlignmentModifier set to 384
- RELIGION_COUNCIL_OF_ESUS iAlignmentModifier set to -384
- RELIGION_ASHEN_VEIL iAlignmentModifier set to -512
---------------------------------------------------
- CIVIC_CONSUMPTION iAlignmentModifier set to -6
- CIVIC_LIBERTY iAlignmentModifier set to 10
- CIVIC_SACRIFICE_THE_WEAK iAlignmentModifier set to -32
- CIVIC_OVERCOUNCIL iAlignmentModifier set to 24
- CIVIC_UNDERCOUNCIL iAlignmentModifier set to -24
---------------------------------------------------
- BUILDING_ASYLUM iAlignmentModifier set to -5
- BUILDING_CITY_OF_A_THOUSAND_SLUMS iAlignmentModifier set to -8
- BUILDING_DEMONS_ALTAR iAlignmentModifier set to -10
- BUILDING_DUNGEON iAlignmentModifier set to -5
- BUILDING_DWARF_CAGE iAlignmentModifier set to -5
- BUILDING_ELF_CAGE iAlignmentModifier set to -5
- BUILDING_HUMAN_CAGE iAlignmentModifier set to -5
- BUILDING_ORC_CAGE iAlignmentModifier set to -5
- BUILDING_HOPE iAlignmentModifier set to 1
- BUILDING_INFIRMARY iAlignmentModifier set to 1
- BUILDING_INFERNAL_GRIMOIRE iAlignmentModifier set to -5
- BUILDING_MERCURIAN_GATE iAlignmentModifier set to 10
- BUILDING_MOKKAS_CAULDRON iAlignmentModifier set to -5
- BUILDING_PILLAR_OF_CHAINS iAlignmentModifier set to -10
- BUILDING_PROPHECY_OF_RAGNAROK iAlignmentModifier set to -15
- BUILDING_SHRINE_OF_SIRONA iAlignmentModifier set to 10
- BUILDING_SMUGGLERS_PORT iAlignmentModifier set to -1
- BUILDING_SOUL_FORGE iAlignmentModifier set to -10
- BUILDING_TOWER_OF_COMPLACENCY iAlignmentModifier set to -10
- BUILDING_TOWER_OF_NECROMANCY iAlignmentModifier set to -5
---------------------------------------------------
- TECH_CORRUPTION_OF_SPIRIT iAlignmentModifier set to -10
- TECH_DECEPTION iAlignmentModifier set to -7
- TECH_DIVINATION iAlignmentModifier set to 3
- TECH_HONOR iAlignmentModifier set to 7
- TECH_INFERNAL_PACT iAlignmentModifier set to -10
- TECH_MALEVOLENT_DESIGNS iAlignmentModifier set to -10
- TECH_MESSAGE_FROM_THE_DEEP iAlignmentModifier set to -5
- TECH_MIND_STAPLING iAlignmentModifier set to -5
- TECH_NECROMANCY iAlignmentModifier set to -3
- TECH_ORDERS_FROM_HEAVEN iAlignmentModifier set to 15
- TECH_POISONS iAlignmentModifier set to -3
- TECH_RIGHTEOUSNESS iAlignmentModifier set to 15
- TECH_WAY_OF_THE_EARTHMOTHER iAlignmentModifier set to 5
- TECH_WAY_OF_THE_WICKED iAlignmentModifier set to -5
- TECH_WAY_OF_THE_WISE iAlignmentModifier set to 5
---------------------------------------------------
- UNIT_DISEASED_CORPSE iAlignmentModifier set to -1
^^-- just to test the text, I haven't really decided upon any of the units yet
 
Looks Great.

I don't suppose you think that maybe adding alignment requirements to techs would be a good idea, do you? I'm mostly thinking that this could be a good temporary measure until the AI properly weighs techs according to alignment, religion, civ, etc. It never seemed right to me that Evil civs could research righteousness, and truly good civs do not tolerate necromancy.

Actually, it might be good if you could make a civ loose knowledge of a tech they used to know if the alignment changed too much. Again, the main example I can think of here is that you would not stay righteous if you become evil.

It might also (instead?) be good if knowledge of certain techs could block the research of others (for example, those with Corruption of Spirit could not have Righteousness), or cause a civ to forget another tech (so you could research Corruption of Spirit but would lose your Righteousness in the process, and later could give up Corruption of Spirit to regain your Righteousness)


That isn't exactly the main point of the modmod, but I think it could be extremely useful. You could add many more techs, but you would have to make decisions about the direction you want to follow and it could be impossible for you to ever run out of things to research. I was considering adding such things in python for a few specific techs, but if it can be done in the DLL it might be clearer to the player what is going on. (Of course, python would still handle more complex requirements better like if you needed 3 techs and a certain alignment in order for a fourth tech to be blocked or forgotten)

On a similar (probably unnecessary and not particularly useful to this mod) note, it could be nice if researching technologies could require access to resources. Since I started playing civ III I've always wondered how you are supposed to be able to develop horseback riding when you've never even heard of horses, or iron working without iron.
 
Looks Great.

I don't suppose you think that maybe adding alignment requirements to techs would be a good idea, do you? I'm mostly thinking that this could be a good temporary measure until the AI properly weighs techs according to alignment, religion, civ, etc. It never seemed right to me that Evil civs could research righteousness, and truly good civs do not tolerate necromancy.

I don't see why not, even if I don't use it. But could use it the way you describe as well.

Actually, it might be good if you could make a civ loose knowledge of a tech they used to know if the alignment changed too much. Again, the main example I can think of here is that you would not stay righteous if you become evil.

Never say never. I don't see what you say as impossible. (I don't see much as impossible with the SDK anymore). The way I would do it would probably be that you would lose beakers in the tech gradually as long as you have the wrong alignment (which would immediate loss of the tech, but you could more easily regain it the shorter time you have been without it).

It might also (instead?) be good if knowledge of certain techs could block the research of others (for example, those with Corruption of Spirit could not have Righteousness), or cause a civ to forget another tech (so you could research Corruption of Spirit but would lose your Righteousness in the process, and later could give up Corruption of Spirit to regain your Righteousness)
Seems like a more hacky way to do it however. And not as streamlined as the above suggestion. (And in the later part of your suggestion I could see the AI going through an endless loop)

On a similar (probably unnecessary and not particularly useful to this mod) note, it could be nice if researching technologies could require access to resources. Since I started playing civ III I've always wondered how you are supposed to be able to develop horseback riding when you've never even heard of horses, or iron working without iron.

Yeah, I think someone has done a similar mod, or was planning one. But I think he made techs get cheaper with some resources. Or maybe it was just techs getting cheaper from other techs.

Btw, any input on the different values? I know some are a bit low (Infirmary), and some are a bit high. And xienwolf suggested having an extra tag on techs for the first one to research the tech. (For example: Would be more evil to be the first to Infernal Pact and summon Hyborem)
 
Changelog updated in first post. (Gonna keep updating it in first post so check some times)

Now I'm going to bed, so don't expect a release today. ;)
 
Are we going to be able to see just how good or evil our rival are? I'm thinking it would be good to show the numerical value when you mouseover a leader's score, in the same place as where it shows the diplomatic breakdown.

It might also be good to have the diplomatic alignment modifiers be based on the broader alignment value instead of just the good-neutral-evil distinction.


Are you going to release this for patch d, or wait for patch e to be released? It looks like e will contain lots of good changes, including some SDK changes, so it may be better to wait.


I thought I'd go ahead and see if I can get you to add the SDK changes I just suggested in the 0.31 changelog thread (here ) , in case Kael doesn't add them in time for my modmod. I believe changes that involve adding new XML tags are currently beyond me, and are really needed for my modmod. They aren't really necessary to this modmod, but if they were included anyway it would make my job a lot easier.
 
I might not be able to release it for E since I will be going home tomorrow. But I will release the source as well, so anyone can combine the mods.

MagisterCultuum said:
I believe I read that the SDK doesn't let units with base movement of 1 get blitz. Could you change this so that units with promotions that give added movement can still get blitz (or just remove this check entirely)?

Actually, I think Blitz works on all units with movement more than 1, and the movement from promotions should count. It has always done in my memory anyways.

MagisterCultuum said:
Of course, I'm still hoping that you'll put <PythonPostCombatLost> and <PythonPostCombatWon> in CIV4PromotionInfos.xml file and <pyPerTurn> in CIV4UnitInfos.xml, and if I can't convince you (or maybe Grey Fox ) than I'll have to figure out how to do it myself (I've yet to figure out how to add new tags to the schema) or else leave out lots of promotions (mostly equipment) which I have planned.

I'll check how easily this is to add. I added these to the units in 0.30 without knowing how they were coded when I made my makeshift upgrade to 0.31 (I forgot to download the source last time I was here :p). So maybe I can do it. I guess I will have to do a loop through all promotions during post combat and see if any of the units have anything in their promotions to be run.

MagisterCultuum said:
I really think that you need to go ahead and make Spell Extension promotions increase the range of ranged spells. This should of course be in the SDK now, instead of having all the ranged spells hardcoded in python like back before BtS. There should be a tag that adds x (which would probably always be 0 or 1, but an equipment promotion that boosts range further could be cool) to the range of all spells that already have a range greater than 0 (or if you prefer, you could add a tag in the spell defines that determines if the range will be increased). Maelstrom should probably have a range of 1 but be boosted by this spell.

This shouldn't be too hard to add, but I'm not sure what you mean by the last sentence. You want a spell to add range? Wouldn't just adding a range tag to promotions solve that as well?
 
You were right xienwolf, I couldn't use the Demonic citizens building the way I planned. Not the way the code works now. I thought it worked differently, but it seems I would have to do a lot of rewriting to make that work.

So I just check if the old owner is the Infernals instead. I'm suspecting that if the city has no culture at all, it won't work, but ah well.
 
If Blitz works now, then no problem. I do remember reading that though, and I've noticed lately that I can't seem to get blitz even when I have the tech and promotions prereqs (I'm not even sure if this was limited to only move 1 + mobility units. I think I've only been able to get it on cavalry units, even though it s supposed to be availible with archer, melee, beast, recon, and disciple too)



Hopefully the xml tags/python functions won't be hard to add; Kael has stated that he specifically wrote them in such a way to make adding them to promotions too easy. He said that he may do so himself, but (as usual) wants to wait until he actually adds a promotion that uses the functions, so as not to slow the game unnecessarily.



Not sure why I wrote "this spell" when I meant to say "these promotions." :p
 
34. Added PyPostCombatLost and PyPostCombatWon to Civ4PromotionInfos.xml

Though I haven't tested them yet, they are fully implemented. I will test them later today. But now I am about to run some errands.
 
Grey Fox, while Erebus being D&D world - why not to add D&D aligments (Lawfull-chaotic, Good - Evil matrix)?

It will actually fit in your mod well, and also will add some flavor to it.

Same Scale as you did for Lawfull-Chaotic.
Each race get 2 values.
Bannor Lawfull good, Sheaim Chaotic Evil, Calabim Lawfull Evil (see difference between Calabim and sheaim ) , Auric Ulvin (Lawfull Evil), Perpentach (Chaotic Semi-Neutral - Evil close to Neutrality), Cardith Lorda , Dain - Lawfull Neutral, Valledia - Chaotic Neutral, Hanah and Falamar Chaotic Neutral while Falamar close to be Good. Beeri Bawl is experementator so can get Chaotic Good, Tasunke is chaotic neutral, Rhoanna is True Neutral, as is Cassiel, Sandalphon should be lawfull, as should be Dwarves.,

So when , Lets say Mahala converts to Order, she still will have some minnor issues with Bannor because she is still chaotic, while Calabim have chance to become Lawfull Goods and take role of Vampire Order protectors.
 
Awesome. Now I probably won't really need to do any SDK work for my modmod. :) I guess you didn't want to add pyPerTurn to units too? Thats really not as important anyway, since one can easily make a promotion that only one unit will ever have.

Just checking, but did you put the unloadAll() statement before the kill(true) statement when duration runs out (in line 1002 in an unedited CvUnit.cpp)? That is a very minor change, but is essential to my modmod, as without it allowing summons to carry cargo is a very bad idea (since the cargo dies when duration runs out. I'd hate to have to recompile just to add a single statement.

Of course, if you don't release it for patch e and if I really want to merge this with UnitStats (and if I can't convince you to do the merge work for me ;) ) then I'd have to recompile anyway, so making this one change while I am at it would be no problem.
 
Awesome. Now I probably won't really need to do any SDK work for my modmod. :) I guess you didn't want to add pyPerTurn to units too? Thats really not as important anyway, since one can easily make a promotion that only one unit will ever have.
If you check my changelog, you'll see that pyPerTurn is in the TODO list, which I will continue with now.

Just checking, but did you put the unloadAll() statement before the kill(true) statement when duration runs out (in line 1002 in an unedited CvUnit.cpp)? That is a very minor change, but is essential to my modmod, as without it allowing summons to carry cargo is a very bad idea (since the cargo dies when duration runs out. I'd hate to have to recompile just to add a single statement.
Uhm, what happens to regular ship cargo then? I know from experience that if units for some reason can walk on water, but are not really able to walk on water (yes strange situation), they will be teleported to nearest land next turn. What happens to the unloaded units, on water, when a ship dies if you move that code?

Grey Fox, while Erebus being D&D world - why not to add D&D aligments (Lawfull-chaotic, Good - Evil matrix)?

It will actually fit in your mod well, and also will add some flavor to it.

Same Scale as you did for Lawfull-Chaotic.
Each race get 2 values.
Bannor Lawfull good, Sheaim Chaotic Evil, Calabim Lawfull Evil (see difference between Calabim and sheaim ) , Auric Ulvin (Lawfull Evil), Perpentach (Chaotic Semi-Neutral - Evil close to Neutrality), Cardith Lorda , Dain - Lawfull Neutral, Valledia - Chaotic Neutral, Hanah and Falamar Chaotic Neutral while Falamar close to be Good. Beeri Bawl is experementator so can get Chaotic Good, Tasunke is chaotic neutral, Rhoanna is True Neutral, as is Cassiel, Sandalphon should be lawfull, as should be Dwarves.,

So when , Lets say Mahala converts to Order, she still will have some minnor issues with Bannor because she is still chaotic, while Calabim have chance to become Lawfull Goods and take role of Vampire Order protectors.

I was planning to do something like that but I don't really see the point.
 
If you check my changelog, you'll see that pyPerTurn is in the TODO list, which I will continue with now.

Well, it wasn't there when I made my last post. Having promotions effect spell range is much more important, since (as I said) you can easily make a promotion for only one unit to have. I'd focus on the range change and not bother with the pyPerTurn if it gives you trouble.


Uhm, what happens to regular ship cargo then?

What I asked was that you change this
Code:
	if (getDuration() > 0)
	{
	    changeDuration(-1);
	    if (getDuration() == 0)
	    {
	        kill(true);
	    }
	}
in void CvUnit::doTurn() to this
Code:
	if (getDuration() > 0)
	{
	    changeDuration(-1);
	    if (getDuration() == 0)
	    {
	        unloadAll();
	        kill(true);
	    }
	}


These changes will have no effect on regular ships or their cargo, since it only effects units killed by limited duration. I know of no way for a ship to get limited duration, at least none that don't require some serious cheating or modmoding. I've tested this change pretty thoroughly, and it doesn't seem to cause any problems (although something I changed latter on caused my modmod to crash when loading. I don't think that was from SDK changes though, since it still crashes with the original DLL. I think the problem was graphical or XML).

It may also be good to remove the requirement that units be in a city in order to paradrop, to make my Dimensional 3 summon more useful. Now that I think of it, I also had to commant out the "if (!pPlot->isFriendlyCity(*this, true))" statement in "bool CvUnit::canParadrop(const CvPlot* pPlot) const" and the "if (!canMoveInto(pTargetPlot, false, false, true))" statement in "bool CvUnit::canParadropAt(const CvPlot* pPlot, int iX, int iY) const" in order to get my Tesseract (This is a summon that is domain_immoble but can carry cargo with as it paradrops) to work the way I want it to. Since no FfH unit uses paradropping, these changes won't effect anything either. I have tested them pretty thoroughly too without problems.



Grey Fox, while Erebus being D&D world - why not to add D&D aligments (Lawfull-chaotic, Good - Evil matrix)?

It will actually fit in your mod well, and also will add some flavor to it.

Same Scale as you did for Lawfull-Chaotic.
Each race get 2 values.
Bannor Lawfull good, Sheaim Chaotic Evil, Calabim Lawfull Evil (see difference between Calabim and sheaim ) , Auric Ulvin (Lawfull Evil), Perpentach (Chaotic Semi-Neutral - Evil close to Neutrality), Cardith Lorda , Dain - Lawfull Neutral, Valledia - Chaotic Neutral, Hanah and Falamar Chaotic Neutral while Falamar close to be Good. Beeri Bawl is experementator so can get Chaotic Good, Tasunke is chaotic neutral, Rhoanna is True Neutral, as is Cassiel, Sandalphon should be lawfull, as should be Dwarves.,

So when , Lets say Mahala converts to Order, she still will have some minnor issues with Bannor because she is still chaotic, while Calabim have chance to become Lawfull Goods and take role of Vampire Order protectors.

I'm undecided about whether such a system should be implemented, but I'm leaning towards opposing it. Also, if such a system is added, the Order should have a much larger effect on your Lawful-Chaotic alignment than the Good-Evil one; an Order Mahala should become lawful, but maybe not really good. Order Calabim should be extremely Lawful, but probably still Evil.


If we were to add more alignment types, I might also add another value-Fanatisicm. This would effect how much the other values effect diplomacy. I guess it could just be a leader specific thing, although it might be nice if it too could change. Hyborem and Basium would have the highest fanaticism, with Cassiel having the lowest value. The Empyrean would be a more good religion than the Order, but the Order would greatly boost both Lawful and Fanatical "alignments"




Oh, I though of one more change that may be essential in my modmod: creating a promotion tag that boosts the duration of the caster's (non-permanent) summons. I can't think of a non-SDK way to do this that would not involve changing all summons to work through python, and I still haven't gotten around learning how to making new xml tags yet. I would love it if you did this for me too. :please:

(I'm planning on removing the summoning trait, and making each dimensional promotion boost duration by 1 turn. I may have some equipment with similar effects too.)


I also don't like how <bTwincast> works: It doesn't matter how many promotion it has that allow Twincasting it has, it will still only summon 2 units. I would like these abilities to stack (since I'd like to add equipment that causes twincasting too), so that a unit with 0 <bTwincast> would summon 1 unit, one with 1 <bTwincast> promotion would summon 2 units, one with 2 <bTwincast>'s would summon 4, one with 3 <bTwincast>'s would summon 8 units, etc. I would also be fine if each promotion just made it summon 1 more instead of doubling the number, if that is too powerful. Multiple promotions with this tag should definately have some effect though.


Twincast should really effect non-summoning spells too. Maybe cause direct damage spells to do twice the damage, or to actually strike twice instead of once. The latter might be better, since it would allow auto-targeting spells to hit multiple units or stacks. It would also mean that you could just put the whole spell casting part of the code in a loop, as increasing the number of times the spell is cast would also increase the number of summons. Obviously, spells that just grant promotions wouldn't have to be cast again (although it wouldn't really hurt anything for it to be, except maybe speed), nor spells that kill the caster of convert it to another unit. It would probably be good to check to make sure the casting requirements are still valid before each cast. That would also mean that you couldn't use this promotion to get around the limit on the number of permanent summons (is twincast taken into account in determining how many permanent units you can have an still summon more? I seem to remember it not being, but that might have been a while ago). Could you change how Twincasting works too?:please:


One more thing just came to mind. Could you make units that are upgraded in citeis with buildings that grant promotions get these free promotions too? I'm mostly thinking this should be done for Hippus Stables/Horselord, Svartalfar Hunting Lodge/Sinister, and Ljosalfar Archer Range/Dexterous. I could make it so that the elven civs can get their promotions anyway by setting their racial promotions as prereqs, but the Hippus have no race to base this on. I guess I could just make spells that let mounted units in cities with Hippus stables get Horselord, but I'd rather not have to. It might also be appropriate to only let units owned by your team get the free promotions from buildings that have the <bApplyFreePromotionOnMove>1 tag, in which case these buildings can just get this tag. That could have the added bonus of letting your permanent allies get the promotions, but not helping out rival civs with open borders (or rival units with the ability to move in your territory without open borders)


Patch e is out now. Is that soon enough for you to make the modmod patch e compatible? Personally I'd rather you wait to release it until you've made it compatible (and preferably also added the suggestions in this post ;) ) but that it largely because I'll be too busy with school work to play for a while anyway. I guess others might be more impatient though.


I just started thinking it might be good to include sto's [Mini MOD _ MOD Comp] Alignment Options in yours. That is certainly more alignment based than most of the suggestions I have been making, and I convinced you to add some of those. :) I haven't actually tried it yet (I don't really have time), but it seems like it could be good to include it. Besides, everything it adds is a option, so if you don't like it you can turn it off. (And if your going to include this one modmod, why not go ahead and include UnitStats too? ;))
 
Version 1.1 has been uploaded. Check the first post for download and changelog, etc.
(It's for v031e)

Be quick to notice any serious errors cause I will be going home again tomorrow, and won't be online for a while.

And if you want to, please work on the values of the different variables in the mod! (Like events, which have no changes yet)

EDIT: Sorry didn't notice your post before. And I don't feel like modding atm, so I'm not sure if I will be able to make any of the changes you want before I leave.
 
Very nice. I wish I had time to play.


Its probably my fault that you didn't see the post in time, since I just kept editing the old one whenever I came up with something new. There's no pressure to get it all done at once, since I'll probably be too busy to mod for the rest of the semester. While I would really like a <iSummonExtraDuration> tag in CIV4PromotionInfos.xml and some SDK changes in Twincast and the paradropping requirements, I likely won't have the time to use them before May 1 anyway.



How exactly do the <iPrereqBroadAlignment> tags work? It seems to me like you would need 2 tags for this, one for the maximum and one for the minimum alignment value.


I've started glancing though the files and I don't see any new tags in CIV4PromotionInfos.xml files except <iPrereqBroadAlignment>and <iAlignmentModifier>. There are no new tags in CIV4BuildingsInfos.xml at all.

Did you accidentally forget to change the XML files since last version?

Edit: They do seem to be in the Schema though. Are these tags that just don't have to appear in the file unless used.

Edit2: I guess they do have to be in the the file only if used, since the extension promotions do have the tag. I went ahead a played a game on quick on a tiny map just to test it. It seemed to work fine, but late in the game I got an unexplained CtD. I didn't pay attention to what turn it was, but I had already reached Guilds and Strength of Will. Also, popups seemed a little weird. I think that normally it only shows one (new tech popup, research popup, event popup, religion screen, civic screen, etc) at a time, but this time they seemed to come up at the same time. This didn't cause actual problem though.

Also, your mod undoes at least one change in patch e; Kael moved the free great sage from Writing to Arcane Lore, but your tech file does not.

Edit3: Oh, could you change the <PromotionCombatType> tag so that you can give a promotion a bonus versus multiple (preferably an arbitrary number of) promotions? I was wanting to add promotions that work against both elven promotions, a against both angels and demons, against all levels of a spell sphere, all "evil" promotions, etc.(Kael said this could be difficult, as it would require changing this to use a list, but that he has come across circumstances whee he wished he could use this and so might eventually add it to the main mod anyway.)

Edit4: I went ahead and started one more game, after making a few minor xml changes, and it now seems like every unit is exploding like a Pyre Zombie when it dies.

Edit5: I hadn't razed anything yet as of the last post, but like xalien says every city razed creates a Syliven's Perfect Lyre, Dragon's Horde, Infernal Grimorie, and Crown of Akharien (all the equipment that can be made by razing a city with the wonder form of the equipment in it)
 
Edit4: I went ahead and started one more game, after making a few minor xml changes, and it now seems like every unit is exploding like a Pyre Zombie when I dies.

That and more - every city you raze/destroy spawns Syliven's Perfect Lyre, Dragon's Hoard, Infernal Grimoire and Akharien's crown.
 
A cursory look through CIV4PromotionInfos.xml reveals why everything is exploding: combat 1 has <PythonPostCombatLost>postCombatExplode(pCaster,pOpponent)</PythonPostCombatLost>. I'm guessing you added this to test the SDK changes, and forgot to remove it. This explains why not every unit explode, but most do. Perhaps you should have tested with a less common promotion.


It seems that you removed the "if (pCity->getNumRealBuilding((BuildingTypes)iI) > 0)" conditional in "void CvPlayer::raze(CvCity* pCity)" in CvPlayer.cpp, thus whenever a city is razed it creates every piece of equipment that could be in the city in building form, without ever testing to see if it is actually there.


I think you only meant for the "if (GET_PLAYER(eHighestCulturePlayer).getCivilizationType() != (CivilizationTypes)GC.getInfoTypeForString("CIVILIZATION_INFERNAL"))" (which you have in the place of " if (pCity->getNumRealBuilding((BuildingTypes)iI) > 0) ") to apply to your addition to this loop, the "iGlobalCounter += GC.getBuildingInfo((BuildingTypes)iI).getModifyGlobalCounter();" statement. However, as it is written razing any city will apply the Global Counter changes from all buildings, regardless of whether they are being destroyed.


Edit: And now back to making suggestions, instead of addressing bugs ;)

I really think that the weapons promotions need tech requirements. (Although I am considering bypassing the way weapons promotions currently work altogether, having them work through spells instead.)


I'd really like it if buildings/wonders could provide different numbers of different types of resources, instead of an equal number of up to 3 resources. I'd prefer something like this:
Code:
<FreeBonuses>
	<FreeBonus>
		<FreeBonusType>BONUS_MANA_SPIRIT</FreeBunusType>
		<iNumBonus>2</iNumBonus>
		</FreeBonus>
	<FreeBonus>
		<FreeBonusType>BONUS_MANA_LIFE</FreeBunusType>
		<iNumBonus>1</iNumBonus>
	</FreeBonus>
	<FreeBonus>
		<FreeBonusType>BONUS_MANA_WATER</FreeBunusType>
		<iNumBonus>1</iNumBonus>
	</FreeBonus>
</FreeBonuses>
, but I'd be willing to settle for just opening up more resource prereq tags (at least for now). I think I'd need at least 5 or 6 resource bonus tags instead of just 3 (since you can make it provide the same resource multiple times if you put it in multiple tags).


I'd like more "or" type prereqs in general, and would usually prefer using a schema like I proposed for the resources rather than more tags that always have to be there.


To avoid resorting to python for lots of my new spells, I would need to add more <RemovePromotionType#> tags. If I end up using spells for an extended version of weapons promotions and don't want to use python for both the prereq and effect, I'll probably need 7 such tags.

I'll also need at least 3 (preferably more) <PromotionPrereq#> tags.

A tag that checked for a specific building or buildingclass in a city (obviously only to be used together with <bInCityOnly>1</bInCityOnly>) would probably be quite useful.


Not that it is needed, but I think it could be nice if xml-only spells could target only units with specific promotions, religions, unit, unitclass, unitcombat, ect.

Also, it could be nice if the xml/SDK portion of a spell could pass a list of valid targets (tiles within range, units within range who did not resist the spell) to <PyResult> and <PyRequirement>. Since C++ can cycle through the nearby tiles/units more quickly, this might make lots of spells more efficient. Also, it would allow the <iSpellExtraRange>1</iSpellExtraRange> tags to be taken into account without hardcoding them into each spell's for loops.
 
Ok, this is getting really off the modmod's main theme, but it would be really good for another modmod.

Looking at your Unit Fuel modcomp, I was thinking you might be the right one to ask about making a Unit Mana modmod. It would be very nice if individual casters has their own mana point value.

This value would go each turn up based on the caster's promotions (channeling1-3, mostly, maybe also metamagic1-3, arcane, unholy taint, spellstaff, and some equipment), the amount of mana you control, and maybe other factors like the total number of casters in the world. Spells would have different mana-point prereqs and costs (higher for stronger spell, of course. It might be good if the ability to cast most spells depended only on the mana points, not a "one spell per turn" limit (non-magical abilities would probably still have the current restriction). Perhaps the mana points based on mana types should be tied to the appropriate spell sphere promotions?


An archmage might be able to choose between summoning 2 fire elementals in one turn, or casting spring on almost every tile in the empire at once (if he were somehow fast enough :p). Either way, he would probably not be able to cast much the next turn, but would have to wait to be useful again. That way you could choose between using your magic a little at a time for lots of spells, or saving the energy for something grand. Thematically, this makes a lot more sense.

It would probablt fit even better if mana points were split into one value per mana resource, and maybe also one per religion. For starters though, a single mana point value could be a big improvement.
 
Top Bottom