Modder's Guide to A New Dawn

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.
 
upload_2018-11-5_10-25-51.png


Line 274 is this:
upload_2018-11-5_10-27-30.png
 
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.
 
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.
 
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.
 
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?
 
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!
 
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?

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'))
 
In CIV4EventTriggerInfo.xml, I've added:

  • EventArt
    • The path to the 256x256 dds which the image is in
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?
 
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?

I looked and I could not find where this is set. You could try a larger or smaller image and see what happens.
 
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?
You could also ask Toffer90 at C2C or thru a PM about this. He has a pretty good handle on these graphical type questions.
 
You could also ask Toffer90 at C2C or thru a PM about this. He has a pretty good handle on these graphical type questions.
Thx! Maybe I'll try that.

I looked and I could not find where this is set. You could try a larger or smaller image and see what happens.
I tried a 720x322 size and it seemed like inserting the middle of it (around 322x322) and simply cutting the edges.
 
Is there a way to allow city founding on water tiles on certain terrain features? Was there some modcomp like that merged?

You can allow founding cities on water tiles by setting <bFound> for TERRAIN_COAST and/or TERRAIN_OCEAN to 1. Then you can either move a Settler out to the tile on a transport ship or give a water unit the ability to found cities by setting its <bFound> to 1.

Caveat: If you do this, no city graphics will appear for the city, only route graphics. Land units can be built in the city and are visible. They can't leave without a Tunnel.

I don't see a way for the XML to limit city founding to a particular feature type. Features generally have <bNoCity> to block settling on that particular tile (see Oasis and Swamp). Terrains have <bFound>, <bFoundCoast> to limit to coastal tiles, and <bFoundFreshWater> to limit to tiles with fresh water (these two currently are always set together, but I don't see a reason why they have to be). Bonuses don't have any ability to modify city-founding, either to allow or disallow. Nor do techs; Algebra specifically has a <bCanFoundonPeaks> XML tag. Any Settler-type unit loaded on a transport could found a city on a water tile if the ability to found a city on that terrain type was turned on.

I think it would be a really cool idea to implement this, but it would need DLL modification to work properly. You'd have to limit it to the Transhuman Era, and I have no idea how AI logic might work with it.
 
I think it would be a really cool idea to implement this, but it would need DLL modification to work properly. You'd have to limit it to the Transhuman Era, and I have no idea how AI logic might work with it.
We could add mid-ocean ridge as a new terrain feature appearing only on ocean tiles. If terrain features had a new tag allowing them to found cities with X tech than the AI could not fill every ocean tile.
Mid-ocean ridges could be placed in small clusters with extra resources on them. This way we had a new transhuman era new World to explore and expand :)
 
Back
Top Bottom