[MOD] More Naval AI

Hi all, I think I found it. Will report back if not!
 
Crash to desktop: Upgrading a Level 5 Scorpion (Mobility 1, Combat 3) to Mobility 2 caused the game to crash.
 
You have a savegame I can look at?

The scorpion in question is one in Garrislyr, just south-southwest of the horde of Barbarians trying to attack. All of my units running around are Enraged due to the Armeggedon counter. Give it a couple turns for the Horde to commit ritual suicide against the Mercenary and the Scorpion defending the city.

Edit: The save might not help too much without a little setup, thanks to the AC at 95 (and my enraged units attacking randomly) and the error happening a turn before the next auto-save. This, annoyingly, might also be a computer-specific crash and not the game itself.
Got to the same point, gave the Scorpion Mobility 2, no hang and crash to desktop.
Second save is at the promotion point.
 

Attachments

  • AutoSave_AD-0288.CivBeyondSwordSave
    750.8 KB · Views: 61
  • Hannah the Irin AD-0291.CivBeyondSwordSave
    779.9 KB · Views: 61
What is it that determines whether a unit an pass through rival territory with a Rite of Passage agreement rather than open borders? Is it the <bOnlyDefensive> tag?

Did you do something to break pPlot.setPythonActive(False) ?
 
Hyborem's whisper seems to be bit broken currently. City does not get "converted" properly and unhappiness remains.

As a workaround, I "fixed" this by changing parameters for pPlayer.AcquireCity from "x, False, True" to "x, False, False" in CvSpellInterface for both "spellHyboremsWhisper" and "popupHyboremsWhisper". This way I got the raze or set a new governor popup and city was converted normally.

I'm not playing with revolutions on and I don't know if this workaround will have any implications if you do. Imo infernal cities should not have those problems anyway; people are all just slaves and all that :)

Edit: same seems to happen when you get a city as part of peace negotiation

Spoiler :

 
What is it that determines whether a unit an pass through rival territory with a Rite of Passage agreement rather than open borders? Is it the <bOnlyDefensive> tag?

Here's the code:

Code:
if (GET_TEAM(getTeam()).isLimitedBorders(eTeam))
{
	if (isOnlyDefensive() || !canFight())
	{
		return true;
	}
}


Did you do something to break pPlot.setPythonActive(False) ?

Not that I know of. I just tested the Guardian of Pristine Pass and only saw one set of Gargoyles spawn. *shrug*


Hyborem's whisper seems to be bit broken currently. City does not get "converted" properly and unhappiness remains.

Thanks for the report! This bug must have been around forever. Turns out a 'traded' city wasnt calling the cityAcquiredAndKept function (not sure why it wasn't). Anyway, it will be fixed in the next release.


In other news, I think I finally found some code that will auto-create the BUG directories if they dont exist. I've also made some Sevopedia updates for pages that were missing, and have been poking around in city production as well. Hoping for a 2.1 release about mid-month!
 
I'm sorry, I had no internet last week :)

I'm coding an updated version of my sorter application. Besides sorting civilizations and leaderheads, it should also be able to quickly sort buildings and units in any way with just a few changes in the code. We could use it to make civilizations and leaders appear sorted in the custom game window, and to make units and buildings appear in a more logical order in the city screen. What is a "more logical order" is up to debate :)

I'm thinking of leaving it that way. Disciple units will be enabled for Great Generals with the next patch.

Why? If they can be attached to disciple units, IMO it should be possible to attach them to adepts too.

Not sure what you mean.

I'm sorry. My brother told me that it is possible to dispel the mutated promotion. Therefore you can get infinite mutations. I'll playtest this in my next test game to be sure.

Any idea what's happening to cause the unit list to suddenly become misformatted?

It happens almost everytime when you do a mass summon, for example, creating a few fireballs with your wizards.

Regarding the "evil civilizations are hit badly by revolutions" issue, maybe the Dungeon stability bonus could depend on alignment. If you are evil, dungeons are better at keeping revolutions at bay. The governor's manor could also give a stability bonus, otherwise it is not very useful. This would help with balancing the differences between alignments a bit.

In other news, I think I finally found some code that will auto-create the BUG directories if they dont exist. I've also made some Sevopedia updates for pages that were missing, and have been poking around in city production as well. Hoping for a 2.1 release about mid-month!

Awesome! I'll have another test game with r873 :)
 
I noticed that the "explore" automation works different from vanilla bts: Units do not rest until they are fully healed. The result is they are killed very quick after wounded one time.
Maybe this was the same in original FfH (Sometimes poisoned never heal - maybe that is the reason). But it is a really silly behavior, that my explored units use as well as other player's recon units.
 
v2.0

"Royal Guards are now never obsolete"

The Royal Guards abandoned my civ when I switched from Aristocracy to Republic. Either that is a bug or I don't understand the changelog.
 
v2.0

"Royal Guards are now never obsolete"

The Royal Guards abandoned my civ when I switched from Aristocracy to Republic. Either that is a bug or I don't understand the changelog.

That's not quite what is meant by "obsolete." An "obsolete" unit has been replaced by a "better" unit, typically an upgraded version, which makes the older unit unable to be built.

Royal Guards are (and as far as I know always have been, or at least in base FFH2) restricted to civs using the Aristocracy civic, and abandon you if you leave it, like religion-specific national units and heroes.
 
Tholal, do you plan to include DynamicCivNames in you mod?
I enabled and adjusted it a bit to work with FfH, and it seems to work fine. The names are not very nice (Infernal Kingdom, Holy Clan Empire), but maybe it is possible to find good flavorful names (I'm not a native English speaker, so my capabilities are limited)
 
That's not quite what is meant by "obsolete." An "obsolete" unit has been replaced by a "better" unit, typically an upgraded version, which makes the older unit unable to be built.

Royal Guards are (and as far as I know always have been, or at least in base FFH2) restricted to civs using the Aristocracy civic, and abandon you if you leave it, like religion-specific national units and heroes.

Got it. Thanks.
 
I noticed that the "explore" automation works different from vanilla bts: Units do not rest until they are fully healed. The result is they are killed very quick after wounded one time.

Thats weird. I'll look into it.


v2.0

"Royal Guards are now never obsolete"

The Royal Guards abandoned my civ when I switched from Aristocracy to Republic. Either that is a bug or I don't understand the changelog.

Magil explained it pretty well but I'll throw my explanation in as well.

Units can become Obsolete when you reach a certain tech point and can make better units of the same type (for example, Hunters make Scouts obsolete, so you cant build Scouts in cities where you can build Hunters).

There is another tag with sets a Prerequisite Civic for certain units. In the case of Royal Guards, it's Aristocracy. They can only be built if you're using that Civic. On top of that, Royal Guards are also flagged with the Abandon tag, meaning that they abandon you if you don't meet their prerequisites.

Tholal, do you plan to include DynamicCivNames in you mod?
I enabled and adjusted it a bit to work with FfH, and it seems to work fine.

Yes, I just never had the time to figure out why it wasn't working. If you want to send me your code I'll incorporate it for the next build.
 
I finished with the civilization/leader sorting. The unit/building sorting is handled somewhere in the dll code, therefore my XML sorter will not give the results I want with them.

I'm attaching the modified xml files to this post (I sorted r877). They have to be placed at Assets\XML\Civilizations.
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    124.9 KB · Views: 77
  • Civ4ScreenShot0001.JPG
    Civ4ScreenShot0001.JPG
    128.9 KB · Views: 78
  • SortedXMLFiles.rar
    23 KB · Views: 47
Yes, I just never had the time to figure out why it wasn't working. If you want to send me your code I'll incorporate it for the next build.

Here's the code. I actually reworked much, because the old system didn't fit in the civic system of FfH.
Names are taken from FF and original DCN.
 

Attachments

  • 120306_DynamicCivNames.zip
    8.2 KB · Views: 45
Played some games but I don't know... the military AI seems worst then vanilla ffh2 version in my opinion the only think he can do is capture some workers on emperor, he lacks the power to capture cityes from human players, at turn 400 on epic speed and some AI defends whit warriors , economy and research seems fine but then if he lacks power there is no real competition

:confused:

-known bug- Alaszkan 's illusion drops a black mirror when he vanish so you can outfit your entire army whit this extremely powerful item
 
Top Bottom