Mentrillum / Slender-Fortress-Modified-Versions

A modification of Team Fortress 2 based on the game Slender: The Eight Pages.
GNU General Public License v3.0
33 stars 22 forks source link

Map Entities Update (Round 3) #32

Closed KitRifty closed 3 years ago

KitRifty commented 3 years ago

Final round.

Overview

Added features:

Changes:

Variable Support for sf2_game_text

The sf2_game_text entity now supports variables in its Message property. The following variables are available to all sf2_game_text entities:

To use a variable, insert the variable name anywhere in your sf2_game_text's Message. For example:

Example 1: Collected <pageCount> out of <maxPages> pages Displays: Collected 1 out of 8 pages

Example 2: <pageCount>? Just <pageCount>? That's not enough! Displays: 1? Just 1? That's not enough!

Escaping characters is not supported.

Page Messages Revamp

To determine a sf2_game_text entity to show when collecting a page, use the Page Text Entity property of sf2_gamerules, or the SetPageTextEntity input along with the Name of the entity. Changing page text entities mid-game or even upon collecting a page is allowed.

%d is no longer used for the revamp style. This has been deprecated in favor of the new variable system introduced.

The old formatting style posed problems for map localization because of the very specific order the numbers are passed into the string (collected page count first, then max page count). Now with the variable system, localization is now easier especially for SOV languages, as the needed variables can be switched around as needed. Stripper: Source can be used for such changes.

Moreover, the variables can be used for any sf2_game_text entity; regardless if they are used as a page text entity, intro text entity, or not.

These changes DO NOT APPLY to the old entity. If you still use the sf2_page_message entity, you are still restricted to using %d and cannot use variables.

Intro Text Sequence Revamp

Like how page messages have been revamped, use the Intro Text Entity property of sf2_gamerules to determine the first intro text entity in the sequence. sf2_game_text entities have now been fitted with the Next Intro Text Entity property, which determines the next intro text entity to be shown in the intro text sequence. You are no longer restricted to a naming scheme like the old system; you can use any name you like for your text entities, just as long as they are all referenced in the correct order.

sf2_intro_message has been deprecated as well; if you were using a sf2_intro_message entity, you must now manually chain it into the intro text sequence. sf2_intro_message will not be used if the Intro Text Entity property is used in sf2_gamerules.

These changes DO NOT APPLY to the old entities. If you still use the sf2_intro_text_# or sf2_intro_message entities, you cannot use variables.

Conclusion

This marks the end of revamping the map entity system from old to new. Preferably, a map should be using either only the old or the new system. Even though a mixture of both is possible, I wouldn't recommend it as you may run into unexpected problems in your map. If any maps are currently using a mixture, you can use Stripper: Source as a band-aid fix, and have future updates of the map totally convert to the new system.

Here is a final list of the entities, comparison of old -> new.

* = exclusive to Modified ** = exclusive to Private

Old Entity New Entity Changes
sf2_boss_maker Creates bosses at its location, or a custom destination set by SetSpawnDestination input. Optionally can set a spawn radius.

OnSpawn output called for each successful spawn by this entity, !activator being the boss entity that spawned.
sf2_game_text Allows showing custom HUD text to the player's screen. Display input can now optionally take a targetname or !activator to show text to a specific player.

game_text was not usable because SF2 utilizes a lot of HUD text, and its text gets overwritten in 1/10 of a second, leading to confusion in maps that use it.

Stripper: Source can be used to replace existing game_text entities with sf2_game_text entities on existing maps, and using game_text is strongly discouraged for future maps.
sf2_trigger_boss_despawn A trigger brush that despawns bosses that enter it.
sf2_adventure_map** sf2_gamerules Is Adventure Map property
sf2_bossoverride(name) sf2_gamerules SetBossOverride and ClearBossOverride inputs
sf2_bosses_chase_endlessly* sf2_gamerules Bosses Chase Endlessly property and Enable/DisableBossesChaseEndlessly inputs
sf2_boxing_map* sf2_logic_boxing
sf2_boxing_boss_spawn* Unchanged
sf2_classic_map** sf2_gamerules Is Classic Map property
sf2_escape_custommusic sf2_gamerules Stop Page Music on Escape property
sf2_escape_map** sf2_gamerules Is Escape Map property
sf2_escape_message sf2_game_text Entity referenced by Escape Text Entity property of sf2_gamerules; can also be set using SetEscapeTextEntity input
sf2_escape_spawnpoint sf2_info_player_escapespawn Allows multiple instances of spawn points and Enable/Disable inputs for more control over spawn locations

OnSpawn output is fired for players that spawn at the entity, !activator being the player.
sf2_escape_timelimit# sf2_gamerules Escape Time Limit property and SetEscapeTimeLimit input
sf2_escape_trigger sf2_trigger_escape Additionally can takes filters into account
sf2_infiniteblink sf2_gamerules Infinite Blink property and Enable/DisableInfiniteBlink inputs
sf2_infiniteflashlight sf2_gamerules Infinite Flashlight property and Enable/DisableInfiniteFlashlight inputs
sf2_infinitesprint sf2_gamerules Infinite Sprint property and Enable/DisableInfiniteSprint inputs
sf2_intro_fade sf2_gamerules Intro Fade Color, Intro Fade Time, and Intro Fade Holdtime properties
sf2_intro_message Deprecated
sf2_intro_music sf2_gamerules Intro Music Path property
sf2_intro_relay sf2_gamerules OnStateEnterIntro output
sf2_introtext# sf2_game_text Starting text referenced by Intro Text Entity property of sf2_gamerules; subsequent text entities referenced by Next Intro Text Entity property of sf2_game_text
sf2_logic_escape sf2_gamerules Escape to Win property

For OnUser1 output equivalent, use OnStateEnterEscape.
sf2maxpages# sf2_gamerules Max Pages property
sf2maxplayers# sf2_gamerules Max Players property
sf2_nav_interface Unchanged
sf2_nojumprestrict** sf2_info_jumprestrict Allows enabling/disabling the jump restriction via Stamina Jump Restriction property and the Enable/DisableStaminaJumpRestriction inputs.
sf2onpagecount# sf2_gamerules OnCollectedXPages and OnCollectedPagesChanged outputs
sf2_page_model
sf2_page_spawnpoint
sf2_info_page_spawn Allows ability to have different models, skin, model scale, etc. for each page spawn point, as well as specify page group via the Group property. You no longer have to guess how the page will look when spawned. Supports physics simulation in Hammer++ for ultra-realistic placement!
sf2_page_message sf2_game_text Entity referenced by Page Text Entity property of sf2_gamerules; can also be set using SetPageTextEntity input
sf2_pagemusic#-# sf2_info_page_music Contains up to 16 different page ranges as well as their respective tracks. It also has default values filled in to showcase how the ranges should be formatted.

If you need more page ranges for whatever reason, make another of this entity.
sf2_page_sound sf2_gamerules Page Collect Sound property
sf2_proxy_map sf2_logic_proxy
sf2_proxy_spawnpoint sf2_info_player_proxyspawn Enable/Disable inputs for more control over spawn locations

OnSpawn output fired for players that spawn at the entity, !activator being the player.
sf2_pvp_spawnpoint sf2_info_player_pvpspawn Enable/Disable inputs for more control over spawn locations

OnSpawn output fired for players that spawn at the entity, !activator being the player.
sf2_pve_trigger** sf2_trigger_pve
sf2_pvp_trigger sf2_trigger_pvp
sf2_raid_map sf2_logic_raid
sf2_renevant_map* sf2_logic_arena Contains inputs for controlling waves + outputs of waves triggered and Finale Time property
sf2_survival2_map sf2_logic_elimination
sf2_survival_map sf2_gamerules Survive before Escape property
sf2_survival_timelimit# sf2_gamerules Survive Until Time property
sf2_slaughterrun_map* sf2_logic_slaughter
sf2spawn(name) sf2_info_boss_spawn Spawns an active boss with the matching profile name defined in Boss Profile property. Use Spawn input to spawn the boss.

OnSpawn output fired for boss entities that spawn at the entity, !activator being the boss entity that spawns.
sf2_time_gain_frompage# sf2_gamerules Time to Add on Page Collect property and SetTimeToAddOnCollectPage input
sf2_timelimit# sf2_gamerules Time Limit property and SetTimeLimit input
sf2_unreachable_escape** sf2_gamerules Unreachable Escape property