[MOD] More Naval AI

I'm unable to replicate this issue. Do you have a saved game with the repeatable crash that I can look at?

Here's a save from the first game I noticed; after that I did a new game to test if it was an isolated issue. Both crash when I end turn.
 

Attachments

  • somnium 1.CivBeyondSwordSave
    882.2 KB · Views: 59
  • somnium duel.CivBeyondSwordSave
    14.7 KB · Views: 60
Hey, I'm working with Tholal right now on this project, mostly on AI stuff, but also looking for any bugs as well. Ever since I've played FfH, there have been certain very select parts of the python code that mysteriously has never worked on my computer (no error messages or anything) that seem to work for others and I wanted to get a feel for if any body else has experienced this.

One instance (like I said, 99% of it works just fine) is the initial two orc archers that are supposed to spawn in new barbarian cities. I'd assumed this was a general bug until Tholal confirmed that it worked just fine on his computer (note, this doesn't work in a clean install of FfH with the newest patch, or with More Naval AI installed) and so have moved the code from python (unchanged) into the DLL where it works on both of our systems.

The only other instance that I'm aware of is the code spawning Orthus, which has also never happened on my computer (I'm presently porting to the code into the DLL for it as well). So I just want to know if anybody else has also had the experience of these items not occurring (e.i. have you not ever had Orthus spawn or see empty unguarded barbarian cities on a regular basis) or any other items I might not have noticed.
 
For Orthus, are you certain you aren't playing with the No Orthus option checked for some reason? It doesn't seem like you are if you've never seen him, but I would suggest doing a Play Now to be sure all game options are defaults then try a game on Quick. If he's spawning right, it will be on turn 51/52, always with the first "So and so has completed his greatest work, the most x Civilizations of the world." Just a thought to make sure it's not that.

-CF
 
My constant problem with Tholal's mod - AC rallies like a madness - and sometimes even in "all neutral/good map" Yet AI most of times do not build PoR.
 
<sarcasm>Man, wish I'd checked that before</sarcasm> ;) Sorry, just having some fun with you, but yea, I can definitely confirm this isn't from the 'no Orthus' option. Not only are the game options all reset to off each custom game you start (unless you change it to save the options in the ini instead of calling the defaults from XML), but it also doesn't explain the 'skipped' archer code that seems to be following from some similar cause.

Both of these actions (spawing the archers and orthus) are very simple python code called from the EventManager python module, both called from game events, but that's where the similarities end. I've been over the code for each and it's all solid, which is backed up by the fact that they've both worked in seemingly nearly everyone's computers (except mine). I also know of no other instances from other mods of this kind of anomaly on my computer. The most likely cause is the game events themselves ('onBeginGameTurn' and 'onCityBuilt') not firing, though there's no obvious reason they wouldn't, but I've yet to confirm that the other code called in those events (spreading hell terrain, adding certain buildings to infernal cities when they are built) is occurring or not. By contrast though, just to pick another event at random, I can confirm that 'onGameStart' and 'onSetPlayerAlive' do call the FfH python code they are supposed to without problem.

That's why I'm trying to establish if anybody else has seen the same behavior and compare the situations to figure out where it could arise from. These kinds of things don't just occur for one person only, even if they're rare. But in the mean time moving the 'skipped' over code (don't know how else to describe it) into the DLL where it's definitely acting properly is the best solution. I'd just really like to figure out what's causing it, partly out of curiosity, and partly because moving the code to the DLL is a bit messy for modmoders (hard coding).
 
In RifE, they have SpawnGroups, which is in the DLL, a new XML file, which lets you spawn units. No hardcoding, maybe you should look at that :)
 
To describe it better, it lets you define specific groups (AKA Spawn Groups) of units, and then set requirements for them to spawn.

You are able to set leaders (though this requires the Commander code from FF), and then list any number of units, promotions that should be applied to those units, etc.
 
I'm presuming (from discussions a few pages back as I recall) that this is from raising cities?

Mmmm...yeah...aaand AC monsters - they either totally wipe out weaker civs or cripple those seriously - in short, AC monster pave the way for "conquest mode" civilization.
 
<sarcasm>Man, wish I'd checked that before</sarcasm> ;) Sorry, just having some fun with you, but yea, I can definitely confirm this isn't from the 'no Orthus' option. Not only are the game options all reset to off each custom game you start (unless you change it to save the options in the ini instead of calling the defaults from XML), but it also doesn't explain the 'skipped' archer code that seems to be following from some similar cause.

Both of these actions (spawing the archers and orthus) are very simple python code called from the EventManager python module, both called from game events, but that's where the similarities end. I've been over the code for each and it's all solid, which is backed up by the fact that they've both worked in seemingly nearly everyone's computers (except mine). I also know of no other instances from other mods of this kind of anomaly on my computer. The most likely cause is the game events themselves ('onBeginGameTurn' and 'onCityBuilt') not firing, though there's no obvious reason they wouldn't, but I've yet to confirm that the other code called in those events (spreading hell terrain, adding certain buildings to infernal cities when they are built) is occurring or not. By contrast though, just to pick another event at random, I can confirm that 'onGameStart' and 'onSetPlayerAlive' do call the FfH python code they are supposed to without problem.

That's why I'm trying to establish if anybody else has seen the same behavior and compare the situations to figure out where it could arise from. These kinds of things don't just occur for one person only, even if they're rare. But in the mean time moving the 'skipped' over code (don't know how else to describe it) into the DLL where it's definitely acting properly is the best solution. I'd just really like to figure out what's causing it, partly out of curiosity, and partly because moving the code to the DLL is a bit messy for modmoders (hard coding).

Fair enough. =P I just figured it was worth asking, given that it's an obvious cause. Though, as far as I know, they're only reset for "Play Now," as I've had issues with hidden game options in RifE (ie remove religion) being in the wrong state due to playing another mod (base FfH, FF, etc) beforehand. My apologies if my question was insulting or anything though--wasn't my intent.
-CF
 
Adding spawn groups as described would be overkill since I'm not looking at adding anything new in terms of features, just ensuring that the base code is actually doing what it's supposed to for everyone. It also doesn't really cover the specifics of what the code in question is coded to do. Thanks for trying to help though :cool:

The more I look at the code, the more I think something is keeping those specific events from firing.

Also, I'm writing it where the conditions to spawn Orthus are in the DLL (which game turn, options checking) but the actual spawning and associated hard code will be called from Custom Functions.
 
My apologies if my question was insulting or anything though--wasn't my intent.

Not insulting, don't worry about it :). The 'hidden' game option thing is an issue if game options is called from the ini file (as in your rife example), but FfH is by default setup to read the options from the mod's game options xml file that sets the defaults each time (all to false).
 
Adding spawn groups as described would be overkill since I'm not looking at adding anything new in terms of features, just ensuring that the base code is actually doing what it's supposed to for everyone. It also doesn't really cover the specifics of what the code in question is coded to do. Thanks for trying to help though :cool:

The more I look at the code, the more I think something is keeping those specific events from firing.

Also, I'm writing it where the conditions to spawn Orthus are in the DLL (which game turn, options checking) but the actual spawning and associated hard code will be called from Custom Functions.

Yeah, I wouldn't have brought it up had Jemon not already done so. :p Only worth while if you want to commit to using it; For bug fixing, it's not worth while.

That last bit though... Yeah, all possible with my system. :p
 
Here's another resource trading issue: I was friendly with Cardith (about +7), and asked what he would want for a spare Fine Clothes resource. He came up with: my only sugar, my only wheat, my only copper, and my only Body Mana! Having a monopoly should let him ask for better than an even trade, but I don't think he should gouge a friend quite so hard.
 
So, I'm not really sure what's going on here. I'm the Illians, playing on Prince, and have been at war with the Hippus and the Kuriotates for a good while. I've used my Priests of Winter to summon Ice Elementals and pretty much obliterate their armies, with little to no retaliation. Enemy stacks just walk around my cities, back and forth, occasionally pillaging my tiles but never attacking my cities or units. Units also will not attack my undefended Priests of Winter if I leave them in the open. Can someone tell me what's happening?

My save can be found here: http://www.mediafire.com/?aruc6jb8e9j4zj4
 
Top Bottom