Skip to content

Allow addons to hide loading tips#91

Merged
themrdemonized merged 1 commit intothemrdemonized:all-in-one-vs2022-wpofrom
Ishmaeel:all-in-one-vs2022-wpo
Oct 19, 2024
Merged

Allow addons to hide loading tips#91
themrdemonized merged 1 commit intothemrdemonized:all-in-one-vs2022-wpofrom
Ishmaeel:all-in-one-vs2022-wpo

Conversation

@Ishmaeel
Copy link
Contributor

Addons are able to customize the number and contents of loading screen tips via scripts and XML files, but they are not able to remove the tips altogether because empty strings are not allowed as resource strings and the engine always prints out a tip number followed by a hardcoded colon character.

With this minor change, loadscreen.script is able to return 0 for get_tip_number which will hide the loading tips.

Here is the best that can be done without custom binaries:
image

Tip number (0) is always displayed, along with the following colon (:)
The dots are coming from ui_st_loadscreen.xml where empty strings or invisible whitespace characters cannot be used.

Here's the result of the same addon with binaries customized with this commit:

image

Minimal addon to make this work is as follows:

ui_st_loadscreen.xml

<?xml version="1.0" encoding="windows-1251"?>
<string_table>
	<string id="ls_header">
		<text>S.T.A.L.K.E.R. Anomaly 1.5.3</text>
	</string>
	<string id="ls_tip_number">
		<text>‎.</text>
	</string>
	<string id="ls_tip_0">
		<text>.</text>
	</string>
</string_table>

loadscreen.script

function get_tip_number(level_name)
	return 0
end

function get_mp_tip_number(level_name)
	return 0
end

Addons are able to customize the number of contents of loading
screen tips via scripts and resource XML files, but they are not
able to remove the tips altogether because empty strings are not
allowed as resource strings and the engine always prints out a
hardcoded tip number followed by a colon (:) anyway.

With this minor change,  `loadscreen.script` is able to return `0` for
`get_tip_number` which will hide the loading tip altogether.
@themrdemonized
Copy link
Owner

thanks

@themrdemonized themrdemonized merged commit 37ae53c into themrdemonized:all-in-one-vs2022-wpo Oct 19, 2024
themrdemonized added a commit that referenced this pull request Oct 19, 2024
Allow addons to hide loading tips

(cherry picked from commit 37ae53c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants