1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Visible stability mod?

Discussion in 'Rhye's and Fall Modmods' started by Chiyochan, Mar 23, 2010.

  1. Lone Wolf

    Lone Wolf Chieftain

    Joined:
    Dec 4, 2006
    Messages:
    9,864
    Well, my ideal screen would be something like (example doesn't reflect the mechanics):
    The potential length is the only drawback here.

    Also, BTW, do Specialists figure in the economy calculations? If no, then it's another unintuitive stability parameter.
     
  2. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Ok, I'm liking what I see. :goodjob:

    Yeah, but the breakdown could only be visible on mouse-over, like for income and expenses. One option could also be to break it down by category, so that mousing-over the Foreign field will give you the parameters involved in that category. Where to put the miscellaneous stuff then? Maybe the main stability field?

    I think something like this would have to involve more than simply displaying stored values, since only the value shown now are actually stored between turns. So the stability code would have to be supplemented with something like a string that is generated on each turn that stores this information for viewing.

    Since it could be hard to summarize comprehensive values on each occasion, the last entry could be something like "other" just to make the equation seem to make sense.

    So if the Cities category was shown as +/-0 and there would be one specified modifier at +5 and additional two at -2 each present, the breakdown could look something like this:
    Or something. At least it would make some sense.
     
  3. onedreamer

    onedreamer Dragon

    Joined:
    Oct 21, 2004
    Messages:
    6,580
    Location:
    Torino - Italia
    You should do things historically and realistically. When you don't, your civ collapses. If you do want to do things like conquer the whole Asia as Egypt, you shouldn't expect to see all numbers that allow you to do so.
     
  4. Schnoucki

    Schnoucki Chieftain

    Joined:
    May 6, 2010
    Messages:
    14
    Location:
    Bordeaux, Fr
    Hello there!
    (sorry if I'm at the wrong place but I'm googleing and searching for an hour now)
    I've played long hours of RFC and enjoy every bits of it, now I'm having fun on RFC Europ (alpha 12 version), and I'd like to test it to help. But questions arise:
    RFC europ has even a more cryptic display of this stability than RFC. Under "F2", the stability advisor shows not 1 but 3 numbers (!) under each sub category (city, governement etc..). And i'm out of guess on what they mean. if someone would give me a hint? (sorry for my english, I'm not a native as you may have guess)

    EDIT: image
    Spoiler :
     
  5. Schnoucki

    Schnoucki Chieftain

    Joined:
    May 6, 2010
    Messages:
    14
    Location:
    Bordeaux, Fr
    Ok...
    (three days later, the time to read a LOT of posts :) ...)
    Seems there is a stability.txt within
    C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\RFCEurope\Assets\Python
    and code in stability.py (that I'm not able to decrypt)
    Spoiler :
    def printStability(self, iPlayer, tBaseStability1, tBaseStability3, tPermStability ):
    print( " 3Miro: STABILITY FOR PLAYER: ",iPlayer )
    print( " iParCities3: ",tBaseStability3[0])
    print( " iParCitiesE: ",tPermStability[0] )
    print( " iParCivics3: ",tBaseStability3[1])
    print( " iParCivicsE: ",tPermStability[1] )
    print( " iParCivics1: ",tBaseStability1[0])
    print( " iParDiplomacy3: ",tBaseStability3[2])
    print( " iParDiplomacyE: ",tPermStability[2] )
    print( " iParEconomy3: ",tBaseStability3[3])
    print( " iParEconomyE: ",tPermStability[3] )
    print( " iParEconomy1: ",tBaseStability1[1])
    print( " iParExpansion3: ",tBaseStability3[4])
    print( " iParExpansionE: ",tPermStability[4] )
    print( " iParExpansion1: ",tBaseStability1[2])
    print( " Stability: ",self.getStability( iPlayer ) )


    I'll be happy if someone remenbers why "base" and "perm", but so far I think I can get information during the play (first victory as burungdy tonight) in the advisor screen.
     
  6. Leoreth

    Leoreth 古典部の会員 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,584
    Gender:
    Male
    Location:
    Kamiyama
    Some factors affect stability only while they are present ("base stability"), like civic combinations and the like. Others have a permanent influence on your stability, e.g. each city razed and each turn of anarchy will lower your stability for the rest of the game.
     
  7. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    What the print command does in CivIV is write stuff into the debug log. So this code doesn't actually show you anything in-game.
     
  8. Schnoucki

    Schnoucki Chieftain

    Joined:
    May 6, 2010
    Messages:
    14
    Location:
    Bordeaux, Fr
    Then, I'm out of my competence to see how it's displayed, but the number of variables in the print is reflecting the number under each part (city, civic, ...). Let's hope someone who did code it will confirm that it follows the pattern 3,E,1...

    Here for city it's 13 | -12
    Spoiler :

    in the code is it
    ( " iParCities3: ",tBaseStability3[0]) 13
    ( " iParCitiesE: ",tPermStability[0] ) -12 ?
     
  9. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    What you need is the .py file that creates the Interior Advisor (or whatever). Sadly I don't have the RFC:E files on me, but look in a sub-folder like "screens".
     
  10. sedna17

    sedna17 Chieftain

    Joined:
    Mar 12, 2008
    Messages:
    1,091
    I know we need to document this part a lot better. The code is pretty much a mess too. We have some notes actually in Assets/Python/StabilityGuide.txt, which I think only the developers have ever read :)

    Broadly speaking it is always displayed across as (permanent/current/temporary) = (E/3/1). Some categories have no temporary.

    Civics is the most straightforward category to use as an example:

    Permanent stability is just stuff that accumulates throughout the game (-3 for each turn in anarchy). Current is a calculation done every 3 turns (for speed) that captures the current state of your empire (+/- some number based on how well your current civics mesh together). Temporary is just very short term adjustments (-20 around a revolution).
     
  11. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    What about "normalization" (if that is in effect in RFC:E)?

    I think this is a factor causing confusing for players, so normalization should be displayed somehow. And this goes for regular RFC also.

    Does anyone have any ideas as how this could be displayed in practice? :confused:

    Obviously the stability value before normalization would have to be stored first (in a variable or field) and then compared to the new value - after normalization. The difference would then be stored somewhere (either as a new dictionary entry in scriptDict or as list field in the Stability instance itself) and displayed in the Interior Advisor.

    The question is how. As a new entry, like "Normalization: -1" or as a modification to the stability value itself, like "Stability 12 (-1)"? Maybe add another arrow somewhere for normalization, indicating if there are too many or too few Civs in play? (This could be considered a stability entry for the game session itself. Like, whether the game is stable or unstable.)
     
  12. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    IIRC RFCE doesn't have normalization but it throws all the vague stuff into expansion category, so I did the same and added normalization in there as well - at least everything adds up.
     
  13. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    You mean in the RFC Marathon modmod? :confused:

    What does you code look like, because I'd like to add this to my own copy of regular RFC also?
     
  14. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    To add it to the expansion parameter just call the setParameter function whenever setStability is called. Rhye put it in most places, but a few things like normalization and difficulty levels are orphaned so they don't show up anywhere. So, in the normalization code you do this (1 being whatever value is there, there's a lot of places to update):

    self.setStability(iPlayer, iStability + 1)
    self.setParameter(iPlayer, iParExpansionE, True, 1)

    Technically if you wanted to add a new parameter just for normalization, you'd have to define it in consts.py, add it to storeddata.py and do the above, just with the new parameter.

    That's from the Middle Eastern thing; for RFC Marathon the idea is to not change anything besides game length.

    All that being said I'm not sure if it's the right idea to provide detailed numbers for everything - part of the fun is to experience it first-hand and learn to play historically, but the numbers are surely useful if you're modmodding...
     
  15. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Oh yeah, the Middle-Eastern thingy... Forgot about that one. :p

    Thanks for the explanation but I actually know how the values are stored and could probably add a now category also, but I was more interested in how you managed to include normalization to the expansion category. Your actual code, that is. Why reinvent the wheel?

    I'm with you on this in theory, but as this (and other) threads demonstrate, the values and figures in the Interior Advisor need to add up. Otherwise the whole thing is just confusing and players will think they've found a bug. Or worse - that they consider the whole mod broken... :rolleyes:

    So while not everything need to be revealed, it could be argued that the numbers still need to add up. I have to admit that otherwise stability as a concept does give the impression of being defunct.
     
  16. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    Well, I hope I answered - the actual code is just setParameter added after every setStability - that's it. I didn't post the whole code since wouldn't work with RFC anyway.
     
  17. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Ok, thanks anyway! :king:

    I'm thinking that all the hidden stability stuff could be added up in a category of their own, and the difference shown in parenthesis after the stability value. Like:
    Code:
    Stability: 13 (+2)
    This would hint that the value would only have been 11, if not for normalization and "other stuff".

    How to calculate this value, then? Perhaps one could just add up the categories and display the rest in parenthesis as "other"?
     

Share This Page