[BTS] Development thread

Just out of curiousity, has anyone taken over from jdog towards maintaining and releasing new versions of batterai?

There has been a lot of interesting discussion and code snipets since his departure, would be nice to see a new version of betterai released or at least an announcement of who will be taking over.

I hope there will be new versions. Civ 4 BTS with this mod is so much better than Civ 5. I played Civ 5 for a few hours, then went back to Civ 4. I still can't beat Civ 4 BTS on Emperor level with version 1.01 of this mod. (I came so close, but my spaceship didn't make it.)

If someone is going to be adding stuff, I hope you will address corporations. The AI isn't as good at founding them as I am. I find it's a big advantage I have over the AI if I ever make it far enough in the game to found Mining Inc and Sid's Sushi.
 
No one has taken over and I have my doubts anyone will, jdog has been maintaining Better BTS AI alone for quite a while now.
If you don't mind the BUG mod being bundeled with it, there is a very recent version of Better BUG AI available which includes all of those code snippets that were posted.

Corporations is just one part of one of the major weaknesses left: intelligent GP usage. Humans bulb, start golden ages, use the GP's special bility or found corporations, while the AI still settles a lot into cities. Maybe one day someone will write a Wait-For-Bulb (Afforess already wrote the mission code) and Wait-For-Corportation AI which makes the AI player conserve its GPs for a time when they can be put to better use but I doubt I have the time for any of that anytime soon.
 
So has Jdog officially stopped working on BBAI?
 
Nobody knows. I hope he will still prefer civ4 over civ5 like many others. ;)
 
So has Jdog officially stopped working on BBAI?

Yes, unfortunately I have no time. Only played one partial game of Civ5 so far as well, looks great but has a long way to go under the hood ... but the Civ4 AI was pretty terrible when it first shipped as well.
 
Nobody knows. I hope he will still prefer civ4 over civ5 like many others. ;)

I beg to differ. Civ IV BTS is better now, as it is more mature, but I think it would be best to make the switch to civ V.
 
Yes, unfortunately I have no time. Only played one partial game of Civ5 so far as well, looks great but has a long way to go under the hood ... but the Civ4 AI was pretty terrible when it first shipped as well.

All I can say is thank you! In my eyes you are one of the few modders that took retail Civ4 and made it the game it was supposed to be. If it wasn't for your work I would have abandoned it a long time ago.

I only tried Civ5 briefly and I agree with you. There is lots of potential there, but it's a long way to go.

Good luck to you for whatever comes next in your life.
 
All I can say is thank you! In my eyes you are one of the few modders that took retail Civ4 and made it the game it was supposed to be. If it wasn't for your work I would have abandoned it a long time ago.

Good luck to you for whatever comes next in your life.

You speak for us all.
 
I beg to differ. Civ IV BTS is better now, as it is more mature, but I think it would be best to make the switch to civ V.

No. It's too different. I won't wait for a Civ4 Mod for Civ5. Makes no sense (I hate every civ5 graphics, the comic style is terrible). Also, I won't play any Civ5 Mod for Civ4 BTS.

Civ4 BTS with a good mod is perfect (for me). But I don't want to discuss this here.

Thanks jdog for your effort. The biggest German mod got updated everytime you have released a new bbai version. :) Will miss it, but my mod for Civ4 will go on. :)
 
Yes, unfortunately I have no time. Only played one partial game of Civ5 so far as well, looks great but has a long way to go under the hood ... but the Civ4 AI was pretty terrible when it first shipped as well.

It's understandable that you now have other stuff going on in your life. Thanks for making Civ IV so much better to play.
 
Thanks all.

The evening after I posted above, the laptop I had done all my BBAI modding on over the last couple years short circuited and died. Guess it decided it's job was over and it was ready for retirement ... it was four years old so it put in its time, but the coincidence of crapping out that night was strange.
 
Aye, thanks for all the work, jdog! :beer: And funny coincidence about the laptop! :crazyeye:
 
Thanks for all the work you put into this mod jdog! I expect to be using it for months or years to come.
 
Is somebody still working on this project?

I've got a little job for you. Why the hell does this nation research as first technology "fishing"??? :crazyeye:

Spoiler :




EDIT: Here is my solution for CCV (int CvPlayerAI::AI_techValue in CvPlayerAI):

PHP:
...
	iValue += iBuildValue;

	// does tech reveal bonus resources
	for (int iJ = 0; iJ < GC.getNumBonusInfos(); iJ++)
	{
		if (GC.getBonusInfo((BonusTypes)iJ).getTechReveal() == eTech)
		{
			// Thomas SG
			int iRevealValue = 50;

			bool bOnlyWaterBonus = true;
			for (int iK = 0; iK < GC.getNumTerrainInfos() && bOnlyWaterBonus; iK++)
			{
				if (GC.getBonusInfo((BonusTypes)iJ).isTerrain((TerrainTypes)iK) || GC.getBonusInfo((BonusTypes)iJ).isFeatureTerrain((TerrainTypes)iK))
				{
					if (iK != GC.getDefineINT("TERRAIN_OCEAN") && iK != GC.getDefineINT("TERRAIN_COAST"))
					{
						bOnlyWaterBonus = false;
					}
				}
			}

			iRevealValue += ((iCoastalCities == 0 && bOnlyWaterBonus)? 0:100 + AI_bonusVal((BonusTypes)iJ) * 50);
			
			BonusClassTypes eBonusClass = (BonusClassTypes)GC.getBonusInfo((BonusTypes)iJ).getBonusClassType();
			int iBonusClassTotal = (paiBonusClassRevealed[eBonusClass] + paiBonusClassUnrevealed[eBonusClass]);
...
 

Attachments

  • Fishing.JPG
    Fishing.JPG
    200.6 KB · Views: 600
Thanks jdog for your effort. The biggest German mod got updated everytime you have released a new bbai version. :) Will miss it, but my mod for Civ4 will go on. :)

:yup: Me too. But Cybah is absolutly right CCV as the biggest German mod is always up to date. And BASE as the second biggest German mod of course too. :p

:lol:
 
Hi Thomas
Thanks for sharing your code with the project! You may be absolutely correct with your logic I just offer some temperance by saying that fishing leads to sailing, a very important inland technology in some cases. I notice a big river heading southwards in your test case submission.
Thanks again for staying involved.
Cheers
 
Can someone incorporate all the changes since version 1.01 and release a new one? :)
 
You may be absolutely correct with your logic I just offer some temperance by saying that fishing leads to sailing, a very important inland technology in some cases. I notice a big river heading southwards in your test case submission.

Irrelevant. If the AI does consider rivers, or anything in a tech that the current tech leads to, then it does it elsewhere in this function. ThomasSG is only changing how revealed resources are valued. Period. Nothing else.

@ThomasSG: You can't call GC.getDefineINT() on TerrainTypes or FeatureTypes; it's used for accessing settings from the XML GlobalDefines files. Even if it does work - and I don't think it will - it's not how that's done everywhere else in the SDK. It's also minimally more efficient to use a break command than to keep checking the break condition every pass in a loop. Here's my version:

Code:
	// does tech reveal bonus resources
	for (int iJ = 0; iJ < GC.getNumBonusInfos(); iJ++)
	{
		if (GC.getBonusInfo((BonusTypes)iJ).getTechReveal() == eTech)
		{
			//
			// Thomas SG (LM Edit) BEGIN
			//
			bool bOnlyWaterBonus = true;
			for (int iK = 0; iK < GC.getNumTerrainInfos(); iK++)
			{
				if (GC.getBonusInfo((BonusTypes)iJ).isTerrain((TerrainTypes)iK) || GC.getBonusInfo((BonusTypes)iJ).isFeatureTerrain((TerrainTypes)iK))
				{
					if ((iK != GC.getInfoTypeForString("TERRAIN_COAST")) && (iK != GC.getInfoTypeForString("TERRAIN_OCEAN")))
					{
						bOnlyWaterBonus = false;
						break;
					}
				}
			}
			int iRevealValue = 50 + (AI_bonusVal((BonusTypes)iJ) * 50);
			if (iCoastalCities > 0 || !bOnlyWaterBonus)
			{
				iRevealValue += 100;
			}
			//
			// Thomas SG (LM Edit) END
			//

			BonusClassTypes eBonusClass = (BonusClassTypes)GC.getBonusInfo((BonusTypes)iJ).getBonusClassType();
			int iBonusClassTotal = (paiBonusClassRevealed[eBonusClass] + paiBonusClassUnrevealed[eBonusClass]);

I do agree with this AI change though. So you guys will know: It does nothing different from normal most of the time, and lessens (but not eliminates) the value to an AI of revealing water-only resources if that AI doesn't currently have any coastal cities. I see no reason not to include this. :)
 
@ThomasSG: You can't call GC.getDefineINT() on TerrainTypes or FeatureTypes; it's used for accessing settings from the XML GlobalDefines files. Even if it does work - and I don't think it will - it's not how that's done everywhere else in the SDK.

It's working fine!

But sorry. CCV has got the tags TERRAIN_COAST and TERRAIN_OCEAN in GlobalDefines. I forgot that they are not there in BTS. But with a call of SHALLOW_WATER_TERRAIN and DEEP_WATER_TERRAIN it should work for BTS too.

And the change is especially good for mods like CCV that reveal water resources with fishing (or another tech). In BTS it may be only useful for whales... :hmm:

And nice change. :goodjob:
 
Top Bottom