Sorry, I'm the only one who can script around these parts anymore, and I've never accepted battle system requests. Good luck finding anyone who still scripts in XP.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
# Make viewports
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 200
@viewport3.z = 5000
...
# Make character sprites
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
# Make weather
@weather = RPG::Weather.new(@viewport1)
# Make picture sprites
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end
class Scene_Battle
def rand_hits(value)
return value if value.is_a?(Integer)
return (rand(value.max - value.min + 1) + value.min)
end
def repeating_action?
return (@repeat[1] - @repeat[0] > 0)
end
alias update_phase4_step1_multi_hit_later update_phase4_step1
def update_phase4_step1(battler = nil)
if battler != nil
update_phase4_step1_multi_hit_later(battler)
return
end
update_phase4_step1_multi_hit_later
@repeat = [1, 1, 0]
return if @active_battler == nil || !$game_system.MULTI_HIT
if @active_battler.current_action.kind == 0
if @active_battler.current_action.basic == 0
if @active_battler.is_a?(Game_Actor)
hits = rand_hits(BlizzCFG.weapon_hits(@active_battler.weapon_id))
elsif @active_battler.is_a?(Game_Enemy)
hits = rand_hits(BlizzCFG.enemy_hits(@active_battler.id))
end
@repeat = [hits, hits, 2]
end
elsif @active_battler.current_action.kind == 1
@repeat[2] = 3
elsif @active_battler.current_action.kind == 2
@repeat[2] = 4
end
end
alias update_phase4_step2_multi_hit_later update_phase4_step2
def update_phase4_step2(battler = nil)
if battler != nil
update_phase4_step2_multi_hit_later(battler)
return
end
update_phase4_step2_multi_hit_later
return if !$game_system.MULTI_HIT
if @phase4_step != 1
if @repeat[2] == 3
hits = rand_hits(BlizzCFG.skill_hits(@skill.id))
@repeat = [hits, hits, 5]
elsif @repeat[2] == 4
hits = rand_hits(BlizzCFG.item_hits(@item.id))
@repeat = [hits, hits, 5]
end
end
if repeating_action?
unless BlizzCFG::SHOW_ANIMATION_PER_HIT
@animation1_id = 0
@animation2_id = 0
end
@help_window.visible = false
end
end
alias update_phase4_step3_multi_hit_later update_phase4_step3
def update_phase4_step3
update_phase4_step3_multi_hit_later
@active_battler.white_flash = false if repeating_action?
end
alias update_phase4_step4_multi_hit_later update_phase4_step4
def update_phase4_step4
update_phase4_step4_multi_hit_later
@wait_count = 0 if repeating_action? && !BlizzCFG::SHOW_ANIMATION_PER_HIT
end
alias update_phase4_step5_multi_hit_later update_phase4_step5
def update_phase4_step5(battler = nil)
if battler != nil
update_phase4_step5_multi_hit_later(battler)
return
end
update_phase4_step5_multi_hit_later
return if !$game_system.MULTI_HIT
if @active_battler.current_action.kind == 1
if BlizzCFG::SKILL_RANDOM.include?(@skill.id)
if @active_battler.is_a?(Game_Actor)
@active_battler.current_action.decide_random_target_for_actor
elsif @active_battler.is_a?(Game_Enemy)
@active_battler.current_action.decide_random_target_for_enemy
end
else
if @active_battler.is_a?(Game_Actor)
@active_battler.current_action.decide_last_target_for_actor
elsif @active_battler.is_a?(Game_Enemy)
@active_battler.current_action.decide_last_target_for_enemy
end
end
elsif @active_battler.current_action.kind == 2
if BlizzCFG::ITEM_RANDOM.include?(@item.id)
if @active_battler.is_a?(Game_Actor)
@active_battler.current_action.decide_random_target_for_actor
elsif @active_battler.is_a?(Game_Enemy)
@active_battler.current_action.decide_random_target_for_enemy
end
else
if @active_battler.is_a?(Game_Actor)
@active_battler.current_action.decide_last_target_for_actor
elsif @active_battler.is_a?(Game_Enemy)
@active_battler.current_action.decide_last_target_for_enemy
end
end
elsif @active_battler.is_a?(Game_Actor)
if BlizzCFG::WEAPON_RANDOM.include?(@active_battler.weapon_id)
@active_battler.current_action.decide_random_target_for_actor
else
@active_battler.current_action.decide_last_target_for_actor
end
elsif @active_battler.is_a?(Game_Enemy)
if BlizzCFG::ENEMY_RANDOM.include?(@active_battler.id)
@active_battler.current_action.decide_random_target_for_enemy
else
@active_battler.current_action.decide_last_target_for_enemy
end
end
@phase4_step = 2 if @repeat[0] > 1 && @repeat[2] > 0
@repeat[0] -= 1
end
alias make_skill_action_result_multi_hit_later make_skill_action_result
def make_skill_action_result(battler = nil, plus_id = nil)
if battler != nil
if plus_id != nil
make_skill_action_result_multi_hit_later(battler, plus_id)
else
make_skill_action_result_multi_hit_later(battler)
end
return
end
if @repeat[2] == 5
sp_cost = @skill.sp_cost
if $game_system.SP_COST_MOD
sp_cost = BlizzCFG.get_cost_mod(@active_battler.states, sp_cost)
end
@active_battler.sp += sp_cost
@status_window.refresh
end
make_skill_action_result_multi_hit_later
end
alias make_item_action_result_multi_hit_later make_item_action_result
def make_item_action_result
if @repeat[2] == 5
$game_party.gain_item(@item.id, 1)
@status_window.refresh
end
make_item_action_result_multi_hit_later
end
# Compatibility fix for LockeZ Sacrifice HP
if method_defined?(:sacrifice_hp)
alias sacrifice_hp_if_not_repeating sacrifice_hp
def sacrifice_hp(battler, action)
sacrifice_hp_if_not_repeating(battler, action) unless @repeat[2] == 5
end
end
end
Quote from: thalesgal on August 07, 2024, 09:49:40 amPlease, I would like to resize the screen but just stretch it. I saw that this script resize the game but my game was entirely made 640x480. So I just want to resize just like ALT+ ENTER does. Just stretch it.From what I remember, XP's game window doesn't actually stretch when you increase its width or height, unlike VXA. It instead just displays a black void beyond the 640x480 default. Fullscreen stretches because it's effectively changing your monitor's resolution to 640x480. So you're not really going to achieve what you want with the default engine.
DLL_EXPORT int fill_color(long srcObject, float* color) {
// obtain the RGSS bitmap data
RGSSBMINFO* srcBitmap = ((RGSSBITMAP*)(srcObject << 1))->bm->bminfo;
if (srcBitmap == NULL)
{
return 1;
}
// used variables
int srcWidth = srcBitmap->infoheader->biWidth;
int srcHeight = srcBitmap->infoheader->biHeight;
// pointers to bitmap data, going from the first row, but the rows are in reverse order
unsigned char* srcData = (unsigned char*)srcBitmap->firstRow;
unsigned char* src = NULL;
// Local Variables used to determine positions during rotation
int x = 0;
int y = 0;
// Iterate each Row in the Height of the Bitmap
for (y = 0; y < srcHeight; ++y)
{
// Iterate each Pixel in the Row of the Bitmap
for (x = 0; x < srcWidth; ++x)
{
// access bitmaps' pixel data from the coordinates
// x - y * destWidth, because the x is the offset in the row,
// but since the rows are reverse, it's "- y * destWidth"
src = &srcData[(x - y * srcWidth) * BPP];
src[2] = (unsigned char)(color[0]);
src[1] = (unsigned char)(color[1]);
src[0] = (unsigned char)(color[2]);
}
}
// Color fill is successful
return 0;
}
alias update_phase4_step5_hpsp_absorb_later update_phase4_step5
def update_phase4_step5(battler = nil)
if $game_system.ABSORB_HP_SP
@status_window.refresh
@help_window.visible, damages = false, 0
@target_battlers.each {|target|
if target.damage != nil
target.damage_pop = true
damages += target.damage if target.damage.is_a?(Numeric)
end}
if check_absorb(@active_battler, @active_battler.current_action.skill_id,
damages)
@status_window.refresh
end
@skill, @phase4_step = nil, 6
elsif battler == nil
update_phase4_step5_hpsp_absorb_later
else
update_phase4_step5_hpsp_absorb_later(battler)
end
end
@skill, @phase4_step = nil, 6
update_phase4_step5_hpsp_absorb_later(battler) # <=====
elsif battler == nil
# WEAPON_RANDOM - add any weapon IDs here and separate them with commas to
# make those specific weapons attack another random target
# for each other hit than the first
# SKILL_RANDOM - add any skill IDs here and separate them with commas to
# make those specific skills attack another random target
# for each other hit than the first
# ITEM_RANDOM - add any item IDs here and separate them with commas to
# make those specific items attack another random target
# for each other hit than the first
# ENEMY_RANDOM - add any enemy IDs here and separate them with commas to
# make those specific enemies attack another random target
# for each other hit than the first
$game_player.gold-=$game_variables
[1]*500
$game_player.gold-=
$game_variables[1]*500
module CustomFogsPanorama
#--------------------------------------------------------------------------
# * Constants (Please do not modify)
#--------------------------------------------------------------------------
NORMAL = 0
ADD = 1
SUB = 2
#--------------------------------------------------------------------------
# List of map IDs, or put [] if you do not want to use this feature
LOCK_PANORAMA_IDS = [1, 2, 3]