Author Topic: Mana Pools and Alternative Magic Systems  (Read 511 times)

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Mana Pools and Alternative Magic Systems
« on: January 26, 2017, 03:28:42 PM »
I can't imagine that I am the only person here who has wanted to use a different magic system than the one that is given to us by AD&D via DC and FRUA (and the GoldBox games, etc).

The kind of system that I have been most interested in trying out was a Mana Pool system. Specifically I mean that a PC has a number of points for magic (the "mana pool"), and a number of spells that each cost a number of points to use. The player chooses which spell to sue and that many points are subtracted from the pool. The player does not need their PC to memorize any spells, they just have to be able to do a simple comparison of the point cost of a spell and the number of points available.

For the longest time, I was trying to somehow use the current system through various scripts and tricks as some kind of point pool system. I couldn't figure it out, and/or there isn't a working mechanism.

But then, doing something else (for the Hero Craft project), I figured it out. You can create a point pool and spellcaster items that everytime you use, they subtract a number of points from the pool. This is rather basic as far as explanations go, but the minimum needed is set forth. Likely you would want to do other things, like change the script for the character display so you could see how many points there were, create subclasses of "spells", etc.

Is there any interest her in my working up some kind of tutorial? This will be a tutorial for advanced users, if it happens. I don't really want to do a tutorial if no one wants to at least "maybe" give this a try - too much work to do just to show off what I thought of. That of course may change later when I'm not trying to get some other stuff done. :D

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Dinonykos Dungeon Craft
Re: Mana Pools and Alternative Magic Systems
« Reply #1 on: January 26, 2017, 04:05:48 PM »
I prefer spell point systems over the AD&D approach, thus I appreciate that you found an option to achieve such a system. But for most of my designs, magic spells play such an unimportant role that I would not need a related tutorial.
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline SilentThief

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 883
Re: Mana Pools and Alternative Magic Systems
« Reply #2 on: January 26, 2017, 09:10:31 PM »
I would like to have this kind of tutorial. I've had thoughts about doing the spell point system (or perhaps... psionic strength points...) but had no idea how to go about doing this.

I don't consider myself an advanced scriptor yet, but I would like to know how to do things like this.

ST

Offline Mechanaut

  • Jr. Member
  • **
  • Posts: 72
Re: Mana Pools and Alternative Magic Systems
« Reply #3 on: January 27, 2017, 03:29:05 AM »
The kind of system that I have been most interested in trying out was a Mana Pool system. Specifically I mean that a PC has a number of points for magic (the "mana pool"), and a number of spells that each cost a number of points to use. The player chooses which spell to sue and that many points are subtracted from the pool.
The Ley Line Walker, in Rifts.  Where the magician [in this case] not only has their own internal mana pool, but for them... parts the land also serve as mana pools; affording them additional power when close to a ley line site.  Also seen somewhat in the recent Shadowrun cRPG games, where in combat the spellcasting PC can choose to occupy a ley line, and have their attacks augmented.
« Last Edit: January 27, 2017, 03:31:22 AM by Mechanaut »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Mana Pools and Alternative Magic Systems
« Reply #4 on: January 27, 2017, 03:31:06 PM »
Once soomebody figures out and shares a spell point system, I think it will be very easy to adapt it to all kinds of things, like psioinics or super powers or just about anything really. I can conceive of a system of ability points where a PC could choose to raise strength or dexterity before or during combat. :D

Ley lines are a really interesting idea, and certainly one that I had not considered in the context of DC and spell points. With that being said, I don't see why it couldn't be used in DC. You would assign a zone that represents the ley line, and in that zone there would be an SA that adds to the pool while in that zone and is removed when not in that zone. :)

All of this is possible because of scripts that we can attach to any entry in any database in the form of special abilities.

Offline ArmorNox (Funky Dynamite)

  • Jr. Member
  • **
  • Posts: 65
Re: Mana Pools and Alternative Magic Systems
« Reply #5 on: January 29, 2017, 09:11:01 PM »
Yeah, when you mentioned the a point system, I immediately thought of something like you suggested....
"Where does he get those -wonderful- toys?!"
"Why, I sell my soul, of course...."

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Mana Pools and Alternative Magic Systems
« Reply #6 on: January 30, 2017, 02:01:08 PM »
So, I had posited that I could do this, and thought of work flow. But I hadn't done anything in DC. Until this weekend. Totally works. :D

I will clean up my mod and the tutorial and post them both.

edited to add:

Actually, there is a bug that is not related to my design, so I will get that resolved adn then post the mini-mod. I'll post the tutorial soon.
« Last Edit: January 30, 2017, 04:11:44 PM by manikus »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Mana Pools and Alternative Magic Systems
« Reply #7 on: January 30, 2017, 04:59:55 PM »
Point Pool Tutorial

Here is the most basic version of a Mana Pool system that I oculd think of:

1)   First thing to do is to enable a PC to have mana points.
classes.txt:
Code: [Select]
Special Ability = charManaPoints,50
Add this line to the class (or classes) that you want to give mana points, 50 is just a number I picked.

2)   Second thing is to make an item that runs on mana points.
items.txt:
Code: [Select]
baseclass = sorcerer
...
Code: [Select]
Special Ability = itemManaUse,yes
Special Ability = itemManaCost,5
Add these line to a spellcaster item. Make sure that the baseclass for the class you used in step 1 can use this item. In this example, I used "sorcerer", but you could easily have this read "fighter" or "magicUser".
Make sure that usable = yes and there is at least 1 charge (I recommend setting the value to a high number like 99999). Make sure that the item placement is WEAPON.
The first Specail Ability (SA) will only allow the item to be readied if the PC can use spell items that draw on the mana pool, i.e. are a mana user. This is important if more than one baseclass can use the item.
The second SA is the cost to the mana pool, 5 being a random number I chose.

3)   Pick the spell that is listed in the spellcaster item in the above step. To see if the spell will work, we need to check the mana pool
spells.txt:
Code: [Select]
Special Ability = spellManaCost,5
...
Code: [Select]
Begin script = $VAR mpc;$VAR mc;mpc \= $GET_CHARACTER_SA($Myself(),"charManaPointsCurrent");mc \= $GET_SPELL_SA("Fireball","spellManaCost");$IF (mc \=\= "-?-?-"){$RETURN "0";};$IF (mpc <# mc){$RETURN "0";}$ELSE{$SET_CHARACTER_SA($Myself(),"charManaPointsCurrent",mpc -# mc);$RETURN "1";};
When using the item, if there are enough mana points, this script will subtract the usage cost from the pool, and if not enough will abort the spell. Fireball is the name of the spell I chose, but it could be any spell, as long as it is the one you have associated with the SpellCaster item.

4)   The fourth thing we need to do is add entries to the SA database so that DC knows what to do with the first two steps.
specialAbilities.txt:
Code: [Select]
\(BEGIN)
name = charManaPoints
[PostCreateCharacter] = $VAR mp;
-mp = $SA_PARAM_GET();
-$SET_CHARACTER_SA($CharacterContext(),"charManaPoints",mp);
-$SET_CHARACTER_SA($CharacterContext(),"charManaPointsCurrent",mp);
\(END)
// make a temp pool, using charManaPoints as the max

\(BEGIN)
name = charManaPointsCurrent
[CanCureOrWhatever] = $VAR mp; $VAR mpc; $VAR time; $VAR pTime; $VAR mana; $VAR rTime;
-mp = $GET_CHARACTER_SA($CharacterContext(),"charManaPoints");
-mpc = $SA_PARAM_GET();
-time = $GET_PARTY_TIME();
-pTime = $GET_CHARACTER_SA($CharacterContext(),"charManaPreviousTime");
-$IF (pTime == "-?-?-"){$SET_CHARACTER_SA($CharacterContext(),"charManaPreviousTime",time);};
-$IF (mpc <# mp)
- {
- $IF (pTime <# time)
- {
- mana = (time -# pTime) /# 6;
- rTime = (time -# pTime) %# 6;
- $IF ((mpc +# mana) ># mp)
- {$SET_CHARACTER_SA($CharacterContext(),"charManaPointsCurrent",mp);}
- $ELSE { $SET_CHARACTER_SA($CharacterContext(),"charManaPointsCurrent",mpc +# mana);};
- $SET_CHARACTER_SA($CharacterContext(),"charManaPreviousTime",time -# rTime);
- $RETURN "1";
- };
- };
\(END)
// adds 1 point back to mana pool every six minutes - 10 points per hour

\(BEGIN)
name = itemManaUse
[OnReady] = $VAR mu;
-mu = $GET_CHARACTER_SA($CharacterContext(),"charManaPoints");
-$IF (mu != "-?-?-"){$RETURN $SET_CHAR_Ready($CharacterContext(),"WEAPON","");};
\(END)
// can ready if has charManaPoints SA
The first SA gives the PC the second SA.
The second SA renews the PC's mana pool.
The third SA is used for determining that the PC can use the item.

5)   Add a line to the character view screen that shows the mana pool so the player can see what they have to work with. To do this we need to add the lines below to the end of the Global_Display SA under the CharacterViewScreen Hook.
specialAbilities.txt:
Code: [Select]
-$GrSet("ManaPool",425,270);
-$GrMoveTo("ManaPool");
-$GrColor("GREEN");$GrPrtLF("Mana Pool " + $GET_CHARACTER_SA($CharacterContext(),"charManaPointsCurrent") + " / " + $GET_CHARACTER_SA($CharacterContext(),"charManaPoints"));



Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2139
Re: Mana Pools and Alternative Magic Systems
« Reply #8 on: January 31, 2017, 05:11:28 PM »
Is it necessary to use a "SpellCaster Item"?  Couldn't we
use a mana system with ordinary spells learned and
memorized? 

Note that I am a lost soul when it comes to DC and
spells.  I probably don't know what I am saying (or even
thinking).

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1924
Re: Mana Pools and Alternative Magic Systems
« Reply #9 on: January 31, 2017, 05:30:37 PM »
Paul's suggestion would actually be more like how I imagined a mana system working - except that, I think, you would want to allow any "learnt" spell to be cast (using up mana points), without any need to "memorize" the spell first.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Mana Pools and Alternative Magic Systems
« Reply #10 on: January 31, 2017, 05:31:14 PM »
They actually don't have to be Spell caster items, but they do have to be items.

To be honest, I didn't even think about trying to use spells, because items seemed easier. However, now that I am thinking about it I can think of a way to do it, with one spot that would be tricky...I can have items renew their number of uses daily, but I can't have spells do that. So, if I were to give a level 99,999 uses at level one and the player only wanted to use a level one spell, which are puny (for sake of discussion) and they need to use 100 a battle to live through the battle, I can see that over the course of a whole game they might run out. I do realize that spellcasters get spell slots back at a specific rate when resting, but I can't control that rate. While I could have the mana pool regenrate itself at any rate I choose, I am still limited by number of spell slots.
Okay, I could just set the number to 2 million or something, or maybe all spells to level zero or level 10. Hmm.  My curiosity is piqued.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2139
Re: Mana Pools and Alternative Magic Systems
« Reply #11 on: January 31, 2017, 06:16:19 PM »
Again, comments from the ignorant:

I think if we discuss the limitations (in very simple, particular,
and non-theoretic language, please), then the limitations can
likely be overcome with an additional hook or two.  Hooks are
generally not too difficult to code, leaving the hard work to
the script writer.

Off topic:
It also seems that this moves us very close to the Dungeon
Master system which adds mana at a rate depending on
the character's overall experience and health.
A system I prefer.  I never understood why using a spell
caused me to 'forget' it.

Next on the agenda.....allow the party to drop an item
on the floor and see it and pick it up later. 

Offline Mechanaut

  • Jr. Member
  • **
  • Posts: 72
Re: Mana Pools and Alternative Magic Systems
« Reply #12 on: January 31, 2017, 06:52:31 PM »
... I never understood why using a spell
caused me to 'forget' it.
Probably a simple matter of mechanics and game balance. In D&D, the warrior is the infantry, and the wizard is artillery. If spells worked like melee weapons, who would play a warrior? But with spells working like grenades, the wizard is powerful, but the wizard runs out; and is left comparatively vulnerable. One could (I suppose) fabricate a loosely plausible reason the mind would forget its mystic memories... (I don't know if they ever officially did).


I always preferred a point based system myself; but an alternative view of it is that a point based system makes the process wholly mechanical, and not very ~magical.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9590
Re: Mana Pools and Alternative Magic Systems
« Reply #13 on: January 31, 2017, 07:17:18 PM »
That sounds like a good reason for spells being forgotten, but you are being far too logical. :)
EGG based the maigic-user spell capability on the Jack Vance books that he loved.

Honestly, I would like to pursue this point pool for actual spells further. I will look at it tonight and try and come up with something concrete.
Theen I would like to pick up on the other thread - being able to drop an item and pick it up in the same cell later. :)

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1924
Re: Mana Pools and Alternative Magic Systems
« Reply #14 on: January 31, 2017, 07:40:24 PM »
A side effect of casting a spell is the destruction of the neural pathways that sustained the memory of how to cast it, I suppose.