Better BUG AI

The only part I don't enable is Global Warming. But since BAT now has new female units, which will probably kill all savegame compatibility anyway, I guess I can compile you a dll with that option on too.
 
I think that option is automatically enabled in the standard BULL compile. If you're using EF's latest build, the female units are enabled by default. I'll check, but I don't think that I use a compiler switch when I compile BAT's DLL.
 
Female Units SDK part isn't even optional, and the makefile for BULL will only switch on AIAutoplay by default, everything else you have to turn on yourself.
In Better BUG AI's standard dlls every option is either on (or not optional, which has the same effect) except for GlobalWarmingMod.
 
Female Units SDK part isn't even optional, and the makefile for BULL will only switch on AIAutoplay by default, everything else you have to turn on yourself.
In Better BUG AI's standard dlls every option is either on (or not optional, which has the same effect) except for GlobalWarmingMod.
In that case, it should be quite easy. Thanks for the help. :)
 
Alright, got a minor code mistake with big consequences for ya Fuyu, that I just found (and mistakenly posted in the BUG forum for a few minutes, heh).

In CvGame.cpp

In void CvGame::doGlobalWarming()

You tried to extend the UP gamespeed scaling JDog did for Mine coughups, Forest growths, Nuclear Plant meltdowns (edit - okay you did that one yourself :)), etc to Global Warming and this awesome new Nuclear Winter effect. HOWEVER, you failed to notice that the random roll for these, which you correctly based on vanilla's format, is BACKWARDS from the others. Instead of "if random(range) == 0", they used "if random(100) < range" for this one. SO! You are actually making the Warming/Winter LESS likely on FASTER gamespeeds, and MORE likely on SLOWER gamespeeds, which is the OPPOSITE of what you want. Done with caps now, just trying to be clear. :p

Here's my fix, just reverse the numerator and denominator:

Code:
/************************************************************************************************/
/* UNOFFICIAL_PATCH                                                               jdog5000      */
/*                                                                                              */
/* Gamespeed scaling                                                                            */
/************************************************************************************************/
/* original bts code
		if (getSorenRandNum(100, "Global Warming") + iGlobalWarmingDefense < GC.getDefineINT("GLOBAL_WARMING_PROB"))
		{
*/
		int iOdds = GC.getDefineINT("GLOBAL_WARMING_PROB") - iGlobalWarmingDefense;

		//
		// Mongoose GamespeedScalingFix BEGIN
		//
		iOdds = (iOdds * 100) / GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getVictoryDelayPercent();
		//
		// Mongoose GamespeedScalingFix END
		//

		if (getSorenRandNum(100, "Global Warming") < iOdds)
		{
/************************************************************************************************/
/* UNOFFICIAL_PATCH                        END                                                  */
/************************************************************************************************/

and

Code:
/************************************************************************************************/
/* UNOFFICIAL_PATCH                                                               jdog5000      */
/*                                                                                              */
/* Gamespeed scaling                                                                            */
/************************************************************************************************/
/* original Global Warming Mod code
		if (getSorenRandNum(100, "Nuclear Fallout") + iGlobalWarmingDefense < GC.getDefineINT("NUCLEAR_WINTER_PROB"))
		{
*/
		int iOdds = GC.getDefineINT("NUCLEAR_WINTER_PROB"); //Fuyu: iGlobalWarmingDefense does no longer protect from nuclear winters

		//
		// Mongoose GamespeedScalingFix BEGIN
		//
		iOdds = (iOdds * 100) / GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getVictoryDelayPercent();
		//
		// Mongoose GamespeedScalingFix END
		//

		if (getSorenRandNum(100, "Nuclear Fallout") < iOdds)
		{
/************************************************************************************************/
/* UNOFFICIAL_PATCH                        END                                                  */
/************************************************************************************************/

I personally thought the vanilla occurance rates for all these things were about right for Marathon speed btw, so I use a value of 300 instead of 100 everywhere to keep Marathon and Vanilla chances equivalent (which results in higher chances on all the faster speeds), but that's just me. I haven't played many games ON any of the faster speeds so I could be wrong.
 
Heh. Ooops.
That happens when you just copy-paste it all .. good catch, thx.
To increase occurance rate I'd go for the GLOBAL_WARMING_PROB / NUCLEAR_WINTER_PROB defines instead of hardcoding 300 but that's just me.
I have yet to play a game where GW actually occurs, and I'm always on normal speed, so I don't know either.
 
Could this be the reason why in PIG mod I've never seen global warming? Whatever you guys happen to figure out, I'm eargerly listening.
 
Thank you too for all the code in here Fuyu, there's a lot of great stuff, your Civic AI revamp and this inspired update to the GW mod in particular. :)

Could this be the reason why in PIG mod I've never seen global warming?

The only way this bug would make GW less likely than whatever the baseline rate for this mod is, is if you were playing on Quick. That's it. Normal speed would be unaffected, and Epic and Marathon would see way MORE warming than they're supposed to.

If you guys aren't seeing any (I don't know myself b/c I haven't played any games with this code yet), then my initial guess would be that the GWDefense is too powerful, and is keeping the odds on each roll clamped at zero. This would be especially likely if you ARE seeing Nuclear Winter trigger occasionally, since the main difference with that is GWDefense is not used.
 
Hello

I played a game with bug and better bts AI, you can find it

here

I wanted to thank everyone who worked on BUG and better BTS AI, give them some feedback and encourage them to continue, even though CIV V is out.

The game, but also these mods provided my with great entertainment and mental challenge.

I read better BTS AI is dead, I learned of Fuyu's merge after starting this game, and I'm going to use it for my next game, this is why I post here, even though i didn't actually use this mod.

THanks to everyone
 
Hey Fuyu!

Do you think it is possible to do a merge of BAT v3 with your BUG Better AI? I don't know how difficult that would be, but since BAT includes BUG, I hope it's not too demanding. Lemon Merchant wanted to do it but now she's gone (for at least a while) so I'm wondering if you can help. If you can, thank you in advance. :)
 
Thank you Fuyu! This is almost the combo of mods that I need!!

I am trying to merge Better BUG AI with BAT and I tried to follow the instructions in the OP. But it couldn't load. I then realized that I have the latest version of BAT (3.0.1) and that might be the problem. (Your instructions talk about using BAT 2.3)

But I can't seem to find the older version of BAT 2.3 :(

Is there no way to merge this with the latest BAT 3.0.1?

EDIT: I see that the poster above me has the exact same question. :lol:

And since BAT makes the graphics "sexier," maybe we can call the Better AI / BAT / BUG merge "SASSY BUG" = Smart And Sexy BUG :cool:

Also btw I was able to find the BAT 2.3 mod here
 
Hey Fuyu!

Do you think it is possible to do a merge of BAT v3 with your BUG Better AI? I don't know how difficult that would be, but since BAT includes BUG, I hope it's not too demanding. Lemon Merchant wanted to do it but now she's gone (for at least a while) so I'm wondering if you can help. If you can, thank you in advance. :)
Lemon just got married, and she is overloaded at school right now. :( I'm still working on the merge, but I have a seriously bad time deficit atm, so it's rather slow progress. Take heart, it's coming. :)

And since BAT makes the graphics "sexier," maybe we can call the Better AI / BAT / BUG merge "SASSY BUG" = Smart And Sexy BUG :cool:
You can call it what you wish, but the official release from the BUG team will be called "Better BAT AI", so please don't use that name if you release it as an actual mod. There is also one component of BAT 3.0.1 that I would prefer not to be in any merged release of the BAT Mod that isn't done by me and the BUG boys. You can PM me for the details if you like.
 
Thank you Fuyu! This is almost the combo of mods that I need!!

I am trying to merge Better BUG AI with BAT and I tried to follow the instructions in the OP. But it couldn't load. I then realized that I have the latest version of BAT (3.0.1) and that might be the problem. (Your instructions talk about using BAT 2.3)

But I can't seem to find the older version of BAT 2.3 :(

Is there no way to merge this with the latest BAT 3.0.1?

EDIT: I see that the poster above me has the exact same question. :lol:

And since BAT makes the graphics "sexier," maybe we can call the Better AI / BAT / BUG merge "SASSY BUG" = Smart And Sexy BUG :cool:

Also btw I was able to find the BAT 2.3 mod here

Got the same Problem.
 
That's terr...er, Congratulations! :beer:
:lol:
I finally got angry enough to get even! :lol:

I truly hope Lemon's spouse loves CIV :please:
or else there may be nagging about time spent :whipped:
She doesn't get Civ at all. But I don't get her love for gluing things together and calling it "crafting", so it works out, I suppose. :crazyeye:

Glue and sparkly things. Hah! I thought I was weird! :mischief:
 
I want to merge Better BUG AI with the Varietas Delectat mod. Does anyone know how I can do that? I just want a simple mod so I thought this would be a nice one.
 
I'm currently having trouble with this mod. I reinstalled CIV 4 Complete after seeing that the mods (that came with the game) aren't compatible. I made a copy of Civ 4 to play the mods, and one for regular use. I installed this mod and now, it won't run at all. I'm running Win 7, but I don't think that should matter (It was running perfectly before) The only thing I can think could affect it was a. I've got 2 copies (1 installed and 1 completely copied) and b. I installed the BUG mod beforehand. Any tips?

Edit: Never mind. It's just the shortcut that crashes the game, and running the .exe runs the mod. Seems strange that the shortcut doesn't work, but it's only a minor issue.
 
hey fuyu!

im glad to see your still around,

im playing bbai bug that present in my mod on an multi-player game,
all is fine, but the ai seem kinda peaceful, can something be done to increase aggression?

plus - are we gonna see another update of this great mod sometime?

thanks in advance,
a fan.
 
Top Bottom