1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Food Economy - Tradable Bonus Resources

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

  1. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    I am working on a large Mod and this is the first component I finished, long time is still needed for my final mod to be finished (I work on it in my spare time after work, so the progress is slow), however I decided to release the first component of my mod which is Food Economy.


    Food Economy (V2)


    This mod is a total rework for Bonus Resources in the game which are currently useless and give nothing but small yield on the tile of the resource. This mod aims to enhance bonus resources to be more useful and to have impact on the game.

    Basically this mod applies enhancements to current Bonus resources, and make Bonus resources tradable.

    1. Enhanced Bonus Resources:

    Food Resources give +1 :c5food: Food in each city that has a granary, this bonus is not on the food resource tile but is empire wide bonus.
    If you have 10 cities with Granary then obtaining 1 Wheat will result in +1 :c5food: food in 10 cities, this is a total +10 :c5food: food to your empire which is as powerful as being an ally with a maritime city state.


    Screen Shots:

    Spoiler :
    Here is an example of a small empire:



    Granary bonuses in the Capital:




    Here a distant city receives same bonuses:



    2. Bonus resources are now Tradable:

    In this mod food resources are made tradable, this will add a strategic importance to food resources, and applies the idea of importing/exporting food between civilizations.

    Screen Shots:
    Spoiler :



    ---------------------------

    Compatibility:
    Spoiler :

    Game Version: 1.0.1.141

    This mod is not compatible with any mod that modifies:
    • TopPanel.lua
    • CityView.lua
    • TradeLogic.lua
    • Diplotrade.xml
    • DiploCurrentDeals.xml

    Notes

    Download Link
    .
     

    Attached Files:

  2. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    Version History

    Version 2.0
    Spoiler :

    • Discovered and fixed a bug where player data is lost in saved games.
      • Added SaveUtils.lua to the mod to save/load player data.
    • Tuned the script to only save data when data is changed to improve performance.
     
  3. Civanator

    Civanator Chieftain

    Joined:
    Dec 18, 2001
    Messages:
    2,865
    Location:
    Gone
    Wow just today I started working on something like this. I thought to myself that food resources are useless, and how I would like to be able to have a city with 3 fish feed a city with no food bonuses around, because I play with no city-states

    Now if you trade a food resource away, does that mean you can no longer receive bonuses from it? I assume not, but just wondering anyway.

    So +1 internets for you on doing this.
    Oh and the screenshots aren't showing up, unless they just haven't been uploaded yet.
     
  4. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    So this mod is a good news for you :D

    Food resources are treated in same way as luxuries, if you have 1 Fish or 5 fish you will receive only +1 Food, now if you trade 4 fish and still has 1 left you still receive +1 food, if you trade away all your fish you get +0 food.

    If you have all 6 types of food resources then you will get +6 food in all cities with granary.
     
  5. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    I fixed that are they showing now??
     
  6. cf_nz

    cf_nz Chieftain

    Joined:
    Mar 17, 2006
    Messages:
    414
    Location:
    New Zealand
    Excellent, I've also been toying with this sort of idea. Looking for to giving it a try.
     
  7. Civanator

    Civanator Chieftain

    Joined:
    Dec 18, 2001
    Messages:
    2,865
    Location:
    Gone
    If you'd like help on the larger modpack I'd be happy to volunteer my time. It'll also give me more motivation to learn LUA scripting.

    And yes the screenshots are showing now :)
     
  8. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,690
    Location:
    Samara
    Hello!
    Great mod :goodjob:
    I have pretty the same mod, but it's unfinished yet.
    The idea is to make resource-consuming buildings that give food.

    In my mod, granary consumes 2 wheat and gives +10 food.
    Same buildings can be created for some other resourses.
     

    Attached Files:

  9. Decimatus

    Decimatus Chieftain

    Joined:
    Oct 22, 2005
    Messages:
    853
    Great looking mod. :)

    If you don't mind, I may at some point try and integrate it in with my own project. :)

    I am also going to add some bonus/luxury resource consuming buildings sometime in the future. I wonder if consuming a bonus or luxury resource would remove the food or happiness bonus?
     
  10. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    the idea of mods is to contribute to modding community so I dont mind that (as long as you mention that you are using it), but It will not be easy to integrate with other mods because in my mod I used unusual methods (may conflict with other mods) which added a level of complexity that is unnecessary but I am forced to it because no other way with the current SDK.
     
  11. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    Good luck in your mod, but try to balance the food bonus, +10 food from 2 Wheat is too much IMO. Test it in the game to see the effect.
     
  12. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    Thanks ! but unfortunately it will not be easy to coordinate the project using emails and messages.
     
  13. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    I forgot to include a method for saving players data, so in V1 player data will be lost in saved games and the mod may not work correctly.
    I fixed this in V2 and added SaveUtils to the mod.
     
  14. xxhe

    xxhe Chieftain

    Joined:
    Mar 10, 2008
    Messages:
    338
    Location:
    IN.
    A great job. The only concern is that the food bonus might be too much..
     
  15. Sneaks

    Sneaks Brooklyn Bum

    Joined:
    Oct 15, 2010
    Messages:
    1,877
    Location:
    NYC
    Questions:

    Do allied city states grant you the food resources, and are they doubled by the Patronage policy that does as such?

    Given the vast quantity of these resources in a given game, do you have plans to integrate other uses for the bonus resources? (Consumption buildings, unit requirement, etc)

    Do you foresee any balance issues given the capacity for cities to start at +6 food after one building? I can already see this effectively nerfing maritimes, but helping ICS to a degree.
     
  16. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    Yes you get food resources from allied city states (see screenshot below) . For policy that gives you double gifted resources it should do same for food resources but I am not sure about it.

    screenshot
    Spoiler :


    I dont like the idea of buildings consume resources, because this will end to be either overpowered (much better than the resource) or very weak (less beneficial that the resource).

    This mod was not intended to increase the growth of cities but was intended to enhance food resources and make them have impact on the game. ICS should be fixed in isolation from resources/improvement where there are many ways to fix ICS like using maintenance costs that increase with number of cities (like in PlayWithMe Mod by Alpaca).

    About the balance issue, I feel the food bonuses are ok especially after the last game patch which nerfed maritime city states to +1 food per city. However if we feel that this needs more balancing then I am open to your suggestions.

    I had some ideas for balancing:
    1- Removing 25% food storage from Granary.
    2- Slowing cities growth by increasing the Required Food amount for a city to grow by +4 food. (but this will widen the gap between civs with access to food resources and civs that have no food resources at all)

    What do you think?
     

    Attached Files:

  17. Aussie_Lurker

    Aussie_Lurker Chieftain

    Joined:
    Jul 21, 2003
    Messages:
    6,939
    Location:
    Adelaide, South Australia
    Hey there. I've been running into a bit of a problem re: trading of bonus resources. When I'm in the diplomacy screen, the Bonus Resource Option is definitely there, but I can never click on it (its always greyed out), & its telling me I have no bonus resources to trade-even though I *know* that I do. Can you think of a reason why this might be?

    If it helps, I'm using Thal's Balance-Combined Mod & the City-State Diplomacy Mod. If that's the cause of the problem, then would I be able to ask if you'd consider merging them so that they'll be compatible in the future? Thanks in advance :).

    Aussie.
     
  18. Sneaks

    Sneaks Brooklyn Bum

    Joined:
    Oct 15, 2010
    Messages:
    1,877
    Location:
    NYC
    Considering Thal's mod also edits the Granary, I would certainly worry about his mod possibly overriding some of this mod's files.
     
  19. Deep_Blue

    Deep_Blue Knight

    Joined:
    Aug 2, 2005
    Messages:
    750
    I think the mods conflict between each other, try activating Food Economy alone and see if the problem still exists.

    I am working on a large mod and food economy is the first component, in the final mod I will be adding some component from other mods like resources info panel. I will only merge small components that adds some utilities, but I don't plan to merge mods that adds or changes gameplay.

    Anyway you can merge them by yourself, Edit the following files:
    * TopPanel.lua
    * CityView.lua
    * TradeLogic.lua

    Any changes I made in these files are labeled by "Modded by Deepblue". So it is easy to find the code to copy and paste.
     
  20. cf_nz

    cf_nz Chieftain

    Joined:
    Mar 17, 2006
    Messages:
    414
    Location:
    New Zealand
    FWIW it looks like there are compatibility issues with Info Adict as well. As far as I can tell there are two files in common, SaveUtils.lua (which is identical in each) and Diplotrade.xml.
     

    Attached Files:

Share This Page