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

Quick Modding Questions Thread

Discussion in 'Civ4 - Creation & Customization' started by kiwitt, Jan 27, 2010.

  1. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,974
    Location:
    DE/NL/FR
    mmhh....how are siege units handled there?

    mmhh...not by XML.
    Theoretically you could have an additional function run after the game start which "manually" places fish in some lakes.
     
  2. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Withdrawals do not activate onCombatResults
     
  3. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,007
    Gender:
    Male
    Location:
    Faraway
    You're right, the DLL already checks if one of the units is dead before triggering the event.
     
  4. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    I have 2 questions:

    1) How do the events occur more frequently?

    2)I have 10 religions that can be found in the game, for example.
    When i start from Ancient era and researched tehnology which allow some kind of religion, in game can be found all religions, but when i start from some later era in which all tehnology which allow religions are researched, then the game is only 7 automatically selected religions. Why? And how to change that?
     
  5. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,974
    Location:
    DE/NL/FR
    1) all events? Needs SDK.
    One special event? Increase iWeight for the event in EventTriggerInfos.xml

    No idea about 2.
     
  6. God-Emperor

    God-Emperor Deity

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    That turns out not to be the case...

    You can increase the odds of getting an event on any given turn via XML. In CIV4EraInfos.xml each era has a value called iEventChancePerTurn. If you increase
    this value for an era, you increase the odds of getting an event on any turn during that era. Double them all and you double the chance in every era.

    Default settings are: 1, 2, 4, 4, 6, 8, 10 going from the ancient era to the future era. These are the chance out of 100, a value which is itself set in an XML file: it is the EVENT_PROBABILITY_ROLL_SIDES value in GlobalDefines.xml.
     
  7. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,974
    Location:
    DE/NL/FR
    Aaaah, good to know :).
     
  8. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    Look spoiler and code with bold.
    Spoiler :
    <EraInfo>
    <Type>ERA_ANCIENT</Type>
    <Description>TXT_KEY_ERA_ANCIENT</Description>
    <Strategy>TXT_KEY_ERA_ANCIENT_STRATEGY</Strategy>
    <bNoGoodies>0</bNoGoodies>
    <bNoAnimals>0</bNoAnimals>
    <bNoBarbUnits>0</bNoBarbUnits>
    <bNoBarbCities>0</bNoBarbCities>
    <iAdvancedStartPoints>600</iAdvancedStartPoints>
    <iStartingUnitMultiplier>1</iStartingUnitMultiplier>
    <iStartingDefenseUnits>0</iStartingDefenseUnits>
    <iStartingWorkerUnits>0</iStartingWorkerUnits>
    <iStartingExploreUnits>1</iStartingExploreUnits>
    <iStartingGold>0</iStartingGold>
    <iFreePopulation>0</iFreePopulation>
    <iStartPercent>0</iStartPercent>
    <iGrowthPercent>100</iGrowthPercent>
    <iTrainPercent>100</iTrainPercent>
    <iConstructPercent>100</iConstructPercent>
    <iCreatePercent>100</iCreatePercent>
    <iResearchPercent>100</iResearchPercent>
    <iBuildPercent>100</iBuildPercent>
    <iImprovementPercent>100</iImprovementPercent>
    <iGreatPeoplePercent>100</iGreatPeoplePercent>
    <iCulturePercent>100</iCulturePercent>
    <iAnarchyPercent>50</iAnarchyPercent>
    <iEventChancePerTurn>1</iEventChancePerTurn> <!-- I can put here number from 1 to 100? -->
    <iSoundtrackSpace>0</iSoundtrackSpace>
    <bFirstSoundtrackFirst>0</bFirstSoundtrackFirst>
    <EraInfoSoundtracks>
    <EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_1</EraInfoSoundtrack>
    <EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_2</EraInfoSoundtrack>
    <EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_3</EraInfoSoundtrack>
    <EraInfoSoundtrack>AS2D_ANCIENT_SOUNDTRACK_4</EraInfoSoundtrack>
    </EraInfoSoundtracks>
    <CitySoundscapes>
    <CitySoundscape>
    <CitySizeType>CITYSIZE_SMALL</CitySizeType>
    <SoundscapeScript>ASSS_CITY_ANCIENT_SMALL_SELECT_AMB</SoundscapeScript>
    </CitySoundscape>
    <CitySoundscape>
    <CitySizeType>CITYSIZE_MEDIUM</CitySizeType>
    <SoundscapeScript>ASSS_CITY_ANCIENT_SMALL_SELECT_AMB</SoundscapeScript>
    </CitySoundscape>
    <CitySoundscape>
    <CitySizeType>CITYSIZE_LARGE</CitySizeType>
    <SoundscapeScript>ASSS_CITY_ANCIENT_LARGE_SELECT_AMB</SoundscapeScript>
    </CitySoundscape>
    </CitySoundscapes>
    <AudioUnitVictoryScript>AS2D_VICTORY_EARLY</AudioUnitVictoryScript>
    <AudioUnitDefeatScript>AS2D_LOSS_EARLY</AudioUnitDefeatScript>
    </EraInfo>


    But if i want to increse one event more than others, where can I increase it?
     
  9. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,974
    Location:
    DE/NL/FR

    ^^...
     
  10. maurcus

    maurcus Warlord

    Joined:
    May 24, 2012
    Messages:
    245
    ok i really need to know. BUG makes mods not work at least all the mods that i or someone else wrote! Help please. how do i fix it????
     
  11. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,974
    Location:
    DE/NL/FR
    You can disable the BUG mod for the other mods, if you like.
    You just need to go to the mods .ini file, and change
    PHP:
    Custom XML and Python from user folder are not loaded
    NoCustomAssets 
    0
    to 1.
     
  12. maurcus

    maurcus Warlord

    Joined:
    May 24, 2012
    Messages:
    245
    thanks it works great
     
  13. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    hey guys, when it comes to resources, are the effects cumulative, as in Iron gives +1 hammer to each city it is connected to right? does having 2 iron give you +2 hammers?

    I want to know, because I want to make manufacturable resources that allow you to redistribute food, for instance, build a Cannery, and get -3 food, but you also get tin food resource which gives +1 Food.
     
  14. The_guy

    The_guy Elephantary School.

    Joined:
    Nov 23, 2010
    Messages:
    64
    Location:
    Holland.
    I just tested that out, and the +1:hammers: applies only to the tile it's in.
     
  15. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,007
    Gender:
    Male
    Location:
    Faraway
    You might want to combine that with a corporation to get certain yields per controlled resource (it's the easiest way to achieve what you're going for).
     
  16. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    are you sure? because you get the tile bonus which is like +3 or some such, then when you look at it in the diplomacy screen it says it gives a plus one bonus, like cow gives +1 health?

    What I want to make is like a way to redstribute food, so you have 1 city that makes a lot of food, you then make a building that reduces the food there and spreads it out everywhere via a resource bonus.

    As to the corporations, I want to make it universal, rather than having to control the corp.
     
  17. The_guy

    The_guy Elephantary School.

    Joined:
    Nov 23, 2010
    Messages:
    64
    Location:
    Holland.
    Well, the tile bonus of +3 is for the mined tile, and the +1 is for the unworked version.
    Will put up some screenshots to proof this. As for your idea, maybe a dummy building?

    Spoiler :


    As you can see, the mine has 2:food:, 3:hammers:, whilst the unmined one has 2:food:, 1:hammers:. There is no production bonus anywhere, 1:hammers: from the city tile itself, and 1:hammers: from the Citizen.
     
  18. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    ok back to the drawing board on how to make it work then...

    hmmm i wonder if i could have a building that reacts to the resource, like a corporation does...so that you make one building to create the resource and then another that creates +food out of that resource like a corp... hmm more investigations... thanks for the info guys
     
  19. dacubz145

    dacubz145 Deity

    Joined:
    Jun 21, 2010
    Messages:
    3,730
    Location:
    Windy City
    How much do the number of civs effect the gameplay speed? Meaning will there be a huge difference if there is 50 civs versus 20 civs? Assuming that between ass the civs, the number of units, cities etc. Is all the same. Because it seems to have a huge effect, but when I think about it it shouldn't since the only real difference would be diplomacy
     
  20. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,974
    Location:
    DE/NL/FR
    Do you mean the difference between e.g. 10 civs with 10 cities each, or 20 civs with 5 cities each?
    That would surprisingly make really a difference. I noticed that once in a FfH2 game. In the late game, I normally had turn times of 5 minutes. And I played in most cases peacefully, so that most civs were still there.
    In a more war like game, at the roughly same point half of the civs were eliminated. And I swear, the turn times were also nearly only the half.

    Don't have really objective reliable data though :mischief:.
     

Share This Page