The Modding Q&A Thread

Where would I find this Python console?
 
Where would I find this Python console?
It depends, on your keyboard layout. I have a Swedish keyboard, so I probably can't help you.

Did you notice my edit, above?
Spoiler :
edit: In \Assets\Python\StoredData.py you change this line:
Code:
                                    'bCongressEnabled': False,
into:
Code:
                                    'bCongressEnabled': True,
 
I have a pretty strange problem: When i start a game, i'm in peace with the Barbarians... Where are the values that control that?

EDIT: fyi, it's from the start and not just after some turns.
 
You don't need all of those, yes. But the wonders are used for certain UHVs for example, as well as some buildings. The DLL code needs them as well, to make sure certain wonders don't get built during a the autoplay of a civ that needs them for its goals (and for the AI as well, to make it focus on historical wonders).

It's quite tedious to keep them up to date whenever you add/remove a building, but that's in part because Rhye did it in the most complicated way possible. Take a look at how SoI or the latest revision of DoC do it if you want to simplify it.
 
Don't know if Linkman did already adapt it. It's relatively easy in principle anyway.
 
Sorry, should've been clearer on that, it's in the SVN only.
 
Sorry to bother with the same topic again, but i still have the problem that barbs doesn't start with war with everyone. I made it that via python in every turn they declare war, but that can't be the end of the journey.
 
Sorry to bother with the same topic again, but i still have the problem that barbs doesn't start with war with everyone. I made it that via python in every turn they declare war, but that can't be the end of the journey.
Unfortunately I don't know how the autowar is usually enforced, but I can take a look into the files, maybe I discover something useful.

Do anyone have any idea why religions can be messed up? I'm making a new version of my modmod and I see that nearly every religion is born in Egypt or Greece. OK, they got more power recently but that doesn't explain why India doesn't go for priesthood.
The AI tech preference is controlled by the tech IDs which are hardcoded into the DLL, if you added a tech or changed something to the defines there, they get interpreted the wrong way and everything is messed up.

(If you're still using the intermediate version of my DoC DLL you have to add TECH_MYSTICISM at the beginning of the MyTechs enum).
 
I've set enabled to create a dump file on a ctd. Where does it land and is there some way to indicate the cause from the ctd out of it?
 
Is there anywhere to find a stand-alone download of the Reformation mod for RFC 1.187?
I have not heard if Panopticon updated it, but I see it in lots of Modmods.
 
Hey, can someone tell me the method to print out something on the game text area? Like that text that shows up when religion spreads(Religion X has spread to city x)
Also, any way of telling if civ is dead? Like gc.getPlayer(iRome).isAlive() or something?
 
That's what the Python class reference says:
VOID addMessage (PlayerType ePlayer, BOOL bForce, INT iLength, STRING szString, STRING szSound, InterfaceMessageType eType, STRING szIcon, ColorType eFlashColor, INT iFlashX, INT iFlashY, BOOL bShowOffScreenArrows, BOOL bShowOnScreenArrows)
void (int /*PlayerTypes*/ ePlayer, bool bForce, int iLength, wstring szString, string szSound = NULL, int /*InterfaceMessageTypes*/ eType = MESSAGE_TYPE_INFO, string szIcon = NULL, ColorTypes eFlashColor = NO_COLOR, int iFlashX = -1, int iFlashY = -1, bool bShowOffScreenArrows = false, bool bShowOnScreenArrows = false)
Or you copy-paste what's already in the code, like this:
Code:
CyInterface().addMessage(iHuman, False, con.iDuration/2, CyTranslator().getText("TXT_KEY_CULTURE_SPREAD", ()), "", 0, "", ColorTypes(con.iGreen), -1, -1, True, True)
and replace the TXT_KEY and color with what you like.

gc.getPlayer(iRome).isAlive() is exactly what you need. It can be even used for the time before the spawn.
 
Top Bottom