FfH2 0.16 Bug Thread

mervvyn said:
Currently, you need mithril plus a weaponsmith in the city to be able to give the mithril weapons promo; iron and bronze only require the metal itself.

Isnt a Forge required for iron and bronze?
 
velk said:
The barbarian shadow also resulted in a sort of ridiculous loop when it attacked a settlement with a few mercenaries in it - the shadow would kill a merc, capturing it, then I would move a merc out to kill the low health merc, capturing it back, and this went on back and forth for over 100 turns while I tried to find something that could see the shadow to get rid of it 8)

Wouldn't it be possible to give invisible units a small chance, say 20%, of becoming visible for a turn after winning a battle. Thing is, it being hard to defend against a weapon if you haven't researched some technology is good strategy. But it being IMPOSSIBLE to defend against unless you have researched rather advanced technology (Marksman, Sand Lion) is just frustrating.
 
Kael,
I still had the same event happen. It seems whenever someone with Immortal/Blood of the Pheonix promotion attacks directly from a boat and dies, their "cargo space" remains filled even though the game says "unit reborn" or whatever when they supposedly reappear in my capital.
Also, they don't immediately reappear in the capital. It seems to wait until I respawn the boat using worldbuilder for the unit to actually show up in the capital.

Also, regarding the Trojan Horse, my point was that it can't "fight back", not that it's boo-hoo, picked-on.
 
8. Copper is revealed with Mining, Iron is revealed with Smelting, Mithril is revealed with Metal Casting (all ores reveal one tech earlier, they are still unusable until the real tech is learned but it gives the player some insight as to whats available before he commits to the full research).

Do you mean that you can not gain the benefits of those ores? As if I see copper with the advent of Mining, I could go to that hex and build a mine on it right away.
 
Kael said:
No, Iron Working should be required before your units will get iron weapons.
Well, I was able to upgrade to iron weapons before iron working thanks to the wonder that comes with Arete.
 
I am playing a Direct IP with my buddy in 16b and have found that for the Sprawling Civs, the option to make a city a hub or a Settlement doesn't come up.

Cheers!

EDIT:: Ouch.. thanks for the update Kael! Thats going to make things tougher... cheers!
 
BlazeRedSXT said:
I am playing a Direct IP with my buddy in 16b and have found that for the Sprawling Civs, the option to make a city a hub or a Settlement doesn't come up.

Cheers!

That is correct, it casues out of syncs in multiplayer so its blocked.
 
There is a defect in how the random number generator is used.

I injected the following code into onGameStart:

Spoiler :
Code:
		for iPlayer in range(gc.getMAX_PLAYERS()):
			player = gc.getPlayer(iPlayer)
			if (player.isAlive() and player.isHuman()):
				py = PyPlayer(iPlayer)
				for pUnit in py.getUnitList():
					if pUnit.getUnitClassType() == iSettler:
						pSettler = pUnit
				iRand1 = CyGame().getSorenRandNum(3, "Bob")
				iRand2 = CyGame().getSorenRandNum(3, "Bob")
				iRand3 = CyGame().getSorenRandNum(3, "Bob")
				iRand4 = CyGame().getSorenRandNum(3, "Bob")
				iRand5 = CyGame().getSorenRandNum(3, "Bob")
				iRand6 = CyGame().getSorenRandNum(3, "Bob")
				iRand7 = CyGame().getSorenRandNum(3, "Bob")
				iRand8 = CyGame().getSorenRandNum(3, "Bob")
				iRand9 = CyGame().getSorenRandNum(3, "Bob")
				iRand10 = CyGame().getSorenRandNum(3, "Bob")
				iRand11 = CyGame().getSorenRandNum(3, "Bob")
				iRand12 = CyGame().getSorenRandNum(3, "Bob")
				iRand13 = CyGame().getSorenRandNum(3, "Bob")
				iRand14 = CyGame().getSorenRandNum(3, "Bob")
				iRand15 = CyGame().getSorenRandNum(3, "Bob")
				iRand16 = CyGame().getSorenRandNum(3, "Bob")
				iRand17 = CyGame().getSorenRandNum(3, "Bob")
				iRand18 = CyGame().getSorenRandNum(3, "Bob")
				iRand19 = CyGame().getSorenRandNum(3, "Bob")
				iRand20 = CyGame().getSorenRandNum(3, "Bob")
				iRand21 = CyGame().getSorenRandNum(3, "Bob")
				iRand22 = CyGame().getSorenRandNum(3, "Bob")
				iRand23 = CyGame().getSorenRandNum(3, "Bob")
				iRand24 = CyGame().getSorenRandNum(3, "Bob")
				iRand25 = CyGame().getSorenRandNum(3, "Bob")
				iRand26 = CyGame().getSorenRandNum(3, "Bob")
				iRand27 = CyGame().getSorenRandNum(3, "Bob")
				iRand28 = CyGame().getSorenRandNum(3, "Bob")
				iRand29 = CyGame().getSorenRandNum(3, "Bob")
				iRand30 = CyGame().getSorenRandNum(3, "Bob")
				sMessage = '%(Number1)01d ' % {'Number1': iRand1} + \
					'%(Number2)01d ' % {'Number2': iRand2} + \
					'%(Number3)01d ' % {'Number3': iRand3} + \
					'%(Number4)01d ' % {'Number4': iRand4} + \
					'%(Number5)01d ' % {'Number5': iRand5} + \
					'%(Number6)01d ' % {'Number6': iRand6} + \
					'%(Number7)01d ' % {'Number7': iRand7} + \
					'%(Number8)01d ' % {'Number8': iRand8} + \
					'%(Number9)01d ' % {'Number9': iRand9} + \
					'%(Number10)01d ' % {'Number10': iRand10} + \
					'%(Number11)01d ' % {'Number11': iRand11} + \
					'%(Number12)01d ' % {'Number12': iRand12} + \
					'%(Number13)01d ' % {'Number13': iRand13} + \
					'%(Number14)01d ' % {'Number14': iRand14} + \
					'%(Number15)01d ' % {'Number15': iRand15} + \
					'%(Number16)01d ' % {'Number16': iRand16} + \
					'%(Number17)01d ' % {'Number17': iRand17} + \
					'%(Number18)01d ' % {'Number18': iRand18} + \
					'%(Number19)01d ' % {'Number19': iRand19} + \
					'%(Number20)01d ' % {'Number20': iRand20} + \
					'%(Number21)01d ' % {'Number21': iRand21} + \
					'%(Number22)01d ' % {'Number22': iRand22} + \
					'%(Number23)01d ' % {'Number23': iRand23} + \
					'%(Number24)01d ' % {'Number24': iRand24} + \
					'%(Number25)01d ' % {'Number25': iRand25} + \
					'%(Number26)01d ' % {'Number26': iRand26} + \
					'%(Number27)01d ' % {'Number27': iRand27} + \
					'%(Number28)01d ' % {'Number28': iRand28} + \
					'%(Number29)01d ' % {'Number29': iRand29} + \
					'%(Number30)01d ' % {'Number30': iRand30}
				CyInterface().addMessage(pSettler.getOwner(),True,25,sMessage,'AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/Religions/Dragon.dds',ColorTypes(8),pSettler.getX(),pSettler.getY(),True,True)
This gives me 30 concecutive "random" numbers on game start-up. I got a total of 10 samples, for a total of 300 "random" numbers. All of these numbers gave me a result in the set {0,1,2}.

The problem is that virtually everywhere (perhaps everywhere) in the python code, the programmers appear to have made the assumption that: CyGame().getSorenRandNum(X, "Bob") given a number in the range {1..X}. It does not; it gives a number in the range {0..X-1}.

This means that a lot of statements that are comparisons with random numbers that are presently <= should be <. as an example, the line:
Code:
if CyGame().getSorenRandNum(100, "Mutation") <= 5:
has a 6% chance of triggering (assuimng that this PSRNG is actually random, which it probably isn't; see below), not the (presumably intended) 5% chance.
 
M@ni@c said:
Wouldn't it be possible to give invisible units a small chance, say 20%, of becoming visible for a turn after winning a battle. Thing is, it being hard to defend against a weapon if you haven't researched some technology is good strategy. But it being IMPOSSIBLE to defend against unless you have researched rather advanced technology (Marksman, Sand Lion) is just frustrating.

That is an interesting idea. When we delve deeper into the invisbility aspects of the game (probably in "Shadow") I think it would be a good idea to have an attack by an invisible unit reveal him.
 
There is a high likelihood that getSorenRandNum is not a random number generator.

I injected the following code into onGameStart:

Spoiler :
Code:
		for iPlayer in range(gc.getMAX_PLAYERS()):
			player = gc.getPlayer(iPlayer)
			if (player.isAlive() and player.isHuman()):
				py = PyPlayer(iPlayer)
				for pUnit in py.getUnitList():
					if pUnit.getUnitClassType() == iSettler:
						pSettler = pUnit
				iSingleRandomCount = {}
				for i in range(100):
					iSingleRandomCount[i] = 0
				for i in range(10000):
					iRand = CyGame().getSorenRandNum(100, "Bob")
					iSingleRandomCount[iRand] = iSingleRandomCount[iRand] + 1
				sMessage = ''
				for i in range(100):
					sMessage = sMessage + '%(Number)02d ' % {'Number': iSingleRandomCount[i]}
				CyInterface().addMessage(pSettler.getOwner(),True,25,sMessage,'AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/Religions/Dragon.dds',ColorTypes(8),pSettler.getX(),pSettler.getY(),True,True)
I used the range 0..99 since that appears to be the most commonly used range in your code. The above code gives me information I can plug into a simple Chi Squre test (a test for randomness).

Here are the results from 3 tests; they all are expressed in chances that these numbers don't form a random distribution:
1) 33%
2) 95%
3) 89%
If this were a random distribution, I'd expect most of these to be in the single percentage range.

I should note that I also have much weaker data that suggests that random number A in a sequence influences random number A+1; I can run such a test with a good amount of data in the next week or so, if desired. However, it flops so horribly on the more basic test that I don't think that this is needed.

I have saved my data sets; I can supply them if desired.

EDIT: The numbers above are correct; my interpretation is not. They are percentages along a chisquare distribution. There is a roughly 12% chance that the PRNG that gave these numbers generates Random distributions.
 
Yeah, link the data sets and I'll take a look.
 
Here are the two tests. 1 is the basis of the first post; 2 is the basis of the second. If you prefer something other than .ods as a format, I can convert to most other spreadsheet types.
 
The Spell Trust appears to create the building Trust at most once per civlization. However, the Building Trust does not appear to do anything; nor does the Spell Trust appear to have any side effects.

Nilis-Knight is correct; appologies.
 
xanaqui42 said:
Here are the two tests. 1 is the basis of the first post; 2 is the basis of the second. If you prefer something other than .ods as a format, I can convert to most other spreadsheet types.

Randomness is clumpy. Everything in your data seems consistent with what I would expect from random number generation. Out of 30,000 checks across 300 numbers (average of 100 guesses per number) our largest deviation was a number that was picked 74 times instead of 100.

I dont really understand the chitest function, it was returning 0.3 on values like 99 and 101 as compared to 100 and 0.02 on small ranges that included values like 125.

I attached a chart of your data. You can see the pattern, average around 100 with no major deviations (depending on what your definition of major deviation is). It all looks fairly decent, no numbers are consistently prefered or neglected, their is no skew towards one end of the table or the other.
 
The only weird thing I can see is that all 3 tests seem to go up and down at almost the same places.
 
Patch "c" is up and linked int he first post.
 
Could it by some chance be caused by the religion related promotions that units get? I just noticed that they never existed before FFH2 and the Cult Of The Dragon promotion is linked to the presence of the Cult Of The Dragon being in a city so maybe something may have been left unfinished with the other religions? I did not find any specific indication that you guys looked over this.
 
Back
Top Bottom