I’ve done exactly what Rayya’s Children does in their manifest and all works fine until I save the game and load it again. Expected results would be to still see my UI changes the same way Rayya’s Children does.
box_o_vox = {
constants = require ‘constants’
}
local player_service_trace = nillocal function check_override_ui(players, player_id)
– Load ui mod
if not player_id then
player_id = _radiant.client.get_player_id()
endlocal client_player = players[player_id]
if client_player then
if client_player.kingdom == “box_o_vox:kingdoms:boxlings” then
– hot load box_o_vox ui mod
_radiant.res.apply_manifest(“/box_o_vox/ui/manifest.json”)
end
end
endlocal function trace_player_service()
_radiant.call(‘stonehearth:get_service’, ‘player’)
:done(function(r)
local player_service = r.result
check_override_ui(player_service:get_data().players)
player_service_trace = player_service:trace(‘box_o_vox ui change’)
:on_changed(function(o)
check_override_ui(player_service:get_data().players)
end)
end)
endradiant.events.listen(box_o_vox, ‘radiant:init’, function()
radiant.events.listen(radiant, ‘radiant:client:server_ready’, function()
trace_player_service()
end)
end)return box_o_vox
No clue why mine won’t display once I reload a saved game. Thanks in advance to anyone who knows a thing