Advertisement
Civilization Fanatics' Center  

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Fall from Heaven > FfH2 Modmods, Scenarios, and Maps > More Naval AI Modmod

Reply
 
Thread Tools
Old Mar 18, 2010, 02:09 PM   #1
Tholal
Emperor
 
Join Date: May 2009
Posts: 1,462
[MOD] More Naval AI

This mod now has its own forum. Please follow this link to get there - http://forums.civfanatics.com/forumdisplay.php?f=476
Attached Thumbnails
Click image for larger version

Name:	advanced_scoreboard.jpg
Views:	891
Size:	103.5 KB
ID:	316604   Click image for larger version

Name:	FFH_sevopedia.jpg
Views:	987
Size:	328.9 KB
ID:	316605  

Last edited by Tholal; Jul 12, 2013 at 01:59 PM. Reason: thread is now obsolete
Tholal is offline   Reply With Quote
Old Mar 18, 2010, 03:06 PM   #2
Seven05
Emperor
 
Join Date: Dec 2005
Location: St. Charles, IL USA
Posts: 1,811
There are some handy functions built into Civ4 for identifying areas, since areas in Civ4 are really continents you can use these to help the AI decide if, or how many, ships they'll need. I used this in my Civ4 mod to prevent the AI from building too many ships (obviosuly not a problem in FfH). I'll see if I can dig up the old python code from before I moved it to the DLL to give you some ideas. You can probably use similar code to refine how you determine which AI to assign to the units having them maintian a larger navy if they're split across multiple areas or switching to a more aggressive AI if they're at war with somebody on a different area.
__________________
________________________________________________
FfH Map Script:Erebus Continent
Fury Road Map Scripts: Fury Road Unofficial Map Pack
Seven05 is offline   Reply With Quote
Old Mar 18, 2010, 03:31 PM   #3
[to_xp]Gekko
WM junkie
 
[to_xp]Gekko's Avatar
 
Join Date: Dec 2005
Location: Seyda Neen, Vvardenfell
Posts: 7,533
awesome
__________________
" Sheelba does what Charadon't " - Senethro
[to_xp]Gekko is offline   Reply With Quote
Old Mar 19, 2010, 09:23 PM   #4
Tholal
Emperor
 
Join Date: May 2009
Posts: 1,462
I just realized that I didn't really talk about the net result of my changes. I'll edit my original post later, but for now here's a quick summary.
  • AI will build boats, settle islands and make sea assaults (decent job of settling; sea assaults are kind of hit or miss)
  • AI civs that begin with coastal empires will hit the water techs earlier
Tholal is offline   Reply With Quote
Old Mar 20, 2010, 03:11 PM   #5
snarko
DLLer
 
Join Date: Dec 2003
Location: Sweden
Posts: 1,512
Quote:
Originally Posted by Tholal View Post
* Wont settle on on-tile islands - Even on larger islands they will sometimes drop off settler groups only to leave them sitting there doing nothing for the rest of the game. As near as I can tell, what often happens is that the settler group gets dropped off at the wrong island, and then spends the rest of the game trying to get across without the help of a boat. This appears to be an FfH specific problem.
This is because FfH has a check, in the SDK, to stop AI units from moving if they can't move in any direction. This is to prevent a WoC issue. Don't think it would be an issue to exempt one tile islands from this rule (I did it before without noticing a problem) but it requires SDK modding

As the settler is surrounded by water it can't move in any direction, therefor the AI is not allowed to use it in any way (including settling).
__________________
If you're not Here and Now then where and when are you?

Need help modding (FfH2)? Or just help with playing the mod? Come ask in #erebus on warrensofthought.com
How to get there
snarko is offline   Reply With Quote
Old Mar 20, 2010, 03:22 PM   #6
Sephi
Deity
 
Join Date: Jan 2009
Posts: 2,907
Quote:
Originally Posted by snarko View Post
This is because FfH has a check, in the SDK, to stop AI units from moving if they can't move in any direction. This is to prevent a WoC issue. Don't think it would be an issue to exempt one tile islands from this rule (I did it before without noticing a problem) but it requires SDK modding

As the settler is surrounded by water it can't move in any direction, therefor the AI is not allowed to use it in any way (including settling).
you can remove the whole code without problem (done in wildmana)
__________________

Master of Mana

Turn based Strategy in a fantasy world setting
Sephi is offline   Reply With Quote
Old Mar 20, 2010, 09:19 PM   #7
Nor'easter
Emperor
 
Join Date: Feb 2007
Posts: 1,107
As someone who started a navy brainstorming thread about a month ago, I definitely agree with what you did with Cargo Space and streamlining the Upgrade Paths, should help make things easier for the AI.
Nor'easter is offline   Reply With Quote
Old Mar 21, 2010, 12:11 AM   #8
Tholal
Emperor
 
Join Date: May 2009
Posts: 1,462
Quote:
Originally Posted by Nor'easter View Post
As someone who started a navy brainstorming thread about a month ago, I definitely agree with what you did with Cargo Space and streamlining the Upgrade Paths, should help make things easier for the AI.
That thread was definitely part of my inspiration.
Tholal is offline   Reply With Quote
Old Mar 21, 2010, 12:25 AM   #9
Tholal
Emperor
 
Join Date: May 2009
Posts: 1,462
Here are some screenshots to show the comparison between base Ffh2 and my mod.

I used a setup that is a difficult map to play and one the AI really has trouble with. I chose a small archipelago map with high water, eight civs, ancient start, no Acheron. There was no human interference at all, and both playthroughs used the exact same start and map.



First picture shows the starting layout.



Here are the results for the base game. As you can see, the game was really very static aside from the appearance of Minister Koun, Hyborem and Basium. But despite building ships, none were ever assigned as settlers or assault ships, so everyone stayed on their own little island. Not a single inter-island settlement was ever built, and no enemy troops ever landed on foreign soil.



Then here's the game with my mod installed. This round was much more dynamic. Not only did everyone settle at least one city off their starting island (though the Balseraphs soon got stuck in one of those situations were the settler lands in the wrong spot and then never moves again), but there were also a number of naval assaults over the centuries. Obviously, the Lsjolfar tore the Sheaim up, but the Elohim also took the two southernmost cities from the Hippus (hard to see due to the culture borders). The Sidar also acquired the easternmost Bannor settlement.



And here we have a final comparison showing the status at turn 350 (which is near the end in a quick game) between the two versions (before is base Ffh2). The Sheaim have been conquered, and the Svartfalar responded to an ill-advised war declaration from the Bannor by destroying all their ships, mounting a trade embargo around their capitol and taking a border island city.
Tholal is offline   Reply With Quote
Old Mar 21, 2010, 02:53 PM   #10
ExMachina
Warlord
 
ExMachina's Avatar
 
Join Date: Jun 2008
Posts: 203
This looks very interesting. I've been playing on Pangaea maps lately, since the AI seems to have such problems with navies. This mod looks like a vast improvement so far.
ExMachina is offline   Reply With Quote
Old Mar 21, 2010, 03:24 PM   #11
Valkrionn
The Hamster King
 
Valkrionn's Avatar
 
Join Date: May 2008
Location: Crestview FL
Posts: 14,450
Tholal, if you don't mind I'd like to look at what you've done and see what we can merge to RifE.
__________________
Valkrionn is offline   Reply With Quote
Old Mar 21, 2010, 03:44 PM   #12
[to_xp]Gekko
WM junkie
 
[to_xp]Gekko's Avatar
 
Join Date: Dec 2005
Location: Seyda Neen, Vvardenfell
Posts: 7,533
that test looks seriously awesome O.o
__________________
" Sheelba does what Charadon't " - Senethro
[to_xp]Gekko is offline   Reply With Quote
Old Mar 21, 2010, 04:06 PM   #13
Tholal
Emperor
 
Join Date: May 2009
Posts: 1,462
Quote:
Originally Posted by Valkrionn View Post
Tholal, if you don't mind I'd like to look at what you've done and see what we can merge to RifE.
Yeah. No problem. What I've done so far is fairly crude. The main issue I discovered was that no naval units were ever being assigned assault or settler status, so simply getting those into the mix makes a huge difference.
Tholal is offline   Reply With Quote
Old Mar 21, 2010, 06:21 PM   #14
Sephi
Deity
 
Join Date: Jan 2009
Posts: 2,907
yeah, Kael merged only the dll side of my basic naval AI, not the XML settings, that's why you saw no settle ships.
__________________

Master of Mana

Turn based Strategy in a fantasy world setting
Sephi is offline   Reply With Quote
Old Mar 22, 2010, 03:35 PM   #15
Tholal
Emperor
 
Join Date: May 2009
Posts: 1,462
I have a new version that I'll post either tonight or tomorrow. Here's a quick preview of the changes:
  • Caught and fixed an issue that would result in newly founded cities trying to immediately build another settler
  • Did away with trying to use the AI_ESCORT_SEA script on naval units as they would never do anything useful
  • Added a check whenever war status changes to convert missionary and animal AI units to the AI_ATTACK script
  • Some naval units will now take an appropriate crew promotion when created
  • Added a check to convert the first Caravel created to a SETTLER_SEA AI to see if I could help the computer players make that first ocean crossing
Tholal is offline   Reply With Quote
Old Mar 23, 2010, 08:37 PM   #16
Tholal
Emperor
 
Join Date: May 2009
Posts: 1,462
Beta 1.1 released (see first post for more info). I'll be heading on vacation on Friday, so there won't be any new versions released for a couple of weeks.
Tholal is offline   Reply With Quote
Old Mar 24, 2010, 07:05 AM   #17
[to_xp]Gekko
WM junkie
 
[to_xp]Gekko's Avatar
 
Join Date: Dec 2005
Location: Seyda Neen, Vvardenfell
Posts: 7,533
thanx!
__________________
" Sheelba does what Charadon't " - Senethro
[to_xp]Gekko is offline   Reply With Quote
Old Mar 25, 2010, 07:27 PM   #18
Tholal
Emperor
 
Join Date: May 2009
Posts: 1,462
I was hoping to show further developments in the world, but the game went into one of those infinite hangups around turn 447. This image shows the map state at turn 5, 100, 200, 300, 400 and 440, respectively. This test was done with the latest version of Erebus Continents, low cohesion, high water, x-wrap -- everything else on default settings



The Lanun had their sizable island all to themselves and they took full advantage, planting cities all around the coast and launching successful assaults of the Calabim and the Hippus, wiping both from the map.

The Balseraphs chose a different path, using Loki to snag the 2nd Sheaim city and then waging a continuous, eternal war against the Elohim (restarting it as soon as possible after every cease-fire). They didn't build a single city all game, instead relying on their conquests, which were only mildly successful. But their aggression basically ensured that all of the civs on their island would never amount to a world power, though the Elohim did try to escape the insanity by moving some of their people to a tiny island in the northern hemisphere.

The Khazad were mostly content with sitting on their two cities, though they did join the Lanun in attacking the Hippus, securing a city on that island and then branching off to another nearby. But then they summoned Basium, declared war on the Sheaim and the Doviello, subjugating both. The Grigori also jumped into the fray, taking the Sheaim's lone offshore colony and joining the Khazad in beating the evil civilization on their home turf.

Last edited by Tholal; Mar 25, 2010 at 07:44 PM.
Tholal is offline   Reply With Quote
Old Mar 25, 2010, 07:32 PM   #19
[to_xp]Gekko
WM junkie
 
[to_xp]Gekko's Avatar
 
Join Date: Dec 2005
Location: Seyda Neen, Vvardenfell
Posts: 7,533
amazing what you're doing man
__________________
" Sheelba does what Charadon't " - Senethro
[to_xp]Gekko is offline   Reply With Quote
Old Mar 31, 2010, 04:48 PM   #20
Shoobs
Chieftain
 
Join Date: Mar 2010
Posts: 90
Keep up the good work!
Shoobs is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Fall from Heaven > FfH2 Modmods, Scenarios, and Maps > More Naval AI Modmod > [MOD] More Naval 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Naval AI modmod ? Morphem01 FfH2 Modmods, Scenarios, and Maps 3 Sep 21, 2009 02:48 AM
AI Naval invasions RedRalph Civ4 - General Discussions 5 Sep 13, 2007 07:24 AM
naval power mod for ptw - based on 'patch suggestion mod' kettyo Civ3 - Completed Modpacks 12 Jan 13, 2003 11:33 AM
Naval AI kIndal Civ2 - Scenario Creation 8 Apr 20, 2002 08:37 AM
Realism Mod: Fixes AI strategy, Units, Naval Warfare! and UUs The Troquelet Civ3 - Creation & Customization 1 Apr 15, 2002 04:10 PM


Advertisement

All times are GMT -6. The time now is 12:30 PM.


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