Single Player bugs and crashes v42 plus (SVN) - After April 2022

Somebody613

Emperor
Joined
Nov 18, 2019
Messages
1,622
What is the <iThreshold>'s numerical value type?
If it's at least 4byte, it's already 2 billion, which is waaaaay above the normal Max Culture.
The problem here is that there are Victory Mechanics that rely on you reaching the Highest Culture Level per city, but that might be looking for a specifically named culture level.
If I add ANOTHER culture level ABOVE that one, I'd be both being able to correctly account for the Victory Condition, and also prevent the above bug via letting the city grow further.
In fact, it's LOGICAL to allow a city to grow into new culture levels, or at least to name that process as a culture level.
Namely, making the culture level not a threshold, but a range instead, like it works with, say, Education ("between 1 and 100", not "above 1" or "below 100", for example).
This would eliminate the bug AND kinda make more sense even by itself - the range looks more logical than a threshold, even if they kinda mean the same thing.
Yes/No/Maybe?
 

Somebody613

Emperor
Joined
Nov 18, 2019
Messages
1,622
32bit I believe. Just remember that on eternity gamespeed that value is multiplied by 10.
So it's still safe to use 200.000.000 as the new threshold, lol.
Even at face value that's plenty of space to grow into, and it could be further adjusted per game to always be 2.000.000.000 anyways.
That's a huge difference, for now.
Of course, the actual goal is to eliminate the problem itself, not just cheat around it.
Heck, in any game that ISN'T going for "have 3 Max Culture cities", you could simply change Monumental itself, without creating an additional fake level just for this purpose.
 

Toffer90

C2C Modder
Joined
Oct 16, 2011
Messages
8,111
Location
Norway
So it's still safe to use 200.000.000 as the new threshold, lol.
I forgot to mention that the value is multiplied by 100 internally in code to deal with decimal accuracy.

Current last culture level iThreshold is
21 299 200.00
multiply it with 100 and you get
2 129 920 000
Max 32 bit signed integer is
2 147 483 647
 

Somebody613

Emperor
Joined
Nov 18, 2019
Messages
1,622
So it's basically going up from 500k to 20kk?
That's merely 40 times, not much of a huge benefit there.
Can you maybe then actually look into the code and fix the problem?
I mean, I don't think it worked like this before, no?
So something was changed (I don't mean the max value), which can be fixed or turned back.
Easiest thing being, well, switching 32bits to 64bits, if possible.
Please, eh?
 

Somebody613

Emperor
Joined
Nov 18, 2019
Messages
1,622
New old bugs, but I can report them specifically.

Logical error in RevEvents.py (line 976):
if iMaxCult2/(1.0*iTotalCulture) > .2
Starts each-turn nagging when some unknown civ has zero culture (apparently, what else could that be, when it complains about "dividing by zero" in this line).

Also drops the same error for line 115:
checkForAssimilation()
Not sure how that's relevant, though.

And then also jumps to BugEventManager.py (line 303):
eventHandler(argsList)
Says something else, but still a bug.

This is annoying.
 

Somebody613

Emperor
Joined
Nov 18, 2019
Messages
1,622
It's fixed on git I believe; maybe I should push to SVN...?
Thanks for fixing the culture bug, but now there's another one.
See the save, I have access to Stone, but I can't build anything Stone-related, it simply removes the building-in-queue at the start of the next turn, despite not showing any problems.
Not that there should be any to begin with.
Try this yourself: you can put, say, Neanderthal Culture to be the only queued building - it allows it, and then the next turn you get an empty queue and a prompt to fill it with something.
In either city.
Really dumb.
 

Attachments

  • broken stone.CivBeyondSwordSave
    6 MB · Views: 2

Toffer90

C2C Modder
Joined
Oct 16, 2011
Messages
8,111
Location
Norway
Thanks for fixing the culture bug, but now there's another one.
See the save, I have access to Stone, but I can't build anything Stone-related, it simply removes the building-in-queue at the start of the next turn, despite not showing any problems.
Not that there should be any to begin with.
Try this yourself: you can put, say, Neanderthal Culture to be the only queued building - it allows it, and then the next turn you get an empty queue and a prompt to fill it with something.
In either city.
Really dumb.
Hmm, sounds like culture decay happens before cities add culture to surrounding plots, so plots can technically change owner and then change back to the first owner again without it being noticeable to the player, meaning one for a moment lose access to stone before getting it back again for example. Hypothesis may be wrong, maybe I'll try to investigate the issue today.
 

Somebody613

Emperor
Joined
Nov 18, 2019
Messages
1,622
Hmm, sounds like culture decay happens before cities add culture to surrounding plots, so plots can technically change owner and then change back to the first owner again without it being noticeable to the player, meaning one for a moment lose access to stone before getting it back again for example. Hypothesis may be wrong, maybe I'll try to investigate the issue today.
Two new points.
First, it fixed itself several techs later, but I wasn't tracing which ones exactly. This did probably include a culture level expansion, but I also don't know for sure.
Second, there was no "other" culture involved THIS TIME (unlike the case from Strategy, where it most probably was PRECISELY what you deciphered), so it's not that.
Really strange, indeed.
Wait... since the other city self-flipped to join me, could it have left behind some hidden culture from the original (dead) civ somehow?
Then it WOULD have the plot "not being sure who owns it" for a while until my NEW culture totally overwhelmed the "leftovers" and got rid of them.
Kinda sounds wrong, though.
I can't exactly trace it now - way too late.
 

JosEPh_II

TBS WarLord
Joined
Jun 20, 2007
Messages
16,608
Location
Western IL. cornfields
What? Entertainers reduce anarchy in conquered cities? I had no clue, how does it work? It just goes down after you move them to the city?
Once you bring in the Enterainers they have another option besides Teach or education. Iirc it's called Patriotism or something like that (don't have the game up atm going off old memories). This builds up your culture faster (again iirc) and adds protection against revolts. It also reduces anarchy time if you bring them in right after you have conquered that city. I don;t use Revolution so not sure exactly what all is available for those players that do.

EDIT: guess I should read all the Thread before posting! :p :lol:
 

JosEPh_II

TBS WarLord
Joined
Jun 20, 2007
Messages
16,608
Location
Western IL. cornfields

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,424
Location
Las Vegas
Yeah that is a serious drawback, but hey every action must have a reaction! :D
Theoretically I'd like to eventually eliminate one-use concepts in favor of different ways to handle and balance things. It's nicer to have an ongoing sense of story with a given unit imo. It's not an overnight shift but hopefully eventually it will work out better that way.
 

The Omega

Completely Insane
Joined
Jun 14, 2004
Messages
3,040
Location
Austin, Texas
Got an example of culture acting in strange ways. Playing with realistic borders, one tile cities. This barbarian city just became a minor civ; when it did it's borders expanded dramatically and almost made a perfect square.

As funny as the Square Mongols are I'm pretty sure that's not how it's supposed to act
 

Attachments

  • Culture Square.png
    Culture Square.png
    2.5 MB · Views: 17

raxo2222

Time Traveller
Joined
Jun 10, 2011
Messages
9,519
Location
Poland
Got an example of culture acting in strange ways. Playing with realistic borders, one tile cities. This barbarian city just became a minor civ; when it did it's borders expanded dramatically and almost made a perfect square.

As funny as the Square Mongols are I'm pretty sure that's not how it's supposed to act
Upload save
 

Toffer90

C2C Modder
Joined
Oct 16, 2011
Messages
8,111
Location
Norway
Got an example of culture acting in strange ways. Playing with realistic borders, one tile cities. This barbarian city just became a minor civ; when it did it's borders expanded dramatically and almost made a perfect square.

As funny as the Square Mongols are I'm pretty sure that's not how it's supposed to act
Fixed the bug, thanks for the report.
 
Joined
Oct 29, 2014
Messages
796
Location
Novigrad
Uh with the new culture mechanisms are you supposed to reach legendary in Ancient Era?
 

raxo2222

Time Traveller
Joined
Jun 10, 2011
Messages
9,519
Location
Poland
Uh with the new culture mechanisms are you supposed to reach legendary in Ancient Era?
Nope, it sounds like typo somewhere, upload save
Edit: Looks like there wasn't any typos, and legendary is 12th out of 18 levels, so looks like culture accumulates little too fast, or steps are bit small.
It seems like largest culture value is just bit under overflow, so we would need 64bit culture values if we wanted it more spaced out.
 
Last edited:
Joined
Oct 29, 2014
Messages
796
Location
Novigrad
Nope, it sounds like typo somewhere, upload save
Edit: Looks like there wasn't any typos, and legendary is 12th out of 18 levels, so looks like culture accumulates little too fast, or steps are bit small.
It seems like largest culture value is just bit under overflow, so we would need 64bit culture values if we wanted it more spaced out.
Do you still need save?
 
Top Bottom