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. vincentz

    vincentz Programmer

    Joined:
    Feb 4, 2009
    Messages:
    3,550
    Gender:
    Male
    Location:
    Denmark
    In globalDefines.xml
    RECON_VISIBILITY_RANGE
     
  2. need my speed

    need my speed Rex Omnium Imperarium

    Joined:
    Oct 3, 2009
    Messages:
    2,055
    Gender:
    Male
    Location:
    European Union (Magna Batavia)
    Can anyone confirm this? :p
     
  3. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,676
    Location:
    UK
    you might be able to chain an event so that turn 1 it removes the cottage and the next turn it places the hamlet..
     
  4. need my speed

    need my speed Rex Omnium Imperarium

    Joined:
    Oct 3, 2009
    Messages:
    2,055
    Gender:
    Male
    Location:
    European Union (Magna Batavia)
    But how would I make sure it selects the same plot?
     
  5. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Why complicates matters when most events use python anyway.
    Just a few lines will do.
     
  6. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,676
    Location:
    UK
    there is a same plot tag. hang on let me find it..

    <PrereqEvents/>
    <bPrereqEventPlot>0</bPrereqEventPlot>

    So you set the prereq event to your cottage destroy event, then set bplot to 1 and then make the second event add the hamlet. Simple!
     
  7. Imp. Knoedel

    Imp. Knoedel Stalin and Starlight, Stalling a Stallion

    Joined:
    Nov 11, 2011
    Messages:
    8,552
    Location:
    The cooler Germany
    As far as I know there is a restriction in the DLL that limits the number of civs that can be in the same game to 18. Where do I change that?

    Also can anyone recommend a good Earth map? I am planning to create a scenario about the cold war, so the resource placement should reflect the situation in the 20th century, so horses in the new world etc.
     
  8. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    CvDefines.h: #define MAX_CIV_PLAYERS.
     
  9. Michkov

    Michkov Emperor

    Joined:
    Jul 5, 2010
    Messages:
    1,364
    Or find the 50civs dll on here when you dont want to mess around in the dll.
     
  10. Imp. Knoedel

    Imp. Knoedel Stalin and Starlight, Stalling a Stallion

    Joined:
    Nov 11, 2011
    Messages:
    8,552
    Location:
    The cooler Germany
    Nah, a little compiling never hurt anybody. (Okay that's a lie, DoC's DLL hurts me whenever I so much as look at it.)

    Is there something else I would have to do? It seems that one little change breaks scenarios. I tried it around a dozen times, and then again with the 40Civs mod I already have, and every single time when I try to start a scenario, be it a custom made or just Earth18Civs, I get two Python exceptions ("CvWBInterface", line 65 and "CvUtil", line 172") and RuntimeError: unidentifiable C++ exception. Custom Games work fine, but whenever MAX_CIV_PLAYERS is set to something higher than 18 I get the same error even when trying to just launch Vanilla scenarios like Earth or Earth18Civs. Changing the value back to 18 and recompiling makes scenarios work again, but obviously that defeats the entire point.

    Edit: The same thing happens when I try the 50Civs DLL I downloaded from here.
     
  11. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    There is nothing else to do in the dll.

    The problem lies with scenarios: they are "defined" with a certain number of players. You have to adapt them to the number of players you want. Look at tutorials but in short, you need to have as many player/team slots as in the dll, even if you leave them almost empty.
     
  12. Imp. Knoedel

    Imp. Knoedel Stalin and Starlight, Stalling a Stallion

    Joined:
    Nov 11, 2011
    Messages:
    8,552
    Location:
    The cooler Germany
    Got it, thanks. :goodjob:
     
  13. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    8,922
    Location:
    Hiding
    What precisely does the "<LSystem>" line mean in CIV4ArtDefines_Buildings? I assume it has something to do with how the building is placed, but I really don't get how it works. I'm trying to make invisible buildings by setting the NIF to Art/Empty, but even though they don't have a model they still appear to have an effect on cities.
     
  14. vincentz

    vincentz Programmer

    Joined:
    Feb 4, 2009
    Messages:
    3,550
    Gender:
    Male
    Location:
    Denmark
    The <LSystem> is the worst nightmare a modder can experience. :devil:

    It points to the CIV4CityLSystem.xml (for buildings in cities) and CIV4PlotLSystem.xml (for improvements and resources).
    It will then lookup that building/improvement/resource and see if it should be placed a special way (most are turned 45 degrees) and what era/ethnic group they should show (some buildings and improvements change graphics depending on era). It also changes resource graphics if an improvement is defined (f.ex. horses, cows and pigs gets into the fencing with pastures).

    The reason why its such a nightmare is, ah well, look for yourself, the files are a mess ;)

    The reason why they still show, is because it overrides artdefine settings.
     
  15. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    8,922
    Location:
    Hiding
    Uh, OK, but what exactly do I do to stop invisible buildings from affecting my cities? Do I set it to 0x0 in ArtDefines? Do I have to go into CIV4CityLSystem? What?
     
  16. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Maybe this thread can help you.
     
  17. vincentz

    vincentz Programmer

    Joined:
    Feb 4, 2009
    Messages:
    3,550
    Gender:
    Male
    Location:
    Denmark
    there is no 0x0. take a look at the files as I suggested.
    Best thing is to use one of the 1x1, though it will still affect your city, and what I also tried to tell you is that if it a Era or Ethnic specific building you need to change all of those too.
    Since you are VERY sparse in info about the building(s) you want to add/change, its pretty hard giving you direct advice....
     
  18. apt_get update

    apt_get update Chieftain

    Joined:
    Jun 15, 2016
    Messages:
    1
    How to make AI to capture selected in script cities? Where is this function located in SDK?
     
  19. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,317
    Gender:
    Male
    Location:
    Canberra, Australia
    The smallest I have done is
    Code:
    		<BuildingArtInfo>
    			<Type>ART_DEF_BUILDING_XXXX</Type>
    			<LSystem/>
    			<bAnimated/>
    			<fScale/>
    			<fInterfaceScale/>
    			<NIF>Art/empty.nif</NIF>
    			<KFM/>
    			<Button>Art/Interface/Buttons/Buildings/XXXX.dds</Button>
    		</BuildingArtInfo>
    
    I think I even had the NIF line as <NIF/> but was told that can cause problems.
     
  20. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    8,922
    Location:
    Hiding
    This works perfectly!


    Link to video.
     

Share This Page