Modmodding Q&A Thread

This method decides if the player can vote in the AP.
 
I don't know how to do that.
 
I added in a new civ, but now, no matter which civ, it always says "You have been defeated" once it loads up. No autoturns or anything. Thoughts?
 
That's a Python error, enable Python exceptions and follow the directions.
 
I fixed some of the problems, but I have no idea what to do with these. I never even touched any of these files.
Spoiler :
R7jj9vp.jpg

HoAOr0b.jpg

Pf8ELPX.jpg

s54GQCj.jpg

DynmPqS.jpg

cQp1a66.jpg

HnSuoal.jpg

IHFtazj.jpg

0dBjlPS.jpg

BuJIizI.jpg

Ug1zA7W.jpg

ylcDRiM.jpg

uautsMZ.jpg

zjdD1wl.jpg

a9MKixS.jpg

v3Mh9g3.jpg

sE7Bu9H.jpg

Shg0dVe.jpg

lxHA7QB.jpg

QfVsr71.jpg

qRVzGXu.jpg

aXe5VvH.jpg

sTkuU6Z.jpg

Z2qmVcP.jpg


I looked through all of these files and found no problems so I'm not sure what to do. Oh, and the game also crashes whenever it loads that one python exception at the end where the scenario is loading up and about to play.
 
If you also enable logging, you can view these messages in Logs/PythonErr.log as well.

What happens is that the game is trying to save Python data into the barbarian player instance. When trying to access that instance, it cannot be found ("NoneType"). This is usually the case because the player has not been properly added. Make sure player and team IDs line up in the corresponding scenario file and you have successfully incremented and compiled the constants in CvDefines.h.
 
I'm a dummy, I forgot to add the Begin Team End Team for the Public Map. I did that, but all the same errors still show up. I incremented the value in CvDefines.h.

Here's the traceback.
Traceback (most recent call last):
File "<string>", line 1, in ?
File "<string>", line 52, in load_module
File "CvEventInterface", line 13, in ?
File "<string>", line 52, in load_module
File "CvRFCEventManager", line 11, in ?
File "<string>", line 52, in load_module
File "CvEventManager", line 12, in ?
File "<string>", line 52, in load_module
File "CvScreensInterface", line 3, in ?
File "<string>", line 52, in load_module
File "CvMainInterface", line 11, in ?
File "<string>", line 52, in load_module
File "RFCUtils", line 9, in ?
File "<string>", line 52, in load_module
File "StoredData", line 390, in ?
File "StoredData", line 17, in __init__
File "StoredData", line 148, in setup
File "StoredData", line 26, in save
AttributeError: 'NoneType' object has no attribute 'setScriptData'
load_module CvAppInterface
 
Then there's still something wrong with player IDs somewhere, i.e. the new slot has not been properly added.
 
Are you talking about where it has the
iCivilization = con.iCivilization
pCivilization
so on and so forth?
 
No, it's more fundamental than that. Either scenario file or C++. I can only suggest to follow the steps again and make sure you've actually done all of that.
 
Question, am I able to just change the 3000BC PublicMap and it still work or am I required to change the other ones?
 
Only the scenario you launch matters.
 
That's what I thought. Also, where is lEnglish defined? Or any civ? I know where iEngland and whatnot is defined, but I never remember doing anything for the demonym of the country. I also saw no problems. I went through it twice.
 
The constants defined in Consts.py are unrelated to the ingame text. Those are defined in the CivilizationInfos.xml and in the Text XML folder.
 
So it has to be Public Maps or C++ that's the problem? Crap. I'll figure it out later. If you have any other tips that would be great.
 
It's really hard to say without knowing what you did - it's probably a little oversight you made a long the way that is admittedly hard to find after the fact. My first guess was MAX_CIV_PLAYERS in CvDefines.h but you already checked that ...
 
I'll get this eventually. So hopefully solving this problem also solves the overarching problem. When I open up the scenario and choose a civ, Scotland is all sorts of funked up. It has XXX for every value where it should say UP, UHV, load time, etc.
 
You probably did not adjust the respective entries in CvRhyes.cpp. If you didn't and your code compiles, that also hints at some of the constants (CvRhyes.h) not being adjusted yet.
 
Okay, I see compile around everywhere, and I don't know what that means. Also, both things were correct. It's almost like it doesn't recognize Scotland is in the game, because the Seljuks have the XXX data... It recognizes it enough, though, that it puts it in the selection. Also, the civilopedia won't open any more.
 
Back
Top Bottom