Question: Does anyone know how I can get a working HUD Hunger icon into CS?
As we all know, it works just fine in SoC but it has been disabled or removed from CS. I do not know (nor can I fathom) the reason why GSC chose to do this.
What I've figured out for myself: Not a whole lot actually.
I do know that "xrGame.dll" is involved but I'm not sure on what level - my own opinion is that once I've actually found the mechanism that triggers the beginning of health loss due to hunger, I should be able to use it to also prompt the HUD icon. Unfortunately "satiety_critical" which is ultimately responsible for deciding when health will begin to be lost doesn't really lead me anywhere other than to "xrGame.dll" where I'm then quickly baffled by the indecipherable symbols in the file (using XVI32 to view). There is a control for radiation in the "bind_stalker.script" but I've had no luck when attempting to duplicate it and then adjust it to suit the hunger level. Example:
- Code: Select all
--[[if actor.satiety()
local hud = get_hud()
local custom_static = hud:GetCustomStatic("cs_radiation_danger")
if custom_static == nil then
hud:AddCustomStatic("cs_radiation_danger", true)
hud:GetCustomStatic("cs_radiation_danger"):wnd():SetTextST("st_radiation_danger")
end
else
local hud = get_hud()
local custom_static = hud:GetCustomStatic("cs_radiation_danger")
if custom_static ~= nil then
hud:RemoveCustomStatic("cs_radiation_danger")
end
end]]--
The error when using this is one that states something like: "bind_monster.script attempt to call bind_stalker.script" - which I'd assume occurs purely because the script above is utter rubbish - I know bugger-all about LUA. Alternatively, using this at the beginning of the above piece of script:
- Code: Select all
--[[if actor.satiety >= 0.9 then
local hud = get_hud()
...etc...
creates an error that states: "attempt to compare number with nil". This I 'think' I understand: "satiety" itself is not actually recognized by LUA, period. The script can't calculate ">= 0.9" because it doesn't have a reference against which to compare it. I've also tried the same script while using "if db.actor.satiety...if actor.satiety_critical...etc." but all of the hunger related [actor_condition] snippets that I've tried from "actor.ltx" have led me here to ask for help.
I hope for the sake of refining the CS Redux mod that someone can. I have 2 further questions which I'll write later. This one takes priority as it is by far the issue that impacts most negatively on the enjoyment of those that play the mod.
Question 2 will be: How can I make 'codelocks' work on inventory boxes - i.e. the combination safes that litter the Zone.
Question 3 will be: How can I best create (or integrate) a custom mission log - i.e. Adding a diary that may be updated to the inventory or adding custom missions to the "secondary tasks" list, or, adding an additional page/tab to the PDA that will automatically (via info_portion etc.) update and save/load custom data.
Thanks for reading.