Simple Python Things

Right - I know from my mod, that wonders/projects will be built/acquired for both players.
 
Right - I know from my mod, that wonders/projects will be built/acquired for both players.

...and you didn't notice me
niemals.gif
?


So do you have a team in this game, smeagolheart?
 
Okay, i've added 5 debuging messages to the file, please make a test with it, and report how many of them you get twice.
They should also be printed to the logs, so please attach them.
 

Attachments

I had to comment out some immediate messages because they were getting "variables refererenced before defined" type errors for conquername and wondername. God I hate python.

Here's what I got though incl the modified python file.
 

Attachments

I had to comment out some immediate messages because they were getting "variables refererenced before defined" type errors for conquername and wondername. God I hate python.

Ups, my bad, copy+paste error :blush:.


My added messages were not meaningfull enough, could you please test it again with the attached file :)?
 

Attachments

Hello again, The J!

I just had a quick question about your SpawnACiv modcomp that popped in my mind a day or two ago, and I want to ask before I forget.

Basically, what if the entire map is already filled with cities, and a civilization is supposed to spawn (i.e., there are no unclaimed tiles left)? Will the spawnable ciivlization simply not spawn? Or will something else happen?

Thanks in advance.
 
The civ will not spawn.
The algorithm will try, as long as less cities than needed are placed on the map, to find an unoccupied plot, but max. 100 times, then it will just stop to do so.
But i see, even when no city is set, the algorithm will try to add units to the capital. That might throw an exception when getting the coordinates, meaning that it will also break there, but unexpected. That's programming wise seen not nice (had not thought about that possibility before, my fault), but should not be harmful for the ongoing game.
Some messages about the spawning of the civ might appear, followed immdediatly by the destruction messages.

But i'm not sure about it, will test it later (if i don't forget it, my memory...).
 
Alright, thanks for the info. Thankfully it seems for WoL that most of my spawnable civs will be pre-Renaissance, so there probably will still be enough room to go around. :D

Actually, I also had another question that I had forgotten for a while. Basically, in the case of a scenario, I am assuming that the SpawnACiv will not be affected, correct? (for instance, if I play a scenario, the Huns will still pop up even if I don't want them to, right?)

Thank you again for your help!
 
Right :/.
the only temporal solution would be to give every existing civ the technology, which triggers the spawning.
But: If then later on another civ spawns, this new civ will get the mentioned technology and that will trigger the spawning.
 
I tried the new one...

File "DestinyCvEventManager", line 896

CyInterface().addMessage(0,False,15,CyTranslator().getText("onCityAcquiredAndKept",(,)),'',0,'Art/Interface/Buttons/General/happy_person.dds',ColorTypes(gc.getInfoTypeForString("COLOR_GREEN")), iX, iY, True,True)

^

SyntaxError: invalid syntax

EDIT:

If you can just add your watches to the standard modcomp and then get it to log what you're looking for, I can just copy that section to my mod.
 
I tried the new one...



EDIT:

If you can just add your watches to the standard modcomp and then get it to log what you're looking for, I can just copy that section to my mod.

I checked out the BASE mod and it has it fine. The only thing different really is how my python is imported via BUG it seems as I've copied and pasted word the cityacquiredandkept section from both the standard modcomp and base and in both cases it works - but get double the messages.. "You captured the Oracle", "You captured the Oracle"...
 
hhmm....and how is your python imported into BUG?

I tried the new one...

Bah, i knew, i would do something wrong.
New one is attached.

If you can just add your watches to the standard modcomp and then get it to log what you're looking for, I can just copy that section to my mod.

Don't see a difference :dunno:.
 

Attachments

hhmm....and how is your python imported into BUG?
Don't see a difference :dunno:.

Bug uses this import thing because it replaces the standard cveventmgr with bugeventmgr, EmperorFool has a tutorial in his signature.

But the code you are posting is not working. I'm getting more python errors.

Code:
    print "passed building is a wonder check: "+thisbuilding.getDescription ()
 
        ^
 
SyntaxError: invalid syntax

I'm asking that you make sure the watch codes are working in the basic modcomp, then I can test in my mod.
 

Attachments

I'm getting more python errors.

[...]

I'm asking that you make sure the watch codes are working in the basic modcomp, then I can test in my mod.

I definitely should.
I should have learned it until now, never post something, which you haven't tested yourself, will probably never work :/.


I'll have to do this tomorrow, or so, it's already after midnight here, and i have to wake up in around 6 hours...bah.
 
Back
Top Bottom