Posts: 4
Threads: 1
Joined: Sep 2017
Thanks: 0
Given 0 thank(s) in 0 post(s)
Hi. Managed to get Cuberite compiled from source on my 2008ish MacMini, seems to run great. The villages look cooler than vanilla, but there's no villagers? Interesting.
Anyhow, I'm interested in a (semi ambitious / foolhardy ?) server mod to create something that is MUD-like. I played ArcticMUD pretty extensively 95-2002ish, and my kids are super into Minecraft and I enjoy playing with them, but would like to add some RPG-like elements to the game. Cuberite seems like it'll be much easier to create plugins/mods for, but I'm not a codemonkey... I spent a couple years in comp eng so I grok the basic concepts, but I'm a lawyer by profession. Here's some of the things I'm thinking about trying to do, and I'm curious if it's even something that's possible with a plugin on the server-side.
1. Randomized RPG style stats (I will use Goodman Games' DCC as a template, because it rules and is the best D&D edition ever): 3-18 Str/Agi/Sta/Per/Int/Luck ...
2. Classes selectable at XP level 1: warrior, wizard, thief, cleric, elf, dwarf, halfling (upon death, you delevel to XP 1, not 0, so you don't lose your class selection, and avoids the potential abuse of intentional changing of classes, I think. Alternatively, just use hardcore mode, but that may be a bit much for 8-12 year olds hehe). Probably need to have a "reroll to 0" option if you do want to change, but you lose all your gear, achievements, etc.
3. Abilities/Magic Spells: some special skills like Stealth, Healing, Turn Undead, some use of existing stuff like nightvision for elves/dwarves, and an abbreviated list of magic spells for wizards/elves. Spells will use components, and I expect to use a system kind of like Ultima 5, where you craft a spell effect to set off (which will be slightly randomized, per DCC style).
4. Inventory/slot tweaks. These will fluctuate for each character based on stats (Str/Agi), too.
5. More mobs and items. Actually, I'd also love to port the Roguelike Dungeons mod for Forge into Cuberite, because it's really pretty cool.
I looked at items.ini and crafting/brewing/furnace.txt, but I'm not entirely sure about the feasibility of simply adding new stuff to these. I'm also not entirely sure about whether it's possible to create randomized stats, not sure if there's any plugin-level access to the server's RNG.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
Hello, welcome to the forum.
Some of these things should be do-able with the current API support. Some would require more work on the C++ backend. Some are very unlikely to be implemented anytime soon.
1. The plugin would have to keep track of the stats (perhaps the new scoreboard implementation could be (ab)used for that), and actually implement the behavior for them. I'm not sure what they each would mean for the gameplay in minecraft, I assume it'd work something like this:
- Strength: for each level, an increasing random chance of higher damage per melee hit (perfectly doable rightaway)
- Agility: increased player speed for each level (doable)
- Sta - ?
- Per - ?
- Int: Intelligence? No idea what that would affect
- Luck: Could be random loot bonus, could be randomly increased mined block drops
2. Class needs to be tracker in the plugin, the mechanics should be fully doable now
3. I'm not entirely sure how these spells / skills would translate into MC world. Some stuff, such as Healing, should be easy enough to add, others, mainly which interact with the AI, would be impossible (the AI is being rewritten nowadays, so maybe this'll change soon)
4. Impossible to do without an accompanying client-side mod. And Cuberite is not prepared for slot count changes, either.
5. Needs an accompanying client-side mod.
There's no access to the server's RNG, but that should not be an issue, mostly. The plugins can already intercept most actions that make use of the internal RNG, so it can manipulate the result (more drops, higher melee damage etc.). And for the other way around (plugin needing an RNG to generate random numbers), Lua's built-in RNG "math.random" can be used.
Posts: 4
Threads: 1
Joined: Sep 2017
Thanks: 0
Given 0 thank(s) in 0 post(s)
Yeah I was afraid that some of what I wanted to do would not be possible without "modding" on server/client both, versus plugins on the server side only. I saw that a guy was working on getting Forge working w/Cuberite, I suppose that would allow for modding to work? Kind of a bummer on the slot tweak issue, but there's a backpack plugin for Cuberite that I downloaded yesterday (haven't set it up yet), so maybe it does work in theory??
On the stats, it's Strength/Agility/Stamina/Personality/Intelligence/Luck, per DCC. I was thinking Str/Agi in some formula would affect how many items you could carry total, so there's some variability, and worn containers become helpful (backpack/pouches/sacks). Stamina would affect how fast your hunger bar decreases, so you could sprint much longer, etc. Maybe have it give a small bonus to armor at base. Personality would affect the cleric-y abilities like healing, turn undead (which would need a crafted item, but wouldn't use it up; or maybe it would, haven't decided). Maybe some charm-like abilities later on, or trading with villagers. Intelligence would affect spell effects and enchantment (only wizards can enchant). And Luck would be, as you say, very helpful with drops, as well as having its bonus/penalty being factored into any randomized result rolls.
It sounds like it should be pretty easy to create the classes and have those be selectable at level 1 right now. Then maybe I move on to stats?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
I'm not too familiar with any D&D-style stats, so I didn't know
As for the backpack, it is possible for Lua plugins to open any kind of UI window the client already knows, so it's possible to make a special backpack command that would open up a chest-like window with items that are "stored in the backpack" (in the plugin's DB) and let the player swap those with their regular inventory / toss them to the ground etc. This would even be a reasonable workflow, since it would require some non-trivial time amount to "open the backpack" - i.e. type the command, and the items won't be accessible by regular gameplay mechanics (so a bow won't use backpack-ed arrows etc.)
You should perhaps do a bit more brainstorming about how the plugin would interact with things. How about multiworld - if there are multiple worlds in the server, will it affect all of them, or will you let the server admin to configure which worlds are affected? Or even further, will it be possible for a character to have different class / stats / backpack / ... for different worlds? It would make sense from some standpoint, but it affects the implementation quite a lot.
Afterwards, I'd recommend thinking about the commands that would be used by the plugin. How will the players choose their class? How will they access their backpack? Is there anything else that would need some interaction?
Then you can start coding, build a skeleton for the plugin and start implementing the individual "bones" gradually. I'd recommend posting some progress on the forum, as well as using an accessible repository online (github.com preferred), so that people can help you or even join you in the effort (it does sound like a fun project Don't forget to choose the license from the start.
Posts: 4
Threads: 1
Joined: Sep 2017
Thanks: 0
Given 0 thank(s) in 0 post(s)
"Stored in the plugin's DB" is an interesting point for me... so if I create these stats/classes for players' characters, these things will have to be stored in a plugin database? I was wondering where the info would be stored. In the mud context, I think every character had a player file (pfile). I was poking around looking at the API documentation yesterday. I sort of understand stuff... but I'm not super clear on how you create/add things.
To your question about how it would interact with multiworlds, that's one of the things that I really like about Cuberite from the start, the support for multiworlds means there can be lots of portals and planes and zones and etc etc. I'd like to see the LimitWorld plugin get a little more robust, so that some of the zones/worlds could be pretty small-ish. But for the stats/classes/equipment part, I expect that will be constant throughout the server for all worlds for a given player.
Posts: 10
Threads: 6
Joined: May 2017
Thanks: 0
Given 0 thank(s) in 0 post(s)
11-16-2017, 05:01 AM
(This post was last modified: 11-16-2017, 05:03 AM by nrgjrteherh435.)
Just out of curiosity, how hard would it be to convert the server-sided version of forge to C++? I understand the API is complex, but not as complex as the client API, surely... I know it would require client-sided mods to accompany the server-sided (duh). The point of doing such a thing would to have an insane amount of performance with 100+ mods (not accounting for client performance drawbacks). :P
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
Porting any mod would most likely require a complete rewrite. It's not just the programming language which is different, but also the complete architecture of the server.
|