RFC Europe: Dynamic civ names

The current model for Dynamic names is somewhat odd. I will have to change some of it so that we will fit it well with the "C++ implemented Python Controlled" scheme. Right now, dynamic names are all in C++.

That's a good idea if it's not hard. There's a bunch of stuff hard-coded in that section of the C++.

If you take a look at the SVN, you'll see I edited the C++ in the renaming code a bit and compiled a new dll, just to test out the XML as I was entering the dynamic names and make sure everything was working. But I support moving that decision tree into Python.
 
That's a good idea if it's not hard. There's a bunch of stuff hard-coded in that section of the C++.

If you take a look at the SVN, you'll see I edited the C++ in the renaming code a bit and compiled a new dll, just to test out the XML as I was entering the dynamic names and make sure everything was working. But I support moving that decision tree into Python.

There is the process name function that gets called from different events (switch religion/government/year...) My idea was to create a link-list of conditions for every nation and it would be loaded from Python. Then the name module would process the link list of the form: France + Monarchy + Christianity + before year X: Frank Empire. France + Republic: French republic. I believe it is the most flexible setting without creating the huge arrays of names for every civ under all possible circumstances.
 
Dynamic names would be great. As would 2nd. LH's and respawnings. As micbic has outlined in his very comprehensive list. Any chance of at least starting to implement them, please.:)
 
There is the process name function that gets called from different events (switch religion/government/year...) My idea was to create a link-list of conditions for every nation and it would be loaded from Python. Then the name module would process the link list of the form: France + Monarchy + Christianity + before year X: Frank Empire. France + Republic: French republic. I believe it is the most flexible setting without creating the huge arrays of names for every civ under all possible circumstances.

The most flexible code would allow a combination of two processes. The first is a generic process for renaming civs (which may be what you are describing above). This could involve sticking together some strings so that you get generic names e.g. 'French' + 'Republic' and 'German' + 'Republic' for republics and 'Exarchate of' + 'Vienna' and 'Exarchate of'+'Spain' for vassals of Byzantium.

The complication to this is that we should allow special cases as well. So if a civ doesn't have an XML entry for <CIV_Republic_Name> then we use the generic name above, but if it does, we use the special name. This way, for instance, England with a Republic can be called the "Commonwealth of England" instead of the 'English Republic'.
 
I was thinking something along the lines of:

struct rule{
int iReqCivic, iReqRel, iReqTurn;
string name;
rule *next;
};

Then in the renaming module:

if ( hasCivic( p -> iReqCivic ) && gameTurn > p -> iReqTurn .... ){
setName( p -> name );
};

Add the details. The rule list would be set via Python.
 
I was thinking something along the lines of:

struct rule{
int iReqCivic, iReqRel, iReqTurn;
string name;
rule *next;
};

Then in the renaming module:

if ( hasCivic( p -> iReqCivic ) && gameTurn > p -> iReqTurn .... ){
setName( p -> name );
};

Add the details. The rule list would be set via Python.

I'm afraid I don't quite understand this code, but the idea of applying Python-written rules is good, so I approve. "Currently" (i.e. RFC and Panopticon's list) the renaming is done on Civic, Turn (or age), Religion, Vassal status, and number of cities, so these would be the useful variables to have in a rule struct.
 
Top Bottom