Guest Access
Tutorial Wizardmaster
Tutorial Wizardmaster
Tutorial Wizardmaster
profile
calvin624
profile
Great script Wiggles. It'd be cool to have an option to use different styled sheets for different types of enemies, a metal debris sheet for machines/robots for example.
I like the blood hue feature, very cool.
One thing I noticed is the enemy's blood appears on top of the enemy, any way you can change that?
It'd be great if you could have a prevention list of tools that don't cause the blood effect, like electric shocks or lasers.
Just ideas if you're looking to update in the future.
I like the blood hue feature, very cool.
One thing I noticed is the enemy's blood appears on top of the enemy, any way you can change that?
It'd be great if you could have a prevention list of tools that don't cause the blood effect, like electric shocks or lasers.
Just ideas if you're looking to update in the future.
Tutorial Wizardmaster
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
i see what your talking about, i will see about revisiting this script in the near future and add you sugested updates and see about that bug your encountering.,
(posted from my phone)
(posted from my phone)
EVENTALIST
Show Signature
EVENTALIST
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
YO! here's my edit for XAS 3.91 ~ hey I noticed the new character sprite for the bloody hit = nice!
blood appears below the enemy
blood appears below the enemy
- Spoiler:
- Code:
#===============================================================================
# XAS - Blood Effects edit for XAS 3.91 on 4/28/11
#===============================================================================
# by Mr_Wiggles
# Version 1.6
# 6/27/10
#===============================================================================
module Blood
#-------------------------------------------------------------------------------
# Blood splatter effects
#-------------------------------------------------------------------------------
# Number of seconds blood is shown for
BLOOD_EARASE_TIME = 10
# Name of the character set for the blood effects
BLOOD_CHARACTER_SET = "Blood_10"
# Make the blood slightly see through? (0 - 255)
BLOOD_OPACITY = 180
# Monster blood colors. when A; return B ("A" monster ID, "B" hue [0 - 350] )
# Hue colors: 0 = red; 40 = yellow; 120 = green; 190 = sky blue;
# 220 = navy blue; 260 = purple; 310 = pink; 350 = red
def blood_hues(id)
case id
when 2 # this is for the enemy id
return 180 # this is the enemy id's hue
when 5
return 40
else # this will return the default blood color
return 0
end
end
end
#-------------------------------------------------------------------------------
# Blood screen effects
#-------------------------------------------------------------------------------
# Use screen blood effects
USE_BLOODY_SCREEN = true
# Number of seconds before blood fades off of screen
BLOOD_DURATION = 10
# Opacity of blood splatters on screen
BLOOD_SCREEN_OPACITY = 200
# Name of picture used for blood splaters
BLOOD_SHEET = "Blood_10"
#===============================================================================
# Game Character
#===============================================================================
class Game_Character
include Blood
alias blood_effect_character_update update
def update
blood_effect_character_update
return if self.battler == nil
if self.battler.is_a?(Game_Enemy)
return if ENEMY_ELEMENT::ENEMY_OBJECT.include?(self.battler.id) or
ENEMY_ELEMENT::ENEMY_ITEM.include?(self.battler.id)
end
@old_hp = self.battler.hp if @old_hp == nil
if @old_hp != self.battler.hp
make_blood_effect if (@old_hp - self.battler.hp > 0)
@old_hp = self.battler.hp
end
end
def make_blood_effect
page = RPG::Event::Page.new
page.move_type = 0; page.move_route = RPG::MoveRoute.new
page.move_frequency = 1; page.always_on_top = false
page.trigger = 0; page.through = true
page.condition.variable_id = 1100
page.condition.variable_value = (40 * BLOOD_EARASE_TIME) + BLOOD_OPACITY
page.graphic.character_name = BLOOD_CHARACTER_SET
page.graphic.character_hue = blood_hues(self.battler.id)
page.direction_fix = true; page.graphic.pattern = rand(3)
page.graphic.opacity = BLOOD_OPACITY
event = RPG::Event.new(self.x, self.y); event.pages = [page]
token = Token_Event.new($game_map.id, event); $game_map.add_token(token)
end
end
#===============================================================================
# Game Event
#===============================================================================
class Game_Event < Game_Character
alias blood_effects_event_update update
def update
blood_effects_event_update
return if self.id < 999 or self.battler != nil
for pg in @event.pages
if pg.condition.variable_id == 1100
pg.condition.variable_value -= 1 if pg.condition.variable_value > 0
self.opacity -= 2 if self.opacity > 0 if pg.condition.variable_value < 255
$game_map.remove_token(self) if pg.condition.variable_value == 0
end
end
end
end
#===============================================================================
# Blood Screen
#===============================================================================
class Bloody_Window < Window_Base
def initialize
super(-20, -20, 700, 600)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.z = 900
@blood_graphics = []
@blood_sheet = RPG::Cache.picture(BLOOD_SHEET)
@wt = @blood_sheet.width / 4
@ht = @blood_sheet.height / 4
update
end
def refresh
self.contents.clear
for blood in @blood_graphics
rect = Rect.new(@wt * blood[2][0], blood[2][1] * @ht, @wt, @ht)
self.contents.blt(blood[0], blood[1], @blood_sheet, rect, blood[4])
end
end
def make_random_blood
loop do
stop_loop = true
x = (rand(50) * 10) + 20
y = (rand(40) * 10) + 20
n = [rand(2)+rand(2), rand(2)+rand(2)]
for blood in @blood_graphics
stop_loop = false if blood[2] == n
end
if stop_loop
@blood_graphics.push([x, y, n, BLOOD_DURATION * 40, BLOOD_SCREEN_OPACITY])
break
end
end
end
def update
@actor = $game_party.actors[0]
@old_player_hp = @actor.hp if @old_player_hp == nil
if @old_player_hp != @actor.hp
make_random_blood if (@old_player_hp - @actor.hp > 0)
@old_player_hp = @actor.hp
end
return if @blood_graphics.size == 0
for blood in @blood_graphics
update_blood(blood)
end
refresh
end
def update_blood(blood)
if blood[4] == 0
@blood_graphics.delete(blood)
return
end
blood[3] -= 5 if blood[3] > 0
blood[4] -= 5 if blood[4] > 0 and blood[3] <= BLOOD_SCREEN_OPACITY
end
end
#==============================================================================
# Scene Map
#==============================================================================
class Scene_Map
alias blood_window_main main
def main
if USE_BLOODY_SCREEN
@blood_window = Bloody_Window.new
@blood_update_pause = 5
end
blood_window_main
@blood_window.dispose if USE_BLOODY_SCREEN
end
alias blood_window_update update
def update
blood_window_update
return if @blood_update_pause == nil
@blood_update_pause -= 1 if @blood_update_pause > 0
if @blood_update_pause == 0
@blood_window.update
@blood_update_pause = 5
end
end
end
Administrator
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
Updated script with new features, and should fix the problem with the XAS version.
EVENTALIST
Show Signature
EVENTALIST
Tutorial Wizardmaster
Tutorial Wizardmaster
Tutorial Wizardmaster
profile
calvin624
profile
Fantastic to see that you're maintaining your scripts - I'm going to update XAS Tuts soon so that the download pages for v3.82 and v3.91 have a catalogue of all the scripts that are compatible for that particular version.
People love your scripts man, not a week goes by without me recommending people visit this site in order to see them!
People love your scripts man, not a week goes by without me recommending people visit this site in order to see them!
Tutorial Wizardmaster
Show Signature
Active Member
Active Member
Active Member
profile
kimono
profile
This script will be in the end a masterpiece for those who don't affraid of blood all on the way.
Maybye we can try to change the sprite color tone according to his hue and health.
Here's a screen that illustrates the idea:
And a demonstration if you want to see the troops in action:
http://www.megaupload.com/?d=1EXFNLQ6
Maybye we can try to change the sprite color tone according to his hue and health.
Here's a screen that illustrates the idea:
And a demonstration if you want to see the troops in action:
http://www.megaupload.com/?d=1EXFNLQ6
Active Member
Show Signature
Active Member
ACTIVATED
ACTIVATED
ACTIVATED
profile
godobladla
profile
Hi! I have an error:
line101 NoMethodError occured.
undefined error for 'hp' for nil:NilClass.
Please help!
I have XAS Hero Edition 3.82
And I use it with Particle effects addon
line101 NoMethodError occured.
undefined error for 'hp' for nil:NilClass.
Please help!
I have XAS Hero Edition 3.82
And I use it with Particle effects addon
ACTIVATED
Show Signature
ACTIVATED
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
Paste this line of code directly above the line that looks like this.
should fix your problem.
- Code:
def be_make_effect(user, skill = nil)
return if self.battler.nil? #<<< Add this line here.
@be_old_hp = self.battler.hp if @be_old_hp.nil?
should fix your problem.
EVENTALIST
Show Signature
EVENTALIST
ACTIVATED
ACTIVATED
ACTIVATED
profile
godobladla
profile
Thanks. But now it says as error:
Script is hanging.
Now what?
Script is hanging.
Now what?
ACTIVATED
Show Signature
ACTIVATED
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
@godobladla - The script is probably hanging because the 'be_make_effect' method is being defined twice if you pasted that chunk of code above the same line.
you should only see one of
and directly under it the fix for that NoMethodError.
(undefined error for 'hp' for nil:NilClass)
you should only see one of
- Code:
def be_make_effect(user, skill = nil)
and directly under it the fix for that NoMethodError.
(undefined error for 'hp' for nil:NilClass)
- Code:
return if self.battler.nil? #<<< Add this line here.
@be_old_hp = self.battler.hp if @be_old_hp.nil?
Administrator
Show Signature