Bug: Dynamic names getting stuck on "Provisional Authority"

Jwitti

Judas Maccabeus
Joined
Sep 11, 2011
Messages
1,895
Location
Judah
So I'm playing V34 and I couldn't help but notice that not only has my Civ Description seem to have gotten stuck on "German Provisional Authority" but everyone else is also in some variation thereof.
Spoiler :

When I first noticed

Spoiler :

quite a bit later, matches the save

The second is during anarchy, I know, but the first is nowhere near it. View attachment Deustch.CivBeyondSwordSave
(Sorry for the small pics, I just now found out imageshack is no longer letting me use full-sized images for free)
 
This is a known problem. The code to change the names was being modified to match our civics but the task was never finished.
 
This is a known problem. The code to change the names was being modified to match our civics but the task was never finished.

What source file is that in? I'd like to take a look.
 
Can someone please clarify which of these areas I need to look in. There is at least a finitesimal chance I could find the problem, but not if I'm looking in the wrong place!:lol:
 
Can someone please clarify which of these areas I need to look in. There is at least a finitesimal chance I could find the problem, but not if I'm looking in the wrong place!:lol:
In the file that DH mentioned.

I started making a naming replacement in DLL and XML but never finished it (so it is not active, buggy and not fully functional) and I don't think anyone else made a DLL replacement for that Python.
 
Ok so after yet another half-hour attempt to learn Python (my most successful so far:lol:), I had another look at this.

There is only one place where "provisional" gets put in your civ name, and you have to be in anarchy.

Therefore the problem seems to be that, when you come out of anarchy, you don't get any new name allocated.

Has this code been rewritten much for C2C's civics? Because it seems likely that it is not finding any familiar civic by which to give the civ a new name, so it's leaving the civ with the last name allocated ie. the 'provisional' one.

How does that sound? Where from here? Feedback (and optionally help) please:).
 
The problem is as you say there is no match with the C2C civics. Part of the problem is what civics should be affecting the name of your nation? If I knew that then I should be able to do something about it.
 
Could you possibly just get it working as well as before? That is to say, fix the references to civics that no longer exist etc. (rather than adding any enhancements or extra subtleties & nuances).

First two things I've noticed:
1. It references a Government civic of 'Federal', and doesn't seem to know about Rule civics at all.
2. Correct me if I'm wrong here but it calls RevUtils.iscandoelections, whereas that function is in RevCivUtils...
 
Personally, I addressed that issue by removing "Provisional" from the DCN localization, so the issue was still there, but it wasn't spamming the scoreboard as much.
 
Sorry if I ask silly questions. For my part, I think there are some obvious and easy things wrong here, so I do think I might be able to shed some light on them. If I'm mistaken, and you(DH)'ve already spent hours looking at how to fix this, do let me know.

I've been looking at the RevUtils, and they've pointed me towards the XML tags relating to Rev.

bFreeSpeech: All civics currently have this set to 0 (false presumably). It's probably true that no one civic guarantees freedom of speech, but given what we've got to work with, I suggest Democracy (Gov't) and Separation of Powers (Power) - at the very least - should have this set to true (what about Magistrates?).

bNoRealElections: DynamicCivNames is expecting civs to be able to have both 'CanDoElections' and 'NoRealElections'. I suggest that NoRealElections should include all Power civics except Legislature and Separation of Powers.

bCommunism: currently is only on the KEYNESIAN economic civic. What's with that?:lol: I suggest instead of querying this value, DynamicNames should say if Labour Freedom > 0 and Democracy Level < 0, that civ is communist. Of course this is a huge oversimplification at best (and just plain wrong at worst) but I think it probably works and that's the main thing:goodjob:.

LabourFreedom: values are currently all over the place. I suggest the following changes:
Socialism: +3 (is -1)
Centralized: -1 (is +2)
Serfdom: -3 (is +2)
Nationalist: +1 (down from +8)
Liberal: +2 (currently +10)
Proletariat: +2 (is -5:eek:)
Bourgeois: -2 (currently +3)
Organized Labour: +2 (currently 0)
 
Sorry if I ask silly questions. For my part, I think there are some obvious and easy things wrong here, so I do think I might be able to shed some light on them. If I'm mistaken, and you(DH)'ve already spent hours looking at how to fix this, do let me know.

I've been looking at the RevUtils, and they've pointed me towards the XML tags relating to Rev.

bFreeSpeech: All civics currently have this set to 0 (false presumably). It's probably true that no one civic guarantees freedom of speech, but given what we've got to work with, I suggest Democracy (Gov't) and Separation of Powers (Power) - at the very least - should have this set to true (what about Magistrates?).

bNoRealElections: DynamicCivNames is expecting civs to be able to have both 'CanDoElections' and 'NoRealElections'. I suggest that NoRealElections should include all Power civics except Legislature and Separation of Powers.

bCommunism: currently is only on the KEYNESIAN economic civic. What's with that?:lol: I suggest instead of querying this value, DynamicNames should say if Labour Freedom > 0 and Democracy Level < 0, that civ is communist. Of course this is a huge oversimplification at best (and just plain wrong at worst) but I think it probably works and that's the main thing:goodjob:.

LabourFreedom: values are currently all over the place. I suggest the following changes:
Socialism: +3 (is -1)
Centralized: -1 (is +2)
Serfdom: -3 (is +2)
Nationalist: +1 (down from +8)
Liberal: +2 (currently +10)
Proletariat: +2 (is -5:eek:)
Bourgeois: -2 (currently +3)
Organized Labour: +2 (currently 0)

Without looking TOO deeply, I think you're really onto something the rest of us don't know anything about. So I'd patently accept your proposal. For what it's worth ;)

Are you also proposing to make these changes? I don't think anyone's taking much direct responsibility for civics lately. I'm not about to try to dive into this mess with all the other's I'm trying to sort out... lol.
 
Without looking TOO deeply, I think you're really onto something the rest of us don't know anything about. So I'd patently accept your proposal. For what it's worth ;)

Are you also proposing to make these changes? I don't think anyone's taking much direct responsibility for civics lately. I'm not about to try to dive into this mess with all the other's I'm trying to sort out... lol.

Um yes I could do the XML changes. There's a bit of Python in there as well so I'm hoping to hear from DH...:)
 
Um yes I could do the XML changes. There's a bit of Python in there as well so I'm hoping to hear from DH...:)

Cool... I figured... just wanted to be sure that's what you were saying.
 
To be honest I have only looked at the "if test" logic for the naming. I have not gone deep enough to figure out where the values come from or what they are supposed to mean.

bCommunism: currently is only on the KEYNESIAN economic civic. What's with that?:lol:

I think that the civic was originally named COMMUNISM but had changed so much that the name was changed to reflect what the civic was.
 
To be honest I have only looked at the "if test" logic for the naming. I have not gone deep enough to figure out where the values come from or what they are supposed to mean.

There's just the one Python change I was hoping you would do: the one changing the test for communism. It would not need much testing - I would just run it across one end-turn and make sure it doesn't crash the game... (As long as it doesn't, it can't be any worse than what we've got now.)

There's one other Python thing (the Power civics included in NoRealElections) but I'm not really sure about it, and maybe it's less important.

The rest is XML, so I'll do that.

If you don't want to do the Python, do you mind if I do it? I would really like to get this particular thing running better, and I feel we're so close!:D
 
If you want to do the python go ahead. The only changes I have made are in the file I posted above. It has not been put on the SVN.
 
Well I put my oar in and eventually my "Provisionals" are starting to go away. I made quite a few wild and wacky changes:crazyeye:, but this is the one that I'm claiming credit for (my code in red, the other bit included for context/position):
Code:
    #Anarchy Naming
    if (pPlayer.isAnarchy and pPlayer.getAnarchyTurns() > 1):
      if( 75 > game.getSorenRandNum(100,'Rev: Naming') ) :
        newName = localText.getText("TXT_KEY_MOD_DCN_PROVISIONAL_GOV", ())%(curAdj)
      else:
        newName = localText.getText("TXT_KEY_MOD_DCN_PROVISIONAL_AUTH", ())%(curAdj)
      return [newName, curShort, curAdj]
    
    [B][COLOR="Red"]if (((not pPlayer.isAnarchy) or (pPlayer.getAnarchyTurns() < 2)) and ("Provisional" in curDesc)):
      if (gc.getInfoTypeForString("CIVIC_HEREDITARY_RULE") == eGovCivic):
        newName = curAdj + ' ' + localText.getText("TXT_KEY_MOD_DCN_KINGDOM", ())
      elif (gc.getInfoTypeForString("CIVIC_REPUBLIC") == eGovCivic):
        newName = localText.getText("TXT_KEY_MOD_DCN_REPUBLIC", ())%(curAdj)
      else :
        newName = curAdj + ' Nation'
      return [newName, curShort, curAdj][/COLOR][/B]

There may be a problem if civs coming out of anarchy do not do what the code calls a "Force[d]Update". Without such an update, they sometimes keep their civ name unchanged.

I realize that my code provides for civs coming out of anarchy to go into one of only three new names. I was hoping that once they weren't provisional any more, the code would pick up the slack and start thinking seriously about what to change them to.

Until my next laughable attempt to learn Python, I'm gonna just cling to this hope.:scan:
 
Top Bottom