smrpg
smrpg copied to clipboard
[Feature Request] Restricting/unlocking upgrades
Restrict upgrades and upgrade levels to a certain RPG level, RPG upgrade(s), RPG upgrade level. (Say i want everyone to have unrestricted access to clipsize but only to level 2 and admins have up to level 5. Restrict clipsize until a player reaches a certain rpg level or buys a certain(or multiple) upgrade or upgrade levels needed to unrestrict it.)
I thought about displaying the requirements by either
A. Replace the cost info by the upgrade with the requirement, and when that requirement is met, change to [Cost:X].
B. Use a submenu with the requirement details.
Was thinking if an upgrade is restricted because it requires a different upgrade, then replace [Cost:X] with either [Cost:Locked] or [Req:Vampire lvl 5]. When that requirement is met, then change the [Req: Vampire lvl 5] to the normal [Cost:20]
I like the submenu option. It scales better if there are multiple dependencies in the upgrades + rpg level. We would still need some indicator in the normal upgrade line in the menu. I'd like to keep the upgrade cost info available, so some symbol at the start like "[R] " or better more verbose " - 1/2 Req" at the end would be nice? Other ideas?
That would even keep the option available to implement something like external requirements e.g. having item X in a shop or being in the top 10 in HLX using some API.
I think less would be better in the upgrades menu to keep it clean. Like having the [R] for a restricted skill and when you unrestrict it - it just disappears. When you see an [R] on the skill, you can just go into the submenu and see the requirements. For actually displaying the requirements in the submenu, i was thinking maybe link convars to each skill submenu and to each of the skill configs.
e.g: smrpg_regen_playerlvl_req "50" smrpg_regen_upgrade_req "health" (upgrade shortname) smrpg_regen_upgrade_req_level "10"
is it possible to make the convars have more than one? e.g: smrpg_regen_upgrade_req "health, resup" and smrpg_regen_upgrade_req_level "10, 2" (10 for health, and 2 for resup)?
I also just thought of having a convar to restrict upgrades past a certain player level too.
I've started working on this here. Check out the sample config. Is the format intuitive enough or do you have any suggestions?
Until now, you can only set the minimum required level of other upgrades and the required minimum rpg level. The "access" section isn't handled yet, but it will look similar to the one in the sample config.
I also just thought of having a convar to restrict upgrades past a certain player level too.
Restrict in disabling it completely for the player if he reaches some rpg level or don't allow him to buy any further levels of the upgrade or restrict him to some set upgrade level?
That looks fantastic! I understood most of the upgrade restrictions format, but the upgrades section was a bit confusing until i read "health" "1" // Need at least "health" level 1 to buy "regen" level 2 and above." which made it all clear.
Restrict as in disabling the upgrade completely once they reach a certain level.
For each section under an upgrade in upgrade restrictions, if someone wants to use any of those 3 independently, e.g "upgrades" and "rpg_level" but not "access" - what do they do to the access section and vice versa? delete that section, leave it blank, or?
Implementing external requirements would be great! Having an upgrade restricted/unlocked by rank, k/d ratio, kills, deaths, etc. or by un/locking an upgrade with a Store plugin.
Restrict as in disabling the upgrade completely once they reach a certain level.
And automatically give the player the credits back? Only the sell percentage or full credits? Hide it from the upgrade menu afterwards or just show it as restricted? Have the option overridable by some access rule so admins or VIPs can still use it past that level?
what do they do to the access section and vice versa? delete that section, leave it blank, or?
Just delete the sections you don't need.
Only give credits back for however many levels they bought on the upgrade. (If an admin gave upgrade levels to that person, they would only get back what they bought and not the levels the admin gave them.) I would like to see a config choice of full credits, percentage, or none. Hide it when it gets disabled per access group and overridable so certain groups can use it.
Only give credits back for however many levels they bought on the upgrade. (If an admin gave upgrade levels to that person, they would only get back what they bought and not the levels the admin gave them.)
That's going to require some kind of tracking of which upgrade level was paid credits for and which not. I'll leave that for an enhancement of this feature later..
For now just restrict it without giving any credits back and leaving an [R] on it with the amount of skill levels bought.
Any ETA for the new updated version?
No, sorry. Dependency tracking is confusing and I don't have lots of time atm. It's done when it's done ;)
Not rushing was just wondering, since I am really excited about this addition. If I can help in any way let me know.
How has all this been going? Been busy with work i haven't had a chance to check smrpg in a while.