Advertisement
Civilization Fanatics' Center

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Modpacks

Notices

Civ4 - Modpacks Modpack creators can post their completed creations here.
Please don't open a new thread if you don't have file to post! This rule also applies to ALL other files forums below. Use the main Civ4 Creation forum for questions & requests.

Reply
 
Thread Tools
Old Feb 18, 2010, 09:31 AM   #1
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
Better BUG AI

Better BUG AI is what I call my merged mod consisting only of Better BTS AI + BULL + BUG

This combination of jdog5000's AI improvement mod Better BTS AI and EmperorFool&co.'s interface improvement mod BTS Unaltered Gameplay is the most advanced/refined/bestest mod (afaik) that does not change game rules (or at least tries to, for the most part) - which is where it differs from the PIG mod.


If there are bug fixes or AI improvement components (or even just ideas, as long as they are specific enough) that are not (yet) part of Better BTS AI,
which I should consider adding, then please let me know, all suggestions are welcome. As are simple bug reports, though they probably belong to Better BTS AI or BUG subforums directly.
I will not touch any python code, ever, so requesting/suggesting python changes here is useless, you'll need to bug the BUG team for that.

Last Update: 2010-09-26 (browse SVN)


Download: (3.75MB)
@ Mediafire (folder with the most up-to-date packages)
@ Sourceforge (bullai files section, might not always have the most recent compiles)
---
Installation: Run the installer.
(Extracting the contents with 7zip works too if you know what you're doing.)
* If you want, get the images for Events With Images and extract to Better BUG AI\Assets\Art\EventImages\ .
---
--
-
Combining this mod with BAT 2.3:
1. Install BAT
2. Copy Better BUG AI's Assets over to BAT, overwrite.
3. Extract the merged files from this zip to BAT, overwrite.
- [ thread in BUG Project subforum ]
-------------------------------------------------------------
For Blue Marble look here.



Components:
Better BTS AI 1.02a r597
* AI Logging
BULL 1.3 r219
* Fractional Trade Routes
* New Sentry Actions
* City Governours Build Workers
BUG 4.5 r2245

-------------------------------------------------------------
my own changes:
  • CityAI:
    • The AI no longer considers unhealthy buildings that would make the city shrink, and also factors in future unheathiness from power when evaluating buildings that would recieve a bonus from power.
    • Happy/Health valuation for buildings and improvements are sightly changed.
    • The AI should build a bit more workers.
    • Worker AI: hopefully there is now less improvement oscillation between forest preserve and lumbermills, and less hamlets/villages/towns get turned to workshops.
    • Considering currently constructed building and checking Health level against happy level for the BULL feature 'Health Effects from Removing Features'.
  • PlayerAI:
    • Using a sightly different valuation of siege units for UNITAI_ATTACK_CITY.
    • Chance of nuclear plants to blow up and global warming chance scale to gamespeed.
  • other:
    • Minimum total production modifiers is still 0% here (UP/BetterAI changed it to -50%).
    • Features with AppearanceProbability of 10000 will be replaced after destruction of city, even if not riverside.
    • xml changes:
      • GlobalsDefinesAlt.xml: Global Warming implementation still sucks, noone wrote any huge and all-new Global Warming/Nuclear Winter mod that satisfies me, but I still reenabled Global Warming from nukes - because nuclear warfare needs to have some drawbacks. You can still turn it off yourself of course.
      • CIV4UnitInfos.xml: changed iPower for Catapult(5->6), Cannon(12->14), Artillery(18->19) and MobileArtillery(26->28) because they seem to better account for the actual military strength of these units. (Does not affect AI unit building behaviour).
      • CIV4UnitInfos.xml: SAM Infantry is now available as an upgrade to the Grenadier (previously Infantry) - to avoid massive upgrading of riflemen to SAM when the AI hits Rocketery before Assembly line.
        Spoiler:

        It's a game rule change, I know, but I couldn't think of any other way to react to what was reported in the 1 game 4 suicides thread.

SVN:
BULLAI @ scourceforge
Spoiler:
first Better BUG AI: http://forums.civfanatics.com/showth...14#post8657114

2010-02-13 version was revision 15
2010-02-17 version was revision 23
2010-02-18 version was revision 25
2010-02-19 version was revision 31
2010-02-20 version was revision 35
2010-02-25 version was revision 39
2010-03-05 version was revision 42
2010-03-06 version was revision 44
2010-03-09 version was revision 47
2010-03-26 version was revision 55
2010-03-29 version was revision 62
2010-03-31 version was revision 63
2010-04-11 version was revision 64
2010-04-12 version was revision 65
2010-04-23 version was revision 69
2010-05-03 version was revision 70
2010-05-05 version was revision 71
2010-05-13 version was revision 72
2010-05-16 version was revision 74
2010-05-17 version was revision 80
2010-05-20 version was revision 83
2010-05-26 version was revision 87
2010-06-10 version was revision 96
2010-06-16 version was revision 97
2010-07-01 version was revision 98
2010-07-08 version was revision 99
2010-07-25 version esd revision 101

2010-09-26 version is revision 117

.
Attached Thumbnails
Click image for larger version

Name:	SAM_Infantry-new_upgrade_path.jpg
Views:	27836
Size:	33.8 KB
ID:	243419   Click image for larger version

Name:	Better_BUG_AI-logo1.jpg
Views:	23771
Size:	11.6 KB
ID:	252942  

Last edited by Fuyu; Sep 26, 2010 at 04:14 AM.
Fuyu is offline   Reply With Quote
Old Feb 18, 2010, 09:32 AM   #2
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
TODO:
  • Comment properly (with walls of ********************s)
  • Find, evaluate and then incorporate fixes from
    • the Unofficial Patch thread or Better AI subforum
      • more gamespeed scaling (done: Nuclear Plants blowing up, Global Warming, Production decay (EF))
      • leave floodplains, remove fallout on settling a city without special casing either floodplains are removed on settling, and replaced when the city is razed
      • for settling on water tiles always use canFoundCitiesOnWater callback if it is enabled (done, thx jdog&EF)
      • No "You traded with our Worst Enemy" Diplo hit from civs you didn't meet yet (done, thx Sephi)
      • allow bombardment of enemy forts on unowned land
      • Show own war plans (done)
      • fix AI_doEnemyUnitData() (done)
    • other mod(component)s
      • MongooseSDK (by LunarMongoose)
        • BarbarianPassiveTechFix (done)
        • considering GreatPersonFix (missing fix to not break savegames)
        • building value from free promotion(s?) (Afforess)
        • building value from unit prereq (Afforess)
        • Legends of Revolution - Push GG to join Legendary Units
        • ? Workers can still connect resources even if destroying pre-existing improvements is not allowed (Afforess)
  • Improve AI decision making for
    • what buildings to build
      • don't shrink cities (done)
      • allow shrinking if lost pop is not important (done)
      • consider AP and state religion bonus yield/commerce (done)
    • what units to build
      • make Warriors buildable for early game city defense (done)
    • what improments to build
    • where to settle (how? ideas: increase iGreed when alone on a continent, reduce value of tiles that are already inside the range of another city, maybe make settler movement possible when player has no city yet (turn 0))
  • create an installer (done, thx phungus)
  • Change credits page to reflect that this is not just BUG

fix HappinessWeight for civics
change CONQUEST4 conditions

UnitAI:
? Are units that can't defend retreating to doomed cities?

status explanation:
* gray: already became a part of Better AI or BULL
* done: it is already in a release
* committed: it is in the SVN but not released in a rar yet
* written: it's part of the code on my computer but I didn't commit to SVN yet
__________________
Better AI + BULL + BUG merged mod "Better BUG AI" 1.02b (2010-09-26)

Last edited by Fuyu; Jul 24, 2010 at 10:28 PM. Reason: so much to do
Fuyu is offline   Reply With Quote
Old Feb 18, 2010, 12:53 PM   #3
NBAfan
boss
 
NBAfan's Avatar
 
Join Date: Aug 2007
Location: Dallas TX,United States
Posts: 3,348
Good job. I have waited a long time for something like this.
NBAfan is offline   Reply With Quote
Old Feb 18, 2010, 06:57 PM   #4
robyextreme
Warlord
 
robyextreme's Avatar
 
Join Date: Oct 2003
Location: Canada
Posts: 204
I came to this forum looking for Better AI + Bug then having the hassle of finding and re-learning how to merge them, then this came along! =) thank you.
__________________
Every hammer you save, is a hammer you've earned- Ramesses
robyextreme is offline   Reply With Quote
Old Feb 19, 2010, 07:07 AM   #5
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
New version: 2010-02-19 (Mediafire only for now)
BUG updated to r2156
BarbarianPassiveTechFix from MongooseSDK
No diplo hits from trading with someone's Worst Enemy if you haven't met that someone yet by Sephi
other SDK changes noone will care about: FloodplainsFix and handling of canFoundCitiesOnWater callback are updated, Global Warning and Nuclear Winter chances now scale by gamespeed, Global Warming Defence (from Forests, Jungle) doesn't help you against Nuclear Winters anymore. (Note that the Global Warming Mod is off in the dlls I compile so there will be no NW unless you compile yourself)
__________________
Better AI + BULL + BUG merged mod "Better BUG AI" 1.02b (2010-09-26)

Last edited by Fuyu; Feb 19, 2010 at 01:50 PM.
Fuyu is offline   Reply With Quote
Old Feb 19, 2010, 04:16 PM   #6
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
Very tiny update:
Yesterday the PerfectWorld2 mapscript was broken. I fixed not only that but also finished figuring out why the starting postition sweetening didn't work the way I wanted and changed it all to my liking.
+2 more BUG revisions.

This one should be good, no more daily releases for a while, I promise

edit: I broke the mapscript again!
__________________
Better AI + BULL + BUG merged mod "Better BUG AI" 1.02b (2010-09-26)

Last edited by Fuyu; Feb 19, 2010 at 04:37 PM.
Fuyu is offline   Reply With Quote
Old Feb 19, 2010, 05:10 PM   #7
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
That should teach me .. No more playing with mapscripts here.
No clue when sourceforge upload will finish, it's up on mediafire

Last edited by Fuyu; May 16, 2010 at 05:30 AM. Reason: typo
Fuyu is offline   Reply With Quote
Old Feb 19, 2010, 07:24 PM   #8
PieceOfMind
Drill IV Defender
 
PieceOfMind's Avatar
 
Join Date: Jan 2006
Location: Australia
Posts: 9,298
Quote:
CIV4UnitInfos.xml: SAM Infantry is now available as an upgrade to the Grenadier (previously Infantry) - to avoid massive upgrading of riflemen to SAM when the AI hits Rocketery before Assembly line.
So it was you who made that change. lol, last time I was merging some code I couldn't figure out where I'd seen that or when I'd made that change for PIG. I kinda understood the reasoning behind it though, and I agree with the change overall.

I am hoping there are no issues with AIs now having too few sam infantry? I am not sure if it was a problem before for AIs upgrading infantry to SAM infantry (I think they cost 5 more so it's a cheap upgrade).

On the change to preventing "shrinkage", what happens if you hit an AI with espionage mission Poison Water and maybe bomb some health resources? Is the AI going to abandon all factories and power plants etc? Sometimes it may not be the best move to avoid shrinkage at all costs. Another example would be if AI civs have a "golden age" of health, growing cities to very large sizes. Afterwards, you hit them with some health problems (maybe you force them to leave Environmentalism civic), bomb some resources, and then espionage kill their factories etc. and watch them desperately try to keep some large unsustainable cities. Maybe beyond size 20 or so the AI should care less about trying to prevent shrinkage at all costs?

Just some thoughts...
__________________
Tip: Forcing Steam's Offline Mode
Civ4 Mods: Advanced Combat Odds, PIG Mod(discontinued), HEX Mod(discontinued)
Suggestion: Try karadoc's K-Mod: Far Beyond the Sword
Read if bored: Zoom-To-Cursor, Good advice from Kaell for DX11 users, Nvidia beats AMD in Civ V
PieceOfMind is offline   Reply With Quote
Old Feb 19, 2010, 08:47 PM   #9
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
It was a necessary change, I couldn't even think of an AI logic change that would eliminate that problem, let alone code it. So it has to be this -_-

Too few SAM Infantry? Not very likely lol
If the AI gets Rocketery before Assembly line it can't upgrade rifles anymore, but it will start building SAM Infantry as defenders, almost exclusively.
The AI never upgrades Infantry to SAM I think, it checks if the upgrade actually has a positive effect after all (if multiple positive options are available, it chooses the best*)


Unhealth from espionage is ignored for the shrink check, don't worry. If you manage to take away resources then yes, the AI will react to that, even without my new code. That code is only a hack which adresses the stock AI's inability to correctly recognize this kind of negative effect of buildings by disabling active shrinking completely.
It is still a hack though, not a real evaluation of pros and contras.
However, I have already written new code for correcter handling of unhealth/unhappy building sideeffects, I'm just not sure how well it would work in practice (completely untested). You are right in general, it is theoretically possible that for a city with neither happy cap nor food problems running lots of specialists, that a building that causes shrinking could still be benificial, very good point.
That would work already, even without better unhealth evaluation, all you need to do is find my anti-shrink code and replace
Code:
int iAllowedShrinkRate = 0;
with
Code:
iAllowedShrinkRate = visiblePopulation()*GC.getFOOD_CONSUMPTION_PER_POPULATION();

Last edited by Fuyu; Feb 19, 2010 at 11:47 PM.
Fuyu is offline   Reply With Quote
Old Feb 19, 2010, 11:43 PM   #10
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
revision 36: the AI will no longer avoid shrinking at all costs at all times: Angry Citicens, weak specialists and population working bad tiles are expendable.

So few lines, yet it took me so long

Last edited by Fuyu; Feb 20, 2010 at 12:50 AM.
Fuyu is offline   Reply With Quote
Old Feb 21, 2010, 08:44 PM   #11
Colonel Kraken
Deity
 
Colonel Kraken's Avatar
 
Join Date: Dec 2001
Location: Grand Rapids, MI
Posts: 2,453
Question

If I have BAT installed (to 2.1.1a), can I merge Better BUG AI into it (because I don't know which files should be overwritten and which should not!)?

Thanks!
Colonel Kraken is offline   Reply With Quote
Old Feb 21, 2010, 08:57 PM   #12
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
I don't think Better BUG AI overwrites anything the BAT Mod needs with something that isn't at least equivalent.
I can give no 100% guarantees but simply taking everything from my mod and overwriting everything there in the process worked at least for me, as far as I can tell.
I do have BAT in a Mod folder though, so overwriting was a matter of one single drag&drop and click. Not sure if CustomAssets installs needs some special treatments, like finding out where to put the gamesetupcheck folder but I'm sure the BUG team could help you with that.
Fuyu is offline   Reply With Quote
Old Feb 22, 2010, 08:07 AM   #13
Colonel Kraken
Deity
 
Colonel Kraken's Avatar
 
Join Date: Dec 2001
Location: Grand Rapids, MI
Posts: 2,453
Thank you, Fuyu.

BAT automatically writes to the My Games folder instead of the Program Files\Firaxis folder. That's easy enough for me, but the thing that confuses me is their install program also created a seperate BUG Mod folder which has the Info UserSettings and GameSetUp Check folders. For your mod, it's all in the same folder. Wierd.

I'll have to go bug the BUG team.
Colonel Kraken is offline   Reply With Quote
Old Feb 22, 2010, 08:23 AM   #14
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
Actually no you don't. If you already have a UserSettings folder and a GameSetUp Check folder, all you need to do is copy my Better BUG AI's Assets over your Mod's Assets folder in MyGames and overwrite. I didn't know it was that simple

Last edited by Fuyu; Feb 22, 2010 at 03:49 PM.
Fuyu is offline   Reply With Quote
Old Feb 22, 2010, 07:55 PM   #15
Colonel Kraken
Deity
 
Colonel Kraken's Avatar
 
Join Date: Dec 2001
Location: Grand Rapids, MI
Posts: 2,453
Hi Fuyu,

Thanks for your response.

When I tried what you suggested, the same thing happens that happened when I tried to merge the mods on my own:

The row of icons at the bottom of the main map screen (Switch View Mode, etc.) disappear, and in diplomacy with another civ, all the text (to choose how you wish to respond) is missing!



Do you know what could be causing this?

Thanks,

CK
Colonel Kraken is offline   Reply With Quote
Old Feb 22, 2010, 08:45 PM   #16
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
If it doesn't work as expected, I'll have to look at it myself one day.
For now all I can do is recommend not to use BAT with this mod.
Damn I was so sure this worked.
Fuyu is offline   Reply With Quote
Old Feb 22, 2010, 09:16 PM   #17
Colonel Kraken
Deity
 
Colonel Kraken's Avatar
 
Join Date: Dec 2001
Location: Grand Rapids, MI
Posts: 2,453
Post Python Error

Thank you, Fuyu. I really appreciate you trying to help.

Last edited by Colonel Kraken; Feb 23, 2010 at 08:35 PM.
Colonel Kraken is offline   Reply With Quote
Old Feb 24, 2010, 12:03 AM   #18
bitbucket66
Chieftain
 
Join Date: Aug 2009
Posts: 3
This modpack is great, I'm very happy with it. However, after installing the latest version, all of my diplomacy text is missing. That is, the "flavor" text which displays when you meet/talk to another leader, as well as all the menu options for interaction with the leader, to open trading, declare war, etc. The area beneath the leaderhead is just blank.

I haven't had this problem with earlier versions of this mod, although I haven't updated with each and every release, so it's not definite that the bug was introduced in the very latest version. It was sometime recently though.

Is anyone else seeing this behavior? Any idea what could be causing it?
bitbucket66 is offline   Reply With Quote
Old Feb 24, 2010, 05:35 AM   #19
Fuyu
Emperor
 
Fuyu's Avatar
 
Join Date: Nov 2009
Location: Austria
Posts: 1,149
Yes, I do. BUG python stuff changed, some python files are now gone. So if you just overwrite, some old python files will remain - and break Diplomacy. See this post by EmperorFool for more info
You need to delete either your whole assets folder or at least the python part, and replace it with the updated one.
__________________
Better AI + BULL + BUG merged mod "Better BUG AI" 1.02b (2010-09-26)
Fuyu is offline   Reply With Quote
Old Feb 24, 2010, 07:19 AM   #20
bitbucket66
Chieftain
 
Join Date: Aug 2009
Posts: 3
I see. Thanks for the quick reply!
bitbucket66 is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Modpacks > [BTS] Better BUG AI

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Advertisement

All times are GMT -6. The time now is 09:06 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
This site is copyright Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR