ImGui.LoadTexture(string path)
returns a texture loaded from an image on disk in the mods' directory.ImGui.Image(texture)
displays a texture loaded with the LoadTexture
function.(Texture texture, ImVec2 size, ImVec2 uv0, ImVec2 uv1, ImVec4 tintColor, borderColor)
GameObject.OnGameAttached
and GameObject.OnDetach
on game reload).Override()
the handler receives the original function (or next in the override chain) as the last parameterObserveBefore()
and ObserveAfter()
Observe()
is an alias for ObserveBefore()
self
in overrides. This should decrease the number of unreleased references and make CET less dependent on garbage collection.FromVariant(variant)
to extract the valueToVariant(value)
to pack the value when the type is unambiguousToVariant(value, type)
when the type is ambiguous or you wanna force the typeScripting::ToRED()
which was very outdated. This was limiting what overridden functions can return.gamedataTDBIDHelper
helper that behaves the same as gamedataTweakDBInterface
.inkGameController
and it's descendants.
In some cases, there seem to be issues with unreleased instances of inkGameController
leading to crashes. This was introduced when we started to properly wrap the context in Handle<>
.self
/ this
. In particular, it prevents crashes when a dot is accidentally used instead of a colon.ISerializable
strong and weak references. This opens access to some new classes, but not all of them.CName
s to the poolIsDefined
helper function as in redscript. Checks if reference is not null and valid. Can be used on game object's field and lua variable.EnumInt
helper function as in redscript.CRUID
type. gamedataLocKeyWrapper
type.CName
and TweakDBID
conversions without .new()
PlayerPuppet.OnAction
handler as for pre patch 1.3.collectgarbage
to let scripts force release game references.exEntitySpawner
to spawn entities easilyxmake install
will now install in the game's directory to make it easier for those installing from source.entEntityId
, PlayerPuppet
.gamedataStatType.BaseDamage
, gameGameVersion.Current
.WeaponObject
instead of gameweaponObject
..new()
constructor. For example, MappinData.new()
.EntityID.new({ hash = 12345 })
.ScriptedPuppet.IsDefeated(npc)
.vec4:Length()
instead of Vector4.Length(vec4)
.StatusEffectHelper.HasStatusEffect(target, gamedataStatusEffectType.Overheat)
.Variant
type support. ToVariant()
and FromVariant()
are only applicable to classes.Observe()
and Override()
now accept both native and scripted type names.Game.GetSystemRequestsHandler()
as an alternative to GetSingleton("inkMenuScenario"):GetSystemRequestsHandler()
.TweakDB:SetFlats
WorldFunctionalTests
Imgui.GetStyle()
ResourceAsyncReference
. Allows editing of TweakDB props of that type by the mods.GetMod()
is only available after onInit
as there is no guarantee that the required mod will be loaded before this event.onInit
event to prevent some unwanted crashes and unexpected behavior.DumpType("Type")
returning empty result.Enum
, eg. Enum.new('', '').value
.Enum
, CName
or TweakDBID
type.ResetAllocator
.self
and random crashes in Observe
and Override
.Override()
to the previous behavior so when the handler fails, the original game function is not called. require()
. Should make the transition to the new version less painful.Game['GetPlayer'] = Game['GetPlayer;GameInstance']
aren't needed in autoexec.lua
. All global and class functions are automatically resolved by short name now.CName
that is None
nil
archivehashes.txt
.db
lua object (will be changed later to on-demand through info in metadata file)require
cache is reset on Reload all mods
nowrequire
does not support '.' instead of '/' now (only breaking change, functions the same otherwise)dofile()
and such included)dir()
command for mods to list directory contentsctrl + tab
to switch window, arrow keys to navigate)power
argument in Drag and Slider widgets, replace it with the newer ImGuiSliderFlag (breaking change)open
optional in ImGui.Begin()
, ImGui.BeginModal()
, ImGui.BeginTabItem()
, so the close button can be hidden when setting flags.json
support to LuaregisterHotkey
, the user can pick what key they want to use in the menuNewObject('class name')
, do not expect this to work with every class without any issuesspdlog
to print in your logGame.GetPlayer()
every frame is fine nowdofile
is now deprecated, use only mods please, it will be removed entirely in the next update