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

Resource and storm question

Discussion in 'Civ4 - Creation & Customization' started by nokmirt, Jan 23, 2010.

  1. nokmirt

    nokmirt Emperor

    Joined:
    Feb 14, 2009
    Messages:
    5,087
    Location:
    Iowa USA
    My partner came up with an excellent idea.

    Hi, I have a question:

    Is it possible to have a Building to produce a resource only if another resource is available in the City in which the building is?

    Or for example two other resources, or one or the other resource, or one resource and either one of two other resources?

    Now another more practical example:

    You have iron and coal and the building produces steal only if iron and either coal or oil are available in the city.

    Another example:

    You have cotton, the building produces cloth only if cotton is available in the city.


    Is there anything like that already done in one of the mods?

    Is there a python script for it?

    Let me know.

    Also, I have one other question, there is a storm system in rise of mankind, what would I need to add this to our mod? Is there Python involved? Or can I just copy it from that mod and add it to ours?
     
  2. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,122
    Location:
    Germany / Netherlands
    No, it's not possible with buildings, just with corporations.


    If you could describe the storm system a bit...
     
  3. nokmirt

    nokmirt Emperor

    Joined:
    Feb 14, 2009
    Messages:
    5,087
    Location:
    Iowa USA
    It's ok I can add it, just had to locate the files. Basically it is a sunami, in game it is a storm cloud that rains and lightning stikes every other second or so. If your ship passes into this area it costs 4 movement points to go through it. The ships loses 20%damage per turn. It causes +0.50 pollution in nearby cities, and tiles lose -1 food and -1 commerce. It says defending units get -25% defense. Anyway I am going to try to add it. I am not sure if it disappears or reappears, my guess is that it does, but since it is a feature, it does not move. Imagine if we could make this move on a whim, like a barbarian. In any case I will put them in places where storms are likely to occur. It is an ocean coastal storm. It will make this giant earth map more interesting.
     
  4. NotSoGood

    NotSoGood Emperor

    Joined:
    Jan 25, 2009
    Messages:
    1,077
    Location:
    Finland
    You could make an event that spawns the storm feature and make the feature to spread around like forests. Though they slow down the game some. RoM had problems with it...
     
  5. nokmirt

    nokmirt Emperor

    Joined:
    Feb 14, 2009
    Messages:
    5,087
    Location:
    Iowa USA
    Yes, I was thinking it might slow the game. We are using the Giant Earth map so it probably would not be a good idea, but it looks cool. I think I will add it and test it. Have two copies of the mod, one with the storm, one without, and see what the turn time differences are. I started playing RoM, and it looks more dreadful when you are still exploring the map. I took my first galley through it, and that was not a good idea, but it did not sink me, just tore it up a bit. Anyway if you do not use an event the storm is stationary for that tile? Does it randomly appear and disappear?
     
  6. NotSoGood

    NotSoGood Emperor

    Joined:
    Jan 25, 2009
    Messages:
    1,077
    Location:
    Finland
    These are the lines you would want to change in feature infos
    Code:
    			<iAppearance>0</iAppearance>
    			<iDisappearance>0</iDisappearance>
    			<iGrowth>8</iGrowth>
    Lets break in pieces. iAppearance defines how oftenly your feature appears. iDisappearance is just the opposite. And iGrowth defines how better chances you have that feature appearing if there is one already in the nearby plot.

    That was from forest feature, so basicly forest won't just appear or disappear on it's own, it needs another forest beside it to appear. With these you might be able to do what you want.
    Remember that those numbers aren't percents. This means
    Code:
    <iGrowth>8</iGrowth>
    8/100=0,08%
    I might be wrong though.
     
  7. nokmirt

    nokmirt Emperor

    Joined:
    Feb 14, 2009
    Messages:
    5,087
    Location:
    Iowa USA
    Thanks for the info, and I will look to see how RoM mod has it set up. I am going to add the storm today and test it. I will let you know what I come up with.
     
  8. mikeejimbo

    mikeejimbo Chieftain

    Joined:
    Jan 16, 2010
    Messages:
    65
    Since it is possible to have a building produce a resource, couldn't you make it require the other resource to build? The problem with that is that it's not exactly what you wanted, since it would still produce that resource if you lose the other resource. Also, I don't recall if you can make a building require a resource in the first place.
     
  9. zappara

    zappara Mod Designer

    Joined:
    Dec 19, 2003
    Messages:
    2,781
    Location:
    Finland
    If you set high iDisappearance and iGrowth values for Storm feature, you'll get "moving" storms but you need to carefully choose the values as too high iGrowth would cause the oceans to be filled with Storms and too high iDisappearance will make all storms disappear before you reach modern era - iAppearance values is only used when the map is generated. RoM also has at least 5 random events (Sea Storms) that cause storms randomly on the oceans/coasts. All this makes storms dynamic game feature instead of being just static terrain feature.
     
  10. nokmirt

    nokmirt Emperor

    Joined:
    Feb 14, 2009
    Messages:
    5,087
    Location:
    Iowa USA
    What I want to find out is where the Python code is, and if I can use it. I should talk to Zappara, is it?

    Ok I wrote, Ha ha I realize it's you I was talking too, I was not paying attention to who I was quoting. Anyway Zappara, I wrote you a private message, asking if I can use this storm in our 1861 AD mod, and if possible, help implement the Python code for the Sea Storm events. I do not know Python, and my friend Ben, seems to be a rather good graphics artist, but I do not think he knows Python. I think it would really make the mod stand out much better. I was wondering is the storm your invention?
     
  11. zappara

    zappara Mod Designer

    Joined:
    Dec 19, 2003
    Messages:
    2,781
    Location:
    Finland
    Yes it is - though I think Charlemagne scenario in BtS used the same graphics for some event but I found bit better use for those graphics. I don't know if any other mod has adopted storm freature or/and those random events I made for this terrain feature.
     
  12. nokmirt

    nokmirt Emperor

    Joined:
    Feb 14, 2009
    Messages:
    5,087
    Location:
    Iowa USA
    The random events, you have four. 3+4 have python code but 1+2 do not. So what turns on event triggers sea_storm_1 and sea_storm_2? In any case it is an awesome idea, and it really makes the game so much more realistic. The one problem I have is that I have not tested it the way you said, so I will do that first, and see if everything works well. I will let you know.
     
  13. Shiggs713

    Shiggs713 Immortal

    Joined:
    Mar 11, 2007
    Messages:
    2,361
    Location:
    Indianapolis
    The normal game engine would make these work, just like any other event.
     
  14. Willem

    Willem Deity

    Joined:
    Feb 12, 2002
    Messages:
    7,313
    Location:
    Canada
    Yes you can. That would be the only way to simulate what the OP is looking for, aside from creating a Corporation.
     
  15. nokmirt

    nokmirt Emperor

    Joined:
    Feb 14, 2009
    Messages:
    5,087
    Location:
    Iowa USA
    Good, thanks, just making sure. Alot goes into this damn game. :lol:

    In this case we will have a cotton mill, which of course requires cotton, and produces cloth. We could also call it textile mill, and have it require sheep, or cotton, and in turn the building would produce cloth, is this not correct? Or we can create both a cotton and textile mill at different points in the techtree.
     
  16. Tripod

    Tripod Chieftain

    Joined:
    Dec 9, 2007
    Messages:
    32
    Location:
    Germany
    It is possible, when you`re able to update the files to bts3.19.You will find these files in the Database(ModComp):Building Resource Converter Mod v0.2, [BTS SDK MODCOMP] Vicinity Bonus.
    When you`re able to merge them you will get what you need.
     

Share This Page