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. Imp. Knoedel

    Imp. Knoedel Simperator Knoedel

    Joined:
    Nov 11, 2011
    Messages:
    8,792
    Location:
    The cooler Germany
    Yeah I thought so, and I already set up a new XML-Tag for Buildings, but I am a bit lost when it comes to the details as to what I have to do for it to actually work. As in, I am stuck on Step 3 of Kael´s tutorial here. I have a working XML-tag that doesn´t do anything yet. I suppose I could copy most of the code from the tag for civics, but when I take a look at CvCity.cpp I got no clue where I´d put it.
     
  2. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    Is it possible to preset trade deals in worldbuilder via text editting? If no-one knows I'll try to do some investigation into it.

    EDIT: I may have asked this before.
     
  3. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    What would happen if I placed temples, cathedrals and monastries into cities via world-builder and did not make their religions present in the actual city. Would they eventually become present in the city over time.

    I am thinking a better world representation would be to have the religious buildings in the cities, but base the actual 'presence' in them in accordance with the nation demographics. e.g. if a nation is 95% Christian all the cities in that nation would be 'Christian' only. If a nation has say 10-20% or more of another religion than I would include that religion as well.
     
  4. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    It would appear that the tag <ReligionChanges/> would be used to determine the affects of the buildings. I note in the base mod I am developing my scenario this has not being set. What is the code example I would have to have to use it. The Modwiki is not much help in this regard.

    EDIT: found it

    Code:
    			<ReligionChanges>
    				<ReligionChange>
    					<ReligionType>RELIGION_JUDAISM</ReligionType>
    					<iReligionChange>1</iReligionChange>
    				</ReligionChange>
    			</ReligionChanges>
     
  5. ChaosSlayer

    ChaosSlayer King

    Joined:
    Feb 3, 2011
    Messages:
    608
    Hello everyone!
    Here is my question.
    I found nice graphics for Water-well improvement, and have this idea where workers could build it in middle of area that doesn't have any water access to use it as water source to build farms etc.

    The only question is how to set up the improvement in such way that it becomes water source? If its possible at all with xml?

    thanks!
     
  6. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,876
    Location:
    DE/NL/FR
  7. ChaosSlayer

    ChaosSlayer King

    Joined:
    Feb 3, 2011
    Messages:
    608
    Thanks the_J! I will look at it.

    In the main time here is another question.

    I always liked how Privateers could rampage enemy waters without declaring war so i wanted to make a land unit like that.

    I made sort of a land pirate unit that I called Buccaneer, and gave it properties:

    <bHiddenNationality>1</bHiddenNationality>
    <bAlwaysHostile>1</bAlwaysHostile>

    The unit generally works great, however has an issue that, unless I am actually at war with civ in question, they will not attack their cities. Instead they will move right in and can sit there peacefully as if I would have open border policy with them. Which doesn't seem very realistic at all :)

    I tried setting them to :

    <bNoCapture>1</bNoCapture> - that normally prevents them capturing cities, but it still allows them to freely enter them.

    Any suggestions how to work around this?

    thanks!
     
  8. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    That is weird.. I thought hidden nationality and always hostile made them work like barbarians....How strange...

    I have a Q about buildings, can buildings be set to stop 2 building being built in the same city.

    Like you can build a food market OR a luxury market but not both, one stops the other.

    Is this a BTS thing or was it added by mods..
     
  9. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,876
    Location:
    DE/NL/FR
    It doesn't, that's the problem.
    The AI can't handle these 2 tags, if not the right unit AI is assigned to the unit.
    And the privateer AI is sadly an AI for water units, and doesn't work on land. And with another unit AI type the AI will just not use this type of unit correctly.


    Can be done by Python. I'm not sure, but I think this might be available somewhere :dunno:.
     
  10. Alrik2002

    Alrik2002 Warlord

    Joined:
    May 24, 2012
    Messages:
    214
    Location:
    Berlin, Germany
    Hi,

    I would like to give the effects of selfmade world wonders, which are defined in the Civ4BuildingInfos.xml to every member of the team which has build it. Unfortunatly I didn´t find any tag so far. Any ideas which one could help.

    bTeamShare didn´t work in two tests.

    Thx
     
  11. The_guy

    The_guy Elephantary School.

    Joined:
    Nov 23, 2010
    Messages:
    64
    Location:
    Holland.
    Anyone knows if and how, in Civ4CivicOptions.xml TraitNoUpkeeps works? I just put TRAIT_INDUSTRIOUS between the tags, but it doesn't seem to have an effect. No errors though.

    EDIT: Also, is there somewhere to find a list of Icons to use for in Strategies especially, like [ICON_FOOD] and [ICON_STRENGTH]?
     
  12. ChaosSlayer

    ChaosSlayer King

    Joined:
    Feb 3, 2011
    Messages:
    608
     
  13. ChaosSlayer

    ChaosSlayer King

    Joined:
    Feb 3, 2011
    Messages:
    608
    New question for today :)

    I would like to know where can i control how often do barbarians spawn?
    I found that normal barbarians are too few, while raging barbarians are way too many :)

    Same for wild animals please

    Also a related question where is determined which units are available to barbarians to use? Also how is it controlled how fast barbarian tech/units advances?

    thanks!
     
  14. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,708
    Location:
    UK
    I need these answers too. I think the Unit types are controlled by the civilizationinfo.XML at the bottom of this file is a barbs entry that removes the majority of units and buildings from their civ. So just delete the units you want them to have.
     
  15. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
  16. God-Emperor

    God-Emperor Deity

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    That is the delay until they start to show up. The actual numbers are linked with the iUnownedTilesPerBarbarianUnit and iUnownedTilesPerGameAnimal. The target number of barbs (or animals) is the number of plots that nobody owns divided by that number.
     
  17. ChaosSlayer

    ChaosSlayer King

    Joined:
    Feb 3, 2011
    Messages:
    608
    thanks! I will keep it in mind ;)
     
  18. ChaosSlayer

    ChaosSlayer King

    Joined:
    Feb 3, 2011
    Messages:
    608
    something I am curious about.

    I know that each AI leader has religion preference.
    However I also know that each leader will switch to any religion which is more beneficial to him at the moment, regardless of which religion he has as preferred.

    My question is: if I am playing with "select religion by choice when discovered" game setting, when AI discovers religion tech - do they choose randomly, or do they follow their encoded preference at least here?
     
  19. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    28,369
    Gender:
    Male
    Location:
    Las Vegas
    Depends on the mod if any. They will choose pretty much randomly on vanilla BTS I believe (unless the favorite religion was implemented then which I'm not sure of.) In C2C, however, utilizing Divine Prophets as well, they will very much choose according to their personalities. Without Divine Prophets, they will select their favorite religion first and a random any other religion thereafter. In vanilla bts, there isn't much cause to have them select specific ones outside of historical flavor alone.
     
  20. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    I have one question. In Rise from Erebus 1.4, there are no "opening menu sound" - don't work. Why? I look in AudioDefines.xml and Audio2DScripts.xml. There is sound define in xml. files. But in Sound folder, there are no "sound for opening menu". I am put sounds from FFH2, all as they are define in AudioDefines.xml, but they don't work again. Sounds and speeches work in game, but "opening menu sound" don't work. How they are turn off "opening menu sound"? Where is that?

    Note: I am not turn off music in my Civs options, and sounds work in other mods.
     

Share This Page