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

Offline Mechanaut

  • Jr. Member
  • **
  • Posts: 61
Re: Mana Pools and Alternative Magic Systems
« Reply #15 on: January 31, 2017, 10:10:39 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.
A Floydian [pink] slip.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9544
Re: Mana Pools and Alternative Magic Systems
« Reply #16 on: February 01, 2017, 01:59:44 PM »
Okay, still working on the spell version of a point pool system. I think it may be easier for the player, but it is going to be trickier for the designer.
Oh, and I don't think I need any new Hooks or functions.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2131
Re: Mana Pools and Alternative Magic Systems
« Reply #17 on: February 01, 2017, 02:33:35 PM »
Quote
I don't think I need any new Hooks or functions

That would be ideal.  But please do not use existing hooks
for other than their intended purpose.  Example: Using the
"Display Party Location" hook to add mana to a character.
It might work but it ain't right and could easily lead to
backward compatibility problems in the future.

Can you outline what hooks and functions you are using for
your new feature?

Offline SilentThief

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 882
Re: Mana Pools and Alternative Magic Systems
« Reply #18 on: February 01, 2017, 02:40:09 PM »
Is it necessary to use a "SpellCaster Item"?  Couldn't we
use a mana system with ordinary spells learned and
memorized? 

For the alternate spellcasting system to work properly, in addition to making it so that the spell is not needing memorizing then this would require that the spell casting is still available after the cast (either it doesn't disappear, or it replicates itself so it is there again to cast again)

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. 

This would definitely open up the possibilities. Add the option for timed turns (either the action updates when you move, or you have a 10-15 second time limit and the action progresses -- the mummy rounds the corner and starts attacking you, for example) and then this and similar games, such as the eye of the beholder series could be recreated in its entirety.

ST they beholder

PS -- I am glad that this is being done. Even without the "timed turns" with the alt spellcasting system this allows many ideas I had in the past. Following this thread with excitement

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9544
Re: Mana Pools and Alternative Magic Systems
« Reply #19 on: February 01, 2017, 02:55:25 PM »
Quote
I don't think I need any new Hooks or functions

That would be ideal.  But please do not use existing hooks
for other than their intended purpose.  Example: Using the
"Display Party Location" hook to add mana to a character.
It might work but it ain't right and could easily lead to
backward compatibility problems in the future.

Can you outline what hooks and functions you are using for
your new feature?

In the version that I have posted already, I am using the CanCureOrWhatever to check the time in order to give back some mana points. This Hook checks every time you go into the Character View Screen, which you have to do to get to the Items Screen.
Also in the currently posted version, I am using a PostCreateCharacter Hook exactly as it was intended, and OnReady, which we were discussing via email.

Ini the upcoming spell version, I am using the following Hooks:
CanLayOrWhatever
LayOrWhatever
CombatMainMenu
CombatSpecialAction
OverrideSpellSelection

I believe I am using all of these as they were intended to use. The new version will still use the CanCureOrWhatever and PostCreateCharacter as mentioned above.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2131
Re: Mana Pools and Alternative Magic Systems
« Reply #20 on: February 01, 2017, 03:55:21 PM »
Quote
CanCureOrWhatever to check the time in order to give back some mana points. This Hook checks every time you go into the Character View Screen

Two comments:

Should not the character regain mana even if the player
does not 'View Character'?  Time certainly passes as the
party moves about or while it engages in combat.

That is not an intuitive use of "CanCureOrWhatever".  That hook
is designed to control the menu options.  It seems to
me a downright hack.  I rate this 2 out of 10.  I'd very
much rather implement something more suitable.

Off topic.  Should we provide for 'Mana Potions'?  Empty
Flasks?  Spells to create Mana Potions?  Away we go!


Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9544
Re: Mana Pools and Alternative Magic Systems
« Reply #21 on: February 01, 2017, 04:45:16 PM »
Quote
CanCureOrWhatever to check the time in order to give back some mana points. This Hook checks every time you go into the Character View Screen

Two comments:

Should not the character regain mana even if the player
does not 'View Character'?  Time certainly passes as the
party moves about or while it engages in combat.
The character gets the amount of mana they should have gotten since the last time the script ran. If they ran the script 6 minutes ago, they get 1 ponit added, but if they last ran the script two hours ago, they get 20 points added. I didn't feel it was necessary to coninually update the mana because they have to pss through the Character View screen to get to the items which use mana, so the mana is added before they can use the item.

Quote from: Paul
That is not an intuitive use of "CanCureOrWhatever".  That hook
is designed to control the menu options.  It seems to
me a downright hack.  I rate this 2 out of 10.  I'd very
much rather implement something more suitable.
Fair enough. If you provide a different Hook, I will use it. Perhaps somethingn like OnCharacterScreenView? The spell method I am working on now still needs to look at the Character Screen outside of combat. Inside combat, I guess we would need to go 60 rounds before 1 point could be recovered (of course this is based on my arbitrary system), but I can use StartCombatRound

Quote from: Paul
Off topic.  Should we provide for 'Mana Potions'?  Empty
Flasks?  Spells to create Mana Potions?  Away we go!
Actually, not off toopic at all. :D I fully expect that whomever implements this kind of system, including myself, will want to make potions to Restore Mana, Resotre Some Mana, Raise Mana Max, etc. Super easy to do - Mana and max Mana are just values stored in SAs and the potion just adds to one or both numbers. And, we already have an empty flask item.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2131
Re: Mana Pools and Alternative Magic Systems
« Reply #22 on: February 01, 2017, 05:31:50 PM »
All very convincing.  It certainly is a feature of your system
that we do not need to do the computations except when
actually needed, rather than continuously.

But....while adventuring, a character's HP and AC are
continuously shown.  Might not some designers want
to display available mana.  It could be quite as important
as AC and HP.  If we were to do this, we would have to
update mana continuously.  And then we would have to
'retro-fit' the mana system somehow.

And....it just does not feel right.  Let me make a
"MinutesPass" hook.  Parameter 5 could be the number
of minutes that pass.  It would make me more comfortable.
I'll implement it and you can use it if you so choose.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9544
Re: Mana Pools and Alternative Magic Systems
« Reply #23 on: February 01, 2017, 05:50:34 PM »
Several issues raised here...

Continually showing versus occasionally showing:
Character View Screen (CVS) is always occasionally, 3D View (3DV) is always continually.
However, CVS is fully scripted by me, so I can show all kinds of things never before seen in DC, things you didn't know you needed to see until you see them. :D 3DV is mostly not scripted, though I can do the location and time as I want (so can others), but I can only place where the names, AC and HP are placed, but not if they are shown or not. If you think someone would want to show mana too, I think you are probably right. But I might want to show mana but not AC. I would like to be able to script the 3DV (and the Item Screen too)

Additionally, I would prefer to have a TimePasses Hook, where Parameter [5] is the time, as per the $GET_PARTY_TIME() function. And since I am asking I would love to have 3 other parameters with Days, Hours and Minutes

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2131
Re: Mana Pools and Alternative Magic Systems
« Reply #24 on: February 01, 2017, 06:24:04 PM »
Quote
where Parameter [5] is the time
I think this is better than my suggestion.
Quote
I would love to have 3 other parameters with Days, Hours and Minutes

days = time/1440;
hours = (time/60)%24
minutes = time%60

But I will happily provide them as parameters, if for
no other reason, to avoid the expensive arithmetic
in scripts.  Parameter 6, 7, and 8 will be H, M, and S.

Amen

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9544
Re: Mana Pools and Alternative Magic Systems
« Reply #25 on: February 01, 2017, 06:26:34 PM »
Thanks, Paul. This sounds like exactly what I need.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2131
Re: Mana Pools and Alternative Magic Systems
« Reply #26 on: February 02, 2017, 01:20:28 PM »
Engine version 2.67 implements
SA name "Global_Time"
Script name "OnTimeElapsed"

parameters:
5 time in minutes since the big bang
6 days since big bang
7 hour within day (0-23)
8 minute within hour (0-59)
9 (bonus!) minutes since last call to "OnTimeElapsed"

Documentation to follow after I take my nap.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9544
Re: Mana Pools and Alternative Magic Systems
« Reply #27 on: February 02, 2017, 01:59:12 PM »
Woo-hoo!

Thanks, Paul. I will make use of this today.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2131
Re: Mana Pools and Alternative Magic Systems
« Reply #28 on: February 02, 2017, 04:08:31 PM »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9544
Re: Mana Pools and Alternative Magic Systems
« Reply #29 on: February 02, 2017, 04:27:56 PM »
Thanks, Paul.

I will work on this script tonight. I'm actually pretty close, but in crushing some scripting bugs, I took a break to fix a few in the default database. :)