03-31-2006, 01:00 PM
(This post was last modified: 04-08-2019, 03:59 AM by DerVVulfman.)
SG Multiple Poisons
Version: 1
Version: 1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.
No support is given. If you are the owner of the thread, please contact administration.
Edit: Bugfix for SG Settings Control
Grab the new one here and replace the old one with it. This is not this script, it's the settings control script it requires
Introduction
Multiple poisons. This script only affects their use in battles
Features
- Set some states to always deal set damage (no variance)
- Set some states to not kill the user, but leave them at 1 hp instead
- Slip damage effects cancel each other out in the order you list them
- Supports a large number of damaging states
- Supports /2.5 instead of just being limited to regular numbers
There be no screenshots fer ye here.
Script
This script requires SG Settings Control, which can be found here. Place it above all the other SG Scripts. Must be under the SDK if you're using it.
Code:
#=============================================================================
# ** SG Multiple Poisons
#=============================================================================
# sandgolem
# Version 1
# 30.03.06
#=============================================================================
#
$game_sg['poisonstates'] = [18,17,3,19]
# Set your state #'s here, in order from first to last. These cancel each
# other out in this order. 3rd one = default Venom.
$game_sg['poisonstates div'] = [2.5,5,10,100]
# Same order as above. Damage is the amount the maxhp is divided by.
# For set damage, put this to the amount of damage you want dealt.
# Use negatives if you want to create a regeneration state
# They won't stack with poison. Use SG Multiple Regenerations if you want that
$game_sg['poisonstates limiter'] = [1,0,0,1]
# Set the # in the orders above to 1 if you don't want the damage to kill
$game_sg['poisonstates varoff'] = [0,1,0,1]
# Set the # in the orders above to 1 if you don't want any damage variance
$game_sg['poisonstates set'] = [0,0,0,1]
# Set the # in the orders above to 1 if you always want it dealing set damage
# Variance is optional, turn it off if you don't want it
#
# You can alter these in any event's call script with sg_ast if you know what
# you're doing. Read through the SG Settings Control script for instructions
#
#=============================================================================
#
# To check for updates or find more scripts, visit:
# [url=http://www.gamebaker.com/rmxp/scripts/]http://www.gamebaker.com/rmxp/scripts/[/url]
#
# To use this script, copy it and insert it in a new section above "Main",
# but under the default scripts and the SDK if you're using it. SG Settings
# Control is required for this script, and must be above it
#
# Have problems? You can leave me a message at:
# [url=http://www.gamebaker.com/users/sandgolem]http://www.gamebaker.com/users/sandgolem[/url]
#
#=============================================================================
if !$game_sg['enabled']
p 'SG Settings Control required. Read instructions where you found this',
'script for a link, or visit www.gamebaker.com/rmxp'
end
#--------------------------------------------------------------------------
# * SDK Log Script
#--------------------------------------------------------------------------
begin
SDK.log("SG Multiple Poisons", "sandgolem", 1, "30.03.06")
if SDK.state("SG Multiple Poisons") != true
@sg_poisons_disabled = true
end
rescue
end
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if !@sg_poisons_disabled
class Game_Battler
def sg_slip_state_check
sg_temp2 = $game_sg['poisonstates']
sg_temp3 = $game_sg['poisonstates div']
sg_temp5 = $game_sg['poisonstates limiter']
sg_temp6 = $game_sg['poisonstates varoff']
sg_temp7 = $game_sg['poisonstates set']
for sg_temp4 in 0...sg_temp2.size
for sg_temp in 0...@states.size
if @states[sg_temp] == sg_temp2[sg_temp4]
if sg_temp7[sg_temp4].to_i < 1
self.damage = self.maxhp / sg_temp3[sg_temp4]
else
self.damage = sg_temp3[sg_temp4]
end
@sg_slip_limiter = sg_temp5[sg_temp4]
@sg_slip_varoff = sg_temp6[sg_temp4]
return
end
end
end
end
def sg_slip_limit_check
if @sg_slip_limiter.to_i >= 1
if self.damage >= self.hp
self.damage = self.hp - 1
end
end
if self.damage == nil
self.damage = 0
end
self.damage = self.damage.to_i
end
def sg_slip_variance
if @sg_slip_varoff.to_i < 1
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
end
end
def slip_damage_effect
#------------------------------------------------------------------------------
# Begin SG Multiple Poisons Edit
#------------------------------------------------------------------------------
@sg_slip_limiter = nil
@sg_slip_varoff = nil
sg_slip_state_check
sg_slip_variance
sg_slip_limit_check
#------------------------------------------------------------------------------
# End SG Multiple Poisons Edit
#------------------------------------------------------------------------------
self.hp -= self.damage
return true
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
Instructions
See comments, some example states are shown in the script.
Check "slip damage" for all the states you want using this
Set the states to be removed at the end of battle if you don't want it dealing damage while walking on the map
Compatibility
Rewrites game battler's slip_damage_effect