Jump to content
TeardownMods

AngryChickens

Members
  • Content Count

    41
  • Joined

  • Days Won

    4

Posts posted by AngryChickens

  1. Hi all - I wanted to take note of a project that @Gabe Wehrle and I teamed up on. Our goal was to provide the amazing framework written by Gabe initially, in a re-usable way to the Teardown community, to make it much easier for modders to feature multiple weather environments in their maps. Today, we are announcing our first release, along with bootstrap instructions. The project is hosted on GitLab; please download the source code from there and follow the README instructions to easily get configurable environments into your map!

    Here's the link: https://gitlab.com/teardown-mods/teardown-environment-system

    Teardown Persistent Environment System

    A helper component that automatically reloads the level including certain groups based on the savegame.mod registry state, with minimal overhead.

    Getting Started

    Simply move the entire env folder into your mod, add an instance tag referencing the environment.xml:

    <instance file="MOD/env/environment.xml"/>

    Your options.lua should include the options_utils.lua and define some basic checkboxes with a key "weather" and a value of the layer name your weather environment is in, in your XML:

    #include "env/options_utils.lua"
    function init()
    	init_env()
    	add_base_layer("executive_residence")
    	add_base_layer("westwing")
    end
    function draw()
    
    	header("Weather/Environment")
    
    	UiPush()
    	radioBox("weather","sunny")
    	UiTranslate(250, 0)
    	radioBox("weather","night")
    	UiTranslate(250, 0)
    	radioBox("weather","sunset")
    	UiTranslate(250, 0)
    	radioBox("weather","rain")
    
    	UiPop()
    
    end

     

    • Like 1
×
×
  • Create New...

How to Disable AdBlock - And why you should do it?

I have disabled AdBlocker. Refresh the page.