Simple Python Things

The "= city.isProductionProcess()" on the second line shouldn't be there.

A somewhat shorter version would be this:
Code:
iPastOverflow = 0
if not city.isProductionProcess():
    iPastOverflow = city.getOverflowProduction()
If you are not going to use the "bIsProcess" variable for anything else, you may as well get rid of it like that. If it is going to be checked again then you may want to keep it.

hmm, oops. copy & paste :p

yeah I wrote that under the presumption that if it is in the C++ code they might need it again somewhere :p
 
dear the_j

a while ago you did some fabbo code (applyCivilWar_Generic and _Custom) but there is one minor problem; if it triggers for a civilization's vassal the bit that runs

"###declare war
if DeclareWar:
pNewTeam.declareWar(pTriggerTeam.getID(),False,WarPlanTypes.WARPLAN_LIMITED)
return true"

returns an error. Any ideas round this? I couldn't find any code along the lines of "if triggering civ is a vassal then don't run OR don't declare war". some pointers would do!
 
is it that there is a space in WarPlanTypes?

also try to put code in the [code ] tags!
 
He meant there is no check on vassal status.
A vassal cannot declare war.
Didn't bother to look at the codes, but there should be more checks like same team and forced peace.
In short, there should be a canDeclareWar check if you want to avoid all of thema
 
Ah... you are enjoying holiday overseas while I am resting with a sprained ankle at home :gripe:
 
Edit: Refering ot War 'n' peace

Really like this mod component- Thanks! I was just wondering though, would it be possible to make another tag so that when a religion is founded the holycity become a new civ such as Christianity-Papal States, Judaism-Israel, etc.?

(P.S I didn't see there was a thread and accidently posted in the download, sorry!)
 
dear sausages

thank you for comments! will experiment with "candeclarewar" code and ?stuff, and will put code in correct format in future. and thank you platyping for the translation
the_J: on HOLIDAY? get back to work at once. disgusting.
 
Is it possible/easy to refrain all world units from the unit upgrade chart in sevopedia?

I just did this in C2C but for all national units, I'll see if I can find the code again - when I finish waking up ;)

edit I actually did it based on something else . However in UnitUpgradesGraph.py in def getGraph find the k loop and add the requirement for heroes
Code:
		for k in range(self.getNumberOfUnits()):
			unit = self.getUnitNumber(k)
			if (unit == -1):
				continue
			if <put test that identifies hero unit here>:
				continue

Sorry can't seem to wake up - must be the new meds. It's a pain getting old. :(
 
Slowly going through everything at the moment.

dear the_j

a while ago you did some fabbo code (applyCivilWar_Generic and _Custom) but there is one minor problem; if it triggers for a civilization's vassal the bit that runs

"###declare war
if DeclareWar:
pNewTeam.declareWar(pTriggerTeam.getID(),False,WarPlanTypes.WARPLAN_LIMITED)
return true"

returns an error. Any ideas round this? I couldn't find any code along the lines of "if triggering civ is a vassal then don't run OR don't declare war". some pointers would do!

I could either
a) disable the event for vassals; preferably IMHO, because you should not want to further cripple a weak civ
b) make the master declare war.
Which fits best to your situation?

Edit: Refering ot War 'n' peace

Really like this mod component- Thanks! I was just wondering though, would it be possible to make another tag so that when a religion is founded the holycity become a new civ such as Christianity-Papal States, Judaism-Israel, etc.?

(P.S I didn't see there was a thread and accidently posted in the download, sorry!)

I think you mean the wrong component.
Depending on which you mean, it could either me easy or complicated...


EDIT:
Nope, Rome is the capital of the "Great Christian Empire", the United States of Europe are supposed to spawn in Brussel.

Then please upload the whole thing somewhere, I want to take a look at it.
Might now happen this week though, because I guess I'll be busy due to the Civ5 release and RL.

-> waiting for the upload.


EDIT2:
hey platy , whats up?

can i request a little mod for the new american mod we are working on?

i wish for a spawn a civ mod - after an ai has been killed - a new one will spawn on empty slots with some arsenal according to the era, also - will it be able to pre define to wich civs this re spawn will be limited to?

just for the background - i wanna have 1 city native american tribes that if their 1 city destroyed - they will spawn somewhere else that is unowned tile (if theres no unowned tiles - no respawn.

other modders and people can enjoy this mod mod in their games (its like civ 1-2 mechanics i think).

hope you can help platyping :)


Do you only want to use the modcomp for this specific purpose (or do you also want to use with its original purpose)?
Is it only a defined list of civs, which need to be respawned somewhere on the map?

EDIT3: After this round of fixes/adjustments, I'll probably not do anymore further. I just don't have time for this anymore.
 
well,

if you can - prefer a random location on the map, a predefined civs that can spawn, if no unowend tiles - no spawn. and are spawn should give units and buildings corresponding to the game tech level

but dude, i dont want to over complicate you, only if you can. thanks for listening :)

wish i could stop modding :)
 
J, the modcomp Keldath is talking about isn't to complicated correct? I beleive your's is triggered when a tech is discovered, all he wants is a transfer to when a civilization is destroyed. Your code already choosing the civ correct? So the only coding really that needs to be done is switch it to the civilization beind destroyed, and then place the units and buildings afterwards

If so, I wanna take a look at it first, see if I can do it, save you some effort
Still almost no where with python coding, but I have become fairly good at simply borrowing from platy's code to create my own python :lol:
 
Yeah, tutorials are a waste of time.
Hands on practise much more efficient.
 
Back
Top Bottom