Closed Pychnight closed 6 years ago
You should improve upon this request, you can see my main goal though I'm not really sure.
Most of this type of request could be done within a script / boo, Just need to refine this request to allow it to be more flexible and still get what, i would like in the end.
Right now -- I think we will need to split the currency system into its own plugin. ( Like seconomy ). Separation of concerns and all that.
But to start off, it will live in the existing leveling plugin during early development. Eventually it should stand on its own though, so other plugins can make use of it easily. Sort of like what we'll do with the boo scripting, since I still need to rip that out of custom npcs.
Also, I don't plan on supporting journaling. Unless there's a good reason for it, it seems too heavy duty for a game IMO. If this were dealing with real money, than its a must. But since this isn't a bank, and really just a simulation of a very simple bank, its a fair amount of extra work for dubious value...
Making this similar to SEconomy, in terms of usage. But not completely.
Current status:
Basic commands: /xbank, /xbank bal
Persists to sqlite db. Willl be configurable, but right now its the only one supported.
The internal currency is only a generic unit- multiple currency rendering and parsing is to come.
This does track npc strikes per player, and also detects npc despawns. However, no rewards of any kind are doled out to players yet. I noticed after starting, that you had requested this to handle currency and exp all in one. I still think its better to keep things separate. One thing I'm doing here, since this code is basically my own from scratch, and not inherited-- is building it as separate objects, that are focused on a specific task. So in this case, the npc strike tracker should be able to be used by other code/plugins. What I'm planning is to have a configurable reward evaluator class that can hook into the strike tracker, and then rewards players as needed, based off of the params we feed it. ( This stuff is so much easier when you use OO principles, and not just cram code in wherever )
how about Ensure Send Status correctly filters out color codes and tags. (custom npcs)
maybe just rename this to SendVictoryStatus
functionality wise it should be the same as a victory screen in text Enemy's killed: Names : Players involved Player 1: exp : damage : player 2: exp : damage Player 3: exp : damage : player 4: exp : damage Player 5: exp : damage : player 6: exp : damage
command /battlereport should bring this up database wise, you can think this as a score board or anti-cheat
3 #7
There are some bad exploits within the current Seconomy Code.
So, i want to turn Leveling plugin into a general currency / exp plugin (Pretty much all in one)
[x] Ability to easily define multiable currencys and give them custom names
[x] Improve Command Structure #9 for requested changes and admins have access to features via commands, where needed.
[x] Ability to define what gives you currency (mining, killing, playing for extended time?, voting)
[x] Ability to define Quadrants for each currency and support unlimited of them (if possible)
[x] Ensure other plugins can use currency easily (housing, custom npcs, npcshops) and support Quadrants for each plugin.
[ ] Ensure Send Status correctly filters out color codes and tags. (custom npcs)
[x] add support to Housing for new currency system / Quadrant support
[x] add support to NpcShops for new currency system / Quadrant support
[x] add support to CustomNpcs for new currency system / Quadrant support
Example usage [this is only a example, if you know a better solution other then config you can do that]
config.json [ Currency: { Internalname: "Exp", "Quadrant1CombatText: "Exp, Color.Green" "Quadrant1FullName": "Exp", "Quadrant1ShortName": "exp", "Quadrant1Abbreviation": "e", ScriptPath: "killing.boo" AllowTrade: "False" (allows use with currency pay command, thus allowing players to trade this currency) GainBy: "Killing" CombatTXTColor: "green" SendCombatTXT "true", SendStatus: "false", Multiplier: 1.0 "DeathPenaltyMultiplier": 0.4, "DeathPenaltyMinimum": 0.05, "DeathPenaltyPvPMultiplier": 0.1 }, { Internalname: "Dust", "Quadrant1CombatText: "d, Color.Green" "Quadrant1FullName": "Dust", "Quadrant1ShortName": "dust", "Quadrant1Abbreviation": "d", "Quadrant2CombatText: "f, Color.Red" "Quadrant2FullName": "Fragement", "Quadrant2ShortName": "fragement", "Quadrant2Abbreviation": "f", "Quadrant3CombatText: "dg, Color.Red" "Quadrant3FullName": "Demigem", "Quadrant3ShortName": "demigem", "Quadrant3Abbreviation": "dg", "Quadrant3CombatText: "c, Color.Red" "Quadrant4FullName": "Crystal", "Quadrant4ShortName": "crystal", "Quadrant4Abbreviation": "c" ScriptPath: "mining.boo" GainBy: "Mining" SendCombatTXT "true", SendStatus: "false", Multiplier: 0.5 "DeathPenaltyMultiplier": 0.4, "DeathPenaltyMinimum": 0.05, "DeathPenaltyPvPMultiplier": 0.1 }, ]
usage example below for other functions [in this example we are reducing the exp multiplier for the specified enemy's by 0.5]
"NpcToExpReward": { "Wall of Flesh": 0.5e, "One Eye": 0.5e, "Lihzahrd": 0.5e, "Flying Snake": 0.5s },
itemshop example
1dg15f12d12e would also be valid for prices
Command Changes #9
/multiplier will need to be changed to support being able to change a specific currency
example /Multiplier Currency e DeathPenaltyMultiplier 0.5 example2 /Multiplier Currency e Multiplier 0.5