Glory and Greatness, Development Thread

Is there anything you need from me?
I think you have done plenty already. You deserve to take the remainder of the year off! ;)
 
Finally Baldyr, I've found a quick and pretty clean way to change unit train times for XML. You know how missionaries and explorers are SPECIALUNITTYPE_PEOPLE, well you can make more special unit types and name them what you want and then tie production to the trait. This means that all of the special powers that are a bonus to building a type of unit can be done through XML instead of Python. Should I just go ahead and do that, would that prevent lag and other things that you mentioned about Python?
So all the unit discounts have been done in XML already? Not only the unit type specific ones, but the combat type ones also? :confused:
 
If I'm not mistaken - all the extra plot/terrain/feature yields are doable with XML with Asaf's custom DLL, right? So I don't have to do any of those in Python, then.
 
Priest specialists grant +1 experience to units trained in the city -- PYTHON
As pointed out in another thread, this would invite an exploit where you change all specialists to Priests any time a unit is about to be completed. Micromanagement hell?

It should probably be something like "make the city generate free XP with running Priests over time", but that would involve updating a new custom value keeping track of how many Priest turns the city has in on every turn for every Polynesian city. (Still doable though.)

A more useful approach might even be to "add free XP to the city pool for running Priests" so that running those specialists all the time would actually make a difference. Then all units built would get some amount of the free XP deducted from that pool - perhaps up to 50% of the available XP - depending on how much has been accumulated. But this also involves updating a value for every city on every turn. :p

And there would still not be any interface for showing what the actual bonus/amount is. But, this could probably also be done - the question is if you even want such a feature?
 
With the exception of the Polynesian power (see above) I'm now finished with a draft of all the Python based powers. This is what the settings look like, by the way:
Spoiler :
Code:
iUnitDiscountPercent = 20
iArabianFood = 2
iArabianCommerce = 1
iCarthageVassalXP = 1
iCarthageVassalGold = 50
eCelticCivic = eHereditary Rule
eChineseCivic = eBureaucracy
iEnglandMoves = 1
tHolyRomanEras = (False, True, False, True, False, False, False) # Classical & Renaissance
iIncaFood = 1
iIndiaCitySize = 2
iIndiaSurplusPercent = 10
iIndianCivic = ePacifism
iJapaneseProbability = 20
maliTechMessage = "Choose a free starting Tech!"
iMayanProbability = 25
iNetherlandsInterest = 3
iGermanProbability = 50
iGermanGold = 25
iOttomanProbability = 50
iOttomanGold = 50
iOttomanCulture = 100
tPersianDomains = eLand, eSea
iPersianMoves = 1
iRomanConstructionDiscount = 20
iRomanUpgradeDiscount = 50
iSpainGoldBonus = 50
iVikingBonus = 100

startingCivicDict = { "Celt": eCelticCivic,
                      "China": eChineseCivic,
                      "India": eIndianCivic
                      }
The point is that you will be able to edit this yourself without doing any real programming as such. So lets not worry about the actual values. :D

Next up is the testing. :p I might upgrade some of the utilities I did earlier though - otherwise I'll just end up testing everything multiple times. Unfortunately I don't have a copy of my original CvEventManager module, so I have to start over on scratch on that. :cry:
 
As pointed out in another thread, this would invite an exploit where you change all specialists to Priests any time a unit is about to be completed. Micromanagement hell?

It should probably be something like "make the city generate free XP with running Priests over time", but that would involve updating a new custom value keeping track of how many Priest turns the city has in on every turn for every Polynesian city. (Still doable though.)

A more useful approach might even be to "add free XP to the city pool for running Priests" so that running those specialists all the time would actually make a difference. Then all units built would get some amount of the free XP deducted from that pool - perhaps up to 50% of the available XP - depending on how much has been accumulated. But this also involves updating a value for every city on every turn. :p

And there would still not be any interface for showing what the actual bonus/amount is. But, this could probably also be done - the question is if you even want such a feature?

Hmmm, let me sleep on it, if that's okay. I'm still wondering if there's a better power that would be more "Polynesian" per se.

With the exception of the Polynesian power (see above) I'm now finished with a draft of all the Python based powers. This is what the settings look like, by the way:
Spoiler:

Next up is the testing. I might upgrade some of the utilities I did earlier though - otherwise I'll just end up testing everything multiple times. Unfortunately I don't have a copy of my original CvEventManager module, so I have to start over on scratch on that.

I might have a copy of what you sent me in the earlier phases, do you want me to send it back or start over clean?

And I'll think on that Polynesian power ...
 
The problem was originally that your CvEventManager had all the copy-paste code in it, so I worked on my own copy and sent you a list of lines to add to yours instead of the actual file. Once you added those to your copy you sent me your version of the file, and I never kept my own, as it seems. Since we're starting from scratch I'll have to go through your old file a pick out those lines again.

So I'm fine with the stuff I have. It will just require an effort to get everything in order.
 
Another update: I scrapped most of the old GGUtils module and introduced a new module called CivPlayer. I wrote it for Jamie's Rome Mod but the intention was always to use it in other projects also. In fact, its based on the CivPlayer class I wrote for GG. ;) I had to write a new version however, one that supports potential for several players with the same Civ attribute. Hopefully I got it right. So I also updated all the rest of the GG Python to the new setup.

Now, for the actual testing... :p
 
About the actual testing - it would be convenient to have all the XML work in place before I start. What is the due-date on that, seasnake?
 
Everything is done except for some text stuff (the strategy guides). I can upload it to a fileshare site this morning and post the link.

Polynesia's Unique Power will be all XML, they'll start with a worker and a work boat so they can rock their economy right away. So that's the last thing.
 
Good to hear! :goodjob:
 
Downloading. I'll get back to you if I run into troubles with the mod. Otherwise I'll get back to you with any issues/considerations with my own power implementations.
 
I'm testing the code and the ones that seem to work thus far are Celtia, China, India, Aztec, Carthage, Colombia, Germany and England. The Gran Colombia power seems a bit buggy though, so you probably wanna do more testing on it yourself.

I will wrap this up shortly in any case, as I'm not working for 4 days.
 
I just noticed that Asaf's custom DLL wasn't included in the G&G download. I did however install it, but now I'm getting XML errors on initialization. I'm guessing the current version isn't compatible with the added functionality of the DLL. This also means that I've broken my own version of the mod - I was testing the Malinese power when the game complained about CyPlayer.AI_chooseFreeTech(). (It wasn't there, as it turned out.) So I'm at a stand-still right now...

I did however manage to get HRE working before the above mess, so that one is in the bag. There is still quite a few to test and debug, so heres hoping you can get the XML portion of the mod in order while I still have the time to work on this. :p And include the DLL and all associated files in the next version!
 
Back
Top Bottom