Author Topic: [XP] Blood Mage 1.80  (Read 24078 times)

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
[XP] Blood Mage 1.80
« on: March 08, 2008, 04:56:19 PM »
Blood Mage Script
Authors: LongFellow
Version: 1.80
Type: Special Skill Effect
Key Term: Battle Add-on

Introduction

This script allows you to have spells consume HP instead of MP. It comes in very useful for making strategic characters :P

Features

  • Consume HP instead of MP
  • Can turn the effect off for certain skills
  • Easy Configuration
  • Lightweight

Screenshots

n/a for this sort of script


Script
Post this above Blizzard's scripts and below the defaults:

(click to show/hide)

Instructions
Inside the script.

Compatibility
None found yet. However, it most likely will have compatibility issues with most CBSes.

Credits and Thanks

  • Blizzard, for teaching me how to script and pointing out a bug, plus giving me some optimized code
  • Fantasist, for bringing me back to the RMXP community to do this
  • Akkrein, for giving me the idea
  • Cid, for reporting two errors (keep up the good work ;))
  • Omegapirate2000, for confirming an error (and possibly reporting another with stable :gasp:)
  • game_guy, for suggesting a feature

Author's Notes

Enjoy! Also, report all errors and compatibility issues in THIS THREAD, not in a new topic. And please do report them ;)
« Last Edit: November 12, 2009, 12:57:25 AM by game_guy »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Blood Mage v 1.02
« Reply #1 on: March 08, 2008, 05:05:28 PM »
I remember debugging and optimizing v1.0 for Tons, but I never came to add it. xD How about applying the right form?

EDIT:
Code: [Select]
#==============================================================================
# Blood Mage Magic Script v 1.0.0
# by WcW & Akkrin
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# - code reviewed, optimized, integrated into Tons of Add-ons, freed from
#   potential bugs and beta tested by Blizzard
# - compatible with RTAB and skill cost modifying scripts (by Blizzard)
# - this add-on is part of Tons of Add-ons with full permission of the original
#   author(s)
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Introduction:
#
# I made this script for Akkein(Akkrin) at http://forum.chaos-project.com at
# his request. If he has allowed you to use this, enjoy. If he has not, ask
# him.
#
# Features:
#
# - Allows for certain classes to use up their HP instead of MP when using
#   spells.
# - Lightweight.
#
# Instructions:
#
# Add the IDs of all your "Blood Mage" classes to the [] thingy in the
# CONFIG section.
#
# Compatibility:
#
# This has no known compatibility issues. Might not be compatible with CBS-es.
# If you find any problems, please post them at http://forum.chaos-project.com
#
# WcW, Signing Off
#==============================================================================

#------------------------------------------------------------------------------
# * CONFIG
#     Configuration section
#------------------------------------------------------------------------------

BLOODMAGES = [] # Between the "[" and "]", add the ID of each class the you
                # want to be a blood mage and seperate each with a comma.

# Below lies the code

#------------------------------------------------------------------------------
# * Battle Scene
#------------------------------------------------------------------------------

class Scene_Battle
 
  #----------------------------------------------------------------------------
  # * Make Skill Action Result
  #----------------------------------------------------------------------------
  alias make_skill_action_result make_skill_action_result_bloodmage_later
  def make_skill_action_result(battler = nil)
    if battler == nil
      battler, sp = @active_battler, @active_battler.sp
      make_skill_action_result_bloodmage_later
    else
      sp = battler.hp
      make_skill_action_result_bloodmage_later(battler)
    end
    if (battler.current_action.forcing || battler.skill_can_use?(@skill.id)) &&
        battler.is_a?(Game_Actor) && BLOODMAGES.include?(battler.class_id)
      battler.hp -= sp - battler.sp
      battler.sp = sp
      @status_window.refresh
    end
  end
 
end

Worx with RTAB. :3

EDIT: I suggest aliasing skill_can_use? for convenience so the player can use the skill even though he has not enough SP. *makes a note*
« Last Edit: March 08, 2008, 05:08:34 PM by BlizzHard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Blood Mage v 1.02
« Reply #2 on: March 08, 2008, 05:13:06 PM »
That better?

And I'll look into that, thanks, Blizz. BTW, why did you change your name?

EDIT:

Wait.. I'm confused... In my test bed for this script, skill_can_use? check to see if the skill is learned, I think that the Scene_Battle method I aliased checks the SP.
« Last Edit: March 08, 2008, 05:17:05 PM by WcW »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Blood Mage v 1.02
« Reply #3 on: March 08, 2008, 05:19:30 PM »
Nice. :) *powers up*

I changed it just for fun. I'll change it back later.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Blood Mage v 1.02
« Reply #4 on: March 08, 2008, 05:20:43 PM »
Wait... where DOES it check to see if you have enough SP...?

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Blood Mage v 1.02
« Reply #5 on: March 08, 2008, 05:26:52 PM »
skill_can_use? in Game_Battler. Just alias it.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Blood Mage v 1.02
« Reply #6 on: March 08, 2008, 05:29:25 PM »
IM AND IDIOT, I WAS LOOKING IN GAME_ACTOR, SAW IT JUST SEEING IF IT WAS LEARNT AND THEN LOOKED AT THE MAKE_SKILL_RESULT, I EVEN SAW THE EFFING SUPER IN THE GAME_ACTOR'S METHOD, IM SUCH AN EFFING IDIOT

ill go fix that , that must be the other bug I found that I couldn't remember :P

EDIT:

Fix'd.
« Last Edit: March 08, 2008, 05:43:57 PM by WcW »

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: [XP] Blood Mage v 1.22
« Reply #7 on: March 09, 2008, 02:40:10 AM »
gj on this script  I can't be bothered looking through it so can you tell me if compatible with blizz ABS :P
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Blood Mage v 1.22
« Reply #8 on: March 09, 2008, 03:09:34 AM »
Probably not, sorry. Maybe I could make a mod for BlizzABS, though.

Offline Vell

  • Lexima Warrior
  • *******
  • Posts: 2915
  • LV: 49
  • Doubt for the dead.
    • View Profile
Re: [XP] Blood Mage v 1.22
« Reply #9 on: March 09, 2008, 04:08:58 AM »
interestin.. skills that use HP instead of MP... maybe I'll use this for Tenia Mala... another game/novel/possible anime/possible manga I'm DEFINITELY going to do in the future, (the game version atleast) will definitely need HP usin skills, I may use this one.

I find it funny that while I was viewing this the ad had a picture of a Blood Elf from WoW...

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Blood Mage v 1.22
« Reply #10 on: March 09, 2008, 05:00:33 AM »
0_o

Also, for the next update, I plan to add a slight aesthetical fix that makes it so that if a Blood Mage has 0 SP, it will show it as the regular color instead of red, an option that can make Blood Mages just display n/a for their SP during battle, and a a new option that lets you turn of HP consumption for certain skills.

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: [XP] Blood Mage v 1.22
« Reply #11 on: March 09, 2008, 09:24:26 AM »
anyway I already planning on using this in my game maybe and have the only support char use her heatlh to use skills :P
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Offline Vell

  • Lexima Warrior
  • *******
  • Posts: 2915
  • LV: 49
  • Doubt for the dead.
    • View Profile
Re: [XP] Blood Mage v 1.22
« Reply #12 on: March 09, 2008, 02:29:43 PM »
yeah itll be cool if not ALL spells had to be HP consuming.

this time its a draenei...

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Blood Mage v 1.22
« Reply #13 on: March 09, 2008, 06:34:30 PM »
No, it's not compatible with Blizz-ABS.

@WcW: Why don't you take my optimized version of your script that's also compatible with RTAB?
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Blood Mage v 1.22
« Reply #14 on: March 10, 2008, 02:18:46 AM »
Oh, sorry, I'll fix that =)

EDIT:

Blizz, the only problem I can spot in your scripting awesomeness is the fact that you NEVER debug your code before hand.

EDIT:

Thanks alot, Blizz, now I'm gonna have to redo your code for the new features.  >:(

It's okay, though

EDIT:

Fix'd. Could someone please check to make sure that it is compatible with RTAB, though?

EDIT:

Major upgrade, lol

EDIT:

And now I know for certain that it is compatible with the latest version of RTAB that I got straight from the Cogwheel website.
« Last Edit: March 10, 2008, 05:43:16 AM by WcW »

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: [XP] Blood Mage v 1.57
« Reply #15 on: March 10, 2008, 08:53:48 AM »
heh you updated it like 5 times today right?
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Blood Mage v 1.57
« Reply #16 on: March 10, 2008, 01:33:37 PM »
Now, that's what I call fast development. O_o
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Blood Mage v 1.57
« Reply #17 on: March 10, 2008, 03:23:07 PM »
In the last 3 or 4 days, actually about.... 12 version updates, so....

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Blood Mage v 1.57
« Reply #18 on: March 10, 2008, 06:28:08 PM »
I wish I Blizz-ABS would go that fast or at least my own game.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Blood Mage v 1.57
« Reply #19 on: March 10, 2008, 09:21:13 PM »
This is a real simple script, it should go pretty fast - and it only is because of how many bugs I found.

EDIT:

And there, yet another one fix'd

EDIT:

Two more fix'd
« Last Edit: March 13, 2008, 08:35:32 PM by WcW »