Platyping's Python

1) Knossos Labyrinth changed to generate Great Engineer instead.

Not sure what you mean, if there are cities already present in turn 1 similar to advanced start, you can just randomly place the wonders in any cities similar to how Olympics is placed randomly

Neuschwanstein
Spoiler :



Attackers won't die from it.
Damage is dealt after the combat, so combat odds not affected
Somehow, attackers that withdraw from combat aren't affected by def onCombatResults.
Thus, they aren't affected either.
 
Not sure what you mean, if there are cities already present in turn 1 similar to advanced start, you can just randomly place the wonders in any cities similar to how Olympics is placed randomly

Yess thats what I want, but i am really bad at python (I am trying though, since im taking a class on Java in school, and it seems somewhat similar although comands are alot different same idea), so could you give me like a quick lesson what to place where in the python code, and would i copy it every time for every building just replacing the building info?
 
Spoiler :
Code:
## Olympics Start ##
			if iGameTurn % 25 ==0:
				[COLOR="blue"]OlyPlayer = []
				for iPlayer in range(gc.getMAX_CIV_PLAYERS()):
					pPlayer = gc.getPlayer(iPlayer)
					if pPlayer.isAlive()==true:
						OlyPlayer.append(pPlayer)

				playerchance = CyGame().getSorenRandNum(len(OlyPlayer), "which player")
				pPlayer = OlyPlayer[playerchance][/COLOR]
				[COLOR="Red"]citychance = CyGame().getSorenRandNum(pPlayer.getNumCities(), "which city")
				i = 0
				(loopCity, iter) = pPlayer.firstCity(false)
				while(loopCity):
					if i == citychance:	
						[COLOR="Lime"]b_Olympics = gc.getInfoTypeForString("BUILDING_OLYMPICS")[/COLOR]
						[COLOR="Yellow"]loopCity.setNumRealBuilding(b_Olympics, 1)[/COLOR]
						loopCity.changeBaseYieldRate(2,1)
						CyInterface().addImmediateMessage( CyTranslator().getText("TXT_OLYMPICS_START",(loopCity.getName(),gc.getPlayer(loopCity.getOwner()).getCivilizationDescriptionKey(),)), None)
					i += 1
					(loopCity, iter) = pPlayer.nextCity(iter, false)[/COLOR]
## Olympics End ##


The statements in Blue select the random player.
The statements in Red select the random city of that player.
The statement in Green defines the building.
The statement in Yellow adds the building to the selected city.

However, this is only meant for adding 1 building to 1 random city.
If you want to add many buildings to many random cities, I suggest you use a for loop at the begining to go through the whole range of buildings, using
Code:
for i in range(gc.getNumBuildingInfos()):
	AncientWonder = gc.getBuildingInfo(i)
	if AncientWonder.getFreeStartEra() < 6: ## 6 stands for Future Era for default BTS
blah blah blah blah blah
then you won't need to define the building

I used something similar with Porcelain, so I dont have to do it 7 times for each temple. Can do the same for dissolution of monastries but... lazy to change

I think The_J used a different method to select random city for his circus, up to you which you prefer
 
By the way, I used a tedious method to choose random player because Olympics occurs throughout the game. Some players may be dead by then, and I don't want it to choose a dead player.

For your case, since it is at game start, you can just
Code:
randomplayer = CyGame().getSorenRandNum(gc.getMAX_CIV_PLAYERS(), "which player")
pPlayer = gc.getPlayer(randomplayer)

Similarly, I don't want to choose a dead city either. For your case, simplified version:
Code:
citychance = CyGame().getSorenRandNum(pPlayer.getNumCities(), "which city")
pCity = pPlayer.getCity(citychance)
 
Hey id like to see a reworked human genome project, i think the one you have now, the effects should go to a project more about cloning, the human genome project which i am learning about in school currently, (atleast for modern timesnot futuristic) isnt focussedon cloning people, but most of it is foccusses on noticing defects in new born babies and fixing them quicker, so i was thinking something like +1 health when the population goes up
 
Hmm yeah true. Can rename it to "First Cloned Mammal" Project which I found in ROM/AND if you like lol, although er... that was Dolly I think

Tsukiji Fish Market
Spoiler :



20% chance to find Fish
10% chance to find Clam
10% chance to find Crab

Didn't include Whale, since I not sure if they sell whales in a fish market... Anyway it should be obsolete by then.

Found this artwork in RI mod, but I like this fish pic better lol


Carhenge
Spoiler :



Gets 50% of production cost of each mechanical unit killed. (tanks, ships, planes, cannons etc)
 
Hmm yeah true. Can rename it to "First Cloned Mammal" Project which I found in ROM/AND if you like lol, although er... that was Dolly I think

Tsukiji Fish Market
Spoiler :



20% chance to find Fish
10% chance to find Clam
10% chance to find Crab

Didn't include Whale, since I not sure if they sell whales in a fish market... Anyway it should be obsolete by then.

Found this artwork in RI mod, but I like this fish pic better lol

Is was, Dolly the sheep, and i saw that in C2C too, but i don't like it. Just because we cloned a sheep does not mean we clone 5 units a turn or whatever yours does, id think it would be more of a futuristic project, which has been missing from most mods (minus your SETI project), maybe something like "Clonable humans" (or a more techy name). But the humane genome project just isn't "historically correct". When you do come out with a new humane genome project id love to use it in my mod:good job:

Also any plans to make them modular? You could dish out new ones a lot easier if you did
 
Is was, Dolly the sheep, and i saw that in C2C too, but i don't like it. Just because we cloned a sheep does not mean we clone 5 units a turn or whatever yours does, id think it would be more of a futuristic project, which has been missing from most mods (minus your SETI project), maybe something like "Clonable humans" (or a more techy name). But the humane genome project just isn't "historically correct". When you do come out with a new humane genome project id love to use it in my mod:good job:

Also any plans to make them modular? You could dish out new ones a lot easier if you did

If you got a suitable name for it, I will be happy to use it lol.

As for turning them to mods, currently lazy to do that, cos all I doing now is
1) Think of an idea
2) Go to my list of wonders and find something most similar
3) Copy and paste
4) Edit python
5) Edit XML
6) Find a suitable art

Done lol
 
If you got a suitable name for it, I will be happy to use it lol.

As for turning them to mods, currently lazy to do that, cos all I doing now is
1) Think of an idea
2) Go to my list of wonders and find something most similar
3) Copy and paste
4) Edit python
5) Edit XML
6) Find a suitable art

Done lol

Modular is the same thing, just step 5 is cut in half, not to mention the DL is less space, and its much easier for the DLer, plus once you make one modular, copy it, rename it and making your second one is about twice as fast as making your first
 
Actually the work is the same to me whether modular or not. Afterall, all I did for XML is edit last entry thats all. No difference whether there is only one building info, or all building infos.
As for size of the DL, none of them even exceed 500 KB, with the exception of SETI because of unit art. I doubt size is a significant factor here.

And the things is, there are 2 groups of players:
1) Those who are new to mods and do not know how to use modules, this way will be easier for them
2) Those who know how to use modules, they have the expertise and knowledge to cut and paste themselves, which wouldn't take 3 minutes.

Turning them all to modules may affect the group 1 players.

3rd wonder/project of the Day:

Theory of Everything
Spoiler :



This is basically the Research Agreement in Civ V. Unlike a free tech, you don't get to choose which tech you get
 
Actually the work is the same to me whether modular or not. Afterall, all I did for XML is edit last entry thats all. No difference whether there is only one building info, or all building infos.
As for size of the DL, none of them even exceed 500 KB, with the exception of SETI because of unit art. I doubt size is a significant factor here.

And the things is, there are 2 groups of players:
1) Those who are new to mods and do not know how to use modules, this way will be easier for them
2) Those who know how to use modules, they have the expertise and knowledge to cut and paste themselves, which wouldn't take 3 minutes.

Turning them all to modules may affect the group 1 players.

3rd wonder/project of the Day:

Theory of Everything
Spoiler :



This is basically the Research Agreement in Civ V. Unlike a free tech, you don't get to choose which tech you get

But keep in mind, all people from group 1, and well mostly any1, isn't going to play your wonders alone. Not that your wonders aren't great but one wonder or project doesn't effect a game in my opinion enough to play a whole mod on it, so i think more people would know how to add modules then copy paste xml but ehh thats just my opinion, plus if you did it modular wouldn't effect group 1 since they don't edit it, they can play it just normal.

Heres an idea for a project id like to see:
Some type of national highway (being american id like to see Route 66, but any name works) that either builds all highway throughout your country or continent, or builds it between two of your cities. Of course you would have to add a new route (highway) or it wouldn't really work with just road...
 
Yeah, I know of cos no one plays a mod with just one extra wonder. But don't laugh, I only realised how to use downloaded modules recently because of that extra step of setting modularloading to 1 in the config file...

As for the highway thing, it has been done by GIR's Via Appia wonder. I think the original download link no longer works, but you can get it via one of the posts in Tsentom's python wonders
 
Burj Al Arab
Spoiler :



To simply the codes, citizens will only migrate from capitals. No immigration will occur if capital only left 1 citizen

Artwork by Hrochland
Note: Download link in 3rd post


Last wonder for the day. Happy Chinese New Year in advance to all (who celebrate:goodjob:)

No wonders/projects for the next few days, cya all
 
I like this last. For my mod I will do new model a bit modify it but it is great inspiration.
I have not immigration Modcomp in my HrochMod but this your idea with immigration wonder I like :)
 
Hehe thanks, glad you like it.
I was thinking hotel, hotel... what does a hotel do => attract foreigners to come.
Although foreigners come for holiday rather than immigration, well... whatever:lol:

Currently, it is set to randomly choose a capital city from a random player, if it meets the 25% criteria. It can be set to choose a random city similar to Olympics, but I think not required to do the extra work to add on to performance issues.

Edit:
1) Helsinki:
Removed 2 extra unused variables in CvGameUtils:
iX = pCity.getX() and iY = pCity.getY()

2) White House:
Changed display text from "5% chance to Force Peace in Losing War" to "Slight Chance to Force Peace in Losing War" to reflect the changes made.

3) WTC, Olympics, Knossos:
Added a "break" in while loops to stop looping once city with wonder found. Slight boost to performance I guess

4) Dissolution of Monasteries:
Used the general code style used in Porcelain rather than defining each individual monastery.
Thus, will work for other mods with extra religion without the need to define anything to the python codes
 
A few last weeks I´m out of city always. When I return must see what you have here new :)
About your burj code - I consider that in my mod would be a Salvation army or something like that
 
Sure, up to you what wonder you want to attach the code to, no issue with that :)

Running out of ideas though, so you may not find anything new when you return :wallbash:
 
You can make many great wonders more, I believe :)
Here is many wonders with any effect. maybe the forum is missing the wonders of bringing into play a new game mechanism. I have some in my mod.
Good work have here Gir, tsentom1, The_J ... You are next :)

For example, what wonder giving new promotion that can not otherwise get? I have in my mode wonders giving a unique unit that can not be trained in the game (inspired by Gir ) and lots of other things. Just need to watch to Wonder - unit - promotion and the other not disturb the balance in the game :)
 
Top Bottom