RFCM-LuKo

I haven't downloaded it yet but looking at the civic screens why does the game force you to be a commie? I know in Europe socialism is more widely accepted but I really don't think a free market makes people unhappy.

Even in '70, when USA was RICH and USSR was crappy (just like any communist country, for that matter) there were some protests by Americans who wanted communism. For sure communism has its own magnetism (but free market gives another bait- richness :) ).

PS: Oh could you make it so GA prevent anarchy again and give every Civ a 1 turn golden age so they can switch civics on spawn without 5-8 turn of anarchy on marathon

I plan giving every civ it's own civics at spawn.

It's way too easy to get creditted by you. So I guess I can stop helping you with development now, right?

I don't think its too easy. But I still haven't adopted Police State so you CAN stop doing anything
 
I plan giving every civ it's own civics at spawn.
There is a civics() method in the coming PyScenario update. :D
 
I hope to use something more sophisticated for that :P But it's probable that I'll use civics() in the end XD
This is a "helper function" from the PyScenario module:
Code:
def setCivics(pPlayer, args=None):
        iNumCivics = gc.getNumCivicOptionInfos()
        if not isValid(args):
                args = (0,) * iNumCivics
        for eCategory in range(iNumCivics):
                if isValid(args[eCategory]):
                        pPlayer.setCivics(eCategory, args[eCategory])
It can either be used to reset all Civic categories - or to specify (with a tuple value) what the five categories should be. These are valid example of use:
Code:
setCivics(pGermany)
tRussianCivics = (2, 3, 1, 1, 0)
setCivics(pRussia, tRussianCivics)
If you set any of the values to None then it isn't changed but will rather remain as is:
Code:
tRomanCivics = (None, 1, 2, None, 3)
setCivics(pRome, tRomanCivics)
The good news is that you don't even have to copy-paste the function into RiseAndFall.py (or where ever you're setting the starting stuff). Instead you import the function to into the module you are editing:
Code:
from PyScenario import setCivics
This is all you need, but you might wanna wait for the next update before using it... (I haven't actually had time to test any of it, and I might improve on it before publishing the final code.)

So its pretty much taken care of - if you don't wanna use PyScenario triggers to set starting civics that is. Seriously, doesn't this make you wanna get into programming for real? :D
 
And I can do that at startup?
You might have to add the necessary Techs first - I haven't tested this yet myself. So I suggest you add the setCivics() function call after the code that grants the techs in RiseAndFall.

Otherwise there are a lot of places you can put something like that and have it be executed on startup, or spawn or whenever you like. (Like in your own Luko.py file. I actually suggest that you do this and collect all your custom Python in your own module.) Its just a matter of knowing where to connect things.

But a PyScenario fix should do it also. :D
Code:
Trigger("Roman Civics").player(iRome).date(tBirth(iRome)).civics(1,2,1,None,1)
Oh, and I see that I forgot about the sixth Expansion category. :rolleyes: I'll add that right away... :p But you get the picture.

The civics() Action also comes with optional Anarchy turns settings (not feature above).
 
Yeah, I'll wait for PyScenario to not make even bigger mess in my files (just now I labelled every non-Python change in mod XD).
This is exactly why you should wrap all of your own Python code into functions and collect them in LuKo.py - then its merely a question of adding function calls to the other modules that you're modding, like:
Code:
LuKo.myFunction(args)
No need to add any (other) lines of code into say RiseAndFall.py or any other file. You should also be able to replace one of Rhye's methods (class functions) by adding a line of code at the end of the module:
Code:
RiseAndFall.processAfrica = LuKo.processAfrica
This would replace Rhye's original method with your own custom version - without ever editing the original code! :goodjob: (Because your version would be located in LuKo.py, right?)
 
I hope you don't mind Luko but I stole your Civic changes and put them in my regular RFC:E/M for personal use. I liked everything but the State prop. thing so I removed that ;)
 
If you want we could make a LuKo Python module for your mod-mod. The first thing that would go into it would be a function for setting starting civics. I can supply the actual code if you test it, but you'd have to create a data-structure that specifies all the starting civics.

You could start out with defining all the civics as variables:
Code:
eDespotism = CivicTypes.CIVIC_DESPOTISM
eHereditaryRule = CivicTypes.CIVIC_HEREDITARY_RULE
eRepresentation = CivicTypes.CIVIC_REPRESENTATION
...and so on. But if you'd rather use the integer values you can find the default ones here. Then you basically have to count up from that to figure out the Expansion civics.

As for the actual data structure, you could do something like this:
Code:
tStartingCivics = (
(eHereditaryRule, None, None, None, None, None), #Egypt
(None, None, None, None, None, None), #India
...
)
The integer value 1 is of course valid instead of eHereditaryRule also. The None values are basically "skip" as defaults. The Indian entry could basically be replaced by a single None value, if you want. (Then the entire Civ is skipped.)
Code:
tStartingCivics = (
(1, None, None, None, None, None), #Egypt
None, #India
...
)
You can define this pretty much as you like - I can build the code around the data. You could go with a dictionary setup also, instead of having None entries for whole Civs:
Code:
startingCivicsDict = {
iEgypt: (eHereditaryRule, None, None, None, None, None),
...
}
Then there wouldn't even be a entry for India.

Just give a holler if and when you need code. :D (A PyScenario setup is still viable, but not as good as the civics would only be set at the end of the spawning turn.)
 
Yay! I'm proud :P But I'm worried that it'll make your game unbalanced (the earlier civ, the stronger, Chinese Americas and so on) ;)

I do 600 A.D. spawns mostly (I don't want to wait 15 minutes on normal to play as a Euro. I don't think the Civics are going to have as much a an impact on the euros/America then Rome or China (They always die to Mongolia on 600 A.D. for me.)
 
An integer value is basically a regular number. Like 1 2 3.

A floating point number is 1,0 2,0 3,0 (even if you can't use a comma for this with Python, so it would rather be 1.0 2.0 3.0).
 
Yeah, I know what is "integer number" but I wonder how to use with civics.
Code:
eDespotism = CivicTypes.0
Like that? Or how :P
Simply:
Code:
eDespotism = 0
But you don't have to define any constants at all if you don't want to.
 
Ok maybe I was wrong about the Civics having little impact on 600 A.D. spawns. I didn't take a screenshot but on an American spawn France had control of ALL of NA except NYC. It was kinda funny. (It was on marathon speed.)
 
Back
Top Bottom