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

RFC Epic/Marathon

Discussion in 'Rhye's and Fall Modmods' started by embryodead, Feb 19, 2010.

  1. Brew

    Brew Chieftain

    Joined:
    Feb 7, 2010
    Messages:
    136
    thanks for the help all! If you can still bear with me, I have another question; I found the anarchy code but can't find the difference between the marathon 0.4 and the Dawn of Civ code. This is what I have for Dawn of Civ:

    Spoiler :
    if (pPlayer.getAnarchyTurns() != 0):
    iTempCivicsThreshold = self.getStability(iPlayer)
    if (self.getStability(iPlayer) > 24):
    #print("Stability: anarchy permanent", self.getStability(iPlayer) - self.getStability(iPlayer)/8, iPlayer)
    self.setStability(iPlayer, self.getStability(iPlayer) - self.getStability(iPlayer)/8)
    else:
    #print("Stability: anarchy permanent", 3, iPlayer)
    self.setStability(iPlayer, self.getStability(iPlayer)-3)
    self.setParameter(iPlayer, iParCivicsE, True, self.getStability(iPlayer) - iTempCivicsThreshold)
    iNewBaseStability -= (self.getStability(iPlayer)+30)/2
    self.setParameter(iPlayer, iParCivics1, True, -(self.getStability(iPlayer)+30)/2)
    #print("iNewBaseStability anarchy",iNewBaseStability, iPlayer)


    Is this the right code, and if so, the scaled down stability hit? Thanks a million!!
     
  2. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    The above is code from 0.3. Are you sure you have 0.4? The lines to copied over are marked by my comments (bolded here + red color for changes):

    Code:
                    if (pPlayer.getAnarchyTurns() != 0):
                            iTempCivicsThreshold = self.getStability(iPlayer)
                            if (self.getStability(iPlayer) > 24):
                                    #print("Stability: anarchy permanent", self.getStability(iPlayer) - self.getStability(iPlayer)/8, iPlayer)
                                    [B]self.setStability(iPlayer, self.getStability(iPlayer) - self.getStability(iPlayer)/8[COLOR="Red"]/utils.getTurns(1)[/COLOR]) # edead: penalty scaling [/B]                              
                            else:
                                    #print("Stability: anarchy permanent", 3, iPlayer)
                                    [B]self.setStability(iPlayer, self.getStability(iPlayer)-3[COLOR="Red"]/utils.getTurns(1)[/COLOR]) # edead: penalty scaling[/B]
                            self.setParameter(iPlayer, iParCivicsE, True, self.getStability(iPlayer) - iTempCivicsThreshold)
                            iNewBaseStability -= (self.getStability(iPlayer)+30)/2
                            self.setParameter(iPlayer, iParCivics1, True, -(self.getStability(iPlayer)+30)/2) 
                            #print("iNewBaseStability anarchy",iNewBaseStability, iPlayer)
    
     
  3. smile286

    smile286 Chieftain

    Joined:
    Aug 16, 2007
    Messages:
    42
    Location:
    Moscow
    embryodead, I have just downloaded mod and there is NO penalty scaling. Maybe you just forget to add these code into 0.4 release? :)
     
  4. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    No I did not forget it, but I just looked at my own readme and noticed the change is listed under 0.5 :p (it was fixed after 0.4, and after someone asked for it). Really sorry for the confusion, Brew :p But at least you've got the needed code in my previous post. And thanks smile286 :)
     
  5. Brew

    Brew Chieftain

    Joined:
    Feb 7, 2010
    Messages:
    136
    thanks a lot Edead - I should be all set now
     
  6. Hell Hawk

    Hell Hawk Emperor

    Joined:
    Apr 2, 2006
    Messages:
    143
  7. ilduce349

    ilduce349 (Financial, Philo)

    Joined:
    Jun 12, 2008
    Messages:
    5,490
    Location:
    Canada (Greatest Country Ever!!!!!)
    0.4 people tech to slowly. As china I have just 4 techs, teching at 100% on monarch when I switched to Greece. Greece was by far the most advanced civilization when I spawned. Change the tech speed to 305%. (or tell me how to do this)
     
  8. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    I explained how to change values here:
    http://forums.civfanatics.com/showpost.php?p=9304527&postcount=107

    However, it's the other way round... if you lower it to 305%, Greece and other civs will be even faster, and you might see tanks in 1600. To fix the balance you need to increase the Research Rate to 370% or more (that will be the setting in the new version).

    It's possible if you know C++/Python and are familiar with that mod.
     
  9. ilduce349

    ilduce349 (Financial, Philo)

    Joined:
    Jun 12, 2008
    Messages:
    5,490
    Location:
    Canada (Greatest Country Ever!!!!!)
    No, i was china, switched to Greece. Greece had double the amount of China when I switched. Switching was an accident but I was surprised to see the switch considering I had researched just pottery and the wheel and was 5 turns into AH. as China it took me 83 turns to do animal husbandry at 100% science on Monarch. thats why I'm complaining.
     
  10. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    Yes, and I'm saying it's the other way round... you are not researching too slow, the world is researching too fast. The setting in GameSpeed info affects the whole world, not just the human player.
     
  11. ilduce349

    ilduce349 (Financial, Philo)

    Joined:
    Jun 12, 2008
    Messages:
    5,490
    Location:
    Canada (Greatest Country Ever!!!!!)
    But the new civilizations were MORE advanced then the old.

    anyway, I am now trying to mod Rand to add marathon game speed. It works with one exception. The civilizations all start early. how do I change the start dates of the civilizations?
     
  12. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    I don't quite follow anymore, esp. considering that everyone is complaining about industrial times in 1600 AD (apart from the fact that most normally are ahead).

    Uh, they are in Consts.py (tBirth) and CvRhyes.cpp (startYear). How did you do it exactly, I mean, did you recompile the SDK etc.? The amount of work required to port it is at least a few hours.
     
  13. ilduce349

    ilduce349 (Financial, Philo)

    Joined:
    Jun 12, 2008
    Messages:
    5,490
    Location:
    Canada (Greatest Country Ever!!!!!)
    My one game the old civilizations were behind by 4ish techs. Maybe I should play more.
    Just went through your mods changes to the xml and copied and pasted. The only 2 problems I have seen (so far) is the start times, and the time victory problem. granted I only played 1 turn, so there could be other problems. But I think my 20 minutes of copy+pasting might have worked. But as this is my first time moding the game, I could be wrong.
     
  14. ilduce349

    ilduce349 (Financial, Philo)

    Joined:
    Jun 12, 2008
    Messages:
    5,490
    Location:
    Canada (Greatest Country Ever!!!!!)
    Dammit, I don't have a program that can read cpp files. What do I need to install? (this is becoming harder then I thought)

    Also, question. In those two files, is there anything other then start years? like can i replace them with yours or do I have to look for the specific changes?

    Also do I need to edit both, or can I just edit the .py one?
     
  15. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    This won't work. XML is like 0.1% of the job, and Python is maybe 50%. Then there is the DLL, it's not just about editing cpp files (which can be done with Notepad++ among others), you'd have to install Microsoft Visual C++ and other SDK components and recompile the thing - I can't even guide you because I'm completely unfamiliar with RAND, which is why this mod is for the basic version only at this point.
     
  16. ilduce349

    ilduce349 (Financial, Philo)

    Joined:
    Jun 12, 2008
    Messages:
    5,490
    Location:
    Canada (Greatest Country Ever!!!!!)
    Ok, because of that statement, I gave up (not surprising). However out of interest, I tried to edit the game speed on yours. I created a new game speed, Eternity, 3 times longer then marathon (as that was the maximum allowed not giving me an error on start up, 0.5 months isn't a game speed, so i would have to edit the script to incorporate days instead of months, and I don't have the modding skills to do that). When playing the game I encountered 1 problem, it takes 3 turns to get to legendary culture, other then that I saw know problems.

    here is the XML script (I made 1 change to the python, which was where your RFC marathon read me file told me to, so I doubt that is the problem)
    Spoiler :


    Copy and pasted, there maybe a few mistakes (line breaks) from the copy and paste but other than that this is the exact view. It looked pretty basic, multiple/divide 3 from the original number. Of course I might have to do a few changes for balance issues. Where is my mistake?


    Also thank you so much, you have been a huge help
     
  17. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    In order to add new game speed you need to:

    - add it to the XML/GameInfo/CIV4GameSpeedInfo.XML (done)

    - add it to the XML/GameInfo/CIV4CultureLevelInfo.XML

    - add it to the getTurns function in RFCUtils.py; basically this line, below the marathon one:
    Code:
    elif iGameSpeed == 3: return turns*10 # eternity
    - add it to the tGoals tables in Consts.py (you can copy Epic block - this is just list of UHVs that are displayed differently depending on game speed)

    (the modifiers for getTurns and cultureLevels are 1.5x and 3x respectively, I guess you should use 9x or 10x)

    Mind you, the game may go wrong with day/week/month calendar, e.g. if some script is supposed to trigger on a given year, it may be triggered mutliple times... but I'm not really sure tbh.
     
  18. ilduce349

    ilduce349 (Financial, Philo)

    Joined:
    Jun 12, 2008
    Messages:
    5,490
    Location:
    Canada (Greatest Country Ever!!!!!)
    I did the python and game speed, what change do I need to do to the culture?
     
  19. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    Link in the first post has been updated to 1.0 version

    - Increased research cost to 185% on Epic and 370% on Marathon
    - Permanent stability penalty from Anarchy now scales down with game speed
    - Fixed Mediolanum spawn date
    - Adjusted Judaism and Christianity founding date on Epic and Marathon to match research rate
    - Added Installer
     
  20. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    Copy and paste the tags for each level, so that along with normal/epic/marathon entries there's your new speed. As for the values, for each level just use the normal value x10.
     

Share This Page