Simple Python Things

@The_J I don't know if anyone else has mentioned this but have you thought of putting credits into the pedia entries for units, buildings, concepts or anything else. That way credit will be given even if the modder using your mods forgets. When I add graphics I try and put the source in the pedia. It seems only fair.

Btw I am converting WarriorsOfGod for use in Rise of Mankind. Done the modular XML bit now onto the modular (BUG) python.
 
I'm at the moment uploading the "SpawnACiv" modcomp, which will take...i guess...a half hour, or maybe a whole. This mobile phone network is not very fast :rolleyes:.
Edit: Uh, that was faster, than i thought.

I've done 2 things:
- added the tag "SpawnChance" to the XML, so that there's also a chance, that the civ will not spawn. Every value between 0 and 100 is valid. Values under 0 will be treated like 0, values over 100 will be treated like 100.
- added the tags "StartX" and "StartY" to the XML. You can add here a X and a Y coordinate for the first city (only for the first). Attention: There's no check for a valid position (besides, if the plot is on the map). If you want to place a city in water or on a peak, the function will do this. It's only checked, if there's already a city, then the new city will not be placed. Other units on the plot will be moved to a near plot.

More than one city was to complicated for me, sorry. Would need some more time.

Also the start with less techs will take some time. It's, like already said, a bit more complicated.
I cannot just let the dices roll for the technologies. You don't want to have a civ, which has astronomy, but doesn't have sailing. There has to be a check, if the earlier techs are already there, so that a civ does not start with only the late techs.
This can be done, but i didn't have the time today, sorry :(.

Great! if you manage to do it I will definitely use it. :D
No prob about getting the coordinates!

Nice to hear :).

btw, Cybrxkhan has mentioned, that the spawning could be done for nearly every civ....would also be interesting, to combine it with a worldmap...already thought of it, but i don't have the time :(.

@The_J I don't know if anyone else has mentioned this but have you thought of putting credits into the pedia entries for units, buildings, concepts or anything else. That way credit will be given even if the modder using your mods forgets. When I add graphics I try and put the source in the pedia. It seems only fair.

Good idea :goodjob:.
I'll do that for all the modcomps, which i'll upload or re-upload.

Btw I am converting WarriorsOfGod for use in Rise of Mankind. Done the modular XML bit now onto the modular (BUG) python.

I hope, that no problems appear :scared:.

Hi, The_J
Excellent work. Many many thanks. Great work as allways. I run like sixty at home add your modcomp
:goodjob: :hatsoff:

That's nice to hear :D.
 
^Hey, The_J, thanks man. It'd be really helpful for people who don't want to try the BarbarianCiv or Revolution python/SDK fun.
 
^If I remember correctly, the Huns are modular, so they're not necessary; the only thing you'd have to change is the SpawnCiv.infos in the XML - which you would be playing around with, anyhow.
 
^If I remember correctly, the Huns are modular, so they're not necessary; the only thing you'd have to change is the SpawnCiv.infos in the XML - which you would be playing around with, anyhow.

cybrxkhan is completly right :yup:.
The huns, like also the americans in the file, are just an example to show, how it works.
You don't need anything from that.

Good info here, thx, i think i will try it in a week or so, when i get some more time.;)
I have ALOT in my mod now from The_J.:goodjob:
 
Alright, The_J... I have another request! :p (as always, this is never emergency, and you don't need to make it, and you can put it on the backburner for months if you're busy)

Basically, I would like the ability for a player, having conquered the enemy's capital, to be able to shift his/her capital to that capital if they want to (historically, for example, Constantinople became capital of the Ottomans right away after they took it from the Byzantines). Again, how hard would this be? Would this simply require a simple move of the palace, or something more?

Thanks for your willingness to do tons of little requests like this! :)
 
Thanks for the compliments you both :).


Even emergency would not help ;). I have maybe some time at the weekend of the next week.

Technical: Yes, could be done, but i don't know, how to do it exactly.
First, i would have to check, if you've captured the capital.
The code for that is really ugly, but it works. There's maybe a better solution, i'll have to check that.
Then, i would need to trigger somehow a window, with the question for it.
I know, how to trigger a popup. I don't know, how to get buttons on the popup, and how to check, what has been clicked, but it's technically possible, i've seen these functions in the API.

So maybe, if i have enough time.
 
^Perhaps it could work with the BtS event system? With the event system, you'd need a minimum of two events - the first one to remove the Palace from your original capital (and whether you want to do it), and the second one to add the Palace to the new capital, and the only python necessary would be to check whether you've just captured the enemy capital.
 
I have made your WarriorsOfGod mod a modular(ish) part of Rise of Mankind. However it looks a bit strange having fanatics and monks running around in the modern and later eras. Have you thought of some modern equivalents for these units to upgrade to?
 
Hey J, ever considered doing something cool with forts?
Have a look here.
Too bad this modcomp was never finished.

2. edit: What is not working with that modcomp?

I guess, the current implementation just does not allow to trigger it more often than 1 time per turn.

I have made your WarriorsOfGod mod a modular(ish) part of Rise of Mankind. However it looks a bit strange having fanatics and monks running around in the modern and later eras. Have you thought of some modern equivalents for these units to upgrade to?

I can't really think of good modern units.
1 reason is sure, that whatever you create for these effects, it will sure be not politically correct.
Think of a suicide bomber or so...
 
I've finally reuploaded the Industry Espionage, Sneak and Marauder Promotion with the new buttons from TheLadiesOgre :).

I've also reuploaded the Spawn A Civ modcomp.
I've added TechPercent tag (like requested by The_Capo), so that a civ can also start with less techs than the civ, which causes the spawn. Every value between 0 and 100 is valid. Values under 0 will be treated like 0, values over 100 will be treated like 100. For example, if you have 15 techs, and the TechPercent is 33, the new civ will 5 techs, which are at the most left in the tech tree. It will not happen, that a civ has an advanced tech, but not an basic tech.
I hope, there's no real bug in that tag. Maybe some small inconsistences in the tech pathway could happen, but nothing serious.



And a new thing:

Training Obsolte Units

Spoiler :


This small modcomp allows you to build units, even when you are able to build all more advanced units.

This modcomp consists only of 2 lines in Assets\Python\CvGameUtils.py, they are labeled with "training obsolete units" (and the activation of the cannotTrain callback in Assets\XML\PythoncallbackDefines.xml).

I made this modcomp, because it was requested several times for specialized mods, and nobody thought, it could be done, and now it was so easy :).
Took my only some minutes to create it :).
 
Top Bottom