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:
    33,114
    Location:
    DE/NL/FR
    Ah, thanks, knew that something was missing :).

    Sure, that will work :yup:.

    SDK, I think.

    Sadly only possible for nukes, via ProjectInfos.xml, the line:
    PHP:
    <bAllowsNukes>1</bAllowsNukes>
     
  2. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    If you want project A and project B before you can build nukes, easiest way out is set A as requirement for B.
    Then B is the one that allows nukes.
    Else use canTrain python callback.
     
  3. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    That's actually a good idea,I will introduce the "Utopian Victory".
    But I first need a code and some instruction how to make the Utopia Project trigger the Utopian Victory.
     
  4. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,114
    Location:
    DE/NL/FR
    mmhh...I'll give it later a try, if I don't forget it.
    Can probably connect that to the other victory condition (eliminating a civ) which was requested some time ago and release it as a mod component together.
     
  5. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    Thanks The_J

    Thanks, its better :)
     
  6. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    I don't understand Al thinking..
    CIV4BuildingInfos.xml:
    Spoiler :

    <BuildingInfo>
    <BuildingClass>BUILDINGCLASS_STOCKADE</BuildingClass>
    <Type>BUILDING_STOCKADE</Type>
    <SpecialBuildingType>NONE</SpecialBuildingType>
    <Description>Stockade</Description>
    <Civilopedia>TXT_KEY_BUILDING_WALLS_PEDIA</Civilopedia>
    <Strategy>TXT_KEY_BUILDING_WALLS_STRATEGY</Strategy>
    <Advisor>ADVISOR_MILITARY</Advisor>
    <ArtDefineTag>ART_DEF_BUILDING_STOCKADE</ArtDefineTag>
    .
    .
    .
    </BuildingInfo>
    <!-- NEW WALL -->
    <BuildingInfo>
    <BuildingClass>BUILDINGCLASS_PALISSADES</BuildingClass>
    <Type>BUILDING_PALISSADES</Type>
    <SpecialBuildingType>NONE</SpecialBuildingType>
    <Description>Wooden Walls</Description>
    .
    .
    <BuildingClassNeededs>
    <BuildingClassNeeded>
    <BuildingClassType>BUILDINGCLASS_STOCKADE</BuildingClassType>
    <bNeededInCity>1</bNeededInCity>
    </BuildingClassNeeded>
    </BuildingClassNeededs>
    .
    .
    </BuildingInfo>
    <!-- NEW WALL -->
    <BuildingInfo>
    <BuildingClass>BUILDINGCLASS_WALLS</BuildingClass>
    <Type>BUILDING_WALLS</Type>
    .
    .
    <BuildingClassNeededs>
    <BuildingClassNeeded>
    <BuildingClassType>BUILDINGCLASS_PALISSADES</BuildingClassType>
    <bNeededInCity>1</bNeededInCity>
    </BuildingClassNeeded>
    </BuildingClassNeededs>
    .
    .
    </BuildingInfo>
    <!-- NEW WALL -->
    <BuildingInfo>
    <BuildingClass>BUILDINGCLASS_ADVANCED_WALLS</BuildingClass>
    <Type>BUILDING_ADVANCED_WALLS</Type>
    <SpecialBuildingType>NONE</SpecialBuildingType>
    <Description>Advanced Walls</Description>
    .
    .
    <BuildingClassNeededs>
    <BuildingClassNeeded>
    <BuildingClassType>BUILDINGCLASS_WALLS</BuildingClassType>
    <bNeededInCity>1</bNeededInCity>
    </BuildingClassNeeded>
    </BuildingClassNeededs>
    .
    .
    </BuildingInfo>
    <!-- NEW WALL -->
    <BuildingInfo>
    <BuildingClass>BUILDINGCLASS_HIGH_WALLS</BuildingClass>
    <Type>BUILDING_HIGH_WALLS</Type>
    <SpecialBuildingType>NONE</SpecialBuildingType>
    <Description>TXT_KEY_CHARL_BUILDING_HIGH_WALLS</Description>
    .
    .
    <BuildingClassNeededs>
    <BuildingClassNeeded>
    <BuildingClassType>BUILDINGCLASS_ADVANCED_WALLS</BuildingClassType>
    <bNeededInCity>1</bNeededInCity>
    </BuildingClassNeeded>
    </BuildingClassNeededs>


    Why Al doesn't build any wall :undecide:. I noticed when for some buildings need more than 2 buildings Al don't build that building, Al build but much less (Maybe). Example: Library--> University (Al will build this), herbalist--> Apothecary--> Clinic (Al build but much less) WHY??? And when for some unit need some building, Al much less build that unit.

    Statistic from one test playing Creatures in war:
    Spoiler :

    Era=ERA_ANCIENT
    Speed=GAMESPEED_NORMAL
    Calendar=CALENDAR_DEFAULT
    Option=GAMEOPTION_AGGRESSIVE_AI
    Option=GAMEOPTION_COMPLETE_KILLS
    Victory=VICTORY_TIME
    Victory=VICTORY_CONQUEST
    Victory=VICTORY_DOMINATION
    Victory=VICTORY_CULTURAL
    GameTurn=212
    MaxTurns=500
    ...
    After 212 turns (Not all tech researched) :
    Number of cities: 58
    Civilizations: 10
    BUILDING_STOCKADE: 2 (Only i am build this)
    Other walls: 0
    BUILDING_SLAVE_CAGE: 38
    BUILDING_SLAVE_MARKET: 16
    BUILDING_NATIONAL_SLAVE_AUCTION: 7 (National Wonder 1 allow)
    BUILDING_BARRACKS: 47
    BUILDING_MILITARY_ENCAMPMENT: 13
    BUILDING_STABLE: 15
    BUILDING_TRAINING_YARD: 39
    BUILDING_ARCHERY_RANGE: 28
    BUILDING_SIEGE_WORKSHOP: 30
    BUILDING_DRAKE_NEST: 32
    BUILDING_GRANARY: 55
    BUILDING_HUNTING_LODGE: 18
    BUILDING_SMOKEHOUSE:46
    BUILDING_HERBALIST: 16
    BUILDING_APOTHECARY: 11 (req BUILDING_HERBALIST)
    BUILDING_CLINIC: 6 (req BUILDING_HERBALIST and BUILDING_APOTHECARY)
    BUILDING_WELL: 9
    BUILDING_AQUEDUCT: 5 (req BUILDING_WELL)
    BUILDING_LIGHTHOUSE: 26
    BUILDING_ANCIENT_SHIPS: 12
    BUILDING_SHIPYARD: 6 (req BUILDING_ANCIENT_SHIPS)
    BUILDING_HARBOR: 5
    BUILDING_FORGE: 34
    BUILDING_FORGE_INDUSTRY: 27 (req BUILDING_FORGE)
    BUILDING_OBELISK: 24
    BUILDING_CITYSQUARE: 3 (req BUILDING_OBELISK) <-- It's very low
    BUILDING_ACADEMY:5 (can be build by great people)
    BUILDING_ELDER_COUNCIL: 15
    BUILDING_LIBRARY: 27
    BUILDING_UNIVERSITY: 0 (No one researched tech for this building after 212 turns)
    BUILDING_THEATRE: 4
    BUILDING_COLOSSEUM: 2
    BUILDING_MARKET: 13
    BUILDING_GROCER: 14
    BUILDING_BANK: 2
    BUILDING_COURTHOUSE: 9
    BUILDING_JAIL: 5
    BUILDING_KI_TEMPLE: 9
    BUILDING_KI_CATHEDRAL: 5
    BUILDING_KI_MONASTERY: 7
    etc...
     
  7. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,114
    Location:
    DE/NL/FR
    Maybe just not enough time/hammers? Might be that the AI just thinks that they'll not be able to build that all, and concentrates on something else.
    -> I'd try making the buildings cheaper.
     
  8. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    Maybe, but FORGE and FORGE_INDUSTRY (req. FORGE) cost: FORGE=120 hammers, FORGE_INDUSTRY=250 hammers, and Al massive build this buildings, but Walls cost: 12, 25, 50, 75, 100 hammers and Al don't want build this.
     
  9. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,114
    Location:
    DE/NL/FR
    mmhh...maybe the buildings are just not good enough? Not enoug bonuses?
    Don't know :dunno:.
     
  10. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
  11. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,114
    Location:
    DE/NL/FR
    Seems you cannot remove unhappiness from a city. Would a ton of :) also do the job?

    The other stuff is more or less working. I just have a few problems with the extension of the victory screen for my second victory type, and would like to deal with that before releasing anything.
    Edit: OH, screen problem fixed, that was easy :D.
    Now just have to think about a clever idea about how to load the correct data for that victory :think:.


    ------------------
    No idea about above, sorry.
     
  12. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    1) Add a dummy building to each city that removes happiness
    2) setWinner (TeamType eNewWinner, VictoryType eNewVictory)
     
  13. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,114
    Location:
    DE/NL/FR
    1) messy, do not want
    2) I said it was a problem with the screen, not the victory itself ;).
     
  14. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Although... whats the point of adding all these benefits when the game already ends... :D
     
  15. Civciv5

    Civciv5 Grand Emperor

    Joined:
    Aug 14, 2011
    Messages:
    2,103
    Location:
    Nergenshuizen, Belgium
    Thank you very much for your help,The_J!
    What's the problem with the data?
     
  16. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,114
    Location:
    DE/NL/FR
    Flavour :dunno:?

    Not yours, the other victory.
    The other one is that civ X wins if civ Y is destroyed.
    Since I guess that for some scenario some people would like to add multiple cases there (X wins when Y destroyed, Z when A, B when C or D, etc), I think at the moment if there's not a more comfortable way to load the data.
    Could make it read from XML, obviously, but have not decided yet.
     
  17. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
  18. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    Where can I find where the amount of culture "Create Artwork" is set ? - FOUND

    EDIT: <iGreatWorkCulture>4000</iGreatWorkCulture>
     
  19. Brael

    Brael Chieftain

    Joined:
    Jun 21, 2008
    Messages:
    3
    I'm trying to turn off ships from being able to pillage. I've found the <bPillage> tag in the unitinfos.XML however when setting that from 1 to 0 it turns off pillage while also turning off blockade. Is there a way to only turn off pillage while leaving blockade?

    I'm guessing there's another setting somewhere since transports can normally pillage but not blockade so the two actions shouldn't be completely tied together.

    Also, after I turn off pillage and put the updated file on both computers I wish to play multiplayer on, and start the game (after clearing the XML cache) the computers don't recognize each other as having the same version of the game files. I'll get the *MOD* tag next to the name of a person even though the files should be identical. I realize the game is still playable with the mod tag next to someones name but I've found that it creates Out of Sync errors any time an action occurs that has been removed from the game on one machine but not the other. Is there a fix for this?
     
  20. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,114
    Location:
    DE/NL/FR
    ...you didn't modify the original files, did you?

    That's correct. And it depends on the file. Some are parsed better without any problems, but in some files (like the different sound XML files) it can really break stuff.
    Sadly no idea which files are all affected.
     

Share This Page