This is occurring with Patch 2. After I found my initial city, if I click on the end turn button, or on any button, I get a CTD.
Other strange things that may be clues... if I found my city, choose my first city build, then move my cursor over the tech buttons up top, I get a CTD. Also, if I launch WorldBuilder, the menu buttons don't seem to do anything, but if I click on the close Worldbuilder button from the little Worldbuilder menu in the top right corner, it takes me back to the game but the menu doesn't go away.
Thanks for any help you can provide.
Oh yes. I am sorry to say that, and I am really not the one who wants to save time in error handling, but I think: something went wrong during installation. Some files probably weren't either correctly unpacked or replaced. Please try to unpack PAE again (perhaps download again) and replace those files with the unpacked files of the 2nd patch. The mod has to be in the original BTS Mod folder (not in MyGames) and you may not rename the folder of the mod.
I know it is always a bad thing to install something, I hate this too, if it doesn't work at once!
But I am sure, if normal clicks in the game end up in a CtD, some files are missing/incorrect.
After some quick glance on the code, the bug is probably not the with the default UNITAI
If I have to guess, your python code get's into an infinite loop here:
Code:
# Piraten-Feature
if iData1 == 722:
# iData2 = 1: Pirat -> normal
# iData2 = 2: Normal -> Pirat
# 722, iData2, 0, iPlayer, iUnitID
pPlayer = gc.getPlayer(iData4)
pUnit = pPlayer.getUnit(iData5)
bSwitch = True
iVisible = pUnit.visibilityRange()
iRange = iVisible * 2 + 1
for i in range(iRange):
for j in range(iRange):
loopPlot = gc.getMap().plot(pUnit.getX() + i - iVisible, pUnit.getY() + j - iVisible)
iNumUnits = loopPlot.getNumUnits()
if iNumUnits > 0:
for k in range (iNumUnits):
if iData4 != loopPlot.getUnit(k).getOwner() and loopPlot.getUnit(k).getOwner() != gc.getBARBARIAN_PLAYER():
bSwitch = False
break
if not bSwitch: break
if not bSwitch: break
Oh wow, first of all, thanks for your great help! I am very glad and relieved a pro modder is willing to help! great!
ok, I reply to your latest post first:
this function is part of a onModNetMessage. this means, it concerns only the HI player! Did you try to comment those lines and go on?
No, it's not python, at least I never got any python expections while checking
Still, I found out that I was wrong:
When deleting all barbarian cities, units and animals, the game do proceed to the next turn.
After some quick testing, I found out that the barbarian naval units are wrong.
If I delete those "Pirate Pentenconter" units in the sea, I can play until some new ones spawn.
Maybe the problem is with the UNITAI_PIRATE_SEA?
PS: Some other odd things I saw while checking through barbarians:
There was a barbarian Great Prophet moving around. I'm not sure if it's intended in this mod, usually barbarian cities cannot spawn great people.
Also, I saw some barbarian animal units inside the cultural borders of a full civ. Not only it shouldn't be possible for them to be there (again, I might be wrong here, maybe it's intended in the mod that they can pass cultural borders in some circumstances), but the AI didn't attack them there, and those animals were there for quite a while.
And I saw an animal unit inside a barbarian city. Found that also strange, especially as it was immobile, never moved anywhere.
ok, now to your valuable 1st post:
- UNITAI_PIRATE_SEA: it would
NOT (edited*) be the first time, this causes errors. it did with land units too. and I had to accept that marodeur units or other bandits on land do not work with that type of UNITAI.
So, perhaps this really causes troubles! perhaps UNITAI_PIRATE_SEA units don't support iCargo?! I don't know whatelse is different of the BTS privateer!
to your other questions:
- Barbarian great prophet: intended.
1) GPs can flee from conquered cities.
2) GPs can be captured. perhaps they got caught while walking from one city to another.
- Barbarian animals within cultural borders: intended.
1) Wild animals can't distinguish cultural borders and can attack you there.
2) Bonus resources can spawn wild animals (horse, elephant, camel, lion) which you have to capture/kill
3) Horses can flee from combat (mounted units, chariots) and you are able to capture them or capture them back!
4) Elephants are strong, AI doesn't attack them in early times.
- Animal in a Barbarian city: oh, that's a bug. no dangerous one. but I try to kill all Barbarian animals that move into a city. I don't know how this one got into it. it's makes no troubles (CtD or infinite turns), so it's not a real problem.
and have my greatest thanks AbsintheRed, that you have a helping hand for PAE and me!