RifE 1.20 Bug Thread

Seems to be a bug prevent cave of ancestors from granting spells level 2 spells to a unit if also have wizards hall. (with latest flavour patch)

cvEventManager.py
def onUnitBuilt(self, argsList):

Code:
if city.getNumBuilding(gc.getInfoTypeForString('BUILDING_WIZARDS_HALL')) > 0:
    // 20 + 5*manaCount % chance of getting one level 1 spell from the available mana types
elif city.getNumBuilding(gc.getInfoTypeForString('BUILDING_WIZARDS_HALL')) > 0 and city.getNumBuilding(gc.getInfoTypeForString('BUILDING_CAVE_OF_ANCESTORS')) > 0:
    // 10 + 5*manaCount % chance of getting one level 1 or 2 spell from the available mana types
if city.getNumBuilding(gc.getInfoTypeForString('BUILDING_SCHOOL_OF_GOVANNON')) > 0:
    // 3*manaCount % chance of getting one level 3 spell from the available mana types

either the if/elif parts want swapping to the having both building is considered first (otherwise if have wizards hall cave is never considered). If even better reworking the logic slightly to that you get

if wizards hall
   20 + 5*mana for one level 1 spell

if cave
    10 + 5*mana for level 2 spell (should probably reduce the multiplier to 4 here)
    // need to also remove all the refences to level 1 spells in the code block.

if school
    3*mana for level 3 spell
 
To recap: any time the game tries to spawn a unit as a result of combat action (i.e. slaver trait/civic and animal packs, but not werewolves) and the defeated unit is considered not alive, it crashes to desktop. This happens quite frequently when, say, the Cualli are at war with the Scions. I can't find the relevant code, is it in the DLL?
 
To recap: any time the game tries to spawn a unit as a result of combat action (i.e. slaver trait/civic and animal packs, but not werewolves) and the defeated unit is considered not alive, it crashes to desktop. This happens quite frequently when, say, the Cualli are at war with the Scions. I can't find the relevant code, is it in the DLL?

Looks like it, try having a look in:

Spoiler :
Code:
cvunit.cpp
void CvUnit::combatWon(CvUnit* pLoser, bool bAttacking)

If you are not aware as i was not until earlier today the dll code is in "Beyond the Sword\Mods\Rise from Erebus\CvGameCoreDLL" not sure if it has been updated for the flavour patches since 1.20 though.

Reason werewolf probably works differently at combatWon() calls back out to the python code, and the werewolf conversion is handled in:

Code:
cvSpellInterface.py
def postCombatLossWerewolf(pCaster, pOpponent):
	if pOpponent.isAlive():
		if pOpponent.getDamage() > 0:	#Must be hurt to be infected, better if we force it to require that the wolf itself hurt you, but this still works nicely.
			iInfectChance = 10
			if CyGame().getSorenRandNum(100, "Werewolf Infection") < iInfectChance:	#Low rigid chance for now, will set something up for variability some other time
				pOpponent.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WEREWOLF'), True)
 
Master of Creation is bugged (well more precisely unbalanced)

Meant to be one of the master rewards for getting sets of level 3 spells (in this case just creation 3)

allows one extra spell to be cast a turn.

In practice an archmage will almost certainly have twincast already so this is 2->3 spells a turn.
But it also give a 33% chance that for every spell cast, that you will get a promo that stops you casting spells for 2-4 turns and causes that spell to fail.

Together they mean you cast significantly less spells than you would without it, and make ability to cast any spell unpredictable.

--

If possible i would suggest that the 33% miscast chance only applies to the extra spell cast (e.g. play it safe and cast as normal. or try and squeeze out an extra spell in an emergency that might lock you down for a few turn).

Failing that bin the effect completely and replace it with a thematic granted spell, e.g.
Food of the Gods: Create food of the Gods build in city, +1 happy, +10 food, requires cast to be in city at end of turn. (lvl3 creation spell already adds one pop per casting so does not seem to overbalanced)

I quite agree, in the net it will result in your level teen something archmage being of less use than a level 4 mage with one tier 2 spell.
 
I got nailed by the mongo Blight last game. That's being fixed, right? Is there a way to turn it off until the new version comes out? Can I just delete it from the EventTrigger file?
 
If you dominate a unit then add it to a Flesh Golem.

If adds the promos/strength to the golem and also free the unit back to the wilds, letting it be dominated again.

Should probably just completely kill the dominated unit (rather than not allowing dominated united to be added to flesh golems, mostly because i like the idea of enslaving anything that looks interesting and merging them into a gignormous war-beast...)
 
Master of Creation is bugged (well more precisely unbalanced)

Meant to be one of the master rewards for getting sets of level 3 spells (in this case just creation 3)

allows one extra spell to be cast a turn.

In practice an archmage will almost certainly have twincast already so this is 2->3 spells a turn.
But it also give a 33% chance that for every spell cast, that you will get a promo that stops you casting spells for 2-4 turns and causes that spell to fail.

Together they mean you cast significantly less spells than you would without it, and make ability to cast any spell unpredictable.

--

If possible i would suggest that the 33% miscast chance only applies to the extra spell cast (e.g. play it safe and cast as normal. or try and squeeze out an extra spell in an emergency that might lock you down for a few turn).

Failing that bin the effect completely and replace it with a thematic granted spell, e.g.
Food of the Gods: Create food of the Gods build in city, +1 happy, +10 food, requires cast to be in city at end of turn. (lvl3 creation spell already adds one pop per casting so does not seem to overbalanced)

I agree; When I added the effect, I hadn't realized that a miscast did anything more than cause the spell to fail. It's not a widely used effect.

Seems to be a bug prevent cave of ancestors from granting spells level 2 spells to a unit if also have wizards hall. (with latest flavour patch)

cvEventManager.py
def onUnitBuilt(self, argsList):

Code:
if city.getNumBuilding(gc.getInfoTypeForString('BUILDING_WIZARDS_HALL')) > 0:
    // 20 + 5*manaCount % chance of getting one level 1 spell from the available mana types
elif city.getNumBuilding(gc.getInfoTypeForString('BUILDING_WIZARDS_HALL')) > 0 and city.getNumBuilding(gc.getInfoTypeForString('BUILDING_CAVE_OF_ANCESTORS')) > 0:
    // 10 + 5*manaCount % chance of getting one level 1 or 2 spell from the available mana types
if city.getNumBuilding(gc.getInfoTypeForString('BUILDING_SCHOOL_OF_GOVANNON')) > 0:
    // 3*manaCount % chance of getting one level 3 spell from the available mana types

either the if/elif parts want swapping to the having both building is considered first (otherwise if have wizards hall cave is never considered). If even better reworking the logic slightly to that you get

if wizards hall
   20 + 5*mana for one level 1 spell

if cave
    10 + 5*mana for level 2 spell (should probably reduce the multiplier to 4 here)
    // need to also remove all the refences to level 1 spells in the code block.

if school
    3*mana for level 3 spell

Yeah, I'll need to check if that's been fixed; It's in one of the files already rewritten. If not, I'll rework the logic myself; I didn't write the code you mention. ;)

Looks like it, try having a look in:

Spoiler :
Code:
cvunit.cpp
void CvUnit::combatWon(CvUnit* pLoser, bool bAttacking)
If you are not aware as i was not until earlier today the dll code is in "Beyond the Sword\Mods\Rise from Erebus\CvGameCoreDLL" not sure if it has been updated for the flavour patches since 1.20 though.

Reason werewolf probably works differently at combatWon() calls back out to the python code, and the werewolf conversion is handled in:

Code:
cvSpellInterface.py
def postCombatLossWerewolf(pCaster, pOpponent):
    if pOpponent.isAlive():
        if pOpponent.getDamage() > 0:    #Must be hurt to be infected, better if we force it to require that the wolf itself hurt you, but this still works nicely.
            iInfectChance = 10
            if CyGame().getSorenRandNum(100, "Werewolf Infection") < iInfectChance:    #Low rigid chance for now, will set something up for variability some other time
                pOpponent.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WEREWOLF'), True)

The DLL you referred to was not updated. Entirely on purpose, because that was where hardcoding was done for the Princess Rule joke and most modders will look at CvInfos first when adding anything... Which is where the hardcoding is done. :lol:

I got nailed by the mongo Blight last game. That's being fixed, right? Is there a way to turn it off until the new version comes out? Can I just delete it from the EventTrigger file?

Can't turn it off that I'm aware of, aside from deleting any python that calls it and the eventtrigger.

I'll take a look at it's code, see if I can squash the double blight.

If you dominate a unit then add it to a Flesh Golem.

If adds the promos/strength to the golem and also free the unit back to the wilds, letting it be dominated again.

Should probably just completely kill the dominated unit (rather than not allowing dominated united to be added to flesh golems, mostly because i like the idea of enslaving anything that looks interesting and merging them into a gignormous war-beast...)

I'll have to look at it... Think I can use a 'safe kill' call, if it exists for units. I know it exists for promotions (Remove the promotion without triggering any pyOnRemove calls).
 
Valor promotion says it has a chance of giving free xp. Does not seem to do so directly or to modify the training rates. Does not seem to get any xp to units that would not normally train.

seems to be the tag <bGetCasterXP>1</bGetCasterXP> which ends up as isGetCasterXP(), only used in CvUnit::getSpellCasterXP().
 
Another one (sorry for all the separate posts; am putting together a complete arcane spellbook so testing each spell to see how you can use/abuse it, and exactly what its effects really are. If i don't post when i find things, likely to forget them later)

Promotion checks are not redone when the unit alive status changes.

This is particularly noticeable for maintained spell like haste.

Have an adapt cast the spell, will keep promotions always a unit with the spell in the stack (themselves)
If they then become undead (say due to the Necromancer trait 5% chance a turn)
The haste promotion stays even though it is not valid on dead units, and cant be recast.
If you upgrade the unit the check is reapplied and the promotion lost.

Should probably recheck all promotion is alive status changes, and possibly the other race (demon/angel etc) ones too.
 
I'll take a look at it's code, see if I can squash the double blight.
That would be cool, thanks.

I suppose another solution (though much less satisfying and more work for the player) is to play with random seed regenerated on reload, and simply go back to the previous autosave if it ever crops up.
 
Another one (sorry for all the separate posts; am putting together a complete arcane spellbook so testing each spell to see how you can use/abuse it, and exactly what its effects really are. If i don't post when i find things, likely to forget them later)

Promotion checks are not redone when the unit alive status changes.

This is particularly noticeable for maintained spell like haste.

Have an adapt cast the spell, will keep promotions always a unit with the spell in the stack (themselves)
If they then become undead (say due to the Necromancer trait 5% chance a turn)
The haste promotion stays even though it is not valid on dead units, and cant be recast.
If you upgrade the unit the check is reapplied and the promotion lost.

Should probably recheck all promotion is alive status changes, and possibly the other race (demon/angel etc) ones too.

That reminds me... last week I captured some Engineer Corps when I conquered the Scion capital, and they lost the Undead promotion. Seemed like they should remain Undead when I gain ownership.
 
I have a problem.

The models are changing or morphing to nomal civ IV versions in the game.
For instance the warrior unit for the Amurites will change from the version with the fur coat to the regular version with a club while simply standing there. It flickers back and forth constantly. this happens for all units i've noticed...especially for the warriors though.

an explanation would be awesome!! Thanks.
 
I have a problem.

The models are changing or morphing to nomal civ IV versions in the game.
For instance the warrior unit for the Amurites will change from the version with the fur coat to the regular version with a club while simply standing there. It flickers back and forth constantly. this happens for all units i've noticed...especially for the warriors though.

an explanation would be awesome!! Thanks.

Open options, go to the graphics tab, and turn off frozen animations. It doesn't cooperate with older graphics. ;)
 
That seems to have done it! Thanks Valkrionn and I have to say good job on the update so far also, thanks for replying so quickly!
 
Finally played a Kuriates game to the point of getting the dragon and poof - two turns later the game freezes up on me. Well kinda...

It goes to the "Waiting on other civilizations..." but never comes back to being my turn. I've waited a few minutes to no avail. The game doesn't completely freeze up during this time because I can still access the civopedia and the menus.

I've even saved a game while this was happening and then reloaded the save game and it started in the "Waiting on other civilizations..." spot and never came back to my turn.

The turn or two before this happened I also got the "Nature's Revolt".

I enabled the python error popups and none happened. And I'm running version 1.23 with no other add-ons.

I've attached the save game on the turn before this happens to me...
 

Attachments

  • _LastGameSaved.CivBeyondSwordSave
    540.6 KB · Views: 58
What could prevent Govannon from teaching Earth1? I have checked the python, and there is nothing there that would prevent it.

I have various module installed, and am 1 patch behind, but I have a bunch of undead wizards (Playing Naxus) who refuse to learn Earth1. Workers, slaves, bladedancers, etc all can learn it, but not the Wizards. They seem to be able to learn many other spheres. What makes Earth1 different?

Never mind. I was thinking if pUnit.isAlive() meant that the unit still existed, not that it was living. I think this may be the problem. So Govannon cannot teach undead magic users. Oh well.
 
hello,

one cosmetic issue - I am playing Kuriotates, RifE 1.23 and I have pink squares instead of picture of great person - there is some missing art.
 
I added the following to reqTeachSpellcasting and spellTeachSpellcasting, in case anyone else wants to use Govannon with the leader Naxus.

Code:
	iDeathWielder = gc.getInfoTypeForString('PROMOTION_DEATHWIELDER')
...
				if pUnit.isAlive() or pUnit.isHasPromotion(iDeathWielder):

This appears to work.
 
I have this also...

That's just an issue with the flavorpatch, it's fixed in the team version so will be fixed in the next full version.

I added the following to reqTeachSpellcasting and spellTeachSpellcasting, in case anyone else wants to use Govannon with the leader Naxus.

Code:
	iDeathWielder = gc.getInfoTypeForString('PROMOTION_DEATHWIELDER')
...
				if pUnit.isAlive() or pUnit.isHasPromotion(iDeathWielder):

This appears to work.

Thanks, I'll look at that. ;)
 
Top Bottom