FfH2 Bug Thread

Some bugs seem too occur all of the time, for instance the 'switch to no religion' bug and the harlequin use of the 'taunt' spell. Also, soon after the Avatar of Wrath appears, we often get a crash.

you might want to add this to your thread.

moving
Code:
	if (plot()->isVisibleToWatchingHuman())
	{
		if (GC.getSpellInfo((SpellTypes)spell).getEffect() != -1)
		{
			gDLL->getEngineIFace()->TriggerEffect(GC.getSpellInfo((SpellTypes)spell).getEffect(), plot()->getPoint(), (float)(GC.getASyncRand().get(360)));
		}
		if (GC.getSpellInfo((SpellTypes)spell).getSound() != NULL)
		{
			gDLL->getInterfaceIFace()->playGeneralSound(GC.getSpellInfo((SpellTypes)spell).getSound(), plot()->getPoint());
		}
		gDLL->getInterfaceIFace()->addMessage((PlayerTypes)getOwner(), true, GC.getEVENT_MESSAGE_TIME(), GC.getSpellInfo((SpellTypes)spell).getDescription(), "AS2D_WONDER_UNIT_BUILD", MESSAGE_TYPE_MAJOR_EVENT, GC.getSpellInfo((SpellTypes)spell).getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_UNIT_TEXT"), getX_INLINE(), getY_INLINE(), true, true);
	}
in CvUnit::cast to the top fixes the taunt spell crash (and maybe some other bugs). What happened was that if the caster died from being attacked after the taunt the game still called plot() for the unit which caused the crash. I did this change in Wildmana some time ago, haven't heard of any problems yet. As for the state religion bug, all that is needed is to add a check for NO_RELIGION in the part where alignments are changed after picking a new religion.
 
you might want to add this to your thread.

moving
Code:
	if (plot()->isVisibleToWatchingHuman())
	{
		if (GC.getSpellInfo((SpellTypes)spell).getEffect() != -1)
		{
			gDLL->getEngineIFace()->TriggerEffect(GC.getSpellInfo((SpellTypes)spell).getEffect(), plot()->getPoint(), (float)(GC.getASyncRand().get(360)));
		}
		if (GC.getSpellInfo((SpellTypes)spell).getSound() != NULL)
		{
			gDLL->getInterfaceIFace()->playGeneralSound(GC.getSpellInfo((SpellTypes)spell).getSound(), plot()->getPoint());
		}
		gDLL->getInterfaceIFace()->addMessage((PlayerTypes)getOwner(), true, GC.getEVENT_MESSAGE_TIME(), GC.getSpellInfo((SpellTypes)spell).getDescription(), "AS2D_WONDER_UNIT_BUILD", MESSAGE_TYPE_MAJOR_EVENT, GC.getSpellInfo((SpellTypes)spell).getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_UNIT_TEXT"), getX_INLINE(), getY_INLINE(), true, true);
	}
in CvUnit::cast to the top fixes the taunt spell crash (and maybe some other bugs). What happened was that if the caster died from being attacked after the taunt the game still called plot() for the unit which caused the crash. I did this change in Wildmana some time ago, haven't heard of any problems yet. As for the state religion bug, all that is needed is to add a check for NO_RELIGION in the part where alignments are changed after picking a new religion.

Good point about the taunt crash. I will fix that.

But Im not understanding the switch to no religion crash. The current check:

Code:
void CvPlayer::convert(ReligionTypes eReligion)
{
	int iAnarchyLength;

	if (!canConvert(eReligion))
	{
		return;
	}

	iAnarchyLength = getReligionAnarchyLength();

	changeAnarchyTurns(iAnarchyLength);

	setLastStateReligion(eReligion);

	setConversionTimer(std::max(1, ((100 + getAnarchyModifier()) * GC.getDefineINT("MIN_CONVERSION_TURNS")) / 100) + iAnarchyLength);

//FfH Religion: Added by Kael 08/09/2007
	if (eReligion!=NO_RELIGION)
	{
		if (getAlignment() < GC.getReligionInfo(eReligion).getAlignmentBest())
		{
			setAlignment(GC.getReligionInfo(eReligion).getAlignmentBest());
		}
		if (getAlignment() > GC.getReligionInfo(eReligion).getAlignmentWorst())
		{
			setAlignment(GC.getReligionInfo(eReligion).getAlignmentWorst());
		}
	}
//FfH: End Add

}

From CvPlayer.cpp already checks for this. Was there another place you meant?
 
Patch 0.41k (unreleased)

Don't forget to do something about the absurdly low value the AI gives to building ships! And, from what I understand, if you allow the AI to build ships, and increase the cargo capacity a bit, they will actually use them occasionally to travel to other continents!
 
11. Hundreds of AI updates from Wildmana (all Sephi's latest AI python and SDK code reviewed and many changes checked in).
Are these many changes documented anywhere? I'm curious as to what was altered. If it's not already written down don't worry about it; I'd rather you used your time for fixing things (or living your life) than writing it all up.
 
yes, that's what I meant. In Patch J that NO_RELIGION check wasn't there ;)

Ahh, I must have already cut it in with all your other fixes.

Don't forget to do something about the absurdly low value the AI gives to building ships! And, from what I understand, if you allow the AI to build ships, and increase the cargo capacity a bit, they will actually use them occasionally to travel to other continents!

Sephi has some new naval code in place. Im playing test games right now. I'll try one on an islands map and see how the ai does.

Are these many changes documented anywhere? I'm curious as to what was altered. If it's not already written down don't worry about it; I'd rather you used your time for fixing things (or living your life) than writing it all up.

Nope, the list isnt documented anywhere, sorry.
 
Sephi has some new naval code in place. Im playing test games right now. I'll try one on an islands map and see how the ai does.

It's been a while since I played non-FfH Civ (including other mods), but my recollection is that the AI in regular BtS uses naval units reasonably well.

I'm not a programmer, so I don't know what you might have changed in the naval AI going from BtS to FfH, but it might be worth comparing the relevant codes, maybe work back to the BtS naval AI?
 
It's been a while since I played non-FfH Civ (including other mods), but my recollection is that the AI in regular BtS uses naval units reasonably well.

I'm not a programmer, so I don't know what you might have changed in the naval AI going from BtS to FfH, but it might be worth comparing the relevant codes, maybe work back to the BtS naval AI?
The biggest change is the Cargo which is now mostly promotion based.
Oh and the split up tech tree which means you don't need the Naval techs that much.
 
I'm not a programmer, so I don't know what you might have changed in the naval AI going from BtS to FfH, but it might be worth comparing the relevant codes, maybe work back to the BtS naval AI?

The AI doesn't understand cargo promotions and crews, because they aren't in BTS. The AI is the same, but the mechanis is different.

And I wonder what these new Sephi's improvements are. Will the AI now stop building melee or recon?

Considering the Esvath art, it's the religious units that need merging. And his Elohim Archmage model, of course.
 
Getting at CTD as soon as end turn. Deleted the wounded Longbowman next to Acheron and same thing happened. Looking into it myself, but heres the save.


And so what if I'm doing badly, more fun if you're the underdog :p

Edit: Its not Barnaxus fighting off Barbs at Ithralia, its not the Kurio worker possibly setting off the Pyre or the Guardians and its not that random Acolyte that Varn Gosam seems to magically have acquired.
 

Attachments

  • Flauros AD-0252.CivBeyondSwordSave
    251.9 KB · Views: 42
15. New Illian Adept model by Esvath.
16. New Illian Mage model by Esvath.
17. New Illian Archmage model by Esvath.

:eek:
I can't believe this! It would be an honour.

[after a moment...]

Also add the other units, please. Maybe the Cultist and Speaker? Or the Elohim Archmage? Or all of them?

Go on, I know you want to... :lol:
 
:eek:
I can't believe this! It would be an honour.

[after a moment...]

Also add the other units, please. Maybe the Cultist and Speaker? Or the Elohim Archmage? Or all of them?

Go on, I know you want to... :lol:

You did great work on them, thank you for creating them. :goodjob:

Im going through the rest now. Sez has given his approval, I do tend to very picky (the ffh art guys have spoiled me) but I expect to check more in.
 
I can't believe this! It would be an honour.

[after a moment...]

Also add the other units, please. Maybe the Cultist and Speaker? Or the Elohim Archmage? Or all of them?

Im going through the rest now. Sez has given his approval, I do tend to very picky (the ffh art guys have spoiled me) but I expect to check more in.

Elohim Archmage definitely needs to be added. It's very professionally and flawlessly done and completes the Elohim Arcane line.

The religious units are done well too, with the possible exception of RoK units. All other religious units are very nice and are, at any rate, much better then the boring Prophet reskins.

Actually, I am surprised that Esvath's Illians got added first - while elegant and flavourful, they are recognizable as Elohim reskins.
 
The biggest change is the Cargo which is now mostly promotion based.
Oh and the split up tech tree which means you don't need the Naval techs that much.

The AI doesn't understand cargo promotions and crews, because they aren't in BTS. The AI is the same, but the mechanis is different.

Maybe getting rid of the crew promotions is a place to start, then? They're a nice addition, but if it's going to be really complicated to teach the AI to use them, and then the AI will have to cycle through its naval units each turn to decide what crew promotions to give each one, slowing the game down, might be easier to get rid of them.

Either that, or simplify things a bit, e.g, block the purely combat ships (Trireme, Frigate, Man o' War, Arcane Barge) from being able to get the Skeleton Crew promotion. Also, give them a cargo capacity of 0 -- they're warships, not transports.
 
You did great work on them, thank you for creating them. :goodjob:

Im going through the rest now. Sez has given his approval, I do tend to very picky (the ffh art guys have spoiled me) but I expect to check more in.

You want them more... You want them more...

:lol:

Elohim Archmage definitely needs to be added. It's very professionally and flawlessly done and completes the Elohim Arcane line.

The religious units are done well too, with the possible exception of RoK units. All other religious units are very nice and are, at any rate, much better then the boring Prophet reskins.

Actually, I am surprised that Esvath's Illians got added first - while elegant and flavourful, they are recognizable as Elohim reskins.

Weeeell... technically speaking, all of my units are reskins. Some better than the others. Actually, the Elohim Archmage was my first project and I did it with no finesse at all. Pure hack-and-slash :lol:
 
TXT_KEY_UNIT_CANNOT_PROTECT_CITY said "Unit cannot defend cities", but , for example, a skeleton can defend his city against an enemy attacker.

I added this tag with the intention to describe "Can not Keep Peace and Order of Cities".
This means that a skeleton can not quash concerned citizen with no military unit, or a probability of city revolt. (And can not grant happiness from Social Order.)

I believe that current description may give a false impression.
But my native language is not english. How do you think?
 
Top Bottom