Jump to content
TeardownMods
  • 0

Teardown Environment System


Question

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
Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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

I have disabled AdBlocker. Refresh the page.