AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Class Backend (https://forums.alliedmods.net/showthread.php?t=164513)

KyleS 08-12-2011 14:16

[ANY] Class Backend
 
2 Attachment(s)
Cool! How does this work?
This reads SMC (KeyValue) files in your SourceMod/ClassManager directory and stores the data in tries.

Everything in Path_SM/configs/ClassManager/ALoad/ loads first, and regardless of the map.
Everything in Path_SM/configs/ClassManager loads second, and dependent on the prefix of the map.

For example, if the map is de_dust, you could have a file called de_dust.cfg, de_du.txt, and de_.ur all providing different user classes. It doesn't matter what the file extension is. Provided it's a valid KV file, all should go well.

I have nothing to interface with this. What will this do for me?
Think of it as a fuel-powered Lawn mower without fuel.

I want to write a plugin that uses this.
Awesome! Take a look at the include. If I end up having to make API changes, they will not break compatibility with your plugin.

I have an issue with the backend! >:O
Well that sucks. Post whatever it is in the thread.

Your include file is a bit bonkers...
Yeah, I know. If you have any suggestions, or if you want to clean it up. By all means please do.

Credits
Psychonic - Putting up with my constant questions
Berni/Graczu - Took a look at their map config implementations.
dvander/Greyscale/javalia/MatthiasVance/Seta00/rhelgeby - Looking at my old structure and or providing helpful comments (<Seta00> trie harder).

Peace-Maker 08-15-2011 12:13

Re: [ANY] Class Backend
 
Uhm, what could i use this for? Imagine i'd wanted to switch to this backend to handle the player classes in smconquest - would i get any advantages?

Lot's of love <3

KyleS 08-15-2011 12:26

Re: [ANY] Class Backend
 
Quote:

Originally Posted by Peace-Maker (Post 1533156)
Uhm, what could i use this for? Imagine i'd wanted to switch to this backend to handle the player classes in smconquest - would i get any advantages?

Lot's of love <3

Just ease of use on users. If your plugin is active, read the Tries and away you go. Each person seems to have their own generic implementation of this. To me at least it just creates a mess for the end user and removes all customization. The main player that has this kind of is ZR. However, map config player classes are pretty rough with it. Since this allows for multiple sources (Static/Generic classes, then specific ones per map prefix and or specific map), it can drastically change the game easily lessening the load for the server admin :wink:

Hope that helped :P

Thrawn2 08-15-2011 12:37

Re: [ANY] Class Backend
 
i don't really get what this does currently =D
what's up with that map<->playerclass relation?
or let's start earlier: what's a playerclass? a trie storing custom information saved in a keyvalues file? that doesn't seem very specific to a playerclass (as in 'soldier', 'demoman', 'common infected', 'uberzombie' etc) to me - and then i'd rather use a function like Trie_LoadFromKeyvalues() and Trie_SaveAsKeyValues(). I'd even less make them dependent on a specific map.

Please elaborate a bit more, as i'm suspecting i've completely missed the point of this ;)


All times are GMT -4. The time now is 08:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.