Added New Mods; Swapped Mods and Removed Some

Removed EGUI in favor of UI Rework by Sota

Added in GTR Optimized for higher res textures, over Zone Reality Remade and removed all files that conflicted from ZRR to save storage space.
This commit is contained in:
2024-03-30 06:43:01 -04:00
parent 48d440e14c
commit 255081e1ee
2883 changed files with 39223 additions and 61569 deletions
@@ -0,0 +1,9 @@
<w>
<file name = "ui\ui_actor_menu">
<texture id="hts_bar_texture" x="1420" y="1576" width="44" height="36" />
</file>
</w>
@@ -0,0 +1,57 @@
<w>
<!-- equipment x = 341, y = 0 -->
<!-- actor_state_info x = 0, y = 539 -->
<!-- power_sensor x = 173, y = 156 -->
<!-- state_progress x = 23, y = 1 -->
<!-- Satiety -->
<satiety_wnd x="539" y="696" width="22.5" height="18">
<texture r="190" g="0" b="0" a="0">none.dds</texture>
<bar x="0" y="0" width="21.9" height="17.75" stretch="1">
<texture r="100" g="100" b="100">hts_bar_texture</texture>
</bar>
<tooltip x="0" y="-35" width="40" height="30" stretch="1">
<text x="0" y="0" complex_mode="1" align="c" vert_align="c" font="letterica18" a="190" r="190" g="190" b="190"></text>
<texture r="10" g="10" b="10" a="210">none.dds</texture>
</tooltip>
</satiety_wnd>
<!-- Thirst -->
<thirst_wnd x="589" y="696" width="22.5" height="18">
<texture r="0" g="190" b="0" a="0">none.dds</texture>
<bar x="0" y="0" width="21.9" height="17.75" stretch="1">
<texture r="100" g="100" b="100">hts_bar_texture</texture>
</bar>
<tooltip x="0" y="-35" width="40" height="30" stretch="1">
<text x="0" y="0" complex_mode="1" align="c" vert_align="c" font="letterica18" a="190" r="190" g="190" b="190"></text>
<texture r="10" g="10" b="10" a="210">none.dds</texture>
</tooltip>
</thirst_wnd>
<!-- Sleep -->
<sleep_wnd x="639" y="696" width="22.5" height="18">
<texture r="0" g="0" b="190" a="0">none.dds</texture>
<bar x="0" y="0" width="21.9" height="17.75" stretch="1">
<texture r="100" g="100" b="100">hts_bar_texture</texture>
</bar>
<tooltip x="0" y="-35" width="40" height="30" stretch="1">
<text x="0" y="0" complex_mode="1" align="c" vert_align="c" font="letterica18" a="190" r="190" g="190" b="190"></text>
<texture r="10" g="10" b="10" a="210">none.dds</texture>
</tooltip>
</sleep_wnd>
</w>
@@ -0,0 +1,57 @@
<w>
<!-- equipment x = 375, y = 0 -->
<!-- actor_state_info x = 0, y = 539 -->
<!-- power_sensor x = 139, y = 156 -->
<!-- state_progress x = 19, y = 1 -->
<!-- Satiety -->
<satiety_wnd x="533" y="696" width="18" height="18">
<texture r="190" g="0" b="0" a="0">none.dds</texture>
<bar x="0" y="0" width="17.5" height="17.75" stretch="1">
<texture r="100" g="100" b="100">hts_bar_texture</texture>
</bar>
<tooltip x="0" y="-35" width="40" height="30" stretch="1">
<text x="0" y="0" complex_mode="1" align="c" vert_align="c" font="letterica18" a="190" r="190" g="190" b="190"></text>
<texture r="10" g="10" b="10" a="210">none.dds</texture>
</tooltip>
</satiety_wnd>
<!-- Thirst -->
<thirst_wnd x="573" y="696" width="18" height="18">
<texture r="0" g="190" b="0" a="0">none.dds</texture>
<bar x="0" y="0" width="17.5" height="17.75" stretch="1">
<texture r="100" g="100" b="100">hts_bar_texture</texture>
</bar>
<tooltip x="0" y="-35" width="40" height="30" stretch="1">
<text x="0" y="0" complex_mode="1" align="c" vert_align="c" font="letterica18" a="190" r="190" g="190" b="190"></text>
<texture r="10" g="10" b="10" a="210">none.dds</texture>
</tooltip>
</thirst_wnd>
<!-- Sleep -->
<sleep_wnd x="613" y="696" width="18" height="18">
<texture r="0" g="0" b="190" a="0">none.dds</texture>
<bar x="0" y="0" width="17.5" height="17.75" stretch="1">
<texture r="100" g="100" b="100">hts_bar_texture</texture>
</bar>
<tooltip x="0" y="-35" width="40" height="30" stretch="1">
<text x="0" y="0" complex_mode="1" align="c" vert_align="c" font="letterica18" a="190" r="190" g="190" b="190"></text>
<texture r="10" g="10" b="10" a="210">none.dds</texture>
</tooltip>
</sleep_wnd>
</w>
@@ -0,0 +1,212 @@
HUD = nil
function activate_hud(gui)
-- open with inventory only
if gui ~= "UIInventory" then
return
end
-- check for inventory gui
if not (ui_inventory and ui_inventory.GUI) then
return
end
-- disable inventory power bar
if ui_inventory.GUI.stat and ui_inventory.GUI.stat["power"] and ui_inventory.GUI.stat["power"].base then
ui_inventory.GUI.stat["power"].base:Show(false)
end
-- show hud
if HUD == nil then
HUD = hts_tooltips()
get_hud():AddDialogToRender(HUD)
HUD:Update_Bars(true)
end
end
function deactivate_hud(gui)
-- if gui ~= "UIInventory" then return end
if HUD ~= nil then
get_hud():RemoveDialogToRender(HUD)
HUD = nil
end
end
class "hts_tooltips" (CUIScriptWnd)
function hts_tooltips:__init() super()
self:InitControls()
end
function hts_tooltips:InitControls()
self:SetWndRect(Frect():set(0,0,1024,768))
self:SetAutoDelete(true)
self.xml = CScriptXmlInit()
local xml = self.xml
xml:ParseFile("ui_new_bars.xml")
self.hts_t = {
[1] = { "satiety", get_satiety_val },
[2] = { "thirst", get_thirst_val },
[3] = { "sleep", get_sleep_val },
}
-- timer
self.tmr = 0
-- build elements
self.elems = self.elems or {}
for i = 1, 3 do
self.elems[i] = self.elems[i] or {}
-- bars
self.elems[i].bar_wnd = xml:InitStatic(self.hts_t[i][1] .. "_wnd", self)
self.elems[i].bar = xml:InitStatic(self.hts_t[i][1] .. "_wnd:bar", self.elems[i].bar_wnd)
-- default bar width, height
self.elems[i].width = self.elems[i].bar:GetWidth()
self.elems[i].height = self.elems[i].bar:GetHeight()
-- default bar texture rect (full bar = x2 - x1)
self.elems[i].rect_x1 = self.elems[i].bar:GetTextureRect().x1
self.elems[i].rect_y1 = self.elems[i].bar:GetTextureRect().y1
self.elems[i].rect_x2 = self.elems[i].bar:GetTextureRect().x2
self.elems[i].rect_y2 = self.elems[i].bar:GetTextureRect().y2
-- tooltip
self.elems[i].tooltip = xml:InitStatic(self.hts_t[i][1] .. "_wnd:tooltip", self.elems[i].bar_wnd)
end
end
function hts_tooltips:Update()
CUIScriptWnd.Update(self)
-- disable bars when in picker window
local picker_enabled = ui_inventory.GUI and ui_inventory.GUI.CC and ui_inventory.GUI.CC["picker"] and ui_inventory.GUI.CC["picker"]:IsShown()
for i = 1, #self.elems do
self.elems[i].bar_wnd:Show( (not picker_enabled) )
end
local tg = time_global()
if (tg < self.tmr) then return end
self.tmr = tg + 50
self:Update_Bars()
end
function hts_tooltips:Update_Bars()
local pos = GetCursorPosition()
for i = 1, #self.elems do
local elem = self.elems[i]
-- update bars
if elem.bar then
-- set new x2 rect
local x1 = elem.rect_x1
local x2 = x1 + ( (elem.rect_x2 - x1) * self.hts_t[i][2]())
self.elems[i].bar:SetTextureRect(Frect():set( x1, elem.rect_y1, x2, elem.rect_y2 ))
-- set new width
local width = elem.width * self.hts_t[i][2]()
self.elems[i].bar:SetWndSize(vector2():set( width, elem.height ))
end
-- update tooltip
self.elems[i].tooltip:Show(false)
if elem.tooltip then
local p, w, h = elem.bar_wnd:GetWndPos(), elem.bar_wnd:GetWidth(), elem.bar_wnd:GetHeight()
local pos_true = pos.x > p.x and pos.y > p.y and pos.x < (p.x + w) and pos.y < (p.y + h)
if pos_true then
self.elems[i].tooltip:Show(true)
self.elems[i].tooltip:TextControl():SetText( math.ceil(self.hts_t[i][2]() * 100) .. " %" )
end
end
end
end
function hts_tooltips:__finalize()
end
-------------------------- misc --------------------------
function get_red_thirst()
local max_thirst = get_local_val([[gamedata\scripts\actor_status_thirst.script]], "actor_status_thirst", "local start_blur_4") or 5760
return max_thirst
end
function get_red_sleep()
local max_sleep = get_local_val([[gamedata\scripts\actor_status_sleep.script]], "actor_status_sleep", "local start_blur_4") or 8750
return max_sleep
end
function get_local_val(path, script_name, str_to_find)
if _G[script_name] then
if not file_exists(path) then
return
end
for line in io.lines(path) do
if string.find(line, str_to_find) then
_,_, loc_val = string.find(line, "start_blur_4%s*=%s*(%d+)")
if type(tonumber(loc_val)) == "number" then
return loc_val
end
end
end
end
end
function file_exists(name)
local f = io.open(name, "r")
if f ~= nil then
io.close(f)
return true
else
return false
end
end
function get_satiety_val()
local conditions = db.actor:cast_Actor():conditions()
local satiety = conditions:GetSatiety()
local red_icon_satiety = conditions:SatietyCritical() * 0.5
satiety = normalize(satiety, red_icon_satiety, 1)
return satiety
end
function get_thirst_val()
local thirst = 1 - actor_status_thirst.get_water_deprivation()
local red_icon_thirst = get_red_thirst()
red_icon_thirst = 1 - normalize(red_icon_thirst, 0, 10000)
thirst = normalize(thirst, red_icon_thirst, 1)
return thirst
end
function get_sleep_val()
local sleep = 1 - actor_status_sleep.get_sleep_deprivation()
local red_icon_sleep = get_red_sleep()
red_icon_sleep = 1 - normalize(red_icon_sleep, 0, 10000)
sleep = normalize(sleep, red_icon_sleep, 1)
return sleep
end
function on_game_start()
RegisterScriptCallback("GUI_on_show", activate_hud)
RegisterScriptCallback("GUI_on_hide", deactivate_hud)
end
@@ -0,0 +1,31 @@
[General]
gameName=stalkeranomaly
modid=0
version=d2024.3.28.0
newestVersion=
category="3,"
nexusFileStatus=1
installationFile=HTS_bars_1.01.zip
repository=Nexus
ignoredVersion=
comments=
notes=
nexusDescription=
url=
hasCustomURL=false
lastNexusQuery=
lastNexusUpdate=
nexusLastModified=2024-03-28T07:37:26Z
nexusCategory=0
converted=false
validated=false
color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
tracked=0
[installedFiles]
1\modid=0
size=1
1\fileid=0
[Plugins]
BAIN%20Installer\option0=00. UI Main