[Modpack] Magical Realm [magical_realm]

Post Reply
Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

[Modpack] Magical Realm [magical_realm]

by Byakuren » Post

Note: No longer actively developed. Take a look at the artifice mod, when it's ready.

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):
Spoiler

Code: Select all

To test spells, you can give yourself a testing wand with
"/give player_name magic_spells:creative_stick". If you are playing on single-player,
the player name will be "singleplayer". Also, give yourself a
magic_spells:creative_spellbook. You can also find these items in the creative
menu.

If you want, you can craft magical foci instead of a wand - these wear out, and have different targeting ranges and use count for each tier. The crafting recipes all have the form of four of one item type on the outside (vertical/horizontal), and one item in the middle. Focus range only affects how far you can select a target; individual spells might have their own range limits.
  Wooden Focus (Outside: Stick, Inside: Paper) - 5 uses, 5 range.
  Stone Focus (Outside: Stone, Inside: Desert Stone) - 20 uses, 10 range
  Bronze Focus (Outside: Steel Ingot, Inside: Bronze Ingot) - 40 uses, 15 range
  Gold Focus (Outside: Steel Ingot, Inside: Gold Ingot) - 80 uses, 15 range
  Diamond Focus (Outside: Gold Ingot, Inside: Diamond) - 320 uses, 20 range

To learn a spell, click with the spellbook, click prepare,choose a spell,
and hit "Learn".
To prepare a spell, click with the spellbook, and choose a spell from the "Prepare" menu.

To use the wand, first select a spell by right-clicking. Then you can cast the spell
by left-clicking.

To remove all your prepared spells, go to the spellbook menu and hit
"Unprepare".
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):
Spoiler
Image
Image
Image
Image
Image
Image
magic_missile (Magic Missile):
Spoiler
Image
Image
Image
These images are a bit misleading - you need to be close enough to use the stick on your enemy to initiate casting of the spell. The reason I'm so far back is because I moved away during the startup time.

EDIT: This is no longer a problem, since I boosted the wand's range to default 30.
reflect_lesser (Lesser Reflect)

rock_hide (Rock Hide)

blink (Blink)

ethereal_jaunt (Ethereal Jaunt)

moon_shoes (Moon Shoes)

haste (Haste)

excavate (Excavate)

Spoiler
dare you enter my magical_realm?
Last edited by Byakuren on Tue Feb 09, 2016 23:31, edited 49 times in total.
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] magical_realm

by Byakuren » Post

Added information about a new spell, Summon Lit TNT.
Every time a mod API is left undocumented, a koala dies.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Modpack] magical_realm

by Napiophelios » Post

I think your biggest challenge will be coming up with unique effects...jump fly heal run fast teleport...its seemingly limited.
You will have to be creative for this to work.

You will need a potion/brewing system/alchemy maybe

You will need practical spells to aid adventuring:
summoning light to see ( I have used Deploy Nodes mod to create large spheres created with temporary light blocks)
temp. rainbow bridges to cross expanses,
temp. phasing/noclip effects to pass thru walls,
temp. invisibility to sneak around,
temp. forcefeilds maybe to protect the party
temp. underwater breathe to escape drowning

I would think simple/prepared spells could be kept in the form of scrolls or tokens items that are expended with use.
Use them to summon creatures/monsters, maybe this is how you get more spells..by finding rare scrolls
token/magic items should be usable by all players once the magic user creates them

Certain spells can simply expend your "mana" or whatever; probably reserve this for powerful/destructive effects.
like fireballs or lightning bolts.

Of course you are gonna have to have wands/staves.
Use them to project magic energy/offensive spells
Use them to transform materials..maybe confine them to elemental effects

You might check out these mods :
Mana
viewtopic.php?t=11154

Player Effects
viewtopic.php?t=9689

ps.
dont mention altars around here...
its only gonna get sh*t started up.
JK.
Good Luck.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] magical_realm

by Byakuren » Post

I think your biggest challenge will be coming up with unique effects...jump fly heal run fast teleport...its seemingly limited.
You will have to be creative for this to work.
This is one of the reasons I tried to make this framework more flexible, and I think I do have some interesting spell ideas I could implement by being able to configure things at preparation/casting time.
You will need a potion/brewing system/alchemy maybe
I'm thinking about this, but I want to flesh out the spells a bit more first.
I would think simple/prepared spells could be kept in the form of scrolls or tokens items that are expended with use.
I think this should be implementable on top of the current system. I'll plan on adding scroll-scribing or something similar.
Certain spells can simply expend your "mana" or whatever; probably reserve this for powerful/destructive effects.
like fireballs or lightning bolts.
I touched upon this in the OP, but I was planning on mainly balancing powerful spells by limiting uses (between preparations) or adding a casting delay. This is all subject to change though, based on how that works out.
Of course you are gonna have to have wands/staves.
I didn't put too much thought into handling different kinds of wands/staves while casting spells from memory. If I add wands/staves they will probably be craftable artifacts like scrolls, except with more uses and the possibility to recharge them.
You might check out these mods :
I've already looked at these two, and am planning on using playereffects to handle status changes caused by spells. I don't know how much I'll use mana, but it might be neat to have preparable spells that restore your mana, or in reverse some sort of way to restore spell slots or reduce preparation cooldown using mana. Maybe wands/staves could draw off mana, instead of a use count?

Thanks for all the feedback.
Every time a mod API is left undocumented, a koala dies.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Modpack] magical_realm

by Napiophelios » Post

Hijiri :

is there something wrong with altars

someone in a forum post warned me about mentioning altars
actually I'm feeling deja vu, maybe someone has said something similar before
That was a joke dude.
Hence the "JK" ( just kidding)

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] magical_realm

by Byakuren » Post

Napiophelios wrote:
Hijiri :

is there something wrong with altars

someone in a forum post warned me about mentioning altars
actually I'm feeling deja vu, maybe someone has said something similar before
That was a joke dude.
Hence the "JK" ( just kidding)
I know it's a joke, it just feels like I'm missing something
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] magical_realm

by Byakuren » Post

I added a creative wand and creative spellbook to make it easier to test spells. See the OP for more info.

Some other changes since the last post:
  • Magic Missile
  • Some quality of life enhancements, such as remembering your previous spell options.
  • The wand has a longer range now, in case you need to target things farther away. By default this is 30 nodes.
Every time a mod API is left undocumented, a koala dies.

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Modpack] Magical Things [magical_realm]

by everamzah » Post

Your mod looks really intriguing! Also, is that xmonad?

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Things [magical_realm]

by Byakuren » Post

everamzah wrote:is that xmonad?
Yep! I enjoy Haskell, so I decided that I might as well. One thing that annoys me, though, is that obs can't do window capture in xmonad. Other than that it's pretty nice, but I probably don't do enough customization to warrant xmonad.
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Things [magical_realm]

by Byakuren » Post

I just finished migrating to smartfs. There are no visible changes from the player's point of view, except there may be some GUI bugs. I also simplified the Summon TNT spell to be single-use and instant cast, with a fixed cost of five preparation slots. Finally, I made the defaults for spell definitions do less. The API has also been modified to accommodate using smartfs in spell definitions. It should still be possible to use a normal formspec, but you will have to do some formspec plumbing yourself.

Praise rubenwardy, who delivereth us from callback hell. Instead we have stateful GUI framework purgatory.
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Things [magical_realm]

by Byakuren » Post

I've set up a testing server (Address in the OP). Please mess around, I'm trying to catch a bug.

EDIT: I found the bug, but the server will probably be left up some of the time, just for testing.
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Things [magical_realm]

by Byakuren » Post

I made the spellbook and wands easier to use. Also added spells Blink and Ethereal Jaunt.
Every time a mod API is left undocumented, a koala dies.

User avatar
Desour
Member
Posts: 1473
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Modpack] Magical Things [magical_realm]

by Desour » Post

i tested the mod on ur server, i like it
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Things [magical_realm]

by Byakuren » Post

I found some public domain sounds, and edited them to see if they would work as sound effects, for the Magic Missile and Ethereal Jaunt spells. Please tell me how they sound.
Every time a mod API is left undocumented, a koala dies.

User avatar
LazerRay
Member
Posts: 147
Joined: Sun Jul 27, 2014 01:32
GitHub: LazerRay

Re: [Modpack] Magical Things [magical_realm]

by LazerRay » Post

Might be fun to eventually have this able to work the the Mana mod, since it currently doesn't have much connected to it.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Things [magical_realm]

by Byakuren » Post

Added craftable magic foci, so that a creative item is not required to cast spells. The creative spellbook is still required for learning/preparing spells, however.
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Things [magical_realm]

by Byakuren » Post

I've replaced playereffects with monoidal_effects in the "monoidal" branch of the repo - this is also the version running on the test server. Development will probably mainly be on that branch, until I'm sure that it is stable enough to merge back into master. That doesn't mean I have seen it crash since I started using it, but I want to see it stay alive for a few days just to be safe.

EDIT: I mean crashing from monoidal_effects, there is already a bug in magic missile that causes crashes, but I don't know what the issue is because it happens in an entities step function, where errors aren't handled nicely.
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Things [magical_realm]

by Byakuren » Post

Added two spells, Haste and Rock Hide, to test monoidal_effects more.
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Realm [magical_realm]

by Byakuren » Post

Added a loot framework and spellbooks. Now you can learn and prepare spells without creative mode - to learn spells you can find them as loot in dungeons or loot vaults, and to prepare them you can craft a Personal Spellbook. In multiplayer, spellbooks are also a random drop from killing players.
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Realm [magical_realm]

by Byakuren » Post

Added a new spell, Excavate. It binds a magical floating pickaxe, which can be controlled and will dig nodes near it. This is also the first spell with a material cost: one steel block.
Every time a mod API is left undocumented, a koala dies.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Modpack] Magical Realm [magical_realm]

by Byakuren » Post

I felt that the approach I took in this modpack is limiting, so I've started on a new magic mod: viewtopic.php?f=9&t=14019 . The spells from magical_realm will eventually find their way in, in some form or another.

I will keep the testing server up, and I'll be testing the new mod there also, when I feel it's ready.
Every time a mod API is left undocumented, a koala dies.

Post Reply

Who is online

Users browsing this forum: No registered users and 56 guests