04-17-2012, 05:38 PM
Actually, my first step it to grab the whole code, kanji text included, and use an online translator to go through each comment one at a time. It's boring and time consuming.... especially with 1000+ line scripts. Even then, the syntax is so messed up, you gotta hit your head against a desk fifty times to figure out what the translation means.
But hey. I think I got something for you. No translator used...
First, take a look at this:
and this...
These are changes I made to the top of the script.
Not exactly translations, but my own personal pseudo-translations of what these functions do.
Insofar as the RC_RANK_IMAGE, I trust you downloaded the position.png from the site you obtained the script. It is nothing more than a 96x32 image. The file is supposed to hold the 3 32x32 icons used to show your position in your formation (front, middle, rear).
Now let me get back to one of the code sections I showed above...
Now this is important.
This bit of code lets you create three elements in your database: FrontMove, MiddleMove and RearMove. You need to create these elements in the same section of the database where you hold the Fire, vs Undead and the other elements. Spelling and capitalization are important. And this had to be translated into English so the feature would work on your Western system.
Now you can create 3 skills. One skill that lets you move your actor into the Front Position, one the lets you move your actor into the Middle position, and etc. Each skill must have an element tagged to it that represents the position. IE; the rear position skill would be tagged with the RearMove element.
BUT..... I am not done yet. There is a change in the lower part of the script that I haven't shown you. It is this:
This bit of code is located around line 230 on down in the script. It is merely a change to the values checked with the when statements. Now in English, it will obtain the position and adjust your player's position accordingly.
Now one more thing.....
I don't know how the whole RANK and RANGE system works. I don't know if you do either. If you do... woohoo!!! If not, well, I guess you don't need to worry about tagging enemies/actors/skills or whatnot with those.
But if that's the case, then the position system changes I showed only do a cosmetic change to your system. I will not affect gameplay. The enemy's decision who to attack is still based on their initial 'class position' as it only reads it straight from the class database.
So I did this little scriptette for you:
This replaces the original 'random_target_actor' routine. Paste this below the KGC script and it will read from the actor's position rather than from the fixed position from the class database.
But hey. I think I got something for you. No translator used...
First, take a look at this:
Code:
module KGC
# WHATEVER THE HECK THIS IS... RANGE
RC_DEFAULT_RANGE = 4
# Graphic File that holds the 3 rank position images
# Stored within the "Graphics/Pictures" folder
RC_RANK_IMAGE = "position"
# Rank Offset Setting
# Defaulted to 120 pixels
# to the left of the character's name
RC_RANK_OFFSET = 0
end
and this...
Code:
# Create a Move Position element... FrontMove, MiddleMove, RearMove
$game_special_elements["move_rank"] = /(Front|Middle|Rear)Move/
Not exactly translations, but my own personal pseudo-translations of what these functions do.
Insofar as the RC_RANK_IMAGE, I trust you downloaded the position.png from the site you obtained the script. It is nothing more than a 96x32 image. The file is supposed to hold the 3 32x32 icons used to show your position in your formation (front, middle, rear).
Now let me get back to one of the code sections I showed above...
Code:
# Create a Move Position element... FrontMove, MiddleMove, RearMove
$game_special_elements["move_rank"] = /(Front|Middle|Rear)Move/
This bit of code lets you create three elements in your database: FrontMove, MiddleMove and RearMove. You need to create these elements in the same section of the database where you hold the Fire, vs Undead and the other elements. Spelling and capitalization are important. And this had to be translated into English so the feature would work on your Western system.
Now you can create 3 skills. One skill that lets you move your actor into the Front Position, one the lets you move your actor into the Middle position, and etc. Each skill must have an element tagged to it that represents the position. IE; the rear position skill would be tagged with the RearMove element.
BUT..... I am not done yet. There is a change in the lower part of the script that I haven't shown you. It is this:
Code:
# Change Battler Position -----------------------------------------------
case move_position
when "Front"
if self.is_a?(Game_Actor)
self.position = 0
else
self.element_ranks[$game_special_elements["rank"]] = 1
end
when "Middle"
if self.is_a?(Game_Actor)
self.position = 1
else
self.element_ranks[$game_special_elements["rank"]] = 3
end
when "Rear"
if self.is_a?(Game_Actor)
self.position = 2
else
self.element_ranks[$game_special_elements["rank"]] = 4
end
end
# End Method ------------------------------------------------------------
Now one more thing.....
I don't know how the whole RANK and RANGE system works. I don't know if you do either. If you do... woohoo!!! If not, well, I guess you don't need to worry about tagging enemies/actors/skills or whatnot with those.
But if that's the case, then the position system changes I showed only do a cosmetic change to your system. I will not affect gameplay. The enemy's decision who to attack is still based on their initial 'class position' as it only reads it straight from the class database.
So I did this little scriptette for you:
Code:
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# * Random Selection of Target Actor
# hp0 : limited to actors with 0 HP
#--------------------------------------------------------------------------
def random_target_actor(hp0 = false)
# Initialize roulette
roulette = []
# Loop
for actor in @actors
# If it fits the conditions
if (not hp0 and actor.exist?) or (hp0 and actor.hp0?)
# Get actor [position] for new version
position = actor.position
# Front guard: n = 4; Mid guard: n = 3; Rear guard: n = 2
n = 4 - position
# Add actor to roulette n times
n.times do
roulette.push(actor)
end
end
end
# If roulette size is 0
if roulette.size == 0
return nil
end
# Spin the roulette, choose an actor
return roulette[rand(roulette.size)]
end
end
This replaces the original 'random_target_actor' routine. Paste this below the KGC script and it will read from the actor's position rather than from the fixed position from the class database.