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

SpecialistExtraCommerces

Discussion in 'Civ4 - Creation & Customization' started by Thanatosimii, Aug 5, 2006.

  1. Thanatosimii

    Thanatosimii Chieftain

    Joined:
    Jun 29, 2004
    Messages:
    26
    When modding the xml file for BuildingInfos, does anyone know how to make this work specialist specific? This is the tag which makes the sistine chapel (? I think) give two more culture for every specialist. It does it like this:

    <SpecialistExtraCommerces>
    <iCommerce>0</iCommerce>
    <iCommerce>0</iCommerce>
    <iCommerce>2</iCommerce>
    </SpecialistExtraCommerces>

    However, If I wanted to make the Great library give one extra science per scientist only, It will not accept:

    <SpecialistExtraCommerces>
    <SpecialistExtraCommerce>
    <SpecialistType>SPECIALIST_SCIENTIST</SpecialistType>
    <iCommerce>0</iCommerce>
    <iCommerce>1</iCommerce>
    <iCommerce>0</iCommerce>
    </SpecialistExtraCommerce>
    </SpecialistExtraCommerces>

    Why not? Can this even be done? Is python the answer? Or is there no hope?
     
  2. woodelf

    woodelf Bard

    Joined:
    Jun 12, 2003
    Messages:
    15,036
    Location:
    Gallery
    When you changed that did you get an extra hammer? Did you get an extra anything?

    There is a spot called <SpecialistYieldChanges> that I've never seen altered. I wonder what that does?

    Wierd.
     
  3. Impaler[WrG]

    Impaler[WrG] Civ4:Col UI programmer

    Joined:
    Dec 5, 2005
    Messages:
    1,750
    Location:
    Vallejo, California
    Its not normaly possible to do that with normal Civ4 but I did create a mod that allows it for Technologies, it would be relitivly simple to also have buildings connect into it, the Civ4 Core Community Project can be found under Mod-Components, the code is at SF.

    If I remember correctly the Player Object originaly had a single "all-specialist" global Commerce bonus array for the Sistine Chapal and a Matrix [Yield][Specialist] for handling AngkorWat effects (thats ware <SpecialistYieldChanges> comes into play). I created a Matrix for Commerce as well and allows Technologies to add to it. You could use a Python trigger to change that Matrix when a Specific Building is built but if you can get in the SDK it would be better to extend my work to Wonder type buildings as well.
     
  4. Thanatosimii

    Thanatosimii Chieftain

    Joined:
    Jun 29, 2004
    Messages:
    26
    I don't understand any of that. But I'm not computer savvy. So there's no simple way? Oh well, on to better ideas.
     
  5. Gerikes

    Gerikes User of Run-on Sentences.

    Joined:
    Jul 26, 2005
    Messages:
    1,753
    Location:
    Massachusetts
    As Woodelf said, there's a SpecialistYieldChanges tag, but that will only allow you to change the Yields for a specialist, not the Commerce. Thus, you'd probably have to edit the SDK to make this do Commerce as well in the XML.

    You could probably do this in Python by putting code in the onCityDoTurn. This is called once a turn for each city. You can check the amount of each type of specialist and do the commerce changes yourself.
     
  6. Aussie_Lurker

    Aussie_Lurker Deity

    Joined:
    Jul 21, 2003
    Messages:
    7,714
    Location:
    Adelaide, South Australia
    Well, having tried to mod in both Python and SDK, I can honestly say that though I find the latter to be the most time-consuming of the two, I find that it is also the one which delivers the most regular and satisfying results. So, if I were to suggest which one you should try, it would be SDK. Start off by ploughing into the CvInfos Source and Header files, and looking for building infos. The rest just requires patience and a knack for adapting existing code to your own needs-or at least this is what I found.

    Aussie_Lurker.
     

Share This Page