Results 1 to 3 of 3

Thread: Granary Food Storage

  1. #1
    Magnar's Avatar Artifex
    Join Date
    Jul 2013
    Location
    The last place you look
    Posts
    4,370

    Default Granary Food Storage

    It seemed a little odd to me that you could build granaries, but that they didn't actually store any food. Food in ToB is always calculated on a turn by turn basis depending on what you produce.

    As such I've started working on a new mod which will make granaries function in a more realistic way.

    Each granary will have a maximum amount of food that it can store:
    (The following values are subject to change based on game balance)

    level 1 granary can store 200 food
    level 2 granary can store 400 food
    level 3 granary can store 800 food

    When a faction has positive food in a turn a certain percentage of that will be stored in the granaries ( 30% in initial version) if there is capacity to hold it.

    When the faction's food drops to negative, a certain amount will be taken from the granaries and added to the factions food pool until the granaries are all emptied.


    Above i've outlined how the first release of this mod will work. there are other features i will add to it in time.


    What's left before release:

    1) debug save/load
    2) Add food effects + cleanup
    3) Add info texts & UI elements


    If you would like to support my mods https://www.patreon.com/magnar
    Last edited by Magnar; May 14, 2018 at 05:21 PM.

  2. #2

    Default Re: Granary Food Storage

    Smart idea, little details like this affect gameplay and immersion immensely, it boggles the mind how CA would/could not implement something like this in the vanilla game. Kudos to you.

  3. #3

    Default Re: Granary Food Storage

    https://imgur.com/a/cbd9IDZ

    Hey Magnar,

    I'm doing scripting with the Shieldwall Team and we saw this idea ages ago so I took a shot at it today. It ended up working pretty well with some minor UI edits to the food breakdown tab.

    You can find the source code for it in these files:
    https://github.com/Shieldwall-TOB/Sh...od_storage.lua
    https://github.com/Shieldwall-TOB/Sh...alFeatures.lua (Yeah it needs to be renamed.. but its basically our faction object so food ended up in there )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •