Setting/Resetting Mana level

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Setting/Resetting Mana level

Post by Gambit37 »

Is there a way of setting the mana level of a character to a fixed value? And resetting it? Adding to it and removing from it? Cancelling the auto-regeneration of it?

I have some ideas of how I can use this in other custom games that don't have magic. But it's all moot if we can't play with the value directly.
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: Setting/Resetting Mana level

Post by Lord_BoNes »

Using a potions... boost the character with a strength 15 potion, then boost them with an "anti-potion" (so for mana, a potion that gives -1 mana instead of +1) using strength 10. This method increases the stat. To decrease it, swap the two potion types around (so a +1 becomes a -1, and a -1 becomes a +1).

Then use a "looping relay" (a relay that targets other things and itself, creating a loop) that checks if the mana is at the required answer (you'd need two relays to check, one relay for above the value and one for below it)

NOTE: Boosting a character with a -1 mana potion re-caps thier mana to its maximum value. IE: 105/100 becomes 100/100
NOTE: Looping relays require that the relay targets itself last on the target list (the bottom-most entry out of the 8 possible targets). Also, remember that looping relays, if used incorrectly, WILL crash RTC.
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Setting/Resetting Mana level

Post by Gambit37 »

Thanks for the input -- sounds complex!

I'm not sure I understand your first paragraph though. Strength 15 potion? Do you mean an actual Strength potion? How does this work with Mana?
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: Setting/Resetting Mana level

Post by Lord_BoNes »

I mean trigger a WALLITEM_ACTION, with action set to "BOOST_CHARACTER", object_1 = "mana potion", object_2 = null... and STRENGTH to 15... then duplicate the wallitem and set the object_1 to "anti-mana potion" and STRENGTH to 10. The concept here is: "Boost him up a bit, then take away 2/3 of what was just given".

You see, the minimum strength of a potion is actually 10%... so what you're doing is: "+15%" + "-10%"(min strength) = "5%". This can produce bugs in certain situations. EG: Character has 60/60 health, do the above "15-10" trick and what happens is:
"+15% health", already at full, no effect... "-10% health"... character's hp goes from 100% hp 90% = BUG!
You can do the "-10%" first, then the "+15%"... but then the bug just shifts to the other end of the spectrum (bug occurs when low on hp).
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
Post Reply