• Civilization 7 has been announced. For more info please check the forum here .

[MOD] MagisterModmod

I'm having units defect to the barbarians almost every turn now. Including the garrisons of core cities.
 
Yeah, I know about the Kurios. I've been playing this mod all year. :)

The best thing to do if you have Cult of the Dragon in a city is to use the Inquisitor ability, or Purge the Unfaithful.
 
I have. This is happening all over the place where Cult of the Dragon is not even in the vicinity. It's happening in a city 5 turns after the Cult was purged. It's happening to workers in the open field.
 
I've dialed back the annoyingness of the Cult of the Dragon for the next version (which I do not plan to release until More Naval AI version 2.41 is released and merged with it).

Units with this religion will still gain the Rebellious promotion if you aren't a member of the same team as the owner of at least one dragon or of the Barbarian/Kuriotates/Sheaim civilization, but the Loyalty promotion will now stop this from happening (rather than being removed when it happens).

The Loyalty promotion now has a 1% chance of expiring on its own. The Cult of the Dragon version of Evangelize Units can also remove this promotion. (It can of course still be restored by the Law I spell, or applied to any unit in a city where a Law III caster is maintaining the by the Unyielding Order building.)

I have also blocked the AI from building Dragon Fanatics (or any Cult of the Dragon unit) unless they meet the criteria to prevent them from rebelling.
 
I suggest a nerf: disable taking items from units just attacked this turn. And nerf affinity items like Rod of Wind as well.

Right now, if you got Orthus's axe and an affinity eq like Rod of Winds, the game is over: These items can turn any tier 1-2 units to blitzing combat machine. It makes no sense that one can attack multiple times then pass the item to other unit. And AI doesn't know this trick.
 
Just a quick note for the art department, could the Valkyrie unit be blond instead of black hair? ;)
 
@youtien:
Personally I like using such exploits to get past the extra free units the AI gets. I can see why you consider it unfair though. I had thought that the code you suggest wouldn't be possible for Orthus's Axe because it grants Blitz, but skimming through the SDK I'm thinking that doesn't actually matter to the isMadeAttack() function. I'll try it out.

@Cutlass:

There is no art department. Base Fall from Heaven II had an art team, but I don't know if any of them still visit the forum. Some units, like the Lamia and Colubra, were borrowed from them even though Kael never got around to adding them to the main mod. The rest of the custom art are reskins I made myself. Changing a unit's hair color is probably within my own abilities, but it is not a high priority.

Edit: I just looked at the files. The hair is currently dark enough that I really cannot tell where is is supposed to end. It would be too easy to make part of it blond and part of it dark, or to accidentally make something blond that really should not be. I would have to change Valkerieglow.dds and Valkeriegloss.dds in addition to Valkerie.dds. It would be difficult to change these while keeping them all properly aligned, and easy to mess up the lighting of her face or armor.

I do not intend to try to change the Valkerie hair color.

@scutarii
Do you have the python log for that in addition to the screen shot? I can see there is at least one other python exception popup behind that one. Could you at least tell me what that said?

The problem here is with the event that allows the Children of The One to be founded in games without the Grigori.

It is rather hard to know if events are working properly, particularly to know if python callbacks of the event triggers work. The events themselves can be forced through python, but I don't know of a way to do that with event triggers. I'm not really sure how the argsList works.

In this case, I think the easiest solution is to get rid of the callback and change it so that the event trigger calls up an event that adds the Unharmed Martyrs building to a city. That should be easier to do, as I can copy from the working event that gives the Clan of Embers a free Eternal Flame.

It looks like the event itself cannot add the religion or holy city status to the city, but that does not matter so much. Since I was getting annoyed with holy cities sometimes inexplicably disappearing, I recently added some code that causes a city with the appropriate holy shrine to become the holy city whenever one does not exist.
 
Do you have the python log for that in addition to the screen shot?
No. Python error log was empty...

I can see there is at least one other python exception popup behind that one. Could you at least tell me what that said?

same thing....
 
I've finished a long game as the Amurites. Normal speed, huge world. (don't mind my spelling here) So to review. There's a lot of interesting stuff in the game. And I appreciate that. I appreciate all the hard work you and others have done for what is really just a hobby.

That said, I think the player tends to be over powered relative to the AI. And that is particularly true with the magic. Now I really don't know what is possible in terms of programming the AI behavior. But what I would suggest, if it were possible, is something like this:

When an AI stack approaches an enemy:

  • Is there siege, if yes, siege reduces fortifications.
  • If no fortifications bonus, siege attacks first.
  • Stack sorted by spell casters or not spell casters.
  • If spell caster can use a spell that will damage the enemy, spell cast.
  • If spellcaster cannot use a spell that can damage the enemy, can spellcaster summon a unit? If yes, unit summoned.
  • If spellcaster cannot use spell that damages the enemy or summons a unit, can it cast a spell that benifts allies? If yes, casts spell.
  • If spellcaster cannot do that either, spellcaster goes to the end of the que.
  • Once all spellcasters have casted or gone to the end of the que, all summoned units attack.
  • Normal units attack.

If that is possible to program, I think that would balance the game play a bit. As is, the player can learn to use magic effectively, and it makes a massive difference in the combat effectiveness of the game play. I should have lost this game, but I won because I could use magic in a devastating way, and the AI might as well have not had any magic.

Further, I would nerf the magic as a whole. Not only can the player use it far more effectively, but it's just too powerful when used effectively. As an example, I have this stack:

Spoiler :


1 Man at Arms casts Haste, and 1 Chanter casts Shadowwalk, and nearly 80 units can now move 6 tiles in enemy territory, attacking on the final move. That means that, with a little patience and good scouting the player can call the battle and always be on the attack, which is the only side that can effectively use magic in a battle. The attacker can move their stack up, cripple the AI stack with magic, and the run the attacks. Each attacking spellcaster can then damage every unit in the opposing stack. What I suggest is that:

  • Spellcasters that can only cast level 1 spells can only effect 6 units per spell cast.
  • Spellcasters that can cast level 2 spells can only effect 12 units per spell cast.
  • Spellcasters that can cast level 3 spells can effect up to 18 units per spell cast.

That would limit the advantage. (If 6-12-18 is too much, other numbers could be picked). I've noticed that when archery units were given ranged attack, it cost them a movement point to use it. I think spellcasting should also cost a movement point. So once the unit has moved and has no more movement, no spellcasting. I was able to use the archmage Summon Rift Gate to move a stack right next to a city, have a unit cast Haste, and then my whole stack can attack that turn. The Kurioates were probably less than a dozen turns from an Altar win, and I was stuck on another continent over a very wide ocean without a lot of ships. And well behind them on the power graph. Yet I punched out all 5 of their cities in 3 turns. And when their stack of about 70 arrived, I punched that out too. I didn't lose anything. So I then went hunting Bassium's stack, and there was some 80 units, and I lost almost nothing punching that out.

So a certain loss turned into a win just because the magic that I could use effectively and they could not was just too powerful.

As you can see, the power loss to me was nothing in destroying their power.

Spoiler :


Now this, having so many units defect was too much, and thanks for dialing that back. But this is just weird in having discipline units of the good religions go off barbarian.

Spoiler :


One last point for tonight. Are there other requirement for Free Odio that are not in the Pedia?

Spoiler :


It only says a tech requirement and level 11. Yet here I had a level 18 and still couldn't do it. And one other thing about that picture. This may only really apply to the Amurites after Govannon starts giving away all those spellcasting abilities. However, as you can see, the information about the unit gets lost behind all of that. I can't see how much damage the unit has, or anything. Is it possible to expand that box to show all the info without obscuring any of it?

Thanks for everything. Despite my nitpicking, I'm enjoying the mod-mod. :)
 
I really don't know much about how the AI works, and haven't really done anything to change it other than make the game recognize that some spells have different prerequisites in my modmod than in base FfH2. The AI is however much better with magic than it is in base ffH2, because my modmod is based on Tholal's More Naval AI modmod. Tholal probably understands more about the AI than anyone working on FfH2 modmods. He has improved things considerably, and is still working to try to make things better. All AI issues with my modmod should really be referred to him.


The magic nerfs you suggest would also require SDK changes (or else really complicated and inefficient python). Since I just use Tholal's DLL, they would have to be taken up with him too.




I'm not really sure why a Confessor would turn barbarian. (A Vicar under Calabim control would; sun-worshipers are as bad as dragon-worshipers as far as the Vampires are concerned.)

I just realized that it is possible that the unit might have been converted to the Cult of the Dragon, and then turned barbarian due to the Rebellious promotion. When units of the Cult of the Dragon are converted by a nearby dragon, then the python code changes their religion back to the Cult of the Dragon after it changes players. Technically having a unit change players involves creating a new unit, which would go back to its default religion. The Rebellious promotion is granted through python but works through the XML/DLL. It might not does not have a check that changes the religion to that of the old unit rather than the default.

I'm not really sure what I can do about that. Perhaps I need to ask Tholal to make a change.

(Of course, sometimes a unit would turn barbarian for other reasons, like being captured by Stephanos.)



When you mouseover the Free Odio spell, the mouseover should include everything found in TXT_KEY_SPELL_FREE_ODIO_HELP. I added this in the December 12th release to end the confusion players were having with older versions.


Destroys Odio's Prison
Grants control of the Crazed Archangel Odio
Changes Alignment to Evil
Unavailible to Good Leaders


(A very similar TXT_KEY explains that the Free Brigit spell is "Unavailible to Evil Leaders")

(I just noticed the typo in Unavailable when I pasted this here, and then fixed it.)

Perhaps I ought to switch it to say:
Requires non-Good Alignment
Grants control of the Crazed Archangel Odio
Destroys Odio's Prison
Changes Alignment to Evil

That way the part explaining the python prereq would be listed closer to and in the same format as the prereqs that the DLL creates automatically based on the XML defines of the spell.


-----

The creation of the More Naval AI subforum confused me. I just now realized that a new version was released 2 days ago. If I had known I would probably have released my own update last night.

I guess I better install it and begin the merge. I have somewhere to be tomorrow though, so I probably wont have time to begin testing until the evening. The actual release may take until Wednesday.
 
The Confessor's religion is The Order after it turns barbarian, but it might have been Cult of the Dragon just before it betrayed you.

I just ran a test and found that units that have their religions set in the XML revert to that religion when they betray you, even if they had been converted to something else (like Cult of the Dragon.

Looking through the code I found that void CvUnit::betray(PlayerTypes ePlayer) calls void CvUnit::convert(CvUnit* pUnit). This function was made to cause units revert religions because it is used in void CvUnit::upgrade(UnitTypes eUnit), which could otherwise cause units (like Devouts) upgrading to priests having no or the wrong religion. I think that part of the code might be better placed within void CvUnit::upgrade(UnitTypes eUnit) tough.

I was in the middle of writing in the More Naval AI thread about the issue when I came across a possible issue with the AvatarOfLeader mechanic. I think I have a very simple fix for it, but would like to run a quick game to make sure the current code does what I think it does first.



As for you last point in your previous post (which I forgot to address in mine): I completely agree that it is a problem that such information becomes unreadable for units with too many promotions. It is not only a problem for units taught by Govannon, but also for most highly promoted heroes. I don't really know hwo to do anything about it though.
 
I just realized that it is possible that the unit might have been converted to the Cult of the Dragon, and then turned barbarian due to the Rebellious promotion. When units of the Cult of the Dragon are converted by a nearby dragon, then the python code changes their religion back to the Cult of the Dragon after it changes players. Technically having a unit change players involves creating a new unit, which would go back to its default religion. The Rebellious promotion is granted through python but works through the XML/DLL. It might not does not have a check that changes the religion to that of the old unit rather than the default.

Shouldn't UNITCOMBAT_DISCIPLE units be immune to religious conversion?
 
I play the Kuriotates a lot. Pity that none of the scenarios seem to use that civ. Guess they weren't a favorite of anyone who made the scenarios.

But I can tell you that you can utterly cripple any civ you aren't at war with using Dragon Fanatics.

You just send in one or two. Preach to all their cities, and camp out in one evangelizing their units. After 5 rounds or so you will convert any unit that isn't immune to Cult of the Dragon. And sooner or later they will become barbs.

Kind of weird the units that are immune to evangelizing. Obviously the hero units can't be affected (now that is, not sure about Grigori, usually Grigori are gone by the time Kuriotates get fanaticism). But as for the rest I've seen Octopus Overlords units that can't be affected. I don't think I've seen any other religion immune to the evangelizing though. Maybe a Runes unit, but I've converted a ton of Order units.

Does the loyalty promo protect them from this? I'm not sure the AI casts it. I usually forget to myself even when I have that.
 
Infinite loop (waiting between turns) again, see the savefile. By the way, Luchuirp Palace + Tablet of Bambur + Guild of the Endeavors + financial leader + workshops and arete is just sick.
 

Attachments

  • Youtien AD-0188.CivBeyondSwordSave
    298.1 KB · Views: 97
Shouldn't UNITCOMBAT_DISCIPLE units be immune to religious conversion?


This is my thinking. A confessor is by definition an Order unit. Just as a Runekeeper is a Kilmorph unit. Because they are by definition members of those religions, they should be immune to conversion.

Also, 20% chance per turn of turning barb is just way too high. Over the course of the game that is essentially indifferent from a 100% chance. And why should a Dragon Fanatic be able to explore rival territory? If I can see him, why can't I kill him?
 
This is my thinking. A confessor is by definition an Order unit. Just as a Runekeeper is a Kilmorph unit. Because they are by definition members of those religions, they should be immune to conversion.

Also, 20% chance per turn of turning barb is just way too high. Over the course of the game that is essentially indifferent from a 100% chance. And why should a Dragon Fanatic be able to explore rival territory? If I can see him, why can't I kill him?

If a Dragon Fanatic can't explore rival territory, what do they do? What is their role?

Basically they are just a disciple unit that can use metal weapons, and don't have a spell in that situation.

Not saying you are wrong, but if they can't explore rival territory I don't know what you use them for.
 
Great mod, I've always wanted Revolutions in Fall from Heaven 2, keeps games interesting right up to the end.
 
If a Dragon Fanatic can't explore rival territory, what do they do? What is their role?

Basically they are just a disciple unit that can use metal weapons, and don't have a spell in that situation.

Not saying you are wrong, but if they can't explore rival territory I don't know what you use them for.


I think the solution may be to keep a Hidden Nationality unit back to kill them with.
 
Top Bottom