Jump to content

Solution To Localizing "StaminaChangeOT"


ztensity

Recommended Posts

Previous Request

 

image.thumb.png.504c876b65018a73fd386396e1dee0b6.png

 

Hey guys, I've been trying tirelessly to localize "StaminaChangeOT" and "HypothermalResist" via XPATH with XML and Localization, but I have had absolutely no luck, despite multiple attempts to get these names to change.

 

I have tried to use XML with XPATH and Localization to change these names multiple times. Does anyone have any thoughts? I'm truly hoping that one of The Fun Pimps comes in with the save. Saminal is looking at some of my code as well to see if he can find something that will find a way to Localize these lines.

 

Finally see my picture again with full current code I'm using with no luck of changing the Localization of "StaminaChangeOT" and "HypothermalResist."

 

SOLUTION

 

753915138_Screenshot2021-02-1818_05_50.thumb.png.711f72c7bb1015d6e68e2607a3422408.png

 

 I figured out a work around after speaking with Sirillion!

 

Sirillion informed me earlier today that it's "not really meant to be part of the UI at all, just a piece of code I found when browsing through the engine." So since he said "StaminaChangeOT" was hardcoded, I decided to go a different route. So I dug through his files to hide the code he added that brought back old buff stat displays (which can't be localized) via the below code:

 

<remove xpath="windows/window[@name='buffInfoPanel']/panel/rect/rect[@name='description2']" />

 

I then used localization for the buff itself to provide the above description, which looks a bit more immersive:

 

buffElementHotShowerWetName,buffs,Buff,,Cleanliness
buffElementHotShowerWetDesc,buffs,Buff,,"Normally under the rain, you get colder, but since you've taken a hot shower, you receive some unexpected benefits.\n\n\n\nStamina Regeneration: +{cvar(.StaminaRegeneration:0.0)}%\n\nCold Resist: +{cvar(.ColdResistance:0.0)}"

 

I will keep the code that hides those stats hidden while I test things, but ultimately, I'll hide it again for the full release for immersion :smile:

 

REQUEST

 

I would like to ask for more ways to localize things. Especially when people such as Sirillion uncover old, unused code. This is amongst many of my thoughts for additions to the game moving forward, but I thought I'd share my solution and thoughts!

Link to comment
Share on other sites

  • ztensity changed the title to Help Needed: Problem Localizing "StaminaChangeOT" From Buffs & Item Display

953999375_Screenshot2021-02-1818_05_50.thumb.png.4b9428d6f142179e44a37e6c98f6b5dd.png

 

I figured out a work around after speaking with Sirillion!

 

Sirillion informed me earlier today that it's "not really meant to be part of the UI at all, just a piece of code I found when browsing through the engine." So since he said "StaminaChangeOT" was hardcoded, I decided to go a different route. So I dug through his files to hide the code he added that brought back old buff stat displays (which can't be localized) via the below code:

 

<remove xpath="windows/window[@name='buffInfoPanel']/panel/rect/rect[@name='description2']" />

 

I then used localization for the buff itself to provide the above description, which looks a bit more immersive:

 

buffElementHotShowerWetName,buffs,Buff,,Cleanliness
buffElementHotShowerWetDesc,buffs,Buff,,"Normally under the rain, you get colder, but since you've taken a hot shower, you receive some unexpected benefits.\n\n\n\nStamina Regeneration: +{cvar(.StaminaRegeneration:0.0)}%\n\nCold Resist: +{cvar(.ColdResistance:0.0)}"

 

I will keep the code that hides those stats hidden while I test things, but ultimately, I'll hide it again for the full release for immersion :smile:

Link to comment
Share on other sites

  • ztensity changed the title to Solution To Localizing "StaminaChangeOT"

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...