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

Food Economy - Tradable Bonus Resources

Discussion in 'Civ5 - Modpacks' started by Deep_Blue, Dec 26, 2010.

  1. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    Oh, I don't think that would be appropriate. I actually haven't use this mod in years, and I've never looked at the code. It is an interesting idea though possibly not as useful in BNW context with the food caravans.
     
  2. havox79

    havox79 Chieftain

    Joined:
    Oct 28, 2015
    Messages:
    58
    Can you give some precisions on this ? :)

    The first query is for made the bonus ressource countable or tradable? what's made set type to 1 ?
    second query you totally erase the bonus resourceclass for replacing it with a new class you can trade ? (ResourceUsage=1) ? or who have trade value ?(AIObjective = 3) ?
    third query ?? why did you have to unset this default null value ? I like understand what I do^^

    For the bonus code part, I think I can find it alone but can you tell me in Faerun which file is the bonus part and UI and can I re-use and modify it ? ( in faerun the bonus is visible in the building tooltip with the "city connection" icon if I remember well. )

    last question : with your code, how to make the trade value of the resource match the overall bonus? which increases with the number of cities.

    I want to update this mod for vanilla BNW and Vox Populi. (with a little growth malus if needed) I think that can be a good training for a more complex resource mod I want to make and in which I want to integrate this function anyway.

    thanks anyway ! ;)
     
    Last edited: Nov 17, 2017
  3. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    Hi,
    The first DB update on Resource_QuantityTypes is made for the placement of resources when the map is generated. I used a modded map generator and had thought I might use it to implement some new health resources. The update sets the plot pool of all former Bonus resources to 1, but that could be any number. For example, Iron is something like 4 in this table, while Aluminum is something liee 8. Note that this is a dead table that does aboslutely nothing without some additional code to reference it.

    The second DB update on Resources is the most important, as it changes all bonus resources into tradeable strategic resources. The AI will now treat them as early game strategics (ResourceUsage = 1). I don't remember what, if any, effect AIObjective has. I think the Player field was modified to avoid some kind of crash....

    The third DB update tells the game which tech will unlock trade in these new strategic resources. Here I set all the old bonus resources to be tradeable with the initial tech, though this could be modified for each resource type. For example you could have cattle being tradable with Animal Husbandry. Leaving this as NULL would mean that resource is not tradeable.

    You can find the UI display that I used in Faerun in TopPanel.lua. Search for "Resources Tooltip".

    I don't know how to change the value that the AI will place on any resource. That sounds like a DLL mod to me.

    Good luck!
     
    havox79 likes this.
  4. havox79

    havox79 Chieftain

    Joined:
    Oct 28, 2015
    Messages:
    58
    Thank you for you help. :)

    Maybe on the Resource_Flavors table ?
     

Share This Page