Or, you could try this utility. I think that chould find the problem.
I got an errorLets try to code.
first step:
Add lines to CvEventManager.py:
After imports:
from myscript import Each_turn_event
After: def onBeginPlayerTurn(self, argsList):
iGameTurn, iPlayer = argsList
Each_turn_event(iGameTurn,gc.getPlayer(iPlayer))
PS. Don`t forget an ident.
This code imports function (Each_turn_event) from file myscript.py
and calls it every turn.
Next put myscript.py to python folder.
Edit dateEvents dictionary as you wish.
Each_turn_event(iGameTurn.gc.getPlayer(iPlayer))
Each_turn_event(iGameTurn,gc.getPlayer(iPlayer))
907: (popup,("November 6 – Italy joins the Anti-Comintern Pact.",)),
909: (popup,("December 11 – Italy withdraws from the League of Nations.",)),
@Duha
I assume I can miss out turns e.g.missing out 908 - 1937, second fortnight in November.Code:907: (popup,("November 6 Italy joins the Anti-Comintern Pact.",)), 909: (popup,("December 11 Italy withdraws from the League of Nations.",)),
Or, you could try this utility. I think that chould find the problem.
I'm not seeing anything wrong so far, but maybe you could help me? First, how do I "uncomment" the mod directory?
# If you want to run this on a mod, uncomment the next line and make
# sure the path points to your mod.
# add_directory charlemagne "$install_dir/beyond the sword/mods/charlemagne/assets"
add_directory 19th "$install_dir/beyond the sword/mods/19th and 20th Century/assets"
Is is question or statement ?
You can place any integer to first place(this place calls "key") and in any order.
{1: (popup,("text",)),
4: (popup,("text",)),
2: (popup,("text",)),
55: (popup,("text",)),
3: (popup,("text",)),
}
-
–
I don't remember how the config looks without editing but mine looks this. Do you possibly mean this part in the config:As you can see, the last line isn't commented (so it's uncommented ) the 19th is at the start of every line that has been checked from your mod so make it something you can find easily. Then there should be a path to your mod's assets folder.Code:# If you want to run this on a mod, uncomment the next line and make # sure the path points to your mod. # add_directory charlemagne "$install_dir/beyond the sword/mods/charlemagne/assets" add_directory 19th "$install_dir/beyond the sword/mods/19th and 20th Century/assets"
I'm sorry but English isn't my native language, so it's very hard to write something like this.
@The_J
As I understand python calls many C++ functions. Can you tell me where I can get their source?
this one here is not very informative
And another question:
If i want to add "+1 Happines" to all cities where I should do it? Is it any global object that stored this info?
It was so near that I can`t find itThe source is the CvGameCoreDll, which is build out of the .cpp and .h files, which are in the CvGameCoreDll folder.
Some times it named more better when I can read c++It is not? Why? Most functions are imho named very clear.
No global objects, as far as i know.
I think you have to iterate over the cities and add manually a +1 everywhere.
(loopCity, iter) = pPlayer.firstCity(False)
while (loopCity):
if not loopCity.isNone():
loopCity.changeExtraHappiness(+1)
(loopCity, iter) = pPlayer.nextCity(iter, False)
This code looks like PyHelprs.getCityListFor you as a beginner: Right .
There are some problems with that pseudo code, which you can't know.
Complelty right would be this:
PHP:(loopCity, iter) = pPlayer.firstCity(False) while (loopCity): if not loopCity.isNone(): loopCity.changeExtraHappiness(+1) (loopCity, iter) = pPlayer.nextCity(iter, False)
User with 9.56 Posts Per Day can`t be lazyI can explain the difference if needed, but atm i'm to lazy .
Maybe change world 2010 to "world 2010".
The space in the name might cause some problems which are caught by the "".
Either I'm doing something terribly wrong with Civchecker, or it isn't good enough to find what's wrong with my mod. Here's the configuration, in my attempt to check my "World 2010" mod:
Code:# If you want to run this on a mod, uncomment the next line and make # sure the path points to your mod. add_directory charlmagne "$install_dir/beyond the sword/mods/World 2010"
add_directory charlmagne "$install_dir/beyond the sword/mods/World 2010/[COLOR="Red"]assets[/COLOR]"
This code looks like PyHelprs.getCityList
User with 9.56 Posts Per Day can`t be lazy
Needed.
Do you mean the instance of the phrase right after "add directory," the instance in the directory title itself, or both? Renaming it with quotation marks in the former case seems to have allowed it to check the mod again without error, but it still doesn't detect the error in the mod itself.
New question: I want to upload the whole of my mod files for anybody who wants to take a look at them, but the mod's too big for an attachment here, though by mod standards it's rather small at the moment. Where should I post it?