Single Player bugs and crashes v36 plus (SVN) - After the 24th of October 2015

Status
Not open for further replies.
Did something happen to the "Civic Upkeep", because it doesnt change like it used to, not until, waaaay late like Modern Era or so??? Then its only from a 1:gold: to a 2:gold:??

See pic, and what i have circled is for ALL civics?? Did i change something that needs to be "back"??:confused:


SO the "costs" for None, Low, Medium, High, and Extreme Upkeep has not changed. That file is still the same as it's been for a long time. And it's based on % of Population and a % off the number of cities in your empire.

Here is High Upkeep values.
Code:
<UpkeepInfo>
			<Type>UPKEEP_HIGH</Type>
			<Description>TXT_KEY_UPKEEP_HIGH</Description>
			<Strategy>TXT_KEY_UPKEEP_HIGH_HELP</Strategy>
			<iPopulationPercent>24</iPopulationPercent>
			<iCityPercent>60</iCityPercent>
		</UpkeepInfo>

You have Tribalism. So you don't have much Pop nor Many cities do you?

JosEPh
 
Ships attacked my warlord corporals while they were loaded on galeon.

City guards can attack from ships on sharpshooters and animals.

You've provided proof of the issues here but not really the full circumstances behind them.

Taking some guesses, I've inserted a little code snippet I'll be testing here which could hopefully clear up both issues, provided I understand what those issues actually are. The second one I think was cleared up in a previous move rule correction. I mean, LE units are capable of attack now that the reason they were made incapable has been made possible to add to a unit independently. Being able to attack, they can attack by boat. The issue I think you were pointing at is that they were able to walk into a city and attack the criminals there. That was an older bug recently corrected.

I'll be testing to make sure I haven't caused any real problems here with incorrect logic then I'll have the fix on my next commit, which will be after taking care of numerous crash scenarios in case those saves won't load after I update next.
 
The game-start warning that was recently changed has a minor spelling error. "Starting in other eras will not be ballanced." -> balanced.

IMO and ideally, I feel it should also say "Prehistoric era starts" (lowercase "starts", adding "era"), but that is quibbling.
 
The game-start warning that was recently changed has a minor spelling error. "Starting in other eras will not be ballanced." -> balanced.

IMO and ideally, I feel it should also say "Prehistoric era starts" (lowercase "starts", adding "era"), but that is quibbling.


fixed, thx . .
 
I'm using the last official patch so it's perhaps it's an issue that is already resolved, but there is a very curious lag regarding specialist. Sometimes it takes forever to reassign specialists, it can take more than 10 seconds to reassign every single specialist, and since reassigning specialists and workers is most often a two step process that doubles the pain. Usually it is very slow in the beginning of a session, then anywhere between 15-minutes to several hours later it suddenly lightens up and the lag is gone. But some sessions the lag never goes away and very rarely it also happens that the lag isn't there in the beginning of a session and it can also return and disappear later seemingly without rhyme or reason. What is going on here?
Interesting. Perhaps you've found a major cause for lag that has gone unseen. I'll have to take some time to analyze that. The AI does this often so it could be a major lag problem for turn times.
Putting this here to remind myself to look into it.
 
Just an addition to the list of culture units with lost promotions due to unitclass, Zulu Impi don't get their Mobility promotion anymore.

Also, Culture (Illyrian) is very badly placed in the tech tree. It's currently on Military Tradition, but its culture unit is a Dragon Ship Pirate variant, so it's already obsolete by the time you can build the culture.
 
Just an addition to the list of culture units with lost promotions due to unitclass, Zulu Impi don't get their Mobility promotion anymore.

Also, Culture (Illyrian) is very badly placed in the tech tree. It's currently on Military Tradition, but its culture unit is a Dragon Ship Pirate variant, so it's already obsolete by the time you can build the culture.

Maybe you should post this in the Cultures thread and address it to Sparth?

JosEPh
 
Some AI behavior oddities in my most recent game. With Great Commanders on, I'm seeing the AI accompany its hunting stacks (generally 1 Hunter-line and 1 Scout-line or Dog) with a Great General or Great Doctor. Now, granted, I could see doing this myself in certain situations, but it's an extremely high-risk behavior considering the small size and relative weakness of said hunting stacks, especially since they usually wander around far from any potential support.

Additionally, I've noticed that Tribal Villages/Unexplored Islands are giving and spawning units that are significantly more advanced than the world tech level should indicate. In early eras, I think this could be somewhat reasonable, but a primitive community creating units that are a full era ahead of the world tech leader is a bit absurd. As the result of my explorations with Caravels, I managed to indirectly wipe out all of an entire hemisphere's naval presence by spawning "hostile villagers" in Sloops of War, when the rest of the world is still floating around in Galleys and Deceres at best.
 
Some AI behavior oddities in my most recent game. With Great Commanders on, I'm seeing the AI accompany its hunting stacks (generally 1 Hunter-line and 1 Scout-line or Dog) with a Great General or Great Doctor. Now, granted, I could see doing this myself in certain situations, but it's an extremely high-risk behavior considering the small size and relative weakness of said hunting stacks, especially since they usually wander around far from any potential support.
Funny... I agree but many players asked for this and Koshling spent numerous hours building it into the AI. The Great Doctor accompaniment is interesting... I'll have to figure out why it thinks to take them for that role.

Additionally, I've noticed that Tribal Villages/Unexplored Islands are giving and spawning units that are significantly more advanced than the world tech level should indicate. In early eras, I think this could be somewhat reasonable, but a primitive community creating units that are a full era ahead of the world tech leader is a bit absurd. As the result of my explorations with Caravels, I managed to indirectly wipe out all of an entire hemisphere's naval presence by spawning "hostile villagers" in Sloops of War, when the rest of the world is still floating around in Galleys and Deceres at best.
It's based on the era the discoverer is in. There can be a slight anachronism from this if the exploring player is at the beginning of an era and has yet to open up the techs that unlock that unit type but it shouldn't be too much discord.

There is a naval event that spawns pirates nearly an era ahead in advancement than anyone in the world is at... maybe that was part of what you experienced?
 
Funny... I agree but many players asked for this and Koshling spent numerous hours building it into the AI. The Great Doctor accompaniment is interesting... I'll have to figure out why it thinks to take them for that role.
Yeah, I have no idea why the Great Doctor was wandering around with a hunter stack either. Maybe because it has the Health Care Unit combat class? Anyway, if this is actually something that's desired by others, perhaps a change to its priorities should be considered, if possible. Specifically, I think actual combat stacks, notably the primary stack-of-doom, should have a much higher priority on Great Generals if the AI is at war. If the AI is at peace, sending GGs along with hunters makes sense to build experience, but not during war.

It's based on the era the discoverer is in. There can be a slight anachronism from this if the exploring player is at the beginning of an era and has yet to open up the techs that unlock that unit type but it shouldn't be too much discord.

There is a naval event that spawns pirates nearly an era ahead in advancement than anyone in the world is at... maybe that was part of what you experienced?
It's definitely not the pirate event, I've had that multiple times, along with the barbarian swarm events, and those are easily recognizable. This was Sloops of War (Renaissance) from Unexplored Islands, while I was at Optics. Roughly the equivalent of a ship from the 17-1800s being launched from an isolated, undiscovered island, as the result of explorers from a roughly 14-1500s tech level.

While we're on the subject though, I think Sloops of War are actually misplaced in the tech tree and in their prerequisites. All of the other Renaissance ships require Metallurgy (after Gunpowder), but Sloops of War (14 strength) require only Compass, meaning they can be built much sooner. I'd say they should have their tech and resource requirements switched with the current Sloop (12 strength). Maybe this is due to my personal tech priorities, but still.
 
Yeah, I have no idea why the Great Doctor was wandering around with a hunter stack either. Maybe because it has the Health Care Unit combat class? Anyway, if this is actually something that's desired by others, perhaps a change to its priorities should be considered, if possible. Specifically, I think actual combat stacks, notably the primary stack-of-doom, should have a much higher priority on Great Generals if the AI is at war. If the AI is at peace, sending GGs along with hunters makes sense to build experience, but not during war.


It's definitely not the pirate event, I've had that multiple times, along with the barbarian swarm events, and those are easily recognizable. This was Sloops of War (Renaissance) from Unexplored Islands, while I was at Optics. Roughly the equivalent of a ship from the 17-1800s being launched from an isolated, undiscovered island, as the result of explorers from a roughly 14-1500s tech level.

While we're on the subject though, I think Sloops of War are actually misplaced in the tech tree and in their prerequisites. All of the other Renaissance ships require Metallurgy (after Gunpowder), but Sloops of War (14 strength) require only Compass, meaning they can be built much sooner. I'd say they should have their tech and resource requirements switched with the current Sloop (12 strength). Maybe this is due to my personal tech priorities, but still.

I will take a look at all of the above at some point. I've been thinking of expanding the naval evaluation to make sure the pre-metal ships are just as rational in upgrade path designs. I promised the creator of those I wouldn't mess with them but if anything is truly out of whack, I'll find it through that evaluation when it comes back into focus.

The general issue... I'm not sure that he's ever released from duty once called to hunting like that and on size matters it's really a risk for him. A few causes to review that code and see what can be done to improve it do exist therefore.
 
I'm still not getting any Crusaders past the initial on-build one. Where in the files is this handled, so I can take a look myself and see if I can figure it out?

Sambuk (Barbary Corsair Culture Unit for... uh... I forgot what culture) is set to way too large a scale. See attached picture.
 

Attachments

  • Sambuk.jpg
    Sambuk.jpg
    494.7 KB · Views: 73
SVN9292:
I burned down an enemy city that had some criminals inside. They never moved from the plot. I later built a fort on the tile, and they continue to remain in the plot. Next I moved police units, including a dedicated investigator, into the fort. The criminals remain and can not be found after 50+ turns. Though they do trigger the dog in a nearby city to wake up every turn.
 
SVN9292:
I burned down an enemy city that had some criminals inside. They never moved from the plot. I later built a fort on the tile, and they continue to remain in the plot. Next I moved police units, including a dedicated investigator, into the fort. The criminals remain and can not be found after 50+ turns. Though they do trigger the dog in a nearby city to wake up every turn.
For what it's worth, in previous versions you could just attack them conventionally after spotting them with a dog, as long as they aren't in a city or fort.

I think it's possible that forts don't count as cities for purposes of investigation, but do for purposes of attacking criminals.

RoMEventManager.py in the Assets/Python folder
Mm. Looking at the relevant code, bearing in mind that I've little to no experience with Python, I can spot a few possibilities. I'll try fiddling with it and see what happens, and edit in the results to this post.
Spoiler :
Code:
		estiEnd = CyGame().getEstimateEndTurn()
		iTurns = estiEnd/100
		if iTurns > 16:
			iTurns = 16
		elif iTurns < 4:
			iTurns = 4

		if CyGame().getGameTurn() % iTurns ==0:
			if gc.getTeam(pPlayer.getTeam()).isHasTech(self.iTECH_FUNDAMENTALISM):
				obsoleteTech = gc.getBuildingInfo(self.iBUILDING_CRUSADE).getObsoleteTech()
				if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == False or obsoleteTech == -1 ):

					# if pCity.getNumActiveBuilding(self.iBUILDING_CRUSADE) > 0:
					if pPlayer.getBuildingClassCount(self.iBUILDING_CRUSADE) > 0 and CyGame().getSorenRandNum(4, "Crusade") == 0:
						iX = ppCity.getX()
						iY = ppCity.getY()
						
						pNewUnit = pPlayer.initUnit( self.iUNIT_CRUSADER, iX, iY, UnitAITypes.UNITAI_ATTACK_CITY, DirectionTypes.NO_DIRECTION )
						pCity.addProductionExperience(pNewUnit, True)
In the line "if CyGame().getGameTurn() % iTurns ==0:" there's no space between the == and the 0. Probably irrelevant.
The check for if the Crusade wonder is present in the city appears to be commented out. I'm unsure what the next line is supposed to be checking for, frankly. It would appear that it's checking for if the player has the Crusade wonder, and then checking if a random number from 0-4 (seed "Crusade"?) is 0? I'm thinking this line is in fact useless, if we uncomment the previous.
iX and iY are defined from ppCity, but I don't see that defined anywhere, and possibly it should be defined from pCity instead.

Like I said, I'll try making the changes and see what happens, then report back.
 
SVN9292:
I burned down an enemy city that had some criminals inside. They never moved from the plot. I later built a fort on the tile, and they continue to remain in the plot. Next I moved police units, including a dedicated investigator, into the fort. The criminals remain and can not be found after 50+ turns. Though they do trigger the dog in a nearby city to wake up every turn.

In a game I started with 9265 I had a Thief in my 2nd city. I moved a Tamed Buffalo (str 4) to the city (I wanted the Herd bldg) and it Attacked and killed the Thief upon entering. (This game is also the one that had the long EoT waits).

I had moved a Tamed horse there earlier in the game and the TH did not attack the Thief.

Perhaps DH can tell what the difference would be between those 2 Tamed animal units?

JosEPh
 
In a game I started with 9265 I had a Thief in my 2nd city. I moved a Tamed Buffalo (str 4) to the city (I wanted the Herd bldg) and it Attacked and killed the Thief upon entering. (This game is also the one that had the long EoT waits).

I had moved a Tamed horse there earlier in the game and the TH did not attack the Thief.

Perhaps DH can tell what the difference would be between those 2 Tamed animal units?

JosEPh
This sounds like the issue that was fixed in SVN 9274 where the Wanted promotion was making criminals attackable. Presumably when you moved the Horse in, the Thief was not yet Wanted, but by the time you moved the Buffalo in, it was.

Spoiler Fixed King Richard's Crusade code :
Code:
	# Crusade Start #
		estiEnd = CyGame().getEstimateEndTurn()
		iTurns = estiEnd/100
		if iTurns > 16:
			iTurns = 16
		elif iTurns < 4:
			iTurns = 4

		if CyGame().getGameTurn() % iTurns == 0:
			if gc.getTeam(pPlayer.getTeam()).isHasTech(self.iTECH_FUNDAMENTALISM):
				obsoleteTech = gc.getBuildingInfo(self.iBUILDING_CRUSADE).getObsoleteTech()
				if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == False or obsoleteTech == -1 ):

					if pCity.getNumActiveBuilding(self.iBUILDING_CRUSADE) > 0:
					#if pPlayer.getBuildingClassCount(self.iBUILDING_CRUSADE) > 0 and CyGame().getSorenRandNum(4, "Crusade") == 0:
						iX = pCity.getX()
						iY = pCity.getY()
						
						pNewUnit = pPlayer.initUnit( self.iUNIT_CRUSADER, iX, iY, UnitAITypes.UNITAI_ATTACK_CITY, DirectionTypes.NO_DIRECTION )
						pCity.addProductionExperience(pNewUnit, True)
		# Crusade End #
Fixed King Richard's Crusade! I made all three of the changes I mentioned in my previous post, and successfully got a Crusader to spawn 16 turns after I made the changes. Interestingly enough, the Crusader did not get all of the XP that it would have if it were a conventionally trained unit, but that's presumably a problem somewhere in the addProductionExperience function and not really important. It was created with all the correct promotions for the city, but only around 110XP, whereas new-build Melee units in the city start with well over 200XP. My current game looks to be on track to obsolete the Crusade wonder before the timing for the next one hits even if I delay Liberalism as long as I can, but it appears to be working at least. From a balance perspective, I think the game speed scaling on the spawn rate could use a look in light of the changes to game speeds, but that's a very minor issue really. As it currently stands I believe that on all game speeds except Normal it'll wind up being one Crusader every 16 turns. Not sure what the intended rate is supposed to be, and Crusaders are quite powerful, so it may be fine just the way it is. The line I commented out may be meant as a further random limit on the spawn rate of Crusaders, but I don't really see a need for it.
 
I just had a random event:

---
"Our military leaders have held internal war games to strengthen our training and grit. One unit has emerged as the champion.

  • Decorate our champions! We shall celebrate their achievement
---

Turns out one of my Gatherers is a champion :lol:

The event hover-over suggests that said Gatherer should have gained the "Leadership" promotion. It gained no such promotion (perhaps because it's not an eligible promotion for the unit?)

Not a game breaker, but mildly amusing.


Also - Revolutions seems to be sane now. Thanks for fixing.
 

Attachments

  • civ4_event_leadership to gatherer..jpeg
    civ4_event_leadership to gatherer..jpeg
    152.2 KB · Views: 89
This sounds like the issue that was fixed in SVN 9274 where the Wanted promotion was making criminals attackable. Presumably when you moved the Horse in, the Thief was not yet Wanted, but by the time you moved the Buffalo in, it was.

Spoiler Fixed King Richard's Crusade code :
Code:
	# Crusade Start #
		estiEnd = CyGame().getEstimateEndTurn()
		iTurns = estiEnd/100
		if iTurns > 16:
			iTurns = 16
		elif iTurns < 4:
			iTurns = 4

		if CyGame().getGameTurn() % iTurns == 0:
			if gc.getTeam(pPlayer.getTeam()).isHasTech(self.iTECH_FUNDAMENTALISM):
				obsoleteTech = gc.getBuildingInfo(self.iBUILDING_CRUSADE).getObsoleteTech()
				if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == False or obsoleteTech == -1 ):

					if pCity.getNumActiveBuilding(self.iBUILDING_CRUSADE) > 0:
					#if pPlayer.getBuildingClassCount(self.iBUILDING_CRUSADE) > 0 and CyGame().getSorenRandNum(4, "Crusade") == 0:
						iX = pCity.getX()
						iY = pCity.getY()
						
						pNewUnit = pPlayer.initUnit( self.iUNIT_CRUSADER, iX, iY, UnitAITypes.UNITAI_ATTACK_CITY, DirectionTypes.NO_DIRECTION )
						pCity.addProductionExperience(pNewUnit, True)
		# Crusade End #
Fixed King Richard's Crusade! I made all three of the changes I mentioned in my previous post, and successfully got a Crusader to spawn 16 turns after I made the changes. Interestingly enough, the Crusader did not get all of the XP that it would have if it were a conventionally trained unit, but that's presumably a problem somewhere in the addProductionExperience function and not really important. It was created with all the correct promotions for the city, but only around 110XP, whereas new-build Melee units in the city start with well over 200XP. My current game looks to be on track to obsolete the Crusade wonder before the timing for the next one hits even if I delay Liberalism as long as I can, but it appears to be working at least. From a balance perspective, I think the game speed scaling on the spawn rate could use a look in light of the changes to game speeds, but that's a very minor issue really. As it currently stands I believe that on all game speeds except Normal it'll wind up being one Crusader every 16 turns. Not sure what the intended rate is supposed to be, and Crusaders are quite powerful, so it may be fine just the way it is. The line I commented out may be meant as a further random limit on the spawn rate of Crusaders, but I don't really see a need for it.

That works for the one city but the original had a 20% chance of spawning a Crusader unit in each of your cities on the spawn turn. Which often meant many Crusaders per turn. Which is what the code you said was not working should be doing.

Edit @SO which is it supposed to be "1 unit every X turns in the city that built the wonder" or "20% chance in every city every X turns"?

edit 2 If the first then the unit should get the city XP but if the second they should only get the city XP 10% of the time as this more represents the nature of the historical crusades. They will always get all the city promotions.

edit 3 This code should do both. Every X turns a unit with full XP is created in the city that builds the wonder and for every other city there is a 20% chance that a unit is created with 10% having full XP and the rest none.
Spoiler :
Code:
	# Crusade Start ##
		estiEnd = CyGame().getEstimateEndTurn()
		iTurns = estiEnd/100
		if iTurns > 16:
			iTurns = 16
		elif iTurns < 4:
			iTurns = 4

		if CyGame().getGameTurn() % iTurns ==0:
			if pPlayer.getBuildingClassCount(self.iBUILDING_CRUSADE) == 0: 
				continue # if the player doesn't have the building
		
			bCreateCrusader = False
			bFullXP = False
			if gc.getTeam(pPlayer.getTeam()).isHasTech(self.iTECH_FUNDAMENTALISM):
				obsoleteTech = gc.getBuildingInfo(self.iBUILDING_CRUSADE).getObsoleteTech()
				if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == False or obsoleteTech == -1 ):

					if pCity.getNumActiveBuilding(self.iBUILDING_CRUSADE) > 0:
						bCreateCrusader = True
						bFullXP = True
					else CyGame().getSorenRandNum(4, "Crusade") == 0:
						bCreateCrusader = True
						if CyGame().getSorenRandNum(9, "Crusade") == 0:
							bFullXP = True

					if bCreateCrusader:
						iX = ppCity.getX()
						iY = ppCity.getY()
						
						pNewUnit = pPlayer.initUnit( self.iUNIT_CRUSADER, iX, iY, UnitAITypes.UNITAI_ATTACK_CITY, DirectionTypes.NO_DIRECTION )
						pCity.addProductionExperience(pNewUnit, bFullXP)
		# Crusade End #

edit 4 @TB We often use this method of creating units as far as I know it does not cause OOS errors on multi player but we could change it to use NetNodeMessages which would mean that only the player with the wonder would need to do the generating, I think.
 
Status
Not open for further replies.
Back
Top Bottom