Fairy Tale

Fuyu added some extras to Jdog5000's Better AI, (like Sentry Actions) plus BUG 4.4 and BULL 1.2.
Sentry Actions, as well as Fractional Trade Routes and Governors Building Workers, are optional parts of BULL, I didn't really add that. It's just a merge, mostly.
If you search for "Fuyu" you'll see where I changed stuff on my own, you should see it's nothing major.
 
Yeah, veBear, I was thinking about giving the Vikings a neighbour in the north. I don't really have a dwarven nation as yet, so your idea might come in handy. I have 16 civs right now, and my initial target was vanilla civ's 18. I have the 17th planned and also have some ideas for another Arabic-looking one, but I can add as may civs as I want really.

A Carthage one sounds interesting too, driving on all the Carthaginian clichés and maybe even giving them an elephant unit, but that's in the future. Thanks for all your ideas!

Good stuff, HighwayHoss. It's on ModDB now!

Well, Fuyu, HighwayHoss merged it in with his patch to Fairy Tale. So however it is, you'll also get the proper mention in the Credits, along with JDog5000, of course. I really like his Better AI. I'm a big fan of the Better AI projects.

Do you perhaps know how I can make the enemy break blockades? I once sat around with a pirate outside an enemy harbour and the enemy built masses of Caravels, but never attacked? Maybe turn up the possibility for the enemy to sacrifice units to weaken a stronger opponent before killing him off?
 
All I see is void CvUnitAI::AI_attackSeaMove() - the part that should handle blockade-breaking with ships parked inside the blockaded city looks like this:
Code:
[COLOR="Green"]/************************************************************************************************/
/* BETTER_BTS_AI_MOD                      08/10/09                                jdog5000      */
/*                                                                                              */
/* Naval AI                                                                                     */
/************************************************************************************************/[/COLOR]
	[COLOR="Green"]// BBAI TODO: Turn this into a function, have docked escort ships do it to[/COLOR]
	CvCity* pCity = plot()->getPlotCity();

	if( pCity != NULL )
	{
		if( pCity->isBlockaded() )
		{
			[COLOR="Green"]// City under blockade[/COLOR]
			[COLOR="Green"]// Attacker has low odds since anyAttack checks above passed, try to break if sufficient numbers[/COLOR]

			int iAttackers = plot()->plotCount(PUF_isUnitAIType, UNITAI_ATTACK_SEA, -1, NO_PLAYER, getTeam(), PUF_isGroupHead, -1, -1);
			int iBlockaders = GET_PLAYER(getOwnerINLINE()).AI_getWaterDanger(plot(), [B]4[/B]);

			if( iAttackers [B]>[/B] (iBlockaders [B]+ [/B]2) )
			{
				if( iAttackers > GC.getGameINLINE().getSorenRandNum(2*iBlockaders + 1, "AI - Break blockade") )
				{
					[COLOR="Green"]// BBAI TODO: Make odds scale by # of blockaders vs number of attackers[/COLOR]
					if ([B]AI_anyAttack(1, 15)[/B])
					{
						return;
					}
				}
			}
		}
	}
[COLOR="Green"]/************************************************************************************************/
/* BETTER_BTS_AI_MOD                       END                                                  */
/************************************************************************************************/[/COLOR]
I bolded what I think is the important part: AI_anyAttack(iRange, iMinOdds) - Range needs to be 2 in case a blockading ship is further away than what the current unit can move in one turn. And min odds are 15, should scale to number of blockaders and attackers, as the BBAI ToDo says.
One more interesting detail: "if( iAttackers > (iBlockaders + 2) )" means you need at least 3 attackers to attack one blockading ship.

SHIP_BLOCKADE_RANGE is only 3 but a range of 4 is searched for enemy ships and all of them are counted as blockaders. Oh well, the assumption is that that the blockade is only a few ships without support so if there are more ships, it'S better to account for them than not to.

I suggest these changes (bolded):
Code:
[COLOR="Green"]/************************************************************************************************/
/* BETTER_BTS_AI_MOD                      08/10/09                                jdog5000      */
/*                                                                                              */
/* Naval AI                                                                                     */
/************************************************************************************************/[/COLOR]
	[COLOR="Green"]// BBAI TODO: Turn this into a function, have docked escort ships do it to[/COLOR]
	CvCity* pCity = plot()->getPlotCity();

	if( pCity != NULL )
	{
		if( pCity->isBlockaded() )
		{
			[B]int iBlockadeRange = GC.getDefineINT("SHIP_BLOCKADE_RANGE");[/B]
			[COLOR="Green"]// City under blockade[/COLOR]
			[COLOR="Green"]// Attacker has low odds since anyAttack checks above passed, try to break if sufficient numbers[/COLOR]

			int iAttackers = plot()->plotCount(PUF_isUnitAIType, UNITAI_ATTACK_SEA, -1, NO_PLAYER, getTeam(), PUF_isGroupHead, -1, -1);
			int iBlockaders = GET_PLAYER(getOwnerINLINE()).AI_getWaterDanger(plot(), [B](iBlockadeRange + 1)[/B]);

			if( iAttackers [B]>[/B] (iBlockaders + 2) [B]||  iAttackers >= 2*iBlockaders[/B])
			{
				if( iAttackers > GC.getGameINLINE().getSorenRandNum(2*iBlockaders + 1, "AI - Break blockade") )
				{
					[COLOR="Green"]// BBAI TODO: Make odds scale by # of blockaders vs number of attackers[/COLOR]
					[B]if (baseMoves() >= iBlockadeRange)[/B]
					{
						if (AI_anyAttack(1, 15))
						{
							return;
						}
					}
					[B]else
					{
						[COLOR="Green"]//Assumption: Every ship can reach a blockade with 2 moves[/COLOR]
						if (AI_anyAttack(2, 15))
						{
							return;
						}
					}
					
					[COLOR="Green"]//If no mission was pushed yet and we have a lot of ships, try again with even lower odds[/COLOR]
					if(iAttackers > 2*iBlockaders)
					{
						if (AI_anyAttack(1, 10))
						{
							return;
						}
					}[/B]
				}
			}
		}
	}
[COLOR="Green"]/************************************************************************************************/
/* BETTER_BTS_AI_MOD                       END                                                  */
/************************************************************************************************/[/COLOR]

Note that this is still not really scaling to the difference between blockader and attacker numbers.
 
Let me know if that actually works. Since I know too little about the situation you described, I could only guess what the cause for the AI not breaking the blockade was.
 
I will try it out and let you know. If it works OK, I will publish the answer to the question on the Better BtS AI thread as well. There was another bloke on there interested in this issue as well.

Thanks again.
 
The HEFT Patch

There's a problem with the HEFT Patch, I'm afraid. I couldn't get it to work with the standard installation of Fairy Tale, but experienced loss of Interface. Setting the NoCustomAssets didn't help either.

We just have to wait for HighwayHoss to get back from the road so he can fix the problem. The Full Install (153 MB's) he also made should be working better though.

HEFT will be integrated into Version 8 of Fairy Tale, and it might be a while before we produce V8, so in the meantime, the Full Install of HEFT is the most up-to-date version of Fairy Tale. I am going to work on a new civ and some other stuff while waiting for the final version of HEFT.
 
Terrain Patch

Chuggi's Better Terrain is one of the features HighwayHoss includes in HEFT. While waiting for his stable version, I was able to make a patch of that feature and post it on ModDB. Now, your Fairy Tale will look better than the screenshots! The Patch is not imperative to gameplay. It just updates the Landscape Graphics.

Download!

Installation

This upgrades the Terrain Graphics of Fairy Tale Version 7. This Update requires the previous Full install of Fairy Tale Version 7.

To Install, drag and drop the Fairy Tale folder within the .zip to the BtS folder on your harddrive. Overwrite where asked. This update should not invalidate saved games since it only concerns purely graphical matters.

This update has been checked to be working on several computers.

The manual is opened by opening the ReadMe.html file supplied with the mod, and the Version History can be studied in the manual as well.

Screenshots



 
Le Sage,
I found that multiple 'kings' were generated even before version 7, which I have not yet played. I hope this helps you find the cause. I really don't think it's a big deal.

jimmygeo
 
Yes. They were. It wasn't a major issue, as you say, but only Great Generals can build their special building, the "Recruitment Centre", so I removed the problem tonight. It was an easy kill and it will be in the next update.
 
One more comment about the blockade breaking: I think AI_attackSeaMove() is called for every unit seperately and AI_anyAttack() would then only cause one unit to move.
Now if the unit immediately moves after a mission is pushed, a situation like this could happen:
1 ship is blockading a city, the city has just enough ships parking inside with UNITAI_ATTACK_SEA, so when the first unit does its AI_attackSeaMove(), it will try to break the blockade. However, now that this ship is outside of the city, there are no longer enough UNITAI_ATTACK_SEA ships left inside, so when the next ship does its AI_attackSeaMove(), it will decide to stay, leaving the ship that already attacked all alone -_-

I hope I'm wrong there.
 
Thanks. We'll see how it turns out. I'm working on the update right now, but haven't gotten to the Blockade-correction point in my list just as yet. Right now I'm adding the new civ to the game. I hope to get to try the updated blockade out in the weekend.
 
For testing purposes you should probably know: The AI will attack any enemy ship if it is one move away and odds are 40 35%+, or 2 moves away with 35 40%+ odds. The part I posted about is only considered if the odds are lower.

And if there are no ships, or at least none running the right UnitAI, nothing will ever happen.
 
I loaded up v7 to play as the Kraxantine Sultanate on the large world map, and I came across this little gem of a start location:
attachment.php

OOPS! Might want to change that.

EDIT: I played a bit as the Principality and noticed that you removed the Monument building. That shafts civs that don't found a religion early for cultural expansion as there is nothing for them until Libraries which are prohibitivly expensive.
 
I played a bit as the Principality and noticed that you removed the Monument building. That shafts civs that don't found a religion early for cultural expansion as there is nothing for them until Libraries which are prohibitivly expensive.
Actually its still there; its just been renamed the Watchtower....why I
have no idea.

BTW I have HEFT 1.2 ready just waiting on LeSage for his patch so I can integrate it.
 
Ah, sorry. Missed that in the changelog.
 
Yeah. That's one of those things I changed just because of aesthetic reasons. I just didn't like the look of the vanilla monument. Same thing for the Aqueduct.

wow! That's an impressive starting location. However did that happen!? I am sure I placed their first city on the map... Oh well. I'll update it now...
 
Updated 100x100 Map

Here's the updated 100x100 map. I've had a helluva bad day, but I took my time to do this. Now I need to go to bed. i don't know what happened to the map. I'm sure I had placed Kraxantina on it and given them a city too... Oh well, there's the updated version.
 
Does the download link in the original post have the most updated version of the game, or do I need to download that and patches?
 
All links go to Fairy Tale's ModDB page. Right now, there's only one single file to download, Fairy Tale Version 7. That's the file to download and install if you want to play the game.

Further, there's also a Terrain Patch, which upgrades the looks of the Terrain, but that one is optional as it is only of Aesthetic value. Tomorrow, I will be uploading HighwayHoss' HEFT Patch as well, but that will also be optional.

The two patches, the Terrain and HEFT, will be integrated into Version 8, which I'm working on right now.
 
Back
Top Bottom