Single Player bugs and crashes v38 plus (SVN) - After the 20th of February 2018

When I capture a city, most of their Partisans spawn at sea. When this happens, ships can kill them without a fight ie. as if they were zero strength.

(Mind you, given that a city defended by one Rifleman will spawn 10 or more Partisans (str 36), AND many of them are invisible, AND they can crop up in your territory several tiles from the city, a few of them drowning makes the mechanism less crazily unbalanced).
 
I had a new city invaded and conquered by a Barb Motorcycle and it spawned about 6 or 7 Partisans for me. Used them to clean out the motorcycle. But then had to rush a rifleman over from an adjacent city to claim it back. The remaining Partisans I used to hunt down Barb units. 2 of them died trying to take out an Adventurer (Mounted unit), str 13, on a forested Hill. Did not take long to burn up those partisan units either.
 
When I capture a city, most of their Partisans spawn at sea. When this happens, ships can kill them without a fight ie. as if they were zero strength.

(Mind you, given that a city defended by one Rifleman will spawn 10 or more Partisans (str 36), AND many of them are invisible, AND they can crop up in your territory several tiles from the city, a few of them drowning makes the mechanism less crazily unbalanced).
The number spawned is or should be based on the population of the city not the number of defenders. It should increase if there are buildings that represent an arms cache eg an arsenal.

It would be nice if we could spawn units of the correct str for the stage the nation is at.

Fixing the spawn on water I thought I had done. Obviously not. Put back on my list.

Other things still on my list for that mechanic are
  • if settled military GP exist in the city there is a change that they spawn as a partisan leader (Military Instructors, Gladiators etc.)
  • if settled health GP exists may spawn support units for the partisans
  • creation of an underground/insurgent/fifth column in the city...
  • evacuation of populace and national wealth before the armies get to the city ie other settled GPs and any national treasures eg art works. ie Refugees and treasures maybe with escorts.
  • make Myths and Stories (but not Story) owned by the nation not an individual city
  • allow partisans to upgrade (only in friendly cities) to regular units
 
We had planned out previously to expand the system to not just potentially spawn partisans but rather the most tech appropriate Ruffian unit. I'm not sure where we put down what we were working on and there are traits tags that were made for this that I'm not applying because I don't know if we connected up our planning at all there. I do really like the idea of being able to upgrade them to regular units - they can't even enter friendly cities as Ruffians so I'd change that to inside your borders rather than inside friendly cities. I think a new tag for that may be necessary.
 
We had planned out previously to expand the system to not just potentially spawn partisans but rather the most tech appropriate Ruffian unit. I'm not sure where we put down what we were working on and there are traits tags that were made for this that I'm not applying because I don't know if we connected up our planning at all there. I do really like the idea of being able to upgrade them to regular units - they can't even enter friendly cities as Ruffians so I'd change that to inside your borders rather than inside friendly cities. I think a new tag for that may be necessary.
Historically they get upgraded by the city admin or rich patrons in the city. Eg Polish squadron in WWII (or WW IV or V as they are now suggesting it be called).

Having them upgrade anywhere in your cultural borders would basically destroy the historical use of the unit.

One thing I missed on the list and is need elsewhere eg UN troops, is the idea that a unit belongs to you but you have lent it to someone else for a limited time or objective.
 
Having them upgrade anywhere in your cultural borders would basically destroy the historical use of the unit.
For numerous game reasons, striving for this much historical accuracy is unreasonably difficult.
I said this forgetting we were already in the process of navigating the biggest problem here which was the HN city capturing for Barbs feature. I now remember that we were going to be assigning the Freedom Fighter promo to those units spawned in this manner for free so that they would lose the HN designation and thus be able to capture cities for the player that owns them and should also thus be able to enter those cities safely.

So to build on that, which I think the promo still needs to be setup to be assigned during the spawning process, we need a new upgrade tag that a unit can only use if it's in a friendly city, specifically for this purpose, so that we can add the use of that tag to Ruffian units to enable them to promote to a more standard military type unit commonly used for city defense, concurrent to the same era if they are in a friendly city.

That should actually be very possible since we're already addressing the problem I thought would cause too much difficulty here.
 
Last edited:
As for the previously reported Cutthroats killing ships, yes it definitely happens, but I've noticed it like 4 times in this entire game, and I haven't been needing to take many hard saves, so it's going to be a while before I have an illustrative save.
Update on this: it's not just Cutthroats, nor just HNs, in fact, it may be that any land unit can kill (without a fight) any enemy naval unit in any port the land unit can enter.
 
it may be that any land unit can kill (without a fight) any enemy naval unit in any port the land unit can enter.
Has always been that way. Maybe even in vanilla BtS. It was that way for RoM.
 
Has always been that way. Maybe even in vanilla BtS. It was that way for RoM.
I remember it being the case for killing air units in BtS, can't confirm whether you could kill naval units this way. Nevertheless it's a bug, and thankfully it seems TB agrees.
 
Has always been that way. Maybe even in vanilla BtS. It was that way for RoM.

I remember it being the case for killing air units in BtS, can't confirm whether you could kill naval units this way.
Nevertheless it's a bug, and thankfully it seems TB agrees.
The situation is a lot more complex than it used to be and I do agree that Naval units should not be so easily destroyed. Yes, back to vanilla naval units in a city are all destroyed when you invade a city and they will not help to defend it but will just die. And that part of the process is still there and making things very tricky for combat capable units trying to be enabled to share a city space with enemies.

Regarding then, the initial report about cutthroats, are we talking about when they sack a city or when they have entered the city to blend in? I can't remember if Cutthroats are supposed to act like their criminal side or their ruffian side on this matter - I think the ruffian side might be how they are setup and if that's the case then it makes sense and it's actually not CURRENTLY a bug that they destroy ships in cities they 'capture'. It is something I want to change the dynamic of but hasn't been a project that's come under focus yet.

What I'd like to see happen is for naval vessels in land invaded cities to naturally and immediately escape to an adjacent water tile (and if they can't then they can die.) Until a point where those vessels are given a tag that enables them to defend a city - the hover vessels in the late game should be capable of this.

However, I also need to change things so that if a land unit like a helicopter attacks a naval unit at sea, there can be a legitimate battle that takes place. This is all wrapped up in the same assumptions here that autodestroy or just don't allow the conflict to take place somehow.

Again, these points aren't bugs but projects.
 
In the case of the Cutthroat, it can be any city, but the ship must be the 'top defender', in practice meaning it's not a city belonging to the ship's owner. (They can sack a city??) In other ie non-HN cases, I'm talking about cities friendly or at least open to the 'attacker'. If a stack-of-death takes a city, it's understandable if ships that do not flee get destroyed or captured. But my (latest) example was a Swazi Tracker (str 4) meeting an enemy Frigate in a third-party port - and treating it as zero-strength.
 
In the case of the Cutthroat, it can be any city, but the ship must be the 'top defender', in practice meaning it's not a city belonging to the ship's owner. (They can sack a city??) In other ie non-HN cases, I'm talking about cities friendly or at least open to the 'attacker'. If a stack-of-death takes a city, it's understandable if ships that do not flee get destroyed or captured. But my (latest) example was a Swazi Tracker (str 4) meeting an enemy Frigate in a third-party port - and treating it as zero-strength.
OK, good distinctions to make. Very important ones.

1) Cutthroats are acting as criminals where cities are concerned and are supposed to be blending with them regardless of enmity or not and should not be able to fight what's there unless an arrest or assassination are being conducted, but since 'enemy' naval units are there, they are being destroyed as 0 str naval units, acting like the cutthroat entered the city to capture it. What happens when a ship tries to enter a city that a cutthroat is already in? What happens to workers and other 0 str units? Anything?

2) A tracker entering an allied city encounters a 3rd party 'enemy' unit there, such as a ship, and treats it like an attack. Or is it ONLY naval vessels it treats as an attack? If a 3rd party 'enemy' axeman was in the city instead, would they attack that axeman just as if it was in the field?
 
1a. I'm guessing - fairly confidently - ships can enter cities with known Cutthroats without combat/being destroyed. I'd have reported it as a bug if I saw a ship destroyed in this manner.

1b. Since you can't attack Always Hostile HNs in a friendly or third-party city, I'd guess you can't normal-attack any land units in cities without attacking the city. Although now that I think about it, I'm pretty sure you can normal-attack hunt animals in third-party cities, so that's one exception, which almost makes me second-guess the rule... I have lost units in neutral cities to Cutthroats, but I assumed that was assassination.

2a and b. As for 1b., my guess is that you won't attack the axeman, but will coexist with it in the third-party city. It is only naval (and air - at least that was standard in vanilla BtS) units that you destroy.

As stated these are all guesses. I suggest you decide what the answers should be, and then experiment and/or tweak until you're sure it's so...
 
1a. I'm guessing - fairly confidently - ships can enter cities with known Cutthroats without combat/being destroyed. I'd have reported it as a bug if I saw a ship destroyed in this manner.

1b. Since you can't attack Always Hostile HNs in a friendly or third-party city, I'd guess you can't normal-attack any land units in cities without attacking the city. Although now that I think about it, I'm pretty sure you can normal-attack hunt animals in third-party cities, so that's one exception, which almost makes me second-guess the rule... I have lost units in neutral cities to Cutthroats, but I assumed that was assassination.

2a and b. As for 1b., my guess is that you won't attack the axeman, but will coexist with it in the third-party city. It is only naval (and air - at least that was standard in vanilla BtS) units that you destroy.

As stated these are all guesses. I suggest you decide what the answers should be, and then experiment and/or tweak until you're sure it's so...
 
1a. I'm guessing - fairly confidently - ships can enter cities with known Cutthroats without combat/being destroyed. I'd have reported it as a bug if I saw a ship destroyed in this manner.
I suspect they simply cannot enter that port but I haven't set this up to test it.

1a. I'm guessing - fairly confidently - ships can enter cities with known Cutthroats without combat/being destroyed. I'd have reported it as a bug if I saw a ship destroyed in this manner.

1b. Since you can't attack Always Hostile HNs in a friendly or third-party city, I'd guess you can't normal-attack any land units in cities without attacking the city. Although now that I think about it, I'm pretty sure you can normal-attack hunt animals in third-party cities, so that's one exception, which almost makes me second-guess the rule... I have lost units in neutral cities to Cutthroats, but I assumed that was assassination.

2a and b. As for 1b., my guess is that you won't attack the axeman, but will coexist with it in the third-party city. It is only naval (and air - at least that was standard in vanilla BtS) units that you destroy.

As stated these are all guesses. I suggest you decide what the answers should be, and then experiment and/or tweak until you're sure it's so...
I ask all of these to get a better clue where the problem would actually lie. What SHOULD be true:
What happens when a ship tries to enter a city that a cutthroat is already in?
Should be able to peacefully co-exist in the city and thus should be able to enter without combat. If it can't, with or without combat, speaks to where the problem may lie and if it CAN, that also speaks to where the problem may lie.

What happens to workers and other 0 str units? Anything?
Should also be equally as capable of peacefully entering the city and share that space wtihout assumed battle. If they can't, again, it speaks to where the problem may lie.

2) A tracker entering an allied city encounters a 3rd party 'enemy' unit there, such as a ship, and treats it like an attack. Or is it ONLY naval vessels it treats as an attack? If a 3rd party 'enemy' axeman was in the city instead, would they attack that axeman just as if it was in the field?
You are right in how it SHOULD operate but again, I'm asking to determine which type of code problem we might have.

Obviously, all these situations I'll need to test.
 
Until a point where those vessels are given a tag that enables them to defend a city - the hover vessels in the late game should be capable of this.
The worst ships in that regard should probably be steam ships. As long as they are in port there should be (next to) no pressure on the boilers, so they would take a long time to get ready to move. But even the other ships could be in comparable trouble if there was only a skeleton crew or less that couldn't probably get the ship out of port.

Hostile ground troops suddenly appearing at the port would be worse for the ships than an aerial attack.
 
The worst ships in that regard should probably be steam ships. As long as they are in port there should be (next to) no pressure on the boilers, so they would take a long time to get ready to move. But even the other ships could be in comparable trouble if there was only a skeleton crew or less that couldn't probably get the ship out of port.

Hostile ground troops suddenly appearing at the port would be worse for the ships than an aerial attack.
Yeah, I would assume the crew has time to react to an ongoing invasion enough to get out of town but it's not like they'd be able to sit there and do battle with the incoming forces unless we're talking about very late game 'navy' which are as much spacefaring as merely oceangoing.
 
First, thank you for a great mod and continued work over the years!

Game hang on rev. 10389 on Caligula's turn (see attached file).

Debugger revealed that it happens within:


CvGameCoreDLL.dll!CvSelectionGroup::mergeIntoGroup(CvSelectionGroup * pSelectionGroup) Line 7599
CvGameCoreDLL.dll!CvUnitAI::processContracts(int iMinPriority) Line 27259
CvGameCoreDLL.dll!CvUnitAI::AI_cityDefenseMove() Line 5817
CvGameCoreDLL.dll!CvUnitAI::AI_update() Line 436
CvGameCoreDLL.dll!CvSelectionGroupAI::AI_update() Line 316
CvGameCoreDLL.dll!CvPlayerAI::AI_unitUpdate() Line 1931


I tried several times, and each time it would hang on CvSelectionGroupAI::AI_update() (with different stacks after).

I play the mod from time to time, every 5 or 6 months, and have had similar issues (hangs on AI unit moves) for years. The solution is usually to force peace or remove player altogether.

Perhaps the AI movement issue can be addressed in a more thorough way, at least as far as preventing hangs at any cost?
 

Attachments

First, thank you for a great mod and continued work over the years!

Game hang on rev. 10389 on Caligula's turn (see attached file).

Debugger revealed that it happens within:


CvGameCoreDLL.dll!CvSelectionGroup::mergeIntoGroup(CvSelectionGroup * pSelectionGroup) Line 7599
CvGameCoreDLL.dll!CvUnitAI::processContracts(int iMinPriority) Line 27259
CvGameCoreDLL.dll!CvUnitAI::AI_cityDefenseMove() Line 5817
CvGameCoreDLL.dll!CvUnitAI::AI_update() Line 436
CvGameCoreDLL.dll!CvSelectionGroupAI::AI_update() Line 316
CvGameCoreDLL.dll!CvPlayerAI::AI_unitUpdate() Line 1931


I tried several times, and each time it would hang on CvSelectionGroupAI::AI_update() (with different stacks after).

I play the mod from time to time, every 5 or 6 months, and have had similar issues (hangs on AI unit moves) for years. The solution is usually to force peace or remove player altogether.

Perhaps the AI movement issue can be addressed in a more thorough way, at least as far as preventing hangs at any cost?
Good job on breaking mod.
Patch MUST be Beyond the Sword\Mods\Caveman2Cosmos, and can't be placed in my documents.
Spoiler :

Civ4BeyondSword 2019-01-23 16-54-16-71.jpg

 
Patch MUST be Beyond the Sword\Mods\Caveman2Cosmos, and can't be placed in my documents.

Sorry, I was not aware that savegames save file system information like folder names. I am suing the latest patched version of Civ, and the game loads just fine on my end. But I do use symlinked and custom-named Caveman to Cosmos folder: C2C.
 
Sorry, I was not aware that savegames save file system information like folder names. I am suing the latest patched version of Civ, and the game loads just fine on my end. But I do use symlinked and custom-named Caveman to Cosmos folder: C2C.
That's going to make debugging it difficult, but it might not be impossible. I will take a look into it as soon as you've confirmed that the problem still exists on the latest SVN version.
 
Back
Top Bottom