smrpg icon indicating copy to clipboard operation
smrpg copied to clipboard

[Feature Request] Restricting/unlocking upgrades

Open coty9090 opened this issue 9 years ago • 13 comments

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]

coty9090 avatar Jun 29 '16 17:06 coty9090

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.

peace-maker avatar Jun 30 '16 15:06 peace-maker

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.

coty9090 avatar Jun 30 '16 21:06 coty9090

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.

peace-maker avatar Jul 11 '16 22:07 peace-maker

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?

peace-maker avatar Jul 11 '16 22:07 peace-maker

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.

coty9090 avatar Jul 12 '16 06:07 coty9090

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.

peace-maker avatar Jul 12 '16 08:07 peace-maker

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.

coty9090 avatar Jul 12 '16 17:07 coty9090

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..

peace-maker avatar Jul 26 '16 19:07 peace-maker

For now just restrict it without giving any credits back and leaving an [R] on it with the amount of skill levels bought.

coty9090 avatar Sep 08 '16 00:09 coty9090

Any ETA for the new updated version?

Hetachi avatar Sep 21 '16 11:09 Hetachi

No, sorry. Dependency tracking is confusing and I don't have lots of time atm. It's done when it's done ;)

peace-maker avatar Sep 21 '16 16:09 peace-maker

Not rushing was just wondering, since I am really excited about this addition. If I can help in any way let me know.

Hetachi avatar Sep 22 '16 19:09 Hetachi

How has all this been going? Been busy with work i haven't had a chance to check smrpg in a while.

coty9090 avatar Aug 07 '17 03:08 coty9090