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

Modder's Guide to A New Dawn

Discussion in 'Rise of Mankind: A New Dawn' started by Afforess, Dec 2, 2009.

  1. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,155
    Location:
    In a constant brainstorm...
    Okay, here's what I found for the bug above:

    The code I received from Vokarya is no longer working but breaks Revolution entirely (CTRL-SHIFT-X doesn't work, Rev index doesn't even appear in city screen).
    If I comment out th3 first lines
    Code:
    #      if( pPlayer.getCapitalCity().isNone()):
    #        city.setRevolutionIndex( int(.35*RevOpt.getInstigateRevolutionThreshold()) )
    #      else :
            if( not city.area().getID() == pPlayer.getCapitalCity().area().getID() ) :
                city.setRevolutionIndex( int(.35*RevOpt.getInstigateRevolutionThreshold()) )
            else :
                city.setRevolutionIndex( int(.25*RevOpt.getInstigateRevolutionThreshold()) )
            city.setRevIndexAverage(city.getRevolutionIndex())
    than the game works fine... until settling the first cities :(

    I also tried this code:
    Code:
            capital = pPlayer.getCapitalCity()
            if( capital == None or capital.isNone() ) :
             city.setRevolutionIndex( int(.35*RevOpt.getInstigateRevolutionThreshold()) )
                  else :
            if( not city.area().getID() == pPlayer.getCapitalCity().area().getID() ) :
                city.setRevolutionIndex( int(.35*RevOpt.getInstigateRevolutionThreshold()) )
            else :
                city.setRevolutionIndex( int(.25*RevOpt.getInstigateRevolutionThreshold()) )
            city.setRevIndexAverage(city.getRevolutionIndex())
    But that didn't work either :undecide:

    Any ideas? Hints?

    I'm testing with the regular 50civs dll if that matters.
     
  2. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,155
    Location:
    In a constant brainstorm...
    upload_2018-11-5_10-25-51.png

    Line 274 is this:
    upload_2018-11-5_10-27-30.png
     
  3. Vokarya

    Vokarya Chieftain

    Joined:
    Mar 25, 2011
    Messages:
    6,059
    One thing you could try is changing the rootDir in CvAltRoot.py so that it points at your modmod folder. That might be worth a try.
     
  4. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,155
    Location:
    In a constant brainstorm...
    I think I tried that already but didn't work (but maybe I'l check again later),

    I finally solved it by out taging the first lines:
    Code:
    #      if( pPlayer.getCapitalCity().isNone()):
    #        city.setRevolutionIndex( int(.35*RevOpt.getInstigateRevolutionThreshold()) )
    #      else :
    #        if( not city.area().getID() == pPlayer.getCapitalCity().area().getID() ) :
    #            city.setRevolutionIndex( int(.35*RevOpt.getInstigateRevolutionThreshold()) )
    #        else :
                city.setRevolutionIndex( int(.25*RevOpt.getInstigateRevolutionThreshold()) )
            city.setRevIndexAverage(city.getRevolutionIndex())
    
    Altough I am not entirely sure what I did but as far as I understand it will do the same thing regardless of the circumstances of city founding. Just don't know what it effects.
     
  5. Vokarya

    Vokarya Chieftain

    Joined:
    Mar 25, 2011
    Messages:
    6,059
    The commented-out lines set the starting revolution index of a new city to a different number if the player doesn't have a capital or the capital is on another continent. That's all it does. Since you're trying to work without a capital, that's why commenting out those lines works.
     
  6. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,155
    Location:
    In a constant brainstorm...
    So it sets a number only once per city, right? I'm okay with this solution than.
    Thank you.
     
  7. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,155
    Location:
    In a constant brainstorm...
    Question about maintenance modifiers in CIV4CivicInfos:
    We have:
    <iDistanceMaintenanceModifier>, <iNumCitiesMaintenanceModifier>, <iHomeAreaMaintenanceModifier> and <iOtherAreaMaintenanceModifier>.

    In case of all cities being on the same continent:

    Is iHomeAreaMaintenanceModifier = ( iDistanceMaintenanceModifier + iNumCitiesMaintenanceModifier ) ?

    So is a <iHomeAreaMaintenanceModifier>-50</iHomeAreaMaintenanceModifier> same as

    <iDistanceMaintenanceModifier>-50</iDistanceMaintenanceModifier> combined with
    <iNumCitiesMaintenanceModifier>-50</iNumCitiesMaintenanceModifier> ?

    I have found this modcomp: Maintenance Modifiers Mod
    I guess that's what we are using and the rules described there are correct, right?
     
  8. Thandor

    Thandor Chieftain

    Joined:
    Mar 1, 2019
    Messages:
    19
    Gender:
    Male
    Hi guys, I would like to add limited combat rounds from Vincentz's mod to my games with AND, but I'm unable to find the source files, so I could mod and compile the cvgamecore.dll file..

    Is there any way I could download them?

    Thanks!
     
  9. Vokarya

    Vokarya Chieftain

    Joined:
    Mar 25, 2011
    Messages:
    6,059
  10. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,155
    Location:
    In a constant brainstorm...
    No Random Events option:
    IIRC I read that it is possible to make an event always launch, even when No Random Events are ON.
    Is that true? How can it be done?
     
  11. Vokarya

    Vokarya Chieftain

    Joined:
    Mar 25, 2011
    Messages:
    6,059
    It can be done with Python. You need to set up a script that mimics the trigger condition of the event and then tells the event to go off anyway.

    This is how the Penicillin event (free Medic 1 promotion for certain units) can fire in a No Events game.
    Code:
    def onProjectBuilt( argsList):
    # Penicillin fix for No Events option
        pCity, iProjectType = argsList
        game = gc.getGame()
        if iProjectType == gc.getInfoTypeForString( 'PROJECT_PENICILLIN' ) and gc.getGame().isOption(GameOptionTypes.GAMEOPTION_NO_EVENTS):
            iPlayer = pCity.getOwner()
            pPlayer = gc.getPlayer(iPlayer)
            pPlayer.trigger(gc.getInfoTypeForString('EVENTTRIGGER_PENICILLIN2'))
     
  12. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,155
    Location:
    In a constant brainstorm...
    Where is the image size defined? In the dll or in some python file? Just in case I'd like to use bigger pictures, like 800x600. Is that possible?
     
  13. Vokarya

    Vokarya Chieftain

    Joined:
    Mar 25, 2011
    Messages:
    6,059
    I looked and I could not find where this is set. You could try a larger or smaller image and see what happens.
     
  14. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,155
    Location:
    In a constant brainstorm...
    Okay, good idea. Thanks for checking :goodjob:
     
  15. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    15,004
    Gender:
    Male
    Location:
    Western IL. cornfields
    You could also ask Toffer90 at C2C or thru a PM about this. He has a pretty good handle on these graphical type questions.
     
  16. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,155
    Location:
    In a constant brainstorm...
    Thx! Maybe I'll try that.

    I tried a 720x322 size and it seemed like inserting the middle of it (around 322x322) and simply cutting the edges.
     

Share This Page