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

More Resources

Discussion in 'Civ4Col - Mare Nostrum' started by Ekmek, Aug 28, 2009.

  1. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,045
    Location:
    San Diego, California
    First off, Koma you said it was possible to add more resources to the game without doing anything to the SDK. I tried once but it crashed. Do you know the steps to do it?


    I've begun merging AoD2 with Mare Nostrum. I have a decent working copy but need to update some stuff. However I think it an opportunity to try this idea - adding more resources.

    I definetely want to redo slaves as I mentioned before. But I'm thinking of making food more complex.

    I think each tile should have a basic 1 food yield but for moreyields you need to grow wheat that turns to food (bread) at a bakery. Grapes could be used to make wine or food(fruit). fish, sheep, and cows would be converted to food at the butcher (maybe not fish). This approach would make food more complex and i want to have alternate consumptions choices instead of sheep to wool cloth and grapes only to wine. I think having your resources convertible to different stuff could add a new dimension.

    this is doable only if I can get more resources added to the game.
     
  2. koma13

    koma13 Chieftain

    Joined:
    Sep 29, 2008
    Messages:
    662
    No, see this tutorial: http://forums.civfanatics.com/showthread.php?t=319070. Yields are hard coded in CvEnums.h. :( That certainly is a hangover from civ4 where we had only 3 fixed yields.
    If you tell me what yield types you want to add, I can try compiling a new dll.
     
  3. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,045
    Location:
    San Diego, California
    ok, thanks Koma. I think I'll work on the integration piece. then from there we can look at resources. Is there a way to fix the code from being hard coded and instead just read the number of entries in the yield.xml. I've done some C++ in the past so I know its kind of doable, but I guess its a matter of finding all the specified yields in the code (and hopefully not in the exe)
     
  4. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    I believe yields are only listed in CvEnums.h. I know they aren't in the .exe, mods like Plantation Economy alter them.
     
  5. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,045
    Location:
    San Diego, California
    true, but if we modify the code to count the numbrer of yields in yield.xml instead of how its done in CvEnums.h then I'm not sure if that will mess up something thats hardcoded. But you may know better than me since I have messed with the SDK at all (I'm too lazy).
     
  6. Aymerick

    Aymerick Chieftain

    Joined:
    Dec 26, 2008
    Messages:
    233
    Location:
    Ville de Québec
    Since Fortuente's tutorial on Adding a new yield/resource to COL isn't about adding new tradable yields, I've posted this short "tutorial" sometime ago. It's not precise but if you look at the files from my mod Plantation Economy, you can figure out pretty much how it works:

    I think the yields are hardcoded so that the AI in the CvCityAI.cpp and CvPlayerAI.cpp knows what to do with each one. Like, which one are tradable, which one it should buy from Europe, which one is a final product or can be transformed by citizen, etc...

    Hope this helps!

    Aymerick
     

Share This Page