Orthus smash OOS

Sephi

Deity
Joined
Jan 25, 2009
Messages
3,092
This small Mod tries to remove some OOS problems from FFH Patch J. No Gamechanges whatsoever, only change is that some AI calculations are cached (so that they don't get out of sync). Only use this Mod if you have OOS problems with patch J. This mod BREAKS SAVES.

Please post if this solved OOS problems for you. Everyone in the MP game needs this little Modmod. Copy dll file into Assets folder

uploaded new version 1.2 (12/29/2009) which disables AI suicide summoning in simultan Multiplayer

http://www.filefront.com/15244959/CvGameCoreDLL.dll/

for modders:
edit: source attached
also see http://forums.civfanatics.com/showpost.php?p=8742990&postcount=7
also add this (change version 1.2)
Spoiler :

in CvGame::updateMoves()
replace added code with
Code:
/*************************************************************************************************/
/**	BETTER AI (Spellcasting end of turn) Sephi                                 					**/
/**	need to find a better place for this in the update cycle?									**/
/**						                                            							**/
/*************************************************************************************************/
						if (!isMPOption(MPOPTION_SIMULTANEOUS_TURNS))
						{

                            if ((!(player.isHuman()) && (!(player.isBarbarian()))))
                            {
                                player.AI_setSummonSuicideMode(true);
                                for(CvUnit* pLoopUnit = player.firstUnit(&iLoop); pLoopUnit != NULL; pLoopUnit = player.nextUnit(&iLoop))
                                {
                                    int ispell=pLoopUnit->chooseSpell();
                                    if (ispell!=NO_SPELL)
                                    {
                                        pLoopUnit->cast(ispell);
                                    }

                                    if (pLoopUnit->isBuffer())
                                    {
                                        pLoopUnit->AI_BuffCast();
                                    }

                                    if (pLoopUnit->isSummoner())
                                    {
                                        pLoopUnit->AI_SummonCast();
                                    }
                                }
                                player.AI_setSummonSuicideMode(false);
                            }
                        }
						player.setAutoMoves(false);
/*************************************************************************************************/
/**	END	                                        												**/
/*************************************************************************************************/
 

Attachments

  • CvGameCoreDLL FFH Patch J OOS Fix.zip
    234.3 KB · Views: 98
about to give this a try, ill let you know if we get OOS


edit: OOS on turn 7.
 
about to give this a try, ill let you know if we get OOS


edit: OOS on turn 7.

o.O ...... dude, I thought this was supposed to help the player against the OOS issues, not help the OOS issues against the player. :p
 
I was still getting intermittent OOSes after this fix. The OOS logger showed that a unit was ending up being assigned to a patrol on one system and not on the other (ending up with UNITAI_COUNTER vs UNITAI_ATTACK). I took a look at the code and after a bit of digging I think I found the problem. These two variables don't appear to ever get properly initialized in the CvCityAI.cpp:

m_iAI_CityPatrolgroupOrigin_X
m_iAI_CityPatrolgroupOrigin_Y

I added a snippet to CvCityAI::AI_reset() to initialize both of them to -1 and I haven't had an OOS since so hopefully that was it. I would upload a DLL, but I use a heavily modded version of FFH so it wouldn't be of any use to anyone. Hopefully this helps though.
 
great find Trojan Sheep

while merging my changes from wildmana, I accidently deleted this in CvCityAI::AI_reset()
Code:
    m_iAI_CityPatrolgroupOrigin_X = -1;
    m_iAI_CityPatrolgroupOrigin_Y = -1;
    m_iAI_CityDefenseProduction_X = -1;
    m_iAI_CityDefenseProduction_Y = -1;
now that explains the OOS.
 
played a multiplayer game with my brother and 6 AI's on a small global highlands. first oos on turn 112, second on 123, a 3rd on 124. Stopped at that point
 
Played a multiplayer game for 350 turns with the latest version. Only 2 OOS on turn 173 and 175 then no problems for the rest of the game. Baselrolfs were in the game so seems like recurring OOS has been found.
 
Played a few more games seem to get alot of OOS's in 2 out of 3 games. not sure if our first game where we only got 2 was just a fluke.
 
Something is realy strange with this OOS's i do not tried this mod, but what i found out is:
when an OOS occurs, saving and reloading just brings one turn (or some more sometimes) without OOS but everytime, me and my pals going to desktop and then, after restarting the game, loading the savegame helps to play at least one hour without OOS. Even when no OOS occurs but we just trying to load a savegame from within the game, an OOS occur.
Iam not sure what is causing the OOS's in our case but i am absolutely sure that restarting the game from desktop make them disapear (NOT just restarting from main menu, that does not help).
btw: iam talking about patch J

is it possible that there are some caching problems? Or some kind of memory leaks?
 
Hey Sephi, I've been trying to play some FFH2 with a friend but we've been seeing a bunch of OOS errors. We saw your patched CvGameCoreDLL.dll and tried it out. Unfortunately we still got an OOS. I noticed you mentioned the luichirp in the "OOS troubleshooting" thread, and FYI, my friend has been playing as the Luichirp in every game. He doesn't think he's doing anything to cause the OOS though, it happens at the beginning of a new turn.

Anyway, I've attached a savegame which uses the DLL in the first post in this thread. If you start it, it should OOS within a few turns. I hope it helps to debug these OOS issues.
 

Attachments

  • Jim AD-0147.CivBeyondSwordSave
    158.1 KB · Views: 105
We had 5 out of 5 games with game breaking OOS's this week using the hotfix.
Luichirp were in some games but not all, think 3 out of the 5. Just enabled logging today, so next time we get oos will post here for you guys to review.

Edit: What seems to happen is an OOS around 150, we reload the game then about another 10 turns later we will get another OOS, then reload, 5 turns later another OOS, reload, then start to get the OOS every turn, this is with the ran seed on reload.
 
oh, that's not good news :/ I think we should further debugging of OOS after patch k is released (who knows what issues are fixed then). Maybe you want to use patch d which shouldn't have any OOS issues until then.
 
As i said before, please try to restart the game from the desktop after an OOS occurs and then loading the game (every human player has to do this). In our games this gave us at least one hour playing without OOS, especialy in situations were a normal reloading just gave us one or some more turns before the next came.
 
As i said before, please try to restart the game from the desktop after an OOS occurs and then loading the game (every human player has to do this). In our games this gave us at least one hour playing without OOS, especialy in situations were a normal reloading just gave us one or some more turns before the next came.

always have done this, you have to

oos problems have been around in this mod from the start, for a little while as Sephi said pre patch d they were not bad at all,it seems this always happens when merging stuff from other mods

I just dont want to play pre patch d coz i like the wild mana and other additions to the main game :D

btw, We have also been getting game breaking oos in every wild mana game we tried

edit: it always seems to happen more when there is a vista user (me) and an xp user (friends)
 
Top Bottom