Updating From Before v2.0.0 - Phil25/RTD GitHub Wiki
You may skip this if you're not customizing perks in any way.
AlliedModders thread.
Your custom perk config might not be compatible with version 2.0.0 and above. Please review the below configuration changes and update what's necessary. If you have any questions or problems, go ahead and ask on the
Before addressing the config; Version 2.0.0 requires SourceMod 1.9 or higher. View latest snapshots.
Contents
^
Configuration Changelist-
Perks are now identified by token, not by ID
- Token is now the section name.
- This is not the case in default config file, which shouldn't be touched.
- ID is still present, cannot be changed.
- ID is added automatically, by the order the perks appear in.
- Token is now the section name.
-
"settings"
is no longer a single value.- Each setting has its own name.
- Settings is split into subfields.
- ex. Fast Hands: instead of
"settings" "2.0, 2.0"
, it is now:
"settings" { "attack" "2.0" "reload" "2.0" }
- ex. Fast Hands: instead of
- Make sure to update each settings field in your custom config.
- This allows you to change individual settings per perk.
- Defining a setting of incorrect name does not yeild an error.
- Make sure you typed them in correctly.
-
Perks are no longer addressed by their unique tag, be mindful of your sm_rtd2_disabled ConVar.
-
"class"
field is parsed differently, what you currently have should work.- Doesn't count any other characters than digits.
"1, 2, 5, 8"
is the same as"12 5 a8"
, or"1258"
."1258"
means Scout, Soldier, Heavy and Medic.
- If you want all class it must be
""
,"0"
, or"511"
.- Putting a 0 anywhere along with other digits doesn't cut it anymore.
- Doesn't count any other characters than digits.
-
"tags"
are now separated by comma, just like weapon classes. -
Removed cvars: sm_rtd2_repeat & sm_rtd2_repeatgreat
-
Added cvars: sm_rtd2_repeat_player & sm_rtd2_repeat_perk
-
Made Timebomb and Fire Timebomb timed perks (were a bit hacked instant-type perks)
- Ticks setting is specified as their time.
- Time defaults to 10.
- Cannot be forcefully removed when the pre-explosion sound is going off.
-
(For devs) deprecated the following natives:
- RTD2_GetClientPerkId, use RTD2_GetClientPerk
- RTD2_ForcePerk, use RTD2_Force
- RTD2_RollPerk, use RTD2_Roll
- RTD2_RemovePerk, use RTD2_Remove
- RTD2_GetPerkOfString, use RTD2_FindPerk or RTD2_FindPerks
- RTD2_RegisterPerk, use RTD2_MakePerk
- RTD2_SetPerkByToken, RTD2_SetPerkById and RTD2_DefaultCorePerk, use RTD2_SetPerk*
^
TLDR- Perks in custom config are identified by token, not ID.
settings
is now a subsection per each perk. Check how it's handled in the default config to deal with it.class
is parsed more loosely but what you currently have should work.tags
are now separated by comma, not a vertical line.- Perks are no longer addressed by their unique tag, be mindful of your sm_rtd2_disabled ConVar.
- Timebomb & Fire Timebomb are now timed perks instead of instant ones. Their time property manages the legacy ticks setting.
^
Examples^
Setting Flying's mode to 0- OLD
"4" // flying's ID
{
"settings" "0" // set settings string to 0
}
- NEW
"flying" // flying's token
{
"settings" // setting subsection
{
"mode" "0" // set mode to 0
}
}
^
Disabling Fast Hands' increased reload rate- OLD: Override
settings
, keep attack speed default, while changing the reload speed
"43"
{
"settings" "2.0, 1.0"
}
- NEW: Override
reload
field only.
"fasthands"
{
"settings"
{
"reload" "1"
}
}