Simple Python Things

Thought so, I got a couple personal requests that I doubt you will want to put them in but I could really use them. Basically its similar to the war/peace event you created, its for scenarios. Basically one where you place units at a certain square, and then one where you take one city and give it to another civilization. So for example in scenario X, on the forth turn, 3 units are placed on plot X,Y that belongs to civilization XY
Anyway those are events that wouldn't go into this since they arent random events

What about having a civic revolution? Basically pick a civic that is known for having revolutions against or with (State's Property, Slavery etc) and have your country basically split in half (basically following US Civil War). I do not think its possible for it to ask wwhich side you want to take but if so that would be really cool. But basically create another nation with half of the cities (I dont even think they need to be next to eachother since in real life they werent always ex. Russian Rev) and make sure they change their civic to something else
 
The former: That's a bit ugly, because there are soooo many custom factors for such an event :ack:. Would not really like to do that.

The latter: Not really different from the small secession event I've already done, or at least I can't see big differences (would require a special civic, and more cities, but else...). And it's damn unfunny if such a bigger thing hits you :/.
 
Then how about a revolutoin where all your cities but your capital is formed into a new country :p

How about this one:
Disease and overpopulatoin are driving people out of our cities!!!
1)No they can not leave! Ensure they stay in their cities! (-1 Happy in all cities)
2)Allow them to do as they please (-1 Populatoin in all cities with a population of atleast 5, all hamlets, cottages etc. get improved one)

Not sure if that is balanced but I actually think its a pretty cool idea. I thought loosing population in all cities would be to unfair, so i put the restriction of atleast 5.
 
That sounds good :).

Maybe only hamlets, or a fixed amount of improvements would be more balanced, because all...that could have a massive impact.

What about a hammer bonus or a free citizen specialist to give both options a positive effect?
 
Only hamlets sounds good:goodjob:
I don't see how you can put a realistic positive effect on the first one since really the "positive" effect is not losing population. Keep population, but more anger seems around equal, and minus population and improve hamlets seem equal (except maybe something else beside just hamlets, because usually at one given point you might have none, i would do a number of all hamlets cottages etc.) so no need to put them both positive.
Although i guess a positive you can do is say first optoin, increase taxes dramtically in the non-city land (totally blanking on the word that is suppose to be there), and you can say increase gold for that option. Then +1 health for second option.

If you want though placing a third option where you say ensure that the place is cleaned up, basically minus gold and no loss of population
 
What map size is the thing you are playing on? becase if it is duel or a small map, the absorbing civ shouldn't be possible. do you have a check to see how many players?

Also for the city one, is there a check for city size? There should be a check to make sure they ahve atleast one city of 5 population. Also I would change the benefit of letting them go. If it is possible, do you think you can change it so the number of things improved is equal to the cities that loose population? Because if you have 12 cities loose population, or 1, it should not be equall benefit. Also I would change it from just hamlets, because expecially late game chances are you will not have 6 hamlets. Also is there one of those button things to go on the improvements that got upgraded? Because chances are (expecially fi its me playing:lol:) the player does not know which is which, so the player will probably not notice a difference if its improved so a button would be useful(same with city if possible. IF you could do that then I would suggest the "!" from global warming).
 
What map size is the thing you are playing on? becase if it is duel or a small map, the absorbing civ shouldn't be possible. do you have a check to see how many players?

There's a check that more than 3 players are needed.
:hmm: I see now that this check is actually redundant, because the absorbing civ is not allowed to be in the top3, and since the absorbed civ has to be last or second last, it makes in the end at minimum 5.

Also for the city one, is there a check for city size? There should be a check to make sure they ahve atleast one city of 5 population.

:blush: oops, forgot that.

Also I would change the benefit of letting them go. If it is possible, do you think you can change it so the number of things improved is equal to the cities that loose population? Because if you have 12 cities loose population, or 1, it should not be equall benefit.

Currently it's max. 2 times the number of cities.
But right, attaching it to the actual number of population loss makes more sense.

Also I would change it from just hamlets, because expecially late game chances are you will not have 6 hamlets.

The event has feudalism, 2 :mad: and 5 :yuck: as prereq (and at least 1 hamlet), so for me it's not a late game event :D.
But I guess it will not hurt to fill up missing hamlets with villages :).

Also is there one of those button things to go on the improvements that got upgraded? Because chances are (expecially fi its me playing:lol:) the player does not know which is which, so the player will probably not notice a difference if its improved so a button would be useful(same with city if possible. IF you could do that then I would suggest the "!" from global warming).

That's already in, you get notices with the hamlet button for every improved tile :).
 
There's a check that more than 3 players are needed.
:hmm: I see now that this check is actually redundant, because the absorbing civ is not allowed to be in the top3, and since the absorbed civ has to be last or second last, it makes in the end at minimum 5.
So then yes there is no reason to even check for it, unless you want a higher number because even 5 seems a bit low to me. When doing that you are removing 20% of the civs in the game. I would say atleast 10 because then one even really would effect the game more then one event should. Also why a restrcition on not in the top 3? Random Ex. If Belarus did this, they would look toward Russia, not Ukraine for help, so would like to hear reasoning behind that (assuming its to keep top player from being to OP)

:blush: oops, forgot that.
Thats why I am here :D

Currently it's max. 2 times the number of cities.
But right, attaching it to the actual number of population loss makes more sense.
Not sure why there would be a max, or how you are figuring that out but if you hange it to number of population loss then I dont gotta try to figure out what you are talking about:lol:

The event has feudalism, 2 :mad: and 5 :yuck: as prereq (and at least 1 hamlet), so for me it's not a late game event :D.
But I guess it will not hurt to fill up missing hamlets with villages :).
Well going to need to remove fuedalism when putting in my mod:D Can you split that up though in the text? So like it says X hamlets improve, Y villages improve?
 
So then yes there is no reason to even check for it, unless you want a higher number because even 5 seems a bit low to me. When doing that you are removing 20% of the civs in the game. I would say atleast 10 because then one even really would effect the game more then one event should. Also why a restrcition on not in the top 3? Random Ex. If Belarus did this, they would look toward Russia, not Ukraine for help, so would like to hear reasoning behind that (assuming its to keep top player from being to OP)

Only balance reasons :yup:.
And did you not suggest that yourself :hmm:?


Not sure why there would be a max, or how you are figuring that out but if you hange it to number of population loss then I dont gotta try to figure out what you are talking about:lol:

The maximum of 2 * number of cities is just a random number to not make it overpowered. Felt that upgrading everything might be too much.
Using the number of affected cities will make more sense.

Well going to need to remove fuedalism when putting in my mod:D Can you split that up though in the text? So like it says X hamlets improve, Y villages improve?

Sure, sure, that's doable.
 
The_J, I ​​made this request in another topic but I think I must ask the right person, you ;)

I would like a mod where the list of names of units come in the order that is inserted in xml and not randomly it is now. If not ask much, in python, please. =)
 
Thought so, I got a couple personal requests that I doubt you will want to put them in but I could really use them. Basically its similar to the war/peace event you created, its for scenarios. Basically one where you place units at a certain square, and then one where you take one city and give it to another civilization. So for example in scenario X, on the forth turn, 3 units are placed on plot X,Y that belongs to civilization XY
Anyway those are events that wouldn't go into this since they arent random events

Any chance you can do this J? I could really use it for my Korean scenario. You said before you didnt want to because it was to specific, but that would be the point. Similar to your war/peace one it is not just a random event, it is one that is specific to a scenario
 
I'm not really interested in that...er...might be the easiest to load the stuff from a custom XML file...mmhh...what other variables do you need?

I guess this time it will take 2 months :ack:.
You dont got to if you don't want, just a request:lol:

Code:
iKoreaUnitX = 15
iKoreaUnitY = 29
## Korean War Start ##
		if CyMap().getMapScriptName() =="Korean War.CivBeyondSwordWBSave":
			if iGameTurn == 8:
				for iPlayerX in range(gc.getMAX_CIV_PLAYERS()):
					pPlayerX = gc.getPlayer(iPlayerX)
					if pPlayerX.isAlive():
						if pPlayerX.getCivilizationType() == gc.getInfoTypeForString("CIVILIZATION_NORTH_KOREA"):
                                                        pPlayerX.initUnit(gc.getInfoTypeForString("UNIT_INFANTRY"), iKoreaUnitX, iKoreaUnitY, UnitAITypes.UNITAI_ATTACK_CITY, DirectionTypes.DIRECTION_SOUTHEAST)	
## Korean War End ##
I mean I got a code for checking it per turn but I do no t know how to switch that into an event since it would be less taxing
 
Hey, why do you need me? That code looks like it could be working :D.

For turning it into an event: The prereqs would have to be in the canDo part of the EventTrigger, the rest in the python part of the event. Not really difficult, but doing such things multiple times will just result in an awful amount of redundancy.
 
Back
Top Bottom