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

TreeGrowth

Discussion in 'Civ5 - Mod Components' started by Bhruic, Sep 30, 2010.

  1. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    TreeGrowth will allow for the spread of forests that was seen in Civ IV (currently only does forests, not jungle). Spread rate varies based on map size and game speed.

    v3
    - Added notifications of any new forest growths within explored territory

    bugs
    - Forests will grow onto city squares

    Bh
     

    Attached Files:

  2. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    Er, made a small change that actually made the mod work :blush:

    Bh
     
  3. Szpilman

    Szpilman Void Co. Chairman

    Joined:
    Dec 2, 2006
    Messages:
    746
    Location:
    Cola
    That's cool, how did you accomplish it, Lua?
     
  4. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    Yup, it's all just a Lua script. It's pretty simple, really, the only hard part was tracking down the function names.

    Bh
     
  5. Baleur

    Baleur Prince

    Joined:
    Jul 9, 2010
    Messages:
    526
    Location:
    Qingdao, China
    AWESOME!!! Please keep working on it (and add for jungles) :)
     
  6. JDexter

    JDexter Prince

    Joined:
    Dec 18, 2003
    Messages:
    565
    Gender:
    Male
    Location:
    Germany
    Seriously great, once a fantasy total conversion is released, this thing better be in it! ;)
     
  7. Shiggs713

    Shiggs713 Immortal

    Joined:
    Mar 11, 2007
    Messages:
    2,361
    Location:
    Indianapolis
    yea, I'm using it already, found it on the mod hub before i found this thread. Nice work.
     
  8. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    Added notifications of forest growths.

    Haven't figured out what to do about jungle yet... With jungle tiles reverting to plains when they are cleared, should I limit jungle growth to other plains tiles? I assume they shouldn't grow on hills. Presumably they shouldn't grow beyond a certain distance from the equator, but that tends to be somewhat map based, so might be harder to deal with.

    Bh
     
  9. tokala

    tokala Emperor

    Joined:
    Jan 14, 2006
    Messages:
    1,739
    Location:
    Klein Texas, Germany
    Great thing for treehuggers and lumberjacks :D
     
  10. JDexter

    JDexter Prince

    Joined:
    Dec 18, 2003
    Messages:
    565
    Gender:
    Male
    Location:
    Germany
    In the real world there are rainforests that are at higher altitudes, rocky or in between mountainious areas. I think it should be okay to have Jungle on hills.
    Is it possible to revert a Jungle to something else than plains or is the new hex type fixed into the chopping function? If not (or if you can change it) I'd simply keep the base landscape when removing the Jungle (as it was in Civ4).
     
  11. TheChanger

    TheChanger Warlord

    Joined:
    Jul 2, 2010
    Messages:
    281
    Gender:
    Male
    Location:
    Australia
    Itll be in Naeralith Reborn i can tell you that much :D thanks Bhruic!

    there are temperate rainforests in tasmania, Australia ;)
     
  12. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Bhruic, your changes are going to make any mod that wants to add custom notifications incompatible (like mine). Instead of each of us modifying the notification panel, I think we should make a generic custom notification panel that allows custom notifications, release it as a mod, and require it as dependency. Then, we can simply call a function and have a custom notification in any mod we want, and our mods won't be incompatible.
     
  13. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    I second this
     
  14. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    Yup, that's a good idea. Frankly, I was just so happy to have finally figured out a functional workaround to the notification issue, that I just went with it.

    It's not going to be terribly easy to make a generic custom version, but I'll do some work on it and see what I can come up with.

    Bh
     
  15. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    im trying to investigate NotificationPanel
    just wonder why
    Code:
    OnNotificationAdded(100, -1, "Notification", "Notification text", 0, 0);
    command does not work

    also what is notification id? how is it changed.. if its only notifications sequentional number thats given to notifications inside the dll (where do they come from i believe) we can create a mapping array for both game notifications and those custom ones created in lua instead of maintaining a separate array for custom notifications
     
  16. Baleur

    Baleur Prince

    Joined:
    Jul 9, 2010
    Messages:
    526
    Location:
    Qingdao, China
    Honestly maybe just for simplicity, have jungles have a slightly lower spread-chance (1 third of forest spread chance?), but also into any adjacant hexes (except desert, tundra and snow ofc).

    Like yeah, jungles are kinda "bad" but then again, with later techs you get science for each jungle tile, so it kinda evens out. Lets say a forest spreads per 50 turns (random number), then a jungle could spread per 75 or even 100 turns :)
    And when you factor in that the AI (and yourself often) chop down most jungles and forests, the longer the game goes on the fewer forest / jungle tiles there are that have a chance to spread.
     
  17. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    hello
    i've tweakened Bhruic's notification panel so everyone can use it:
    http://www.keepandshare.com/doc/view.php?id=2281139&da=y

    how to create a notification:
    Code:
    LuaEvents.CustomNotification(x, y, "Tool tip message", "Summary");
    the problem is the picture is always an exclamation sign we have to work on this to allow a custom picture for notifications and also not to hardcode text in lua but get from xml.
     
  18. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    Sorry to say that your custom notification isn't really a good generic custom notification. It doesn't really handle anything beyond the exact circumstance that I setup, which isn't likely to be the same setup anyone else would be looking for.

    Bh
     
  19. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    of course its far from perfect but its ok for me
    one can pass coordinates and info, not that bad imo
     
  20. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Well yours doesn't allow for messages, so it's an improvement IMHO. More Information could be passed for the icon type, and then it would be pretty good.
     

Share This Page