Github: https://github.com/raymoo/magical_realm
License: GPL3
Dependencies: default, fire, tnt, dye, loot, monoidal_effects
Testing Server (May be down much of the time): viewtopic.php?f=10&t=13832&p=203374
Playing with/Testing Spells (including the included ones):
If you write any spells depending on my framework, expect them to break often, as I am still feeling out the API.
I am working on a modpack for magical things,.
Mods:
player_systems - Persistent data indexed by player name:
I needed a simple system to get and set data specific to players, and have it persisted automatically. This is mainly meant for personal use, unless there is enough interest.
magic_spells - a spell framework:
The main difference from the magic modpack, other than flexibility, is that spells take spell slots to prepare, and you can only restore your preparation slots every now and then. This doesn't mean that all spells will be DnD-style limited-use spells, but it does mean that while some spells might be infinite-use, you can't switch out your build every 5 minutes (unless the server is configured that way).
Another difference is that there is special support for startup times on spells. I am planning for most of my spells to not use mana, and instead have them take up less spell slots if prepared with longer casting times, in order to balance powerful spells. Many spells probably will have the option of being prepared for instant-casting, but it will usually mean that the uses are limited.
Since some spells might have more complex behavior than others, spells can be defined to have a custom form for special configuration at preparation time. If you don't specify one, it immediately goes to spell confirmation, using an empty table as metadata.
The API can be viewed at https://github.com/raymoo/magical_realm ... ls/API.txt.
combat_spells
Adds magic_spells spells related to combat.
travel_spells
Adds spells that aid in travel.
build_spells
Spells that enable you to change things in the world.
magic_foci
Lets you craft magic foci of varying quality. A magic focus lets you cast spells.
loot
Loot framework
spellbooks
Adds spellbooks, which let you learn spells and are single-use.
magic_battle
Adds some PvP mechanics
I could use suggestions, particularly with
- Extending the API - Are there any limitations you see with the API that would prevent your nice spell idea from being realized? This includes simple things that I might have just not thought of exposing.
- Nicening the API - Maybe your spell is doable, but would result in ugly, unmaintainable, spaghetti code if done with this API. Suggest ways to make the API more convenient/safer/terser/etc.
- How to grant players spells - Rare items? Expensive crafts? Maybe something more elaborate than time investment. This would probably be part of a separate mod (in this modpack).
- When/How to allow players to prepare spells - Currently there is a /prepare command for testing purposes, but maybe players should need a spellbook or altar to prepare their spells at. Or maybe players would need to stand still a minute to collect their thoughts, but I don't think waiting like that fits in Minetest. This would probably be part of a separate mod (in this modpack).
- Progression - Currently there is a simple system for keeping track of aptitudes (for different schools of magic), but the API does not expose anything for boosting them, even though they are passed into some of the spell callbacks. The idea is that you can make specific spells cheaper if the caster has a high aptitude in a relevant school of magic, when calculating spell slot usage. This could make a normally-unaffordable spell something that could be used semi-often, for specialized casters.
- Spell schools - What spheres of magic should exist? This would be handled by a separate mod, to prevent tying magic_spells from being tied to a specific list of magic schools.
- Death mechanics - How to handle player death, with regards to known/prepared spells and things. Most likely this would be handled in a separate mod.
- Casting Interface - Nice ways to cast spells that have already been prepared.
Spell ideas are good too, but since I haven't implemented many yet, there are already a lot to choose from. But if there is some specific kind of spell you would like to see implemented sooner, or that you would think would make good example code, feel free to suggest.
Current Spells:
summon_tnt (Summon Lit TNT):
magic_missile (Magic Missile):
reflect_lesser (Lesser Reflect)
rock_hide (Rock Hide)
blink (Blink)
ethereal_jaunt (Ethereal Jaunt)
moon_shoes (Moon Shoes)
haste (Haste)
excavate (Excavate)