Posts: 11,231
Threads: 649
Joined: May 2009
11-20-2018, 08:23 PM
(This post was last modified: 11-20-2018, 08:24 PM by DerVVulfman.)
Okay... The Animated Battlers system I've been working on only allows one to use a spritesheet that has a single column of poses. This means that RPGMaker MV's 3-row animated battlers doesn't work with my system, right?
Err.... not SO much.
I've just made a prototype conversion script that can convert RMMV animated battlers and RM2K3 battlers that are generated as Charas Project into Single-Row battlers that use 3 frames! It's not perfect and it only arranges the poses based on the source's layout. So while a generated RMMV to Minkoff spritesheet might have the Idle/Ready pose in the first row, the second row has RMMV's charge-to-attack pose. And the RM2K3 layout is much more different.
It handles small sheets no problem. But humongous ones that are 4500px across and 3000px down... That can take a minute to convert. Yep, and I have a fast processor. And yep I found a monstrosity that big.
Oh, I might work out a system to rearrange the poses (hopefully). But hey, one can find MORE resources now once this gets running.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 1,097
Threads: 11
Joined: Jan 2015
(11-20-2018, 08:23 PM)DerVVulfman Wrote: Okay... The Animated Battlers system I've been working on only allows one to use a spritesheet that has a single column of poses. This means that RPGMaker MV's 3-row animated battlers doesn't work with my system, right?
Err.... not SO much.
I've just made a prototype conversion script that can convert RMMV animated battlers and RM2K3 battlers that are generated as Charas Project into Single-Row battlers that use 3 frames! It's not perfect and it only arranges the poses based on the source's layout. So while a generated RMMV to Minkoff spritesheet might have the Idle/Ready pose in the first row, the second row has RMMV's charge-to-attack pose. And the RM2K3 layout is much more different.
It handles small sheets no problem. But humongous ones that are 4500px across and 3000px down... That can take a minute to convert. Yep, and I have a fast processor. And yep I found a monstrosity that big.
Oh, I might work out a system to rearrange the poses (hopefully). But hey, one can find MORE resources now once this gets running.
Waitwaitwait... WE CAN CONVERT RMMV BATTLERS TO XP BATTLERS NOW?!
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH--
*Ahem*
This is a wonderful development.
Keep up the good work, sir.
Posts: 4,606
Threads: 543
Joined: Dec 2009
11-21-2018, 03:08 AM
(This post was last modified: 11-22-2018, 05:05 AM by kyonides.)
Good news, guys and gals! I managed to cross compile my mkxpplus project, the fork of the well known(?) mkxp, and it runs on Windows 8.1 already!
I am uploading the binary files right now! Keep in mind it's window resolution is 800*608 px now so the smallest map cannot be less than 25 tiles wide and 19 tiles high. If you are going to play midi files, you got to download a soundfont sf2 file IIRC. I have already posted one here, perhaps it was in resources or something the like.
MediaFire DOWNLOAD LINK
Mega DOWNLOAD LINK
BoxNet Download Link
soundfont
Edit
I know there are a couple of things that could be changed like removing the console window while playing the game...
By the way, one of the RAR files includes a Ruby script with rb extension. Just go open it with Notepad or Notepad++ or SublimeText since it's just a text file. It contains the scripts that had to be modified to allow you to extend the map tileset to cover the whole window. Other scripts would need to be customized as well...
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Posts: 449
Threads: 18
Joined: Sep 2015
I found a no longer used 9 years old variable in my game. It's there since the very first version from somewhen in 2009.
I really should clean up...
Posts: 4,606
Threads: 543
Joined: Dec 2009
By the way, Melana, so far I only got 64 bit binary executables and libraries for mkxp for now, but I have already fetched 32 bit libraries that will allow me to compile it for 32 bit systems as well so you don't have to be worried for not being able to test it. It is just a matter of time before I upload more files to the different hosting websites.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Posts: 11,231
Threads: 649
Joined: May 2009
(11-21-2018, 12:30 PM)Melana Wrote: I found a no longer used 9 years old variable in my game. It's there since the very first version from somewhen in 2009.
I really should clean up...
I got ya beat, Melana I've been reviewing software I wrote eleven years ago (2007)! A lot of rewrites needed.
And I'm still going if the Scripts Database is any indication.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 494
Threads: 9
Joined: Sep 2013
I kinda stumbled something similar when testing some stuff in my project. I've been using this script by Wecoc for years. It adds more scope options to both items and skills and is part of his collection that brings features from VX/ACE to XP.
Then I randomly noticed that it causes skills and items that revive more than one actor to not work at all. I assumed that I never tested it to its fullest. Then it turned out that I had actually noticed the error and contacted Wecoc about it years ago. He made a correction that I, for some unfathomable reason, never bothered to test until yesterday. The error's still there.
The script in question.
Code: #==============================================================================
# [XP] VX Ace Wecoc Features (ACE_WF) VERSION 1.1
#------------------------------------------------------------------------------
# AC : #024
# Name : BATTLE_SCOPE
# Requires : -
# Incompat : -
# Author : Wecoc
#==============================================================================
# Description
#------------------------------------------------------------------------------
# Adds new 'random' scope options to items and skills.
#
# 0: none
# 1: one enemy
# 2: all enemies
# 3: one ally
# 4: all allies
# 5: 1 ally--HP 0
# 6: all allies--HP 0
# 7: the user
#
# 8: 1 random enemy
# 9: 2 random enemies
# 10: 3 random enemies
# 11: 4 random enemies
# 12: 5 random enemies
# 13: 6 random enemies
# 14: 7 random enemies
#
# 15: 1 random ally
# 16: 2 random allies
# 17: 3 random allies
# 18: 4 random allies
# 19: 5 random allies
# 20: 6 random allies
# 21: 7 random allies
#
# 22: 1 random ally--HP 0
# 23: 2 random allies--HP 0
# 24: 3 random allies--HP 0
# 25: 4 random allies--HP 0
# 26: 5 random allies--HP 0
# 27: 6 random allies--HP 0
# 28: 7 random allies--HP 0
#
# - How to call it
# $data_items[id].scope = n
# $data_skills[id].scope = n
#==============================================================================
module ACE_WF
BATTLE_SCOPE = true
end
module RPG
class Item
def to_enemy?
return [1, 2, 8, 9, 10, 11, 12, 13, 14].include?(@scope)
end
def to_ally?
return (to_live_ally? or to_dead_ally?)
end
def to_live_ally?
return [3, 4, 15, 16, 17, 18, 19, 20, 21].include?(@scope)
end
def to_dead_ally?
return [5, 6, 22, 23, 24, 25, 26, 27, 28].include?(@scope)
end
def to_user?
return @scope == 7
end
def to_singular?
return [1, 3, 5, 7, 8, 15, 22].include?(@scope)
end
def to_multiple?
return (not to_singular?)
end
def to_random?
return @scope > 7
end
end
end
module RPG
class Skill
def to_enemy?
return [1, 2, 8, 9, 10, 11, 12, 13, 14].include?(@scope)
end
def to_ally?
return (to_live_ally? or to_dead_ally?)
end
def to_live_ally?
return [3, 4, 15, 16, 17, 18, 19, 20, 21].include?(@scope)
end
def to_dead_ally?
return [5, 6, 22, 23, 24, 25, 26, 27, 28].include?(@scope)
end
def to_user?
return @scope == 7
end
def to_singular?
return [1, 3, 5, 7, 8, 15, 22].include?(@scope)
end
def to_multiple?
return (not to_singular?)
end
def to_random?
return @scope > 7
end
end
end
class Scene_Battle
def set_target_battlers(scope)
live_actors = $game_party.actors.select {|x| x.exist? and x.hp0? == false}
dead_actors = $game_party.actors.select {|x| x.exist? and x.hp0? == true}
live_enemies = $game_troop.enemies.select {|x| x.exist? and x.hp0? == false}
dead_enemies = $game_troop.enemies.select {|x| x.exist? and x.hp0? == true}
# If battler performing action is enemy
if @active_battler.is_a?(Game_Enemy)
case scope
when 1 # single enemy
index = @active_battler.current_action.target_index
@target_battlers.push($game_party.smooth_target_actor(index))
when 2, 11..14 # all enemies
for actor in live_actors + dead_actors # Bugfix
@target_battlers.push(actor)
end
when 3 # single ally
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
when 4 # all allies
for enemy in live_enemies + dead_enemies # Bugfix
@target_battlers.push(enemy)
end
when 5 # single ally (HP 0)
index = @active_battler.current_action.target_index
enemy = $game_troop.enemies[index]
if enemy != nil and enemy.hp0?
@target_battlers.push(enemy)
end
when 6 # all allies (HP 0)
for enemy in dead_enemies
@target_battlers.push(enemy)
end
when 7 # user
@target_battlers.push(@active_battler)
when 8 # 1 random enemy
@target_battlers.push(live_actors[rand(live_actors.size)])
when 9 # 2 random enemies
if live_actors.size <= 2
for actor in live_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_actors.size
rand_array.push(rand(live_actors.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(live_actors[rand_array[0]])
@target_battlers.push(live_actors[rand_array[1]])
end
when 10 # 3 random enemies
if live_actors.size <= 3
for actor in live_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_actors.size
rand_array.push(rand(live_actors.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(live_actors[rand_array[0]])
@target_battlers.push(live_actors[rand_array[1]])
@target_battlers.push(live_actors[rand_array[2]])
end
when 15 # 1 random ally
@target_battlers.push(live_enemies[rand(live_enemies.size)])
when 16 # 2 random allies
if live_enemies.size <= 2
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
end
when 17 # 3 random allies
if live_enemies.size <= 3
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
end
when 18 # 4 random allies
if live_enemies.size <= 4
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 4
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
end
when 19 # 5 random allies
if live_enemies.size <= 5
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 5
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
end
when 20 # 6 random allies
if live_enemies.size <= 6
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 6
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
@target_battlers.push(live_enemies[rand_array[5]])
end
when 21 # 7 random allies
if live_enemies.size <= 7
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 7
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
@target_battlers.push(live_enemies[rand_array[5]])
@target_battlers.push(live_enemies[rand_array[6]])
end
when 22 # 1 random ally --HP=0
@target_battlers.push(dead_enemies[rand(live_enemies.size)])
when 23 # 2 random allies --HP=0
if dead_enemies.size <= 2
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
end
when 24 # 3 random allies --HP=0
if dead_enemies.size <= 3
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
end
when 25 # 4 random allies --HP=0
if dead_enemies.size <= 4
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 4
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
@target_battlers.push(dead_enemies[rand_array[3]])
end
when 26 # 5 random allies --HP=0
if dead_enemies.size <= 5
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 5
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
@target_battlers.push(dead_enemies[rand_array[3]])
@target_battlers.push(dead_enemies[rand_array[4]])
end
when 27 # 6 random allies --HP=0
if dead_enemies.size <= 6
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 6
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
@target_battlers.push(dead_enemies[rand_array[3]])
@target_battlers.push(dead_enemies[rand_array[4]])
@target_battlers.push(dead_enemies[rand_array[5]])
end
when 28 # 7 random allies --HP=0
if dead_enemies.size <= 7
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 7
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
@target_battlers.push(dead_enemies[rand_array[3]])
@target_battlers.push(dead_enemies[rand_array[4]])
@target_battlers.push(dead_enemies[rand_array[5]])
@target_battlers.push(dead_enemies[rand_array[6]])
end
end
end
# If battler performing action is actor
if @active_battler.is_a?(Game_Actor)
case scope
when 1 # single enemy
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
when 2 # all enemies
for enemy in live_enemies + dead_enemies # Bugfix
@target_battlers.push(enemy)
end
when 3 # single ally
index = @active_battler.current_action.target_index
@target_battlers.push($game_party.smooth_target_actor(index))
when 4, 18..21 # all allies
for actor in live_actors + dead_actors # Bugfix
@target_battlers.push(actor)
end
when 5 # single ally (HP 0)
index = @active_battler.current_action.target_index
actor = $game_party.actors[index]
if actor != nil and actor.hp0?
@target_battlers.push(actor)
end
when 6, 25..28 # all allies (HP 0)
for actor in dead_actors
@target_battlers.push(actor)
end
when 7 # user
@target_battlers.push(@active_battler)
when 8 # 1 random enemy
@target_battlers.push(live_enemies[rand(live_enemies.size)])
when 9 # 2 random enemies
if live_enemies.size <= 2
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
end
when 10 # 3 random enemies
if live_enemies.size <= 3
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
end
when 11 # 4 random enemies
if live_enemies.size <= 4
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 4
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
end
when 12 # 5 random enemies
if live_enemies.size <= 5
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 5
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
end
when 13 # 6 random enemies
if live_enemies.size <= 6
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 6
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
@target_battlers.push(live_enemies[rand_array[5]])
end
when 14 # 7 random enemies
if live_enemies.size <= 7
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 7
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
@target_battlers.push(live_enemies[rand_array[5]])
@target_battlers.push(live_enemies[rand_array[6]])
end
when 15 # 1 random ally
@target_battlers.push(live_actors[rand(live_actors.size)])
when 16 # 2 random allies
if live_actors.size <= 2
for actor in live_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_actors.size
rand_array.push(rand(live_actors.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(live_actors[rand_array[0]])
@target_battlers.push(live_actors[rand_array[1]])
end
when 17 # 3 random allies
if live_actors.size <= 3
for actor in live_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_actors.size
rand_array.push(rand(live_actors.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(live_actors[rand_array[0]])
@target_battlers.push(live_actors[rand_array[1]])
@target_battlers.push(live_actors[rand_array[2]])
end
when 22 # 1 random ally --HP = 0
@target_battlers.push(dead_actors[rand(dead_actors.size)])
when 23 # 2 random allies --HP = 0
if dead_actors.size <= 2
for actor in dead_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...dead_actors.size
rand_array.push(rand(dead_actors.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(dead_actors[rand_array[0]])
@target_battlers.push(dead_actors[rand_array[1]])
end
when 24 # 3 random allies --HP = 0
if dead_actors.size <= 3
for actor in dead_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...dead_actors.size
rand_array.push(rand(dead_actors.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(dead_actors[rand_array[0]])
@target_battlers.push(dead_actors[rand_array[1]])
@target_battlers.push(dead_actors[rand_array[2]])
end
end
end
end
end
Posts: 937
Threads: 101
Joined: May 2009
12-01-2018, 09:01 PM
(This post was last modified: 12-01-2018, 10:06 PM by Kain Nobel.)
I now have some animated battlers developed! Doing major work on the battle system at the moment, there are so many problems! Reducing and streamlining code, restructuring everything, it'll probably leave my project unplayable for the next month or two. Sometimes I worry if I've coded myself into oblivion and have to roll back to an earlier version. Oh well, it will get fixed/improved/mastered eventually.
^Screenshot already out of date BTW. I've fixed the animation Z problem which stands out in this picture.
Prototype builds are in the spirit of Cloud and the gang, but they're only temporary placeholders until I get my original characters more fleshed out. Now I've got whole sheets of an original battle templates (child, woman, man, man (muscle), man (fat)) and pieces of hair, clothing, shoes, accessories, etc I've made. Still making more battle poses, assumed end goal would be sheets tailored to each weapon type.
Also working on battler "AI" (if you want to call it that.)
Some scripted enemies...
BattleAI::Ghost
Code: #===============================================================================
# ** BattleAI::Ghost
#-------------------------------------------------------------------------------
# A wicked wandering spirit which vanishes at will, curses your party
# and uses Arcane magic. Once physically attacked, it will try to stay in
# an "Invisible" state to avoid your hits. Once magically attacked, it will
# begin adding "Silence" to its routine.
#
# Attacks
# -------
# Attack - Physical Attack
# Dreadful Sin - Magical Attack. Contains "Dark" element.
# Screaming Pain - Physical Attack. 20% chance of resetting ATB bar.
# Silence - Non-Damage. Inflicts "Silence".
#===============================================================================
class BattleAI::Ghost < BattleAI
#-----------------------------------------------------------------------------
# * Setup
#-----------------------------------------------------------------------------
def setup
# Default physically attacked false
@physically_attacked = false
# Default magically attacked false
@magically_attacked = false
# Set vanish and angry to 0
@vanish = 0
@angry = 0
# Start with a random step between 1 and 3
@step = rand(1..3)
# 1/8 chance of first attack
first_attack if rand(1..8) == 8
end
#-----------------------------------------------------------------------------
# * First Attack
#-----------------------------------------------------------------------------
def first_attack
# End method unless battler is leader
return unless @battler.index == 0
# Set first attack flag
@first_attack = true
# Select all foes
@battler.set_target(:foes_all)
# Use Skill ("Curse")
@battler.use_skill(111)
end
#-----------------------------------------------------------------------------
# * Process
#-----------------------------------------------------------------------------
def process
# Add 1 to vanish if state
@vanish += 1 if @battler.state?(38)
# End method and die if SP 0
return if process_sp0
# End method if process vanish
return if process_vanish
# End method if process reappear
return if process_reappear
# End method if process low HP
return if process_lowhp
# Perform regular process
process_phase1
end
#-----------------------------------------------------------------------------
# * Process : SP 0
#-----------------------------------------------------------------------------
def process_sp0
# If battler has no SP
if @battler.sp == 0
# Battler automatically dies
@battler.die
# Return true
return true
end
# Return false
false
end
#-----------------------------------------------------------------------------
# * Process : Vanish
#-----------------------------------------------------------------------------
def process_vanish
# False unless been physically attacked before
return false unless @physical_attack
# False unless 2/3 (66%) chance
return false unless rand(1..3) > 1
# Set target self
@battler.set_target(:user)
# Use Skill ("Vanish")
@battler.use_skill(80)
# Return true
true
end
#-----------------------------------------------------------------------------
# * Process : Reappear
#-----------------------------------------------------------------------------
def process_reappear
# Return false unless vanished for 2 or more turns
return false unless @vanish >= 2 && @battler.state?(38)
# Set target self
@battler.set_target(:user)
# Use Skill ("Appear")
@battler.use_skill(81)
# Return true
true
end
#-----------------------------------------------------------------------------
# * Process : Low HP
#-----------------------------------------------------------------------------
def process_lowhp
# Return false unless 1/4 chance
return false unless rand(1..4) == 4
# Return false unless HP less than 35%
return false unless @battler.hp < (@battler.maxhp * 0.35)
# Return false unless able to use skill "Drain Energy"
return false unless @battler.skill_can_use?(83)
# Set target with highest HP
@battler.set_target(:foe_highest_hp)
# Use Skill ("Drain Energy")
@battler.use_skill(83)
# Return true
true
end
#-----------------------------------------------------------------------------
# * Regular Attack
#-----------------------------------------------------------------------------
def regular_attack
# Select nearest target
@battler.set_target(:foe_nearest)
# Do Attack
@battler.do_attack
end
#-----------------------------------------------------------------------------
# * Use "Dreadful Sin"
#-----------------------------------------------------------------------------
def use_dreadful_sin
# If 3/8 (38%) chance
if (rand(1..8) < 4)
# Select target with highest HP
@battler.set_target(:foe_highest_hp)
# Use Skill ("Dreadful Sin")
@battler.use_skill(109)
# If 5/8 (62%) chance
else
# Do a regular attack
regular_attack
end
end
#-----------------------------------------------------------------------------
# * Use "Screaming Pain"
#-----------------------------------------------------------------------------
def use_screaming_pain
# If 3/8 (38%) chance
if (rand(1..8) < 4)
# Select random target
@battler.set_target(:foe_random)
# Use Skill ("Screaming Pain")
@battler.use_skill(110)
# If 5/8 (62%) chance
else
# Do a regular attack
regular_attack
end
end
#-----------------------------------------------------------------------------
# * Use "Silence"
#-----------------------------------------------------------------------------
def use_silence
# Order target from least to most skills obtained
arr = $game_party.actors.sort {|a, b| a.skills.size <=> b.skills.size}
# Set nil target
target = nil
# Go through each actor from most skills to least skills
arr.reverse.each do |actor|
# Skip if actor already has "Silence" state
next if actor.state?(17)
# Set target
target = actor
end
# If no target
if target.nil?
# Do a regular attack
regular_attack
# If target
else
# Set target
@battler.set_target(target)
# Use Skill ("Silence")
@battler.use_skill(37)
end
end
#-----------------------------------------------------------------------------
# * Process : Phase 1
#-----------------------------------------------------------------------------
def process_phase1
# Branch out by step
case @step
when 1
# Do a regular attack
regular_attack
# Increase step
@step += 1
when 2
# Use "Dreadful Sin"
use_dreadful_sin
# Increase step
@step += 1
when 3
# Use "Screaming Pain"
use_screaming_pain
# Increase step if magically attacked or reset to 1
@step = (@magically_attacked ? @step + 1 : 1)
when 4
# Use "Silence"
use_silence
# Reset step to 1
@step = 1
end
# Set step back to 1 if too high
@step = 1 if (@step > (@magically_attacked ? 4 : 3))
end
#-----------------------------------------------------------------------------
# * Counter
#-----------------------------------------------------------------------------
def counter(attacker)
# If attacker using attack
if attacker.do_attack?
# Set physically attacked flag
@physically_attacked = true
# Set target self
@battler.set_target(:user)
# Use Skill ("Vanish")
@battler.use_skill(82)
# If attacker is using a skill
elsif attacker.do_skill?
# Get attacker skill
skill = $data_skills[attacker.current_action.skill_id]
# Retaliate against heal damage
retaliate_heal(attacker, skill)
# If attacker is using an item
elsif attacker.do_item?
# Get attacker item
item = $data_items[attacker.current_action.item_id]
# Retaliate against heal damage
retaliate_heal(attacker, item)
end
end
#-----------------------------------------------------------------------------
# * Retaliate Heal
#-----------------------------------------------------------------------------
def retaliate_heal(attacker, object)
# End method unless object has "Heal" element
return unless object.element_set.include?(1)
# Send an angry message
send_angry_message
# Target attacker
@battler.set_target(@angry == 2 ? :foes_all : attacker)
# Use Skill ("Curse")
@battler.use_skill(111)
end
#-----------------------------------------------------------------------------
# * Send Angry Message
#-----------------------------------------------------------------------------
def send_angry_message
# End method if angry message already said
return if @angry == 2
# If message variable 0
if @angry == 0
# Send 1st angry message
$scene.set_msg(@battler, "How dare you..")
$scene.set_msg(@battler, "You'll pay dearly...")
elsif @angry == 1
# Send 2nd angry message
$scene.set_msg(@battler, "Curse you!")
$scene.set_msg(@battler, "You'll all pay now!")
end
# Increase message value
@angry += 1
end
#-----------------------------------------------------------------------------
# * Death
#-----------------------------------------------------------------------------
def death(attacker)
# Do nothing
end
end
BattleAI::Vagrant
Code: #===============================================================================
# ** BattleAI::Vagrant
#-------------------------------------------------------------------------------
# Vagrants are packs of wandering thieves. They've got nothing better
# to do but rob and harass travelers going about their day. While they
# typically escape after stealing an item, they can steal another and another
# if given the chance. Whatever the very last item each enemy has stolen
# is the only item(s) you'll be getting back from said enemy.
# Their only strength is in numbers, and the fact that they could take
# something rare and awesome. They become cowards when their friends run low
# and are more likely to escape then. Their evasion is slightly higher than
# normal, 30%, so you may want to use magic skills so you don't miss.
#===============================================================================
class BattleAI::Vagrant < BattleAI
#-----------------------------------------------------------------------------
# * Setup
#-----------------------------------------------------------------------------
def setup
# Set random step between 1 and 3
@step = rand(1..3)
end
#-----------------------------------------------------------------------------
# * Process
#-----------------------------------------------------------------------------
def process
# If stolen item and 1/3 (33%) chance
if @battler.stolen_item > 0 && (rand(1..3) == 3)
# Set successful steal message
$scene.set_msg(@battler, msg_success)
# Do Escape
@battler.do_escape
# End method
return
end
# If he is alone in battle and 4/5 (80%) chance
if $game_troop.enemies.size == 1 && (rand(1..5) > 1)
# Set coward message
$scene.set_msg(@battler, msg_coward)
# Do escape
@battler.do_escape
# End method
return
end
# Skip from step 1 to step 2 or 3 if already stolen
@step = rand(2..3) if (@step == 1 && @battler.stolen_item > 0)
# Branch out by step
case @step
when 1
# Set mugger's message
$scene.set_msg(@battler, msg_shakedown)
when 2
# Select nearest foe
@battler.set_target(:foe_nearest)
# Do Attack
@battler.do_attack
when 3
# Select random foe
@battler.set_target(:foe_nearest)
# Use Skill ("Mug")
@battler.use_skill(142)
end
# Add 1 step
@step += 1
# Set step 0 if too high
@step = 1 if @step > 3
end
#-----------------------------------------------------------------------------
# * Message : Shakedown
#-----------------------------------------------------------------------------
def msg_shakedown
# Default blank text
text = ''
# Get text based on battler index
text = case @battler.index
when 0 ; 'Hand it over and nobody has to get hurt, ya hear?'
when 1 ; 'Give us everything you\'ve got!'
end
# Return text
text
end
#-----------------------------------------------------------------------------
# * Message : Success
#-----------------------------------------------------------------------------
def msg_success
# Default blank text
text = ''
# Get text based on battler index
text = case @battler.index
when 0 ; 'Haha, see ya suckers!'
when 1 ; 'Come to the hood and get jacked!'
when 2 ; 'Looks like we\'re making out like bandits!'
end
# Return text
text
end
#-----------------------------------------------------------------------------
# * Message : Coward
#-----------------------------------------------------------------------------
def msg_coward
'I... I\'m outta here!'
end
#-----------------------------------------------------------------------------
# * Message : Angry
#-----------------------------------------------------------------------------
def msg_angry
# Text if enemy hasn't stolen from party yet
@angry_msg1 ||= 'Oh so you think you can steal from me?!'
# Text if enemy has already stolen from party
@angry_msg2 ||= 'Finders, keepers! I stole it fair and square!'
# Return message
(@battler.stolen_item > 0 ? @angry_msg2 : @angry_msg1)
end
#-----------------------------------------------------------------------------
# * Counter
#-----------------------------------------------------------------------------
def counter(attacker)
# If attacker is using a skill
if attacker.do_skill?
# Get skill
skill = $data_skills[attacker.current_action.skill_id]
# Retaliate steal
retaliate_steal(attacker, skill)
# If attacker is using an item
elsif attacker.do_item?
# Get item
item = $data_items[attacker.current_action.item_id]
# Retaliate steal
retaliate_steal(attacker, item)
end
end
#-----------------------------------------------------------------------------
# * Retaliate Steal
#-----------------------------------------------------------------------------
def retaliate_steal(attacker, object)
# End method unless object performs steal/mug type effect
return unless object.do_steal?
# Set angry message
$scene.set_msg(@battler, msg_angry)
# Select attacker
@battler.set_target(attacker)
# Do Attack
@battler.do_attack
end
#-----------------------------------------------------------------------------
# * Death
#-----------------------------------------------------------------------------
def death(attacker)
# If battler had stolen before dying
if @battler.stolen_item > 0
# Re-appropriate very last item stolen
$game_party.gain_item(@battler.stolen_item, 1)
# If nothing was ever stolen
else
# Give a +5% EXP bonus to killer
$game_troop.bonus_exp[attacker] += 0.05
# Give a +5% Gold bonus to killer's party
$game_troop.bonus_gold += 0.05
end
end
end
BattleAI::Basilisk
Code: #===============================================================================
# ** BattleAI::Basilisk
#-------------------------------------------------------------------------------
# A lazy lizard monster with a savage bite and nails of steel. If you
# discover it sleeping think twice about waking it up.
#===============================================================================
class BattleAI::Basilisk
#-----------------------------------------------------------------------------
# * Setup
#-----------------------------------------------------------------------------
def setup
# Default provoked false
@provoked = false
# Default sleeping flag
@sleeping = false
# If 1/3 (33%) chance
if rand(1..3) == 3
# Start out with "Sleep"
@battler.add_state(18)
# Set flag
@sleeping = true
end
end
#-----------------------------------------------------------------------------
# * Process
#-----------------------------------------------------------------------------
def process
# Do nothing if unprovoked
return unless @provoked
# Set step to random number
@step = rand(1..16)
# If 3/8 (38%)
if @step.between?(1..6)
# Select nearest foe
@battler.set_target(:foe_nearest)
# Use Skill ("Bite")
@battler.do_skill(150)
# If 3/8 (37%)
elsif @step.between?(7..12)
# Select random foe
@battler.set_target(:foe_random)
# Use Skill ("Claw")
@battler.do_skill(151)
# If 1/4 (25%)
elsif @step.between?(13..16)
# If 3/4 (75%) and can use "Slow" skill
if (rand(1..4) < 4) && @battler.skill_can_use?(49)
# Default nil target
target = nil
# Get list of actors sorted from slowest to fastest
actors = $game_party.actors.sort {|a, b| a.agi <=> b.agi}
# Go through each actor from fastest to slowest
actors.reverse.each do |actor|
# Next if already has "Slow" state or immobile
next if (actor.state?(26) || !actor.movable?)
# Select target
target = actor
end
# Unless no target
unless target.nil?
# Select target
@battler.set_target(target)
# Do Skill ("Slow")
@battler.use_skill(49)
# End method
return
end
end
# Select nearest foe
@battler.set_target(:foe_nearest)
# Do Attack
@battler.do_attack
end
end
#-----------------------------------------------------------------------------
# * Counter
#-----------------------------------------------------------------------------
def counter(attacker)
# Set provoked flag if damage taken
@provoked = (@battler.hp < @battler.maxhp)
# If attacker is using a skill
if attacker.do_skill?
# Get skill
skill = $data_skills[attacker.current_action.skill_id]
# Provoked if stolen from
steal_provoke(attacker, skill)
# If attacker is using an item
elsif attacker.do_item?
# Get item
item = $data_items[attacker.current_action.item_id]
# Provoked if stolen from
steal_provoke(attacker, item)
end
end
#-----------------------------------------------------------------------------
# * Steal Provoke
#-----------------------------------------------------------------------------
def steal_provoke(attacker, object)
# Set provoked flag if stealing and not "Sleep"
@provoked = true if object.do_steal? && !@battler.state?(18)
end
#-----------------------------------------------------------------------------
# * Death
#-----------------------------------------------------------------------------
def death(attacker)
# Do nothing
end
end
The oldschool "Action List" style enemies are still functional for when I want to use it, but I'll be doing these for tricky enemies and most of the more difficult boss fights. I'm amazed at how much there is to define just for a simple fly-by random encounter, but bosses will be a lot more fun to design and fight from now on!
I like to write enemy routine scripts, it gives for a lot of cunning and calculating on part of the acting enemy. As such, a Ghost will iterate through the actor with the most skills to the actor with the least skills and determine if they need to inflict "Silence" or not, prioritizing the one with the most potential skills whom doesn't already have "Silence". The physical attackers have to deal with Ghosts vanishing all the time so either way it makes for an annoying to potentially difficult fight depending on your level and patience.
ANIMATED/AI BATTLER PROGRESS
Heroes
Logan - Character (100%) Battler (112% (Most Poses/Actions))
Mac - Character (100%) Battler (60%)
Sasha - Character (100%) Battler (30%)
Enemies
Ghost - Animated/AI
Soldier 1 - Animated (80%)
Soldier 2 - Animated (100%)
Cain (Knight Blade) - Animated
Basilisk - Animated/AI
Hellhound - Animated/AI
Hellraiser - AI (No animation yet :( )
Tesla Wyrm - Animated/AI
Triterrortops - Animated/AI
Doberman - Animated/AI
Cobra - Animated
Razor Palm - Animated
Oily Body - Animated
Flame Soul - Animated/AI
Other Characters
Locke (FF6) - Character/Battler
Sabin (FF6) - Character/Battler
Celes (FF6) - Character/Battler
Terra (FF6) - Character/Battler
Cloud (FF7) - Character
Tifa (FF7) - Character/Battler (155% (Most Poses/Actions))
Aeris (FF7) - Character/Battler
Ward (FF8) - Character
Red Baron (Shining Force II) - Character/Battler
Ghestal (Shining Force II) - Battler (20%)
I'll probably be doing more non-original characters during the expansion process of the animated battler template I've been creating. It's easier to beta animations when you're designing familiar heroes/villians than if you were to worry about creating a new character from scratch too. Thanks to Tifa, my females have so much more actions than the males so the boys will have to eventually catch up. Heck, Cloud doesn't even have a battler designed for him yet - not that it's on my high priorities list - but I might get to him soon just because it bugs me.
My internet connection sucks and I can't get IRC to work, plus I work a lot, so I don't know how much I'll be around after the holidays. Still, I'll try to drop in once in awhile just so people know I'm alive lol.
Posts: 11,231
Threads: 649
Joined: May 2009
12-01-2018, 10:32 PM
(This post was last modified: 12-01-2018, 10:33 PM by DerVVulfman.)
KAINERS!!!
Hey, ya might like my MV to Minkoff converter script : though I know you like making your own.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 11,231
Threads: 649
Joined: May 2009
12-11-2018, 04:39 AM
(This post was last modified: 12-11-2018, 04:40 AM by DerVVulfman.)
Taking a break from spriting Akali, I am now back to a leisurely job of coding.
Yeah, like anything I code is something simple. So let's see what I have working now:
- Conversion of txt files into rxdata for compressed/encrypted projects? CHECK
- variations on layouts based on designed window dimensions and margins? CHECK
- Three basic styles: 1-page viewing, 2-page viewing, scrolls? CHECK
- Page turning and scrolling correctly worked out? CHECK
- Multiple font styles (italics, bold, shadow, outline)? * CHECK
- Font color styles: RMXP default codes and custom Hex codes? CHECK
- Actual rendered graphics importing with text? CHECK
- Functional Tab system? CHECK
- Functional forced page-break system? INCOMPLETE
- Up to fourty different page numbering styles? CHECK
- One-time reading grants: Able to learn/remove spells? CHECK
- One-time reading grants: Able to gain/lose stat or health bonuses? CHECK
- Able to include more one-time bonuses/penalties via script? CHECK
- Script name chosen? CHECK
- Demo created? INCOMPLETE
Well, there's gonna be a library, so I need some cannon-fodder for this demo.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
|