Show posts

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.

Topics - Jragyn

1
JABS - J's Action Battle System
Authors: J / JE / Jragyn
Version: 1.00
Type: Action Battle System
Key Term: Custom Battle System

Introduction

After over a decade of leveraging other people's plugins/scripts, I finally have decided to give back.
Enter: JABS, my (J/JE/Jragyn) Action Battle System.
Using this plugin will allow you to battles on the map akin to many popular franchises that start with zeld-.

This was largely inspired by Blizzard's ABS (BlizzABS / BABS, for XP) and Moghunters ABS (XAS / Chrono Engine, for XP+/MV).

It is also by no means perfect, and I fully expect lots of bugs and other imperfections to be found... afterall, I did only develop this in like, 3 months!
I am also not a sprite-maker or artist by any stretch. Though this would probably support cool animations and poses etc, I have no idea how to create them and know no one personally who can/would for me.

Features

  • JABS is an Action Battle System, enabling battles to happen on the map.
  • Battlers can be created via events w/ specific notes.
  • Battlers will follow their configured AI (that you decide with notes).

Comes with a few extra plugins that one may expect in an ABS, but are by no means required (just useful):
  • A simple HUD (displays face + hp/mp/tp/xp-to-next + status icons and their counters).
  • A simple text log (tracks activity like damage dealt and received, EXP/GP/loot earned, etc.).
  • A simple action key setup (shows cooldowns and combos etc.)

Screenshots
Spoiler: ShowHide








Demo

You can find the sample project on my public code repository.
It lives right over here.
Just click the ... in the upper right and Download as Zip.

Script
The code is within the demo provided above (you wouldn't want 10k lines of code pasted here anyway).


Instructions
It is strongly recommended you utilize the demo project as a base to build your own project off of. The plugins are in the order they should be, and the whole thing should just work out of the box. Additionally, the demo does showcase some of the native capabilities of the engine and steps you, the RM developer, through some of the basic stuff and guides you where to look for things.


Compatibility
This was not tested with any other real plugins aside from what is within the project. If there are plugins/scripts out there that tamper with the way events work, there may be some incompatibilities. However, I did my best to extend and not overwrite where possible.


Credits and Thanks

  • Blizzard (and Winkio I think?)
  • Moghunter

Author's Notes

I deliberately left all code open for the public to view and edit as they see fit (please be kind and give credit where credit is due!).
When I first started out playing around in RMXP, the ability to look into other people's scripts and such helped me learn how to do things on my own. I have built many-a-extensions for scripts/plugins over the years that I just kept to myself... but with JABS, I hope this to become a collaborative community effort! So, if you're a crafty enough developer yourself and want to extend this engine with your own added functionality, I would humbly ask that you loop me into the changes you hope to make! It is totally possible that I just didn't think of adding it myself and would add it to JABS for all to use!

Additionally, if you have questions about the code, I'd be happy to explain most anything you'd see in the J-ABS.js file (or any of my plugins).

Thank you, and happy RM-ing!
2
In short, I'm trying to do this:
http://forum.chaos-project.com/index.php/topic,15144.0.html

But in the new RPG Maker MV.
For those too lazy to click and read, I'm attempting to remodel the status screen to include more information, specifically the values of s/x params, and also a brief description of what they do for the player.

I've broken it down enough so I understand the functionality of it in Ruby, but MV uses JavaScript, and of course also remodeled all of its core scripts so it is like starting all over. As a result, I have run into a few problems that I really just don't fully understand, because the same course of action done in RMVXace resulted in something else.

Here is a link to the *.js file I'm working on (ever changing since I'm tinkering and toying with it constantly).
Here is a link to the original end result of the script for RMVXace.

The biggest issue I've run into:
> windows don't seem to stack ontop of eachother, instead they erase whatever was beneath. As a result, changing opacity just makes it so you see the map instead of the lower layer of status screen.

To re-iterate, this is no longer in Ruby, which after staring at it and slowly learning for the last 6+ years, looking at Javascript seems so foreign.
(It probably doesn't help that in September I returned to school to pursue an AA >> BAS in computer stuff, resulting in learning html/css/javascript/c# all at the same time now)

Anyone able to help? This isn't a pressing matter by any means, it is more for my own learning than for some super awesome project or anything. Eventually, this same knowledge will be applied to the entire Menu, but first, babysteps.
3
My goal:
 To create a status menu that fits the "16:9 ratio" thing(640x360 compared to the default 544x416).
 To allow the player to not just view the stats, but also view a brief snippet(help window) of what they do (ie: Attack- raises physical damage dealt).
 
My Progress:
 I am pretty nub with scripting. I meant to pick it up with RMXP, but then VX came out. Then work happened. Then VX Ace came out. More work happened, and MV is about to come out... but I already got started during the VX Ace era, so here we are. I put together modules that have some configurations in them (like vocab for the s/x params), modified a few methods that are supposed to enable higher-than-cap base parameters(they seem to work), and actually perform the minor adjustment for changing screen resolution from default to the ratio I mentioned before.
 I have a basic understanding of how it all works for the most part, and I feel like the issue I am stumbling most with is simply understanding the window to scene interactions, in addition to the details about things like command windows and how all that works. I've read over the default scripts again and again, and I just feel like I'm missing something. So I posted what I've got at the bottom. Currently, the script draws all the parameters, and I tried to do things with the Scene_Status and making it do the selectable thing... but its definitely not working.

I was hoping I could get a peer review or something from one of the experts(read: more knowledgeable than I am) and maybe a shove in the right direction with wisdom about how the things I'm tripping over work. :( Sorry for the mouthful, just trying to be as clear as possible.

1. What RPG Maker you are using?
   -RMVXace
2. What exactly is the problem you are encountering? Which scripts are you using?
   -It is a naked project, the only thing I'm using is my own script (listed below).
3. In which environment does the problem occur?
   -The issues start occurring when I decide to start going into the menu and pressing buttons.
   -As written and pasted on Pastebin, it is setup so that if you choose any of the selections on the status menu, you get:
"Script 'Window_Base' line 72: RGSSError occured. disposed window." Which I'm sure is because I failed at doing the right thing with window creation.

For clarity, I've done my best to comment what I believe its supposed to do or at least what my intent was for the code listed below:
And also, so I don't have a mile long post, I shoved it onto pastebin:

Click here for the module for the Revamp.
Click here for the Revamp on Pastebin.

Single instruction: Module goes in its own script section above the Revamp itself.

And thanks again for anyone who lends help, I appreciate it.
4
Script Troubleshooting / [RMVXA] CCTS for VXace?
May 04, 2013, 06:33:36 pm
I've taken it upon myself to try and convert this script over to RPG Maker VX Ace, and for the most part thought I was succeeding, however, after changing up appropriate methods to match what VX Ace has compared to XP, in the end, it just pops an error with "get_pixel" error under Window_Base, which seemingly has little to nothing to do with the script :\

Doing a quick CTRL+SHIFT+F of "get_pixel", this is only found in Window_Base attached like this: "windowskin.get_pixel(blahblah)"
Doing another search for "windowskin", and it pulls up the CCTS referencing windowskins for the clock, which I set to nil.

At this point, I'm pretty well stumped, I can't seem to figure it out and was hoping for a little assistance.
The system accomplished all I was considering utilizing, except via scripts instead of Common Events and variables, etc.

If not to use the script, I'd like to understand the error and how to fix it, just so that I can apply the knowledge further to my own scripting capabilities.
5
I thought this'd be already created, but I can't seem to find it in any forums or anywhere.

I seek to be able to enter a state, and skills become available/unavailable.
IE: Enter state:Aggressive Stance and lose the ability to cast Heal (becomes greyed out/hidden), but gain the ability to use Vicious Slash.

Anyone have any ideas?
6
Active Count Battle 2
Authors: KGC
Version: 3
Type: Active Time Battle
Key Term: Custom Battle System



Introduction

This is a ATB-based Battle System written by KGC.
It replaces the entire Default Battle System.

The original script in japanese can be found here:
KGC ACB2


Features


  • Turns are taken in real/count time.

  • Seemingly quite compatible with a lot of other scripts.

  • etc.




Screenshots
Nothing terribley exciting, would be best to just download and give it a whirl.
Spoiler: ShowHide



Demo

Demo via myMediafire.
The demo has TONs 7.5 and my EQUAP bars,
but by no means does this CBS require them.
It just functions with them :)

I do encourage you download the demo, since it comes with default graphic files you need.


Script

The script is too large to paste in here.
It just has to go between Scene_Debug & Main somewhere.
Download the demo so you can have the default graphic files, though.



Instructions

There are details as to configuration all within the script.
Make sure you have the default graphic files, or your own files for graphics!


Compatibility

Probably won't function with other CBSs.
General compatibility with things that don't mess with the Battle system.
If you find something that absolutely will not work,
I'll post the incompatibilities here.

It IS however totally compatible with all the other KGC scripts.


Credits and Thanks


  • KGC: You guy(s) make awesome scripts. Too bad none of them for RMXP are in english!

  • Jragyn: I didn't make it whatsoever, but I did english-ify the configuration :)




Author's Notes

One more time, I did NOT write this script.
I just translated the configuration into english from its original in japanese.
7
RMXP Script Database / [XP] J::Battle BOOST!
May 28, 2011, 01:43:15 am
J::Battle BOOST!
Authors: Unknown
Version: 1
Type: Battle Speed Enhancer
Key Term: Battle Add-on



Introduction

Its not even really a script as much as an altered definition.
But hot-damn, it MAKES THE DIFFERENCE.


Features


  • DRASTICALLY speeds up all battles.

  • etc.




Screenshots

You cannot screenshot speed.



Demo

No, I will not make a demo.
This is really just... plug and play.


Script

Spoiler: ShowHide
=begin
____________________________
| J::Battle BOOST!           |
| Author: Unknown            |
|____________________________|

 A ridiculously useful little altered definition that DRASTICALLY
 increases the battle speed.
 
 Its hard to explain, you should just give it a go and see what I mean.
 
 All you need to know is that the higher the number, the faster it goes.
 To a limit, of course.
   
=end


class RPG::Sprite
 def effect?
   @_whiten_duration > 16 ||     # 0 - 16
   @_appear_duration > 16 ||     # 0 - 16
   @_escape_duration > 32 ||     # 0 - 32
   @_collapse_duration > 12 ||   # 0 - 48
   @_damage_duration > 40 ||     # 0 - 40
   @_animation_duration > 200    # 0 - 200
 end
end



Instructions

This is totally plug and play.
Just copy-pasta into your script editor and it should do the job.
You can adjust the numbers if you want...
but I set them up for you, so you don't really need to. :)


Compatibility

I can't think of any issues I've ran into.
This essentially functions with any battle system that utilizes Scene_Battle.
(ie: doesn't work with BlizzABS because that uses Map_Battler or whatever)


Credits and Thanks


  • Unknown




Author's Notes

I did not actually write this scriptlet thingy, but the japanese site I found it on went down some time ago. :(
Its a sad day, they had a lot of other scripts I wish I grabbed so I could share here...
Though I have a few more :)
8
RMXP Script Database / [XP] J::EQUAP bars!
May 28, 2011, 01:13:45 am
J::EQUAP bars!
Authors: Jragyn
Version: 1
Type: TONs Plug-in
Key Term: Misc Add-on



Introduction

This script is just another visual representation of Blizzard's EQUAP system, but instead of AP/MAXap, it also uses bars.
The Blizzart Bars, mind you.


Features


  • Enables Bars to be used for Learnable EQUAP skills.

  • Can give a unique $game_system.bar_style to just the EQUAP bars.

  • Can change the coloring of just the EQUAP bars.

  • etc.




Screenshots

Spoiler: ShowHide



Demo

There doesn't need to be a demo for this.
Though I will make one of someone asks for it...(seriously I mean)


Script

Pastebin Link or:
Spoiler: ShowHide

=begin
____________________________
| J::EQUAP bars!             |
| Author: Jragyn             |
|____________________________|

 This script is more like a plug-in for the EQUAP system.
 It displays a bar that measures the AP vs. MAXap for any given skill.
 
 Of course...
 This script does require TONs to work.
 And the Blizzart BARS to be enabled.
 And the EQUAP System to be enabled and setup.
 

Credit to ForeverZer0 for being a Ruby Reference Bible for dummies :)

=end


#v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
#::Aliased/Overwrite  [Window_Skill] ----- draw_item
#v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^

#========================#
# Set the wordage for a  #
# learned skill here:    #
module J                 #
 LEARNT = '-Master-'    #
#=======================================#
# Use a new color scheme                #
# for the EQUAP bars?                   #
 NEW_SCHEME = true                     #
# only need to set if NEW_SCHEME = true #
 SCHEME_1 = Color.new( 96, 96, 96,192) # (just a darkish grey)
 SCHEME_2 = Color.new(192,192,192,192) # (just a lighter grey)
#=======================================#
# Use a different $bar_style            #
# for the EQUAP bars?                   #
 NEW_BARS = true                       #
# only need to set if NEW_BARS = true   #
 J_STYLE = 2 # ( 0~6 )                 #
#=======================================#
end #
#===#

class Window_Skill
 alias j_draw_item_equap_bar draw_item
 def draw_item(index, w=148)

#checks to verify both Blizzart BARS and EQUAP are enabled.
if $game_system.BARS && TONS_OF_ADDONS::EQUAP_SKILLS

   skill = @data[index]    
   if @actor.skill_can_use?(skill.id)
     self.contents.font.color = normal_color
   else
     self.contents.font.color = disabled_color
   end
   
   rate = 0
   if BlizzCFG.maxap(skill.id) > 0
     rate = @actor.ap(skill.id).to_f / BlizzCFG.maxap(skill.id)
   end#if
 #uses set colors in J::~~ if set to true, otherwise uses defaults.  
 if J::NEW_SCHEME
   color1 = J::SCHEME_1
   color2 = J::SCHEME_2
 else
   
 #color determination, based on Blizzard's draw_hp_bar(whatever) colorscheme.
     if rate > 0.6
       color1 = Color.new(80 - 150 * (rate-0.6), 80, 50 * (rate-0.6), 192)
       color2 = Color.new(240 - 450 * (rate-0.6), 240, 150 * (rate-0.6), 192)
     elsif rate > 0.2 && rate <= 0.6
       color1 = Color.new(80, 200 * (rate-0.2), 0, 192)
       color2 = Color.new(240, 600 * (rate-0.2), 0, 192)
     elsif rate <= 0.2
       color1 = Color.new(400 * rate, 0, 0, 192)
       color2 = Color.new(240, 0, 0, 192)
     end#if
 end#ifJscheme
     color3 = Color.new(0, 80, 0, 192)
     
   x = 4 + index % 2 * (288 + 32)
   y = index / 2 * 32
   rect = Rect.new(x, y, self.width / @column_max - 32, 32)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   bitmap = RPG::Cache.icon(skill.icon_name)
   opacity = self.contents.font.color == normal_color ? 255 : 128
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
#===============================================================================
# The deciding part as to whether or not to draw the bars and/or ap_infos.    
     if BlizzCFG.maxap(skill.id) > 0 && @actor.ap(skill.id) == BlizzCFG.maxap(skill.id)
       self.contents.draw_text(x + 180, y, 60, 32, J::LEARNT, 2)
     elsif BlizzCFG.maxap(skill.id) > 0
       ap_info = "[#{@actor.ap(skill.id)}/#{BlizzCFG.maxap(skill.id)}]"
         if J::NEW_BARS
           original_style = $game_system.bar_style
           J::J_STYLE > 6 ? $game_system.bar_style = 2 : $game_system.bar_style = J::J_STYLE
           self.contents.gradient_bar(x+24, y, w, color1, color2, color3, rate)
           $game_system.bar_style = original_style
         else
           self.contents.gradient_bar(x+24, y, w, color1, color2, color3, rate)
         end#if_newbars
       self.contents.draw_text(x+180, y, 64, 32, ap_info, 0)
     end#if
#===============================================================================      
     self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
   self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
 else
   j_draw_item_equap_bar(index)
 end#bars&equap
end#def

end#class



Instructions

As long as you have both Blizzart BARS (within TONs) enabled, and EQUAP enabled,
this script will function completely fine on its own. Though there are a couple extra little
aesthetics you can play with if you like.


Compatibility

May not work if you have a custom Window_Skill.


Credits and Thanks


  • Jragyn: I made it!

  • ForeverZer0: for allowing me to reference him like a Ruby Bible (or something like that XD )




Author's Notes

I can't really think of anything else I should stack on or add to this,
but if you think of something I need to know about this,
or have a recommendation/request, please let me know :)
9
What would be the script call while using a full input module (Blizz-ABS) to detect whether or not any of the buttons have been pressed while on the map? (ie: the attack/defend/direction-arrows/skills/etc)

Trying to make a small event that counts the number of keypresses and saves them to a variable for later use... have managed to do each key individually, but I can't imagine how to do all of them X_X

EDIT: Also, is there a easy-ish way to call a common event via script-calling?
ie: $data_common_events[12].execute
???
10
Is it normal that with Blizz-ABS installed, that my character always looks like they're walking?
Err, much like an event that has "Stop animation" checked.
I have it setup so that they have an attack/defend/spell/item graphic, but uhh... when they are just sitting there, they are stepping in place. :\

Is this just a switch or checkbox I forgot to flip off/on?
11
In the instance of scripting, say somewhere simple like SP Cost of a skill...
How would I go about /always/ have 3 digits?

ie:

Heal costs 4 sp.
In the skill window, I'd like it to say '004'.

Fire2 costs 25 sp.
In the skill window, it should say '025'.

Ultima costs 180 sp/
In the skill window, it should say '180'.


How would this be possible?
I have a feeling its a lot more complex than the idea itself :\


--J
12
RMVX Script Database / [VX] VTP Multi-Drop
September 16, 2010, 12:42:36 am
VTP Multi-Drop
Authors: Blizzard, J
Version: 1
Type: Item Drop Editor
Key Term: Battle Add-on



Introduction

This script allows for the scripter to have a single enemy drop more than just two items at once.


Features


  • Simple Setup.
  • All setup in one area of script.
  • Enemies can drop any number of items! (haven't tested outrageous numbers, though.)



Screenshots

Screenshot is unnecessary.


Demo

Again, unnecessary.


Script
=begin
  Version::1.0

  Multi-Drop by Blizzard
  Ported to VX by J
    For use with Vampyr's ABS
 
=end

module J
 
  def self.drop_config(id)
    i,w,a = 1,2,3 # sensible variables for items,weapons,armor
    always,veryhigh,high,normal,low,verylow,onepercent = 100,85,70,50,30,15,1
    case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Drop Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#             [item_type, item_id, %chance]

    when 1 then return [ # Slime
#      [i, 2, always],
#      [a, 15, 100],
#      [w, 4, 5]
      ]
    when 2 then return [ # Kobold
      ]
    when 3 then return [ #BOSS Ogre
      ]
    when 4 then return [ # Goop
      ]
    when 5 then return [ # Bot
      ]
    when 6 then return [ #BOSS Robox
      ]
    when 7 then return [ # Batgoyle
      ]
    when 8 then return [ # Skeleton
      ]
    when 9 then return [ # Werewolf
      ]
    when 10 then return [ #BOSS Giant Slime
      ]
    when 11 then return [ # RARE: Rogue Bot
      ]
    when 12 then return [ # Blob
      ]
    when 13 then return [ # Leg Eater
      ]
    when 14 then return [ # Thief
      ]
    when 15 then return [ # Wingbat
      ]
    when 16 then return [ # Ghast
      ]
    when 17 then return [ # Spirit
      ]
    when 18 then return [ # Alpha Werewolf
      ]
    when 19 then return [ # Azure Drake
      ]
    when 20 then return [ # Cobalt Jelly
      ]
    when 21 then return [ # Dryad
      ]
    when 22 then return [ # Leg Chomper
      ]
    when 23 then return [ # Hardy Drake
      ]
    when 24 then return [ # Mimic
      ]
    when 25 then return [ #BOSS Behemoth
      ]

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Drop Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end

    for i in [$data_enemies[id].drop_item1, $data_enemies[id].drop_item2]
    dropped_items = []
        next if i.kind == 0
        next if rand(di.denominator) != 0
        if i.kind == 1
          dropped_items << $data_items[i.item_id]
        elsif i.kind == 2
          dropped_items << $data_weapons[i.weapon_id]
        elsif i.kind == 3
          dropped_items << $data_armors[i.armor_id]
        end
    return [[0, 0, 0]]
  end
end

  def self.items(enemy)
    dropped_items = []
    return if enemy.id == nil
    self.drop_config(enemy.id).each {|x|
        if rand(100) < x[2]
          case x[0]
          when 1 then dropped_items << $data_items[x[1]]
          when 2 then dropped_items << $data_weapons[x[1]]
          when 3 then dropped_items << $data_armors[x[1]]
          end
        end}
    # result
    return dropped_items
  end

end



Instructions

This script goes beneath the VTP ABS System, and above main.


Compatibility

This script is EXPLICITY COMPATIBLE WITH VERUS TEMPUS PROELIUM ABS.
If it works with other battle systems, thats great, but I haven't tested it, and doubt it does.


Credits and Thanks


  • Vampyr, as he is the one who ultimately created the ABS.
  • Blizzard, for he pretty much wrote this script.
  • Me, J! As I took the minimal effort it required to work it into this VX system.



Author's Notes

I put this together based around a a VTP+ script I put together, so if this for whatever reason doesn't work, please identify the problem and/or script error+line, and I'll see if I can't remedy it.

This is a release because I found it in my list, and this forum has a wimpy selection of VX scripts (compared to its XP selection).
13
Script Requests / [RESOLVED...][XP] Direct Commands?
September 03, 2010, 09:25:18 pm
Does anyone remember from FF6(3) how characters had abilities directly accessable from the command menu?
ie: Locke the thief had a "steal" skill, but you didn't have to enter the skill menu and use it from there, it was in the list of commands right alongside of "fight" and "items".

Well, in combination with Blizzard's EQUAP and KGC's separation commands, I've sorta managed to get the idea across, but I'm having all sorts of issues setting it up and keeping it functional.

All I would like to happen is that various characters command menus will change depending on what weapons they have equipped. Winkio started a topic similer to this a while ago...but it didn't resolve as far as I know, so I propose the idea again.

Can anyone formulate a method of which skills will show up as commands on the command menu in battle?
An example of what I am hoping for. This is a screenshot of what it should look like, but mind you its completely not functioning how it looks like it should:

Spoiler: ShowHide


If such a script is already created or there is some method that would be easier than what I am suggesting, please do share. I personally think this could be useful, but maybe thats just me.


EDIT: Infact, I found one that does it, but it mandates a specific battle system.
Could it be editted down so that it is compatible with the Default Battle System, or something?

#==============================================================================
# Individual Battle Commands
# by Atoa
# Based on Charlie Lee script
# Modified by Atoa, to work with ACBS
#==============================================================================
# Following some suggestions, i've made some changes to the individual
# battle commands script
#
# Now you can not only add an command to an skill, you can also add an command
# to an actor (like in RM2000/2003/VX) and add an skill directly to an command
# so if you select the command, the skill will be used without opening the
# skill menu
#
#
# IMPORTANT: If you using the Add-On 'Atoa ATB' or 'Atoa CTB', put this script
# *bellow* the ATB/CTB Add-On.
#==============================================================================

module N01
 # Do not remove or change these lines
 Skill_Command = {}
 Actor_Command = {}
 Usable_Command = {}
 # Do not remove or change these lines

 # Show command list in status menu?
 Show_Commands_In_Menu = true
 
 # Position of command window in status menu
 Menu_Commands_Postition = [16,160]
 # Note: you must edit the status menu, or the command window will stay above
 # other informations
 
 # Command Window Border Opacity
 Command_Window_Border_Opacity = 255
 
 # Command Window Back Opacity
 Command_Window_Back_Opacity = 160
   
 # Max number of commands shown
 Max_Commands_Shown = 5

 # Skill Commands.
 # These commands appear automatically when an actor learn one of the skill
 # that is part of the command.
 #
 # Skill_Command[Command_Name] = [Skills_IDs]
 #
 Skill_Command['Magic'] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
   16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
   35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
   54, 55, 56]
 
 Skill_Command['Techs'] = [57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
   69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80]
 
 Skill_Command['Unite'] = [98,99,100,101,102,103]
 
 Skill_Command['Overdrive'] = [119]

 Skill_Command['Summon'] = [120,121,122,123]

 # Actor Commands.
 # These are the commands linked to the actors, they will be shown even if
 # the actor has none of the skill of this command.
 # You can add the same command for different actors, the list of skills shown
 # will be separated for each
 #
 # Actor_Command[Command_Name] = {Actor_id => [Skills_IDs]}
 #
 Actor_Command['Skill'] = {1 => [85,86,89,93,118], 2 => [84,87,88,93,105,106,107],
   3 => [96,108,109,111,112,114]}
 
 Actor_Command['Wizzardry'] = {4 => [95,110,113,115,116,117]}
 
 # Usable Commands.
 # These commands are linked directly to an skill. Once you choose one of them
 # you will use without opening the skill menu.
 # This command appear automatically once the actor learn the skill linked to
 # the command. The skill linked to the command aren't shown in the skill
 # menu outside battle
 #
 # Direct_Comman[Command_Name] = Skill_ID
 #
 Usable_Command['Steal'] = 83
 
 Usable_Command['Cat Form'] = 97
 
 Usable_Command['Return Summon'] = 124
end

#==============================================================================
# â–  Atoa Module
#==============================================================================
$atoa_script['SBS Individual Commands'] = true

#==============================================================================
# â–  Game_Actor
#==============================================================================
class Game_Actor
 #--------------------------------------------------------------------------
 include N01
 #--------------------------------------------------------------------------
 attr_accessor :individual_commands
 #--------------------------------------------------------------------------
 alias acbs_setup_ibc setup
 def setup(actor_id)
   acbs_setup_ibc(actor_id)
   @individual_commands = []
 end
 #--------------------------------------------------------------------------
 def refresh_commands
   @individual_commands = []
   for i in 0...@skills.size
     skill = $data_skills[@skills[i]]
     if skill != nil
       for command in Skill_Command.dup
         if command[1].include?(skill.id) and not @individual_commands.include?(command[0])
           @individual_commands << command[0]
         end
       end
       for command in Usable_Command.dup
         if command[1] == skill.id and not @individual_commands.include?(command[0])
           @individual_commands << command[0]
         end
       end        
     end
   end
   for command in Actor_Command.dup
     if command[1].include?(@actor_id) and not @individual_commands.include?(command[0])
       @individual_commands << command[0]
     end
   end
 end
end

#==============================================================================
# â–  Game_Party
#==============================================================================
class Game_Party
 #--------------------------------------------------------------------------
 include N01
 #--------------------------------------------------------------------------
 alias acbs_add_actor_ibc add_actor
 #--------------------------------------------------------------------------
 def add_actor(actor_id)
   acbs_add_actor_ibc(actor_id)
   actor = $game_actors[actor_id]
   actor.refresh_commands
 end
end

#==============================================================================
# â–  Scene_Battle
#==============================================================================
class Scene_Battle
 #--------------------------------------------------------------------------
 include N01
 #--------------------------------------------------------------------------
 attr_accessor :escape_name
 #--------------------------------------------------------------------------
 alias acbs_phase3_setup_command_window_ibc phase3_setup_command_window
 def phase3_setup_command_window
   acbs_phase3_setup_command_window_ibc
   @active_battler.refresh_commands
   s1 = $data_system.words.attack
   s2 = $data_system.words.item
   s3 = $data_system.words.guard
   s4 = @escape_name if @escape_type == 0
   @individual_commands = [s1] + @active_battler.individual_commands + [s2, s3]
   if @escape_type == 0
     @individual_commands = [s1]+  @active_battler.individual_commands + [s2, s3, s4]
   end
   @actor_command_window.dispose
   @actor_command_window = Window_Command.new(160, @individual_commands, @active_battler)
   comand_size = (@individual_commands.size >= 5 ? 5 : @individual_commands.size)
   @actor_command_window.x = COMMAND_WINDOW_POSITION[0]
   @actor_command_window.y = COMMAND_WINDOW_POSITION[1] + 120 - 24 * comand_size
   @actor_command_window.opacity = Command_Window_Border_Opacity
   @actor_command_window.back_opacity = Command_Window_Back_Opacity
   @actor_command_window.z = 4500
   @actor_command_window.index = 0
   @actor_command_window.active = true
   @actor_command_window.visible = true
   @active_battler_window.refresh(@active_battler)
   @active_battler_window.visible = BATTLER_NAME_WINDOW
   @active_battler_window.x = COMMAND_WINDOW_POSITION[0]
   @active_battler_window.y = COMMAND_WINDOW_POSITION[1] + 56 - 24 * comand_size
   @active_battler_window.z = 4500
 end
 #--------------------------------------------------------------------------
 alias acbs_update_phase3_basic_command_ibc update_phase3_basic_command
 def update_phase3_basic_command
   @direct_command = false
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     phase3_prior_actor
     return
   end
   if Input.trigger?(Input::C)
     @command_name = @actor_command_window.commands[@actor_command_window.index]
     case @command_name
     when $data_system.words.attack
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 0
       @active_battler.current_action.basic = 0
       start_enemy_select
     when $data_system.words.guard
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 0
       @active_battler.current_action.basic = 1
       phase3_next_actor
     when $data_system.words.item
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 2
       start_item_select
     when @escape_name
       if $game_temp.battle_can_escape == false
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       update_phase2_escape
       return
     end
     if @active_battler != nil and
       @active_battler.individual_commands.include?(@command_name)
       if Usable_Command.include?(@command_name)
         unless @active_battler.skill_can_use?(Usable_Command[@command_name])
           $game_system.se_play($data_system.buzzer_se)
           return
         end
         @active_battler.current_action.kind = 1
         @commands_category = @command_name
         @direct_command = true
         start_command_select(Usable_Command[@command_name])
       else
         $game_system.se_play($data_system.decision_se)
         @active_battler.current_action.kind = 1
         @commands_category = @command_name
         start_skill_select
       end
     end
     return
   end
   acbs_update_phase3_basic_command_ibc
 end
 #--------------------------------------------------------------------------
 alias acbs_start_skill_select_ibc start_skill_select
 def start_skill_select
   acbs_start_skill_select_ibc
   @skill_window.dispose
   @skill_window = Window_Skill.new(@active_battler, @commands_category)
   @skill_window.help_window = @help_window
 end
 #--------------------------------------------------------------------------
 def start_command_select(skill_id)
   if Input.trigger?(Input::C)
     @skill = $data_skills[skill_id]
     if @skill.nil? or not @active_battler.skill_can_use?(@skill.id)
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_system.se_play($data_system.decision_se)
     @active_battler.current_action.skill_id = @skill.id
     if @skill.extension.include?("TARGETALL")
       start_select_all_battlers
       return
     elsif @skill.scope == 2 or (@skill.scope < 3 and @skill.extension.include?("RANDOMTARGET"))
       start_select_all_enemies
       return
     elsif @skill.scope == 4 or (@skill.scope > 2 and @skill.extension.include?("RANDOMTARGET"))
       start_select_all_actors
       return
     end
     if @skill.scope == 1
       start_enemy_select
     elsif @skill.scope == 3 or @skill.scope == 5
       start_actor_select
     else
       phase3_next_actor
     end
     return
   end
 end
 #--------------------------------------------------------------------------
 def active_command_window
   @actor_command_window.active = true
   @actor_command_window.visible = true
   @help_window.visible = false
   @active_battler_window.visible = true if BATTLER_NAME_WINDOW
 end
 #--------------------------------------------------------------------------
 alias acbs_update_phase3_enemy_select_ibc update_phase3_enemy_select
 def update_phase3_enemy_select
   if Input.trigger?(Input::B) and @direct_command
     $game_system.se_play($data_system.cancel_se)
     end_enemy_select
     active_command_window
     return
   end
   if Input.trigger?(Input::C) and @direct_command
     $game_system.se_play($data_system.decision_se)
     @active_battler.current_action.target_index = @enemy_arrow.index
     end_enemy_select
     phase3_next_actor
     @help_window.visible = false
     return
   end
   acbs_update_phase3_enemy_select_ibc
 end
 #--------------------------------------------------------------------------
 alias acbs_update_phase3_actor_select_ibc update_phase3_actor_select
 def update_phase3_actor_select
   if Input.trigger?(Input::B) and @direct_command
     $game_system.se_play($data_system.cancel_se)
     end_actor_select
     active_command_window
     return
   end
   if Input.trigger?(Input::C) and @direct_command
     $game_system.se_play($data_system.decision_se)
     @active_battler.current_action.target_index = @actor_arrow.index
     end_actor_select
     phase3_next_actor
     @help_window.visible = false
     return
   end
   acbs_update_phase3_actor_select_ibc
 end
 #--------------------------------------------------------------------------
 alias acbs_update_phase3_select_all_enemies_ibc update_phase3_select_all_enemies
 def update_phase3_select_all_enemies
   @enemy_arrow_all.update_multi_arrow
   if Input.trigger?(Input::B) and @direct_command
     $game_system.se_play($data_system.cancel_se)
     end_select_all_enemies
     active_command_window
     return
   end
   if Input.trigger?(Input::C) and @direct_command
     $game_system.se_play($data_system.decision_se)
     end_select_all_enemies
     phase3_next_actor
     @help_window.visible = false
     return
   end
   acbs_update_phase3_select_all_enemies_ibc
 end
 #--------------------------------------------------------------------------
 alias acbs_update_phase3_select_all_actors_ibc update_phase3_select_all_actors
 def update_phase3_select_all_actors
   @actor_arrow_all.update_multi_arrow
   if Input.trigger?(Input::B) and @direct_command
     $game_system.se_play($data_system.cancel_se)
     end_select_all_actors
     active_command_window
     return
   end
   if Input.trigger?(Input::C) and @direct_command
     $game_system.se_play($data_system.decision_se)
     end_select_all_actors
     phase3_next_actor
     @help_window.visible = false
     return
   end
   acbs_update_phase3_select_all_actors_ibc
 end      
 #--------------------------------------------------------------------------
 alias acbs_update_phase3_select_all_battlers_ibc update_phase3_select_all_battlers
 def update_phase3_select_all_battlers
   @battler_arrow_all.update_multi_arrow
   if Input.trigger?(Input::B) and @direct_command
     $game_system.se_play($data_system.cancel_se)
     end_select_all_battlers
     active_command_window
     return
   end
   if Input.trigger?(Input::C) and @direct_command
     $game_system.se_play($data_system.decision_se)
     end_select_all_battlers
     phase3_next_actor
     @help_window.visible = false
     return
   end
   acbs_update_phase3_select_all_battlers_ibc
 end      
end

#==============================================================================
# â–  Window_Skill
#==============================================================================
class Window_Skill < Window_Selectable
 #--------------------------------------------------------------------------
 include N01
 #--------------------------------------------------------------------------
 def initialize(actor, skill_command_type = '')
   super(0, 128, 640, 352)
   @skill_command_type = skill_command_type
   @actor = actor
   @column_max = 2
   refresh
   self.index = 0
   if $game_temp.in_battle
     self.y = 320
     self.height = 160
     self.z = 900
     self.back_opacity = MENU_OPACITY
   end
 end
 #--------------------------------------------------------------------------
 def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = []
   for i in 0...@actor.skills.size
     skill = $data_skills[@actor.skills[i]]
     if skill != nil and $game_temp.in_battle and skill_in_command?(skill)
       @data << skill
     elsif skill != nil and not $game_temp.in_battle
       for command in  Usable_Command.dup
         @data << skill unless command[1] == skill.id or @data.include?(skill)
       end
     end
   end
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_item(i)
     end
   end
 end
 #--------------------------------------------------------------------------
 def skill_in_command?(skill)
   if Skill_Command[@skill_command_type] != nil and
      Skill_Command[@skill_command_type].include?(skill.id)
     return true
   elsif Actor_Command[@skill_command_type] != nil and
      Actor_Command[@skill_command_type].include?(@actor.id) and
      Actor_Command[@skill_command_type][@actor.id].include?(skill.id)
     return true
   end
   return false
 end
end

#==============================================================================
# â–  Window_Command
#==============================================================================
class Window_Command < Window_Selectable
 #--------------------------------------------------------------------------
 include N01
 #--------------------------------------------------------------------------
 attr_accessor :commands
 #--------------------------------------------------------------------------
 def initialize(width, commands, battler = nil)
   if $scene.is_a?(Scene_Battle)
     comand_size = (commands.size >= 5 ? 192 : commands.size * 32 + 32)
     max_comand = Max_Commands_Shown * 32 + 32
   else
     comand_size =  commands.size * 32 + 32
     max_comand = comand_size
   end
   comand_size = [comand_size, max_comand].min
   super(0, 0, width, comand_size)
   @battler = battler
   @item_max = commands.size
   @commands = commands
   self.contents = Bitmap.new(width - 32, @item_max * 32)
   refresh
   self.index = 0
 end
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   for i in 0...@item_max
     if $scene.is_a?(Scene_Battle) and @battler != nil and
        Usable_Command.include?(@commands[i]) and not
        @battler.skill_can_use?(Usable_Command[@commands[i]])
       draw_item(i, disabled_color)
     elsif $scene.is_a?(Scene_Battle) and @commands[i] == $scene.escape_name and
        $game_temp.battle_can_escape == false
       draw_item(i, disabled_color)
     else
       draw_item(i, normal_color)
     end
   end
 end
end

#==============================================================================
# â–  Scene_Status
#==============================================================================
class Scene_Status
 #--------------------------------------------------------------------------
 include N01
 #--------------------------------------------------------------------------
 alias acbs_main_scenestatus_ibc main
 def main
   set_command_window if Show_Commands_In_Menu
   acbs_main_scenestatus_ibc
   @command_window.dispose if Show_Commands_In_Menu
 end
 #--------------------------------------------------------------------------
 def set_command_window
   actor = $game_party.actors[@actor_index]
   actor.refresh_commands
   s1 = $data_system.words.attack
   s2 = $data_system.words.item
   s3 = $data_system.words.guard
   @individual_commands = [s1] + actor.individual_commands + [s2, s3]
   @command_window = Window_Command.new(160, @individual_commands, actor)
   @command_window.x = Menu_Commands_Postition[0]
   @command_window.y = Menu_Commands_Postition[1]
   @command_window.z = 1000
   @command_window.active = false
   @command_window.index = -1
 end
end



--J
14
RPG Maker Scripts / [RESOLVED] Running an EXE via XP?
September 03, 2010, 07:16:37 pm
Is it possible to run an executable from a script or something while inside a game.exe?

Intentions:
 Utilizing a map or something within RMXP to act as a "launcher" for executing other game programs inside the project folder.

ie:
 Having a map with some chara/events on it, inwhich you talk to them and it executes a minigame program (like minesweeper lets say).

This possible or probable?
15
J::BUY/SELL via variables!
Authors: Jragyn
Version: 1.0
Type: Shop Pricing Add-on
Key Term: Custom Shop System



Introduction

This is almost not a script in the sense its just a mini J::MODULE and some variable fun.
It allows for the maker to create a sorta-sense of 'dynamic' pricing in-game.


Features


  • Once you choose the 2 variables, its all in-game modification!
  • Separate BUY and SELL variables, allowing for a more full control of the pricing.
  • Did I mention? There is no script calling. Its just good ol' variable fun!
  • ...etc.



Screenshots

Spoiler: ShowHide

This probably means more than any in-game screenshot does.


Demo

If a demo is reeeeeally necessary, I will make one.
Otherwise, its pretty much plug'n'play.


Script

This does best underneath Scene_Shop, but above Main.
Spoiler: ShowHide
=begin
____________________________
| J::BUY/SELL via variables! |
| Author: Jragyn             |
| Inspiration: Yanfly(wong)  |
|____________________________|

 This script allows the maker to edit buying and selling prices globally
 via the use of ingame variables.

 Just change the variables indicated by:
 BUY = ##  and  SELL = ##
 while ingame, and the prices will be impacted in a percentual manner.    
--------------------------------------------------------------------------------  
 ie:
   change the variable value of BUY ingame to 70,
     and items will have a new pricetag of 70% its database price.
   
   change the variable value of SELL ingame to 100,
     and items you sell will be sold for their full price in the database.
--------------------------------------------------------------------------------
 The default pricing as suggested by RMXP is you buy at 100% of an items
 database price, and you sell it back for half-price. If you want to change
 this, just alter the value of the Variables designated below.


Lastly, I give credit to Yanfly. He created a script that replicates this effect
for RMVX, and now I present my version of it for RMXP.
 
v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
::Aliased   [Scene_Title] ----- command_new_game
::Overwrote [Scene_Shop] ------ update_buy & update_sell & update_number
::Overwrote [Window_Shopbuy] -- draw_item
v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
=end

module J
#========================================#
# BUY = Variable ## in the database.     #
# DEFAULT_BUY = The default buy pricing  #
                                        #
 BUY  = 11                              #
 DEFAULT_BUY = 100                      #
#========================================#
# SELL = Variable ## in the database.    #
# DEFAULT_BUY = The default sell pricing #
                                        #
 SELL = 12                              #
 DEFAULT_SELL = 50                      #
#========================================#
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
#                                                                              #
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
class Scene_Title
 alias purple_uber_sonic_goose command_new_game
 def command_new_game
   purple_uber_sonic_goose
#==============================================#
# These are the default prices that            #
# are setup upon a new game.                   #
#==============================================#
   $game_variables[J::BUY]  = J::DEFAULT_BUY  #
   $game_variables[J::SELL] = J::DEFAULT_SELL #
#==============================================#
 end
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
#                                                                              #
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
class Window_ShopBuy < Window_Selectable
 #--------------------------------------------------------------------------
 # * Draw Item
 #     index : item number
 #  altered 1 line to allow for price alterations.
 #--------------------------------------------------------------------------
 def draw_item(index)
   item = @data[index]
   # Get items in possession
   case item
   when RPG::Item
     number = $game_party.item_number(item.id)
   when RPG::Weapon
     number = $game_party.weapon_number(item.id)
   when RPG::Armor
     number = $game_party.armor_number(item.id)
   end
   # If price is less than money in possession, and amount in possession is
   # not 99, then set to normal text color. Otherwise set to disabled color
   if ((item.price * $game_variables[J::BUY]) / 100) <= $game_party.gold and number < 99
     self.contents.font.color = normal_color
   else
     self.contents.font.color = disabled_color
   end
   x = 4
   y = index * 32
   rect = Rect.new(x, y, self.width - 32, 32)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   bitmap = RPG::Cache.icon(item.icon_name)
   opacity = self.contents.font.color == normal_color ? 255 : 128
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
   self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
   self.contents.draw_text(x + 240, y, 88, 32, ((item.price * $game_variables[J::BUY]) / 100).to_s, 2)
 end
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
#                                                                              #
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
class Scene_Shop
 #--------------------------------------------------------------------------
 # * Frame Update (when buy window is active)
 #  altered 3 lines to allow for price alterations.
 #--------------------------------------------------------------------------
 def update_buy
   # Set status window item
   @status_window.item = @buy_window.item
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Change windows to initial mode
     @command_window.active = true
     @dummy_window.visible = true
     @buy_window.active = false
     @buy_window.visible = false
     @status_window.visible = false
     @status_window.item = nil
     # Erase help text
     @help_window.set_text("")
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Get item
     @item = @buy_window.item
     # If item is invalid, or price is higher than money possessed
     if @item == nil or ((@item.price * $game_variables[J::BUY]) / 100) > $game_party.gold
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Get items in possession count
     case @item
     when RPG::Item
       number = $game_party.item_number(@item.id)
     when RPG::Weapon
       number = $game_party.weapon_number(@item.id)
     when RPG::Armor
       number = $game_party.armor_number(@item.id)
     end
     # If 99 items are already in possession
     if number == 99
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Calculate maximum amount possible to buy
     max = ((@item.price * $game_variables[J::BUY]) / 100) == 0 ? 99 : $game_party.gold / ((@item.price * $game_variables[J::BUY]) / 100)
     max = [max, 99 - number].min
     # Change windows to quantity input mode
     @buy_window.active = false
     @buy_window.visible = false
     @number_window.set(@item, max, ((@item.price * $game_variables[J::BUY]) / 100))
     @number_window.active = true
     @number_window.visible = true
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when sell window is active)
 #  altered 2 lines to allow for price alterations.
 #--------------------------------------------------------------------------
 def update_sell
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Change windows to initial mode
     @command_window.active = true
     @dummy_window.visible = true
     @sell_window.active = false
     @sell_window.visible = false
     @status_window.item = nil
     # Erase help text
     @help_window.set_text("")
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Get item
     @item = @sell_window.item
     # Set status window item
     @status_window.item = @item
     # If item is invalid, or item price is 0 (unable to sell)
     if @item == nil or ((@item.price * $game_variables[J::SELL]) / 100) == 0
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Get items in possession count
     case @item
     when RPG::Item
       number = $game_party.item_number(@item.id)
     when RPG::Weapon
       number = $game_party.weapon_number(@item.id)
     when RPG::Armor
       number = $game_party.armor_number(@item.id)
     end
     # Maximum quanitity to sell = number of items in possession
     max = number
     # Change windows to quantity input mode
     @sell_window.active = false
     @sell_window.visible = false
     @number_window.set(@item, max, ((@item.price * $game_variables[J::SELL]) / 100))
     @number_window.active = true
     @number_window.visible = true
     @status_window.visible = true
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when quantity input window is active)
 #  altered 2 lines to allow for price alterations.
 #--------------------------------------------------------------------------
 def update_number
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Set quantity input window to inactive / invisible
     @number_window.active = false
     @number_window.visible = false
     # Branch by command window cursor position
     case @command_window.index
     when 0  # buy
       # Change windows to buy mode
       @buy_window.active = true
       @buy_window.visible = true
     when 1  # sell
       # Change windows to sell mode
       @sell_window.active = true
       @sell_window.visible = true
       @status_window.visible = false
     end
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Play shop SE
     $game_system.se_play($data_system.shop_se)
     # Set quantity input window to inactive / invisible
     @number_window.active = false
     @number_window.visible = false
     # Branch by command window cursor position
     case @command_window.index
     when 0  # buy
       # Buy process
       $game_party.lose_gold(@number_window.number * ((@item.price * $game_variables[J::BUY]) / 100))
       case @item
       when RPG::Item
         $game_party.gain_item(@item.id, @number_window.number)
       when RPG::Weapon
         $game_party.gain_weapon(@item.id, @number_window.number)
       when RPG::Armor
         $game_party.gain_armor(@item.id, @number_window.number)
       end
       # Refresh each window
       @gold_window.refresh
       @buy_window.refresh
       @status_window.refresh
       # Change windows to buy mode
       @buy_window.active = true
       @buy_window.visible = true
     when 1  # sell
       # Sell process
       $game_party.gain_gold(@number_window.number * ((@item.price * $game_variables[J::SELL]) / 100))
       case @item
       when RPG::Item
         $game_party.lose_item(@item.id, @number_window.number)
       when RPG::Weapon
         $game_party.lose_weapon(@item.id, @number_window.number)
       when RPG::Armor
         $game_party.lose_armor(@item.id, @number_window.number)
       end
       # Refresh each window
       @gold_window.refresh
       @sell_window.refresh
       @status_window.refresh
       # Change windows to sell mode
       @sell_window.active = true
       @sell_window.visible = true
       @status_window.visible = false
     end
     return
   end
 end
end



Instructions

The instructions are pretty self explanatory.
Pick the variables, and edit them as necessary to manipulate pricing.


Compatibility

The pieces that have been re-written or aliased are listed in the script.
I can't imagine it being incompatible with too many things, short of maybe a custom shop menu.
It was put together in interest of being functional with Falcon's Tax Script.
So hurray!

Oh, and its built to function in the default Scene_Shop, so if you change or mess with that,
this script may lose its functionality. Just tell me though and I can edit your Scene_Shop, if ya like.


Credits and Thanks


  • Wahaha, me! Jragyn! or J, that works too. Its shorter and provides less questions.
  • Yanfly(wong). He crafted a system like this for RMVX. So now I create one that works for XP!




Author's Notes
  • I accept constructive criticism.
    If there is a better way to script something like this, then do say so!
    I like help/advice.
    Also, if it doesn't work, please state for what reason and why where how etc. lol.

    Please keep in mind, this ultimately isn't really a script, its literally like, an editting of like, 10 lines.
    But hey, it works just the same, right?
16
Script Requests / [XP] Elemental Stats?
May 21, 2010, 01:59:19 pm
I was playing a dot.hack game the other day and realized that they have a kinda interesting system for elements.

Rather than an element being attached to a weapon or armor directly, every actor instead has a set of umm...elemental stats. Much like STR or DEX, they just have an x number of additional stats that are instead labeled with elements versus statnames.

I presume the way these things work (seeing as there is no exact definition ingame) is this:

Seeing as they are numbers (ie: I have 25 fire element) they just add this number to attack damage if the enemy is weak to fire, and subtract it if they are strong. These stats don't generally rise unless a piece of armor, or weapon, is equipped, or permanently if an item is used (ie: FIRE boost, +1 Fire element forever) or well...script calls I guess.

I dunno. I suppose this could enable more details with the elemental process of gaming.
Instead of a fiery sword, you could now define just how fiery a sword this is :D

ember knife +2 fire
fire sword +8 fire
blazing claymore +20 fire
magma weapon +99 fire

:D

I am sure I could provide more details if asked, but I just woke up.

Does anyone else think this plausible or useful? Want to help me in tackling it?


--J
17
Verus Tempus Proelium (VTP)
Authors: Vlad, (soon Jragyn)
Version: 1.0
Type: On-the-map Active Battle System
Key Term: Custom Battle System



Introduction

Well, first off, this isn't my script.
It was written by a fellow who names himself 'vlad'.
He also crafted a heavier version of this by the name of "Vampyr's SBABS".

This script is similer to Blizz's ABS he made, but its for VX.
It allows for the player to play and execute battle actions on the map.
Games like Zelda and Secret of Mana function like this.

The system isn't perfect.




Features


  • Allows for quick action-based battles on the map.
  • No need for sprite building or animations, it uses the basic character set!
  • Functions with no custom input, allowing for use of USB Game Controllers.
  • Utilizes the -note system- of VX for specifying many things, details for weapons etc.



Screenshots

Spoiler: ShowHide






Demo

The Demo you should download for reference.


Script
The Script REQUIRES at least the top two, in this order, while the extras are...well...extra.
Spoiler: ShowHide
Quote
The Kernel
VTP Kernal 1.0

The ABS System
VTP System 1.0

The default HUD (requires pictures from the demo)
VTP HUD 1.0




Instructions

The instructions from the author are somewhat dated, and I will be providing a text document or something to explain...everything. Or as close to it as possible.

QuoteHow to setup enemy events and the database.


Just ask in the forum if you have questions, I'll try to help if I can.



Compatibility

I can't imagine it working too well with other Map-based battle systems.
I am working on functionality in regards to other scripts, and will release modifications as I create them.
It DOES work with the RGSS2+ thingie, as suggested by the second screenshot above.
Should it be compatible with something? Gimme suggestions, I'll see if I can...
It is GAY when it comes to 8directional movement. Though the movement works, it screws up the attacking and all that jazz, and I haven't tackled the task of trying to fix it.


Credits and Thanks


  • Vampyr! You crafted the base for it. gj.
  • J, myself, because I'm trying to support it? lol.



Author's Notes

Remember, the script isn't MINE, but I am trying to provide updates and fixes for it as the bugs come out, and also adding other features...though it'll likely be part of a bundley thingie, so it may be a bit before I release it/them. :D Otherwise, have at it and have fun! ABS for VX yo.

(btw, if anyone has a better site or something that I could host these scripts on, lemme know, cuz I feel weird slapping them on Pastebin...)


--J  :negative:
18
RPG Maker Scripts / The Exp_Factor fix
May 16, 2010, 01:52:57 am
So I'm not really sure if I should post this as a new script or not, so I'll just plop it up and if someone says it should be its own script, or pasted inside the current topic of "Satoh's Fluctuating Experience" then I will do that::

=begin

   The Exp_Factor
 
 

Author: Satoh
with massive support from Blizzard
Fixed: J & G_G

So the manner of which this script works, is that Experience-to-next-level
is fixed at 1000. Similer to the Dot.Hack games if you've ever played them.
The experience gained is factored against the difference in level between
you and the foe.

What?
You can't set the level of the enemies?
Well now you can!
All ya gotta do is put the desired level of the foe into the enemies' EXP field.
Seeing as XP-to-next is fixed, XP gained is also somewhat fixed. Therefor, the
EXP field of foes is now used for levels instead.

So fixed XP gain goes as one might guess:
The higher level of a monster you fight over yourself, the greater the XP you
gain. If you really like, you can edit these exact numbers a bit below, but I
suggest you don't bother unless you really know what your doing.


It seems this script was originally written by Mr. Satoh~san, however, when
Blizz-ABS took several steps further, this script did not.

So with G_G as my reference, I took it upon myself to repair its functionality.
Now, it seems to work.
Hurray!


--J


=end
 #--------------------------------------------------------------------------
 # * Start After Battle Phase
 #--------------------------------------------------------------------------
class Scene_Battle
 def start_phase5
   if $BlizzABS
     #nothing
   else
   # Shift to phase 5
   @phase = 5
   # Play battle end ME
   $game_system.me_play($game_system.battle_end_me)
   # Return to BGM before battle started
   $game_system.bgm_play($game_temp.map_bgm)
   # Initialize EXP, amount of gold, and treasure
   exp = 0
   gold = 0
   treasures = []
   # Loop
   for enemy in $game_troop.enemies
     # If enemy is not hidden
     unless enemy.hidden
       # Add EXP and amount of gold obtained
       exp += enemy.exp
       gold += enemy.gold
       # Determine if treasure appears
       if rand(100) < enemy.treasure_prob
         if enemy.item_id > 0
           treasures.push($data_items[enemy.item_id])
         end
         if enemy.weapon_id > 0
           treasures.push($data_weapons[enemy.weapon_id])
         end
         if enemy.armor_id > 0
           treasures.push($data_armors[enemy.armor_id])
         end
       end
     end
   end
   # Treasure is limited to a maximum of 6 items
   treasures = treasures[0..5]
   # Obtaining EXP
       for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     if actor.cant_get_exp? == false
       last_level = actor.level
       for enemy in $game_troop.enemies
         actor.exp += $BlizzABS.Processor.exp_factor(actor, enemy.exp)
       end
     end
   end
   # Obtaining gold
   $game_party.gain_gold(gold)
   # Obtaining treasure
   for item in treasures
     case item
     when RPG::Item
       $game_party.gain_item(item.id, 1)
     when RPG::Weapon
       $game_party.gain_weapon(item.id, 1)
     when RPG::Armor
       $game_party.gain_armor(item.id, 1)
     end
   end
   # Make battle result window
   @result_window = Window_BattleResult.new(exp, gold, treasures)
   # Set wait count
   @phase5_wait_count = 100
   end
   end

 #--------------------------------------------------------------------------
 # * Determine the EXP gained from foes.
 #     renamed method to "exp_factor"
 #     This entire method is merely the difference in level between you
 #     and the foe. The greater the difference, the greater the xp mod.
 #--------------------------------------------------------------------------
if $BlizzABS
class BlizzABS::Processor
 def exp_factor(actor, exp)
   lvl = exp - actor.level #compare the Enemy Level(EXP field)
                             #with the actor's current level
   sexp = 0
       case lvl
   when 10..100000 # The instance where enemies are 10+ levels higher than you.
     sexp = 520
   when 9
     sexp = 430
   when 8
     sexp = 350
   when 7
     sexp = 280
   when 6
     sexp = 220
   when 5
     sexp = 170
   when 4
     sexp = 130  # enemy levels are higher than yours.
   when 3
     sexp = 100  #^
   when 2        #|
     sexp = 80   #|
   when 1        #|
     sexp = 70
   when 0         # The instance where enemeis and yourself are the same level.
     sexp = 60
   when -1       #|
     sexp = 50   #|
   when -2       #|
     sexp = 40   #V
   when -3
     sexp = 28   #enemy levels are lower than yours.
   when -4
     sexp = 13
   when -5
     sexp = 8
   when -6
     sexp = 6
   when -7
     sexp = 4
   when -8
     sexp = 3
   when -9
     sexp = 2
   when -100000..-10 # The instance where you are 10+ levels higher than the foe.
     sexp = 1
   end
 return sexp
end
 #----------------------------------------------------------------------------
 # exp_result
 #  enemy - the killed enemy event
 #  Processes EXP gain after the death of an enemy.
 #----------------------------------------------------------------------------
 def exp_result(enemy)
     # get EXP
     exp = enemy.exp if enemy.exp != nil
       # All the stuff dealing with TONs
       if $tons_version != nil
         # if version is correct and using Different Difficulties
         if $tons_version >= 6.4 && TONS_OF_ADDONS::DIFFICULTY
           # multiply gained gold
           exp = exp * $game_system.exp_rate / 100
         end
         # if version is correct and using Passive Skills
         if $tons_version >= 6.5 && $game_system.PASSIVE_SKILLS
           # multiply gained gold with each actor's rate
           $game_party.actors.each {|actor| exp *= actor.exp_rate}
           exp = exp.to_i
         end
       end

     # iterate through all party members
     $game_party.actors.each {|actor|
         # increase EXP except if actor can't get EXP
         actor.exp += exp_factor(actor, exp) unless actor.cant_get_exp?}
   # return exp value for further processing
   return exp
 end#def
end#class
$BlizzABS = BlizzABS::Processor.new
end#if
 #--------------------------------------------------------------------------
 # * Calculate EXP
 #--------------------------------------------------------------------------
=begin

This is to prevent character not starting at Lvl 1 from having an EXP boost.

=end
class Game_Actor < Game_Battler
 def make_exp_list
   @exp_list[1] = 0
   for i in 2..100
     @exp_list[i] = 1000
   end
 end
 
 alias setup_satoh_expmod_aliased setup
 def setup(actor_id)
   setup_satoh_expmod_aliased(actor_id)
   @exp = 0
 end
 #--------------------------------------------------------------------------
 # * Change EXP
 #     exp : new EXP
 #--------------------------------------------------------------------------
=begin

Ok, this portion of the script rewrites the Level-up process. Now, anytime you
gain 1000 or more exp you gain a level. Then 1000 exp is subtracted from that
and any leftover exp is saved for your next level.
EXAMPLE:
Markus gains 1040 exp.
Markus levels up once and 1000 is subtracted.
Markus has 40 saved, and only needs 960 for his next level.

=end
 def exp=(exp)
   @exp = [[exp, 9999999].min, 0].max
   # Level up
   if @level <= ($data_actors[@actor_id].final_level - 1)
     while @exp >= 1000
       @level += 1 #unless @level >= $data_actors[@actor_id].final_level
       @exp -= 1000
       # Learn skill
       for j in $data_classes[@class_id].learnings
         if j.level == @level
         learn_skill(j.skill_id)
         end
       end
     end
   else
   @exp = 0
   end
 end
 #--------------------------------------------------------------------------
 # * Get EXP String
 #--------------------------------------------------------------------------
 def exp_s
   if @level != $data_actors[@actor_id].final_level
   return @exp_list[@level+1] > 0 ? @exp.to_s : "-------"
   else
   return "0"
   end
 end
 #--------------------------------------------------------------------------
 # * Get Next Level EXP String
 #--------------------------------------------------------------------------
 def next_exp_s
   if @level != $data_actors[@actor_id].final_level
   return @exp_list[@level+1] > 0 ? @exp_list[@level+1].to_s : "-------"
   else
   return "1000"
   end
 end
 #--------------------------------------------------------------------------
 # * Get Until Next Level EXP String
 #--------------------------------------------------------------------------
 def next_rest_exp_s
   if @level != $data_actors[@actor_id].final_level
   return @exp_list[@level+1] > 0 ?
     (@exp_list[@level+1] - @exp).to_s : "-------"
   else
   return "1000"
   end
 end
end

19
http://forum.chaos-project.com/index.php/topic,2051.0.html

re-compatibilitize this with blizz-ABS :D

Once upon a time it was compatible, but even in a naked project it doesn't werk anymore.

The idea is ingenious, it is a shame I'm unable to utilize it T-T
20
Script Requests / [XP/VX?] Enemy Close BGM
May 01, 2010, 01:23:33 am
Is it possible for either XP or VX to play two BMG's simultaneously?
A prime example is in the dothack series...
Where (as far as my mind can wrap around it) the game seems to play two variations of a near identical theme for any given map the player is on.
It plays a docile/calm-ish theme when your just wandering around exploring or whatever, but when an enemy draws near, it kicks into a more upbeat...or more intense version of the same song.

Here, if you'd like an example of two music soundtrax to HEAR the difference to understand what I'm talking about:
http://bluelaguna.net/downloads/mp3s/sforceneocollection/21+Dark+Castle.mp3
http://bluelaguna.net/downloads/mp3s/sforceneocollection/22+Dark+Castle+-+Battle.mp3
(also feel free to hit up the site if your in search of quality gaming music :] )

But umm...yeah. If its possible to script, or even do this via events, then please tell me, 'cuz I can't figure it out.
If this script is possible, it'd likely only really have a purpose in an ABS styled system like Blizz-ABS anyways.

So, hopefully, someone can get back to me with gratuitous amounts of answers.


--JeR
21
As the topic suggests, I was looking for a merging of two scripts...that are both like, rather short.
I attempted to combine them myself, but in the end, it just results in failure v.v (failure being nothing happens)

The scripts in question are::
http://forum.chaos-project.com/index.php/topic,5963.0.html G_G's Over-time script.
Used for taking/healing damage over time on the map.
^
|
v
http://forum.chaos-project.com/index.php/topic,2482.0.html shdwlinks1993's ultimately useful and simple poison/regen script. (I approve)


Both of these scripts are really short, yet really powerful at the sametime, and if they could be merged, I think that the end result would be quite an impressive feat, for any of those who would wish to utilize an ABS.

Oh, btw, the end result must be in VX...RGSS2...
Though I'm certain making it compatible with both wouldn't be a huge task...

Of course, I will continue to drone away on this script as well, but if some elite script could come up and just kick this dilemma in the face, I'd be satisfied just the same.


--JeR



22
Recruitment / CA! EX... anyone up for the task?
April 01, 2010, 06:02:58 pm
I umm...
I'm trying to make a game, using XP of course...
and I figured I have like, an hour or more of gameplay now, and was wondering if anyone was...well...
up for giving me some criticism on it?

I have friends in real life that I have play and test the game, so I know it somewhat works...(though I'm certain there innumerable bugs)

But none of my friends are like, XP saavy, they kinda suggest things that would be cool, but would obviously require absurd amounts of scripting that well, I suck at. So I was hoping that I could fetch some feedback from those who make games, and play games, so I can hopefully get some useful, constructive criticism.

http://www.zumodrive.com/share/4w7QMTZjND

is the link...

And here is a few things I already know about the game:

--The mapping isn't the greatest. Or anywhere close. It gets the point across, though.

--I literally didn't add the hint of story that is in the game until halfway through what you see.
    So its might seem kinda retarded.

--There are a bajillion scripts in this game. For the most part, they are all compatible and set up as they should be, but if you come across an error, please tell me what ya did so I can fix it!

--I used pretty much all RTP graphix, while all the most the music I use from elsewhere. You may or may not recognize the music.

--The game uses BlizzABS(2.6), but the graphics for attacking aren't set up at all, so quite literally, your just standing there and a sword swings seemingly outta no where. If you can't deal with it, don't play it. I'll implement graphics, but they aren't necessary now. :D

--That being said...I think the world knows the majority of it all...

Oh, umm, controls! Mostly they are all explained within the game, but incase you miss it or I just am retarded and forgot some controls, here they are:

    UP = "Key['Arrow Up'], Key['W']"
    LEFT = "Key['Arrow Left'], Key['A']"
    DOWN = "Key['Arrow Down'], Key['S']"
    RIGHT = "Key['Arrow Right'], Key['D']"
    PREVPAGE = "Key['Q'], Key['Page Up']"
    NEXTPAGE = "Key['E'], Key['Page Down']"
    CONFIRM = "Key['Enter'], Key['H']"
    CANCEL = "Key['F'], Key['Backspace']"
    ATTACK = "Key['K'], Key['Left Ctrl'], Key['End']"
    DEFEND = "Key['L']"
    SKILL = "Key['J']"
    ITEM = "Key['I']"
    SELECT = "Key['O'], Key['/']"
    HUD = "Key['Z']"
    HOTKEY = "Key['X']"
    MINIMAP = "Key['C']"
    RUN = "Key['M'], Key['Left Shift']"
    SNEAK = "Key['.'], Key['Left Alt']"
    JUMP = "Key['Space'], Key[',']"
    TURN = "Key['U']"

haha, directly from part 1 of the ABS.

but umm....yeah. So thats it!
Tell me how it goes!

I feel like I'm forgetting something...
23
Script Requests / More about 'DMG' pops.
March 02, 2010, 04:08:07 am
I'm tinkering around with it, but having serious trouble figuring out the method of which 'dmg' pops are created and used...more specifically, I'm trying to create a way to make XP & GP pop on enemy defeat.

And thinking about 'dmg' pops, I've seen scripts where in regular battles where a single animation would produce multiple dmgpops, is this possible to re-create within/for Blizz-ABS? None of the ones that work in regular battle that I've seen seem to work in the ABS...I suppose its more a curiousity as to possibility than a request.

Thanks for those that reply with information on these two concepts.
You contribute to my learning experience :)


--JeR
24
MOVELESS::DAMAGE for Blizz-ABS!
Authors: Blizzard, Jragyn
Version: 1.0
Type: Blizz-ABS Plug-In
Key Term: Blizz-ABS Plugin



Introduction
The script will disable the movement of the damage sprite when displayed on the screen.



Features


  • Fading!
  • Random pop location!




Screenshots
A little difficult to demostrate, but I try anyways:
Spoiler: ShowHide



Demo
There isn't much a need for a full-on Demo.


Script
Spoiler: ShowHide

#===========================#
#  J::DAMAGE for BlizzABS!  #
#    v. 1.0                 #
#      Jragyn, Blizzard     #
#===========================#

=begin
 This script really is more a scriptlet than anything else,
 as it just modifies a few small aesthetic-styled details.
 
 It causes damage to not bounce around anymore, but instead
 just kinda sits there, and fades out. I created it because
 I wanted to see the damage for longer, and now I share it
 with the world!
=end

module JDMG
# This will create a random location for the damage to pop up over the target.
 RANDOM   = true

# This will STOP the damage from physically moving.
 MOVELESS = true
 
# This will drag out the fading a bit longer, so you can see the damage longer.
 FADEOUT  = true
 
end

class Sprite_Damage < Sprite
 
 def initialize(request, viewport = nil)
   super(viewport)
   draw_damage(request)
#=======================================#
#  Though it doesn't move,              #
#  it DOES pick random locations        #
#  from the base area of the sprite     #
#=======================================#
 if JDMG::RANDOM && JDMG::MOVELESS     #
   @map_x = request.x + rand(40) - 20  #
   @map_y = request.y + rand(40) - 40  #
 elsif JDMG::RANDOM                    #
   @map_x = request.x                  #
   @map_y = request.y                  #
 else                                  #
#=======================================#
   @map_x = request.x
   @map_y = request.y
 end
   self.z = 1
   rad = rand(360) * Math::PI / 180
   @vx, @vy = -Math.cos(rad) * 3, Math.sin(rad) * 2
   @counter = Math::PI
   update
 end
 
 def update
   self.x = @map_x - self.bitmap.width / 2 - $game_map.display_x / 4
   self.y = @map_y - self.bitmap.height / 2 - $game_map.display_y / 4
#====================================#
#  Added to remove the move factor!  #
#====================================#
 if JDMG::MOVELESS                  #
 # Nothing                          #
 else                               #
#====================================#
   self.ox, self.oy = @vx * (@counter - Math::PI), @vy * (@counter - Math::PI)
 end
   @counter += 1
   if BlizzABS::Config::BOUNCING_DAMAGE
     self.oy += (Math.sin((@counter - Math::PI) / 5.0) * 800 / (@counter)).abs
     self.opacity -= 15 if @counter > 35
   else
#====================================#
#  Added to remove the move factor!  #
#====================================#
 if JDMG::MOVELESS                  #
 # Nothing                          #
 else                               #
#====================================#
   self.oy += (Math.sin((@counter - Math::PI) / 10.0) * 1200 / (@counter)).abs
 end
#========================================#
#  This piece creates a slower fade out  #
#  compared to original design.          #
#========================================#
 if JDMG::FADEOUT                       #
   self.opacity -= 5 if @counter > 20   #
 else                                   #
#========================================#
   self.opacity -= 15 if @counter > 15  
 end
   end
   if @critical && Graphics.frame_count % 2 == 0
     self.bitmap.hue_change(60)
   end
 end
end



Instructions
It seems to only function when inserted BENEATH the Blizz-ABS system.


Compatibility

--So long as Blizz-ABS has used the damage drawing methods currently in use, this script should work.

--I suppose it wouldn't work if something else was directly modified these methods.

--EXPLICITLY FOR BLIZZ-ABS. (if it need be said)


Credits and Thanks


  • I didn't really write much, but me! Jragyn. Use it wherever, I don't care.
  • Blizzard! Because obviously this piece would have no use/purpose.
  • RMVX! For teaching what little I know about modules and their use :D



Author's Notes
No special notes, just remember: Below Blizz-ABS Or it won't do anything!
Feel free to use this script at your leisure, of course in conjunction with Blizzard's
contracts he mandates with his ABS.
25
So I swear up and down that I found a script here that will accomplish such...by Game_guy nonetheless, but now Its evading my scouring eyeballs.

So I need a way to manipulate the element of attack that a character does, via accessory/armor.

IE: Fiery Ring = Weapons do fire-typed damage when equipped.


The only script this ultimately need be compatible with would be Blizzard's ABS. Err, 2.6+...
And Guillaume's(?) Equip setup.
[G777 as I've seen it refered to]
(Not that I do anything crazy with it, just use it to limit the number of equipment on a character, versus giving an abundant amount of various unusual kinds, lol.)

I leave it up to the scripter to decide on ease of creation as to whether or not it would be easy to make multiple different elemental rings equippable, or just 1 at a time, I can make it work in the game either way.

And err, yeah. Thats that!


Though its not of dire urgency, the sooner this dilemma is resolved, the better. :]


--JeR

26
Script Requests / [XP] to [VX] Elemental Reflector?
August 26, 2009, 05:16:43 pm
So I posted up a script here.

Teh Script:
|||
  V
Spoiler: ShowHide
#==============================================================================
# * Hima's Elemental Reflector v. 1.3
#------------------------------------------------------------------------------
#     This script will allow you to set your character or enemies to reflect any element
#    you want. You can also create armors or skills that create elemental reflector.
#
#    Version History
#    ---------------------------------------------------------
#    1.0    -    First Released
#    1.1    -    Fixed infinite reflect problem
#    1.2    -    More features added
#                a.) You can now choose to reflect any physical or magical skill.
#                b.) Physical reflect will also reflect any basic attack.
#                c.) Basic attack with element will also be reflected from elemental reflector.
#    1.3    -    Fixed some bugs that occur when you don't put all the ELEMENTS you defined into the database.
# ---------------------------------------------------------
# contact : ninomiya_mako@hotmail.com
#==============================================================================
module HIMA_REFLECT
    #--------------------------------------------------------------------------
  # - Customize Point -
    # ELEMENTS     - This is where you create the name of element you want to reflect. This is how it works
    #           {Name => Reflected Element ID, Name => Reflected Element ID, ...}
    #           The name can be anything, and ID is ID of the element that this will reflect. You have to
    #           create a new element that match what you input here.
    #           Special Element ID are as follows :
    #
    #            "Physical" -> For any physical skill, with atk_f greater than 0
    #            "Magic"    -> For any magic skill, with int_f (mind_f) greater than 0
    #
    #    WORD             - Message that will pop up when reflection occurs.
  #--------------------------------------------------------------------------
    ELEMENTS = {"Reflect Physical" => "Physical",
                "Reflect Heat" => 2,
                "Reflect Cold" => 3,
                "Reflect Thunder" => 4,
                "Reflect Liquid" => 5,
                "Reflect Ground" => 6,
                "Reflect Air" => 7,
                "Reflect Energy" => 8,
                "Reflect Void" => 9,
                "Reflect Magic" => "Magical"}
    WORD = "Reflect"

end

module RPG
    class Skill
        def type_of_skill
            if @int_f > 0
                return "Magical"
            elsif @atk_f > 0
                return "Physical"
            else
                return nil
            end
        end
    end
end

class Game_Battler
  attr_accessor :reflect                   # Reflect Flag
    alias hima_reflect_init initialize
    def initialize
        @reflect = 0    #0 = no reflect, 1 = basic_attack, 2 = skill_effect
    hima_reflect_init
    end
   
    alias hima_reflect_attack_effect attack_effect
    def attack_effect(attacker)
        # Check for reflect basic attack
        element_to_reflect = HIMA_REFLECT::ELEMENTS.index("Physical")
        reflect_id = $data_system.elements.index(element_to_reflect)
        if reflect_id != nil
            if self.element_reflect(reflect_id) == 1
                if attacker.element_reflect(reflect_id) == 1
                    self.damage = "Block"
                    self.reflect = 0
                else
                    self.damage = HIMA_REFLECT::WORD
                    self.reflect = 1
                end
                return false
            end
        end
        # End of reflect basic attack
       
        # Check for reflect element of basic attack
        for q in 0...attacker.element_set.size
            element_id = attacker.element_set[q]
            element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
            if element_to_reflect != nil
                reflect_id = $data_system.elements.index(element_to_reflect)
                if self.element_reflect(reflect_id) == 1
          if attacker.element_reflect(reflect_id) == 1
              self.damage = "Block"
              self.reflect = 0
          else
              self.damage = HIMA_REFLECT::WORD
              self.reflect = 1
          end
          return false
                end
            end
        end #end for       
        # End of reflect element of basic attack
        hima_reflect_attack_effect(attacker)
    end
   
    alias hima_reflect_skill_effect skill_effect
  def skill_effect(user, skill)
        # Reflect physical or magic skill
        if skill.type_of_skill != nil
            element_id = skill.type_of_skill
            element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
            if element_to_reflect != nil
                reflect_id = $data_system.elements.index(element_to_reflect)
                if reflect_id != nil
                    if self.element_reflect(reflect_id) == 1
                        if user.element_reflect(reflect_id) == 1
                                self.damage = "Block"
                                self.reflect = 0
                        else
                                self.damage = HIMA_REFLECT::WORD
                                self.reflect = 2
                        end
                        return false
                    end
                end
            end
        end
       
        # Reflect specific element
        for q in 0...skill.element_set.size
            element_id = skill.element_set[q]
            element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
            if element_to_reflect != nil
                reflect_id = $data_system.elements.index(element_to_reflect)
                if reflect_id != nil
                    if self.element_reflect(reflect_id) == 1
                        if user.element_reflect(reflect_id) == 1
                                self.damage = "Block"
                                self.reflect = 0
                        else
                                self.damage = HIMA_REFLECT::WORD
                                self.reflect = 2
                        end
                        return false
                    end
                end
            end
        end #end for
        hima_reflect_skill_effect(user,skill)
  end
   
    def element_reflect(element_id)
        if self.is_a?(Game_Actor)
        result = $data_classes[self.class_id].element_ranks[element_id]

            for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
                armor = $data_armors[i]
                if armor != nil and armor.guard_element_set.include?(element_id)
                    result = 1
                end
            end
   
            for i in @states
                if $data_states[i].guard_element_set.include?(element_id)
                    result = 1
                end
            end
        else
            result = $data_enemies[self.enemy_id].element_ranks[element_id]
            for i in @states
                if $data_states[i].guard_element_set.include?(element_id)
                    result = 1
                end
            end
        end
    # Method end
    return result
  end
end

class Game_Enemy < Game_Battler
    attr_accessor        :enemy_id
end

class Scene_Battle
    alias hima_update_phase4_step5 update_phase4_step5
  def update_phase4_step5
        hima_update_phase4_step5
    reflect = 0
        for target in @target_battlers
          if target.reflect != 0
                reflect = target.reflect
                target.reflect = 0
      end
    end
        if reflect > 0
      @target_battlers = []
            @target_battlers.push(@active_battler)
            case reflect
                when 1
                    @active_battler.attack_effect(@active_battler)
                when 2
                    @active_battler.skill_effect(@active_battler,@skill)
            end #case
            @phase4_step = 4
        else
      @phase4_step = 6
    end
  end
end

Teh Details:
http://forum.chaos-project.com/index.php?topic=4469.0

Its all about reflecting!

However I like to hop to and from projects in VX and XP,
and was hoping someone could assist me with a conversion.

Firstly, I use this so I can see my battlers in battle:
Spoiler: ShowHide
#==============================================================================
# ** Actor Battler Graphics
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.0
#    03-01-2008
#    RGSS2
#------------------------------------------------------------------------------
#
#  INTRODUCTION:
#
#  This system permits you to include 'Actor Battler' graphics that were not
#  included in the RPGMaker VX system.   This script mimics many of the lost
#  features, and includes a new one:  Actor Battler Centering.

#------------------------------------------------------------------------------
#
#  USAGE:
#
#  --Positioning--
#   A nice feature to this system  is the ability to adjust the left/right &
#   up/down position of your battlers.
#
#   Actually, the vertical up/down position  can be adjusted by changing the
#   value of the SCREEN_Y variable.   The left/right positioning is a little
#   different.
#
#   The CENTER_X value is a true/false value  that sets whether the battlers
#   line up from the left and space themselves out  in the manner of the de-
#   fault RPGMaker XP  or whether the system calculates and centers them ac-
#   ross the screen.
#
#   The DEFAULT_X value establishes  how many actors  are typically shown in
#   the battlefield. While this is the default value, the maximum value used
#   can be changed with a script call.
#
#   Finally,  the TRANSPARENT value is another true/false value that you can
#   use to make the battlers lightly transparent until they're about to per-
#   form an attack.  Another feature from RPGMaker XP.
#
#  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#
#  --The Actor List--
#  This system DOES require you to edit the configuration system to list all
#  of the 'actor' battlers  that you  are using.   It is assumed  that these
#  battlers will be in the  'Graphics\Battlers'  folder with the rest of the
#  enemy battlers.
#
#  Each value in the ACTOR array holds two values:   filename and hue.  This
#  not only allows you to add battle graphics  for your heroes,  but adjusts
#  the character's hue as well.  If you do not include the hue setting, it
#  goes to the default setting of '0'.
#
#------------------------------------------------------------------------------
#
#  SCRIPT CALLS:
#
#  There's only two script calls that you need to know.
#
#  --Changing Battlers--
#  Given that this system allows you to use 'Actor' battlers, you may find a
#  need to 'change' the battler in-game.  Unfortunately, this cannot be done
#  with a pre-rendered map event, so I had to make a script call:
#
#           $game_actors[ID].set_battler("filename", hue)

#  By using this call, you can change the graphic and hue of a battler while
#  the game is running. 
#
#  As an example:  $game_actors[1].set_battler("Ylva")

#  ...would set actor #1's battler to use "Ylva.png" as the graphic desired.
#  You may note that the 'hue' was not included  in this call.   The default
#  value of '0' was used.
#
#  NOTE:  Just calling $game_actors[2].set_battler() would erase the battler
#         from actor #2, rendering it invisible on the battlefield.
#
#  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#
#  --Changing Position Value--
#  This script allows you to have the battlers centered in the battlefield
#  and spaced out evenly.  Under most circumstances, you have four members
#  in your party.  But what if you want to increase the number of members
#  to 5 or 6?
#
#  Now, this system does not increase the number of members in your party,
#  but it is already set up to adjust the spacing of your members in the
#  battlefield.  With a simple script call:
#
#           $game_system.actorbattler_max = 7
#
#  You can make the system space the battlers on the field with the under-
#  standing that up to 7 members are in the party.
#
#------------------------------------------------------------------------------
#
#  EDITS AND MODIFICATIONS:

#  This system Aliases the following methods:
#  * initialize                     (RPG::Actor)
#  * initialize                     (Game_Temp)
#  * initialize                     (Game_System)
#  * initialize                     (Game_Actor)
#  * update                         (Sprite_Battler)
#  * start                          (Scene_Battle)
#  * start_party_command_selection  (Scene_Battle)
#  * process_victory                (Scene_Battle)
#  * execute_action                 (Scene_Battle)
#
#  This system redefines the following methods:
#  * use_sprite?                    (Game_Actor)
#  * create_actors                  (Spriteset_Battle)
#  * update_actors                  (Spriteset_Battle)

#
#------------------------------------------------------------------------------
#
#  TERMS AND CONDITIONS:
#
#  Free to use, even in commercial projects.  Just note that I need some form
#  of due credit... even a mere mention in some end titles.
#
#==============================================================================



#==============================================================================
# ** Actor_Battler Module
#------------------------------------------------------------------------------
#  A module containing configurable data for the Actor Battler Graphic system.
#==============================================================================

module Actor_Battler
  # Actor battler array
  ACTOR = Array.new  # Do not touch -_^

   #========================================================================
   #  **  C  O  N  F  I  G  U  R  A  T  I  O  N      S  Y  S  T  E  M  **  #
   #======================================================================== 
 
  # --Positioning--
  # Actor Battler positioning system
  #
    CENTER_X    = true    # If true, centers actors rather than default lineup.
    DEFAULT_X   = 5       # Default party Max
    SCREEN_Y    = 400     # Vertical height of battlers
    TRANSPARENT = false    # If true, makes lightly transparent until attacking.
 
   
  # --Actor List--
  # Add your actor battlers here
  #
  # Actor#      Filename,   Hue (optional)
    ACTOR[1] = ["Rubikiss"]
    ACTOR[2] = ["Bennett"]
    ACTOR[3] = ["Ulrika",  0]
    ACTOR[4] = ["Ralph",     0]
    ACTOR[5] = ["Lydia", 0]
    ACTOR[6] = ["Aluxes",    0]
    ACTOR[7] = ["Eryn",     0]
    ACTOR[8] = ["Kitoshi",    0]

   
   #========================================================================
   #  **  E  N  D     O  F     C  O  N  F  I  G  U  R  A  T  I  O  N   **  #
   #======================================================================== 
end



#==============================================================================
# ** RPG Module
#------------------------------------------------------------------------------
#  A module containing RPGVX Data Structures.
#==============================================================================
module RPG
  #============================================================================
  # ** Actor
  #----------------------------------------------------------------------------
  #  Data class for actors
  #============================================================================ 
  class Actor
    #------------------------------------------------------------------------
    # * Alias Listings
    #------------------------------------------------------------------------ 
    alias actorbattler_init initialize
    #------------------------------------------------------------------------
    # * Object Initialization
    #------------------------------------------------------------------------ 
    def initialize
      # Perform the original call
      actorbattler_init
      @battler_name = ""
      @battler_hue = 0
    end
  end
end



#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
# The instance of this class is referenced by $game_temp.
#==============================================================================

class Game_Temp
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :battle_main_phase        # battle flag: main phase
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------   
  alias actorbattler_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Perform the original call
    actorbattler_initialize
    # Set the main phase flag to false
    @battle_main_phase = false
  end
end



#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :actorbattler_max         # Max. size for centered battlers
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------   
  alias actorbattler_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Perform the original call
    actorbattler_initialize
    # Set 'Centered' battler max to 4 (default)
    @actorbattler_max = Actor_Battler::DEFAULT_X
  end
end



#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #-------------------------------------------------------------------------- 
  attr_accessor :screen_x                 # battle screen X coordinate
  attr_accessor :screen_y                 # battle screen Y coordinate
  #--------------------------------------------------------------------------
  # * Alias Listings
  #-------------------------------------------------------------------------- 
  alias actorbattler_init initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor_id : actor ID
  #--------------------------------------------------------------------------
  def initialize(actor_id)
    # Perform the original call
    actorbattler_init(actor_id)
    # Apply battler graphic
    @battler_name = Actor_Battler::ACTOR[actor_id][0]
    # Apply battler hue if exists, else default of '0'
    if Actor_Battler::ACTOR[actor_id][1] != nil
      @battler_hue  = Actor_Battler::ACTOR[actor_id][1]
    else
      @battler_hue  = 0
    end
  end
  #--------------------------------------------------------------------------
  # * Change Battler
  #     battler_name  : new battler graphic filename
  #     battler_hue   : new battler hue setting (default = 0)
  #--------------------------------------------------------------------------
  def set_battler(battler_name = "", battler_hue = 0)
    @battler_name = battler_name
    @battler_hue = battler_hue
  end 
  #--------------------------------------------------------------------------
  # * Use Sprites?
  #--------------------------------------------------------------------------
  def use_sprite?
    return true
  end 
  #--------------------------------------------------------------------------
  # * Get Battle Screen X-Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    if self.index != nil
      if Actor_Battler::CENTER_X
        # Return after calculating x-coords of centered party members
        return self.index * (544 / $game_system.actorbattler_max) +
              ($game_system.actorbattler_max - $game_party.members.size) *
              (272 / $game_system.actorbattler_max) +
              (272 / $game_system.actorbattler_max)
      else
        # Return after calculating x-coords of default-aligned party members
        return self.index * 136 + 68
      end
    else
      return 0
    end
  end
  #--------------------------------------------------------------------------
  # * Get Battle Screen Y-Coordinate
  #--------------------------------------------------------------------------
  def screen_y
    return Actor_Battler::SCREEN_Y
  end 
  #--------------------------------------------------------------------------
  # * Get Battle Screen Z-Coordinate
  #--------------------------------------------------------------------------
  def screen_z
    # Return after calculating z-coordinate by order of members in party
    if self.index != nil
      return $game_party.members.size - self.index
    else
      return 0
    end
  end
end



#==============================================================================
# ** Sprite_Battler
#------------------------------------------------------------------------------
#  This sprite is used to display battlers. It observes a instance of the
# Game_Battler class and automatically changes sprite conditions.
#==============================================================================

class Sprite_Battler < Sprite_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #-------------------------------------------------------------------------- 
  alias actorbattler_update update
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Perform the original call
    actorbattler_update
    # If the actor battlers are lightly transparent until they act
    if Actor_Battler::TRANSPARENT == true
      # If the battler is a visible actor battler
      if @battler.is_a?(Game_Actor) and @battler_visible
        # Bring opacity level down a bit when not in main phase
        if $game_temp.battle_main_phase
          self.opacity += 3 if self.opacity < 255
        else
          self.opacity -= 3 if self.opacity > 207
        end
      end   
    end
  end
end



#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  This class brings together battle screen sprites. It's used within the
# Scene_Battle class.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Create Actor Sprite
  #    Removes the 'empty' battler image used by the default system and
  #    replaces it.  It also observes the actual size of the party and
  #    not a predetermined 4-party limit.
  #--------------------------------------------------------------------------
  def create_actors
    @actor_sprites = []
    for actor in $game_party.members.reverse
      @actor_sprites.push(Sprite_Battler.new(@viewport2, actor))
    end
  end 
  #--------------------------------------------------------------------------
  # * Update Actor Sprite
  #--------------------------------------------------------------------------
  def update_actors
    # Reset actor battler sprites if party size increases
    if $game_party.members.size > @actor_sprites.size
      dispose_actors
      create_actors
    end
    for sprite in @actor_sprites
      sprite.update
    end
  end 
end



#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias actorbattler_s start
  alias actorbattler_spcs start_party_command_selection
  alias actorbattler_pv process_victory
  alias actorbattler_ea execute_action
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    actorbattler_s
    $game_temp.battle_main_phase = false
  end
  #--------------------------------------------------------------------------
  # * Start party command selection
  #--------------------------------------------------------------------------
  def start_party_command_selection
    actorbattler_spcs   
    if $game_temp.in_battle
      $game_temp.battle_main_phase = false
    end
  end
  #--------------------------------------------------------------------------
  # * Victory Processing
  #--------------------------------------------------------------------------
  def process_victory
    $game_temp.battle_main_phase = false
    actorbattler_pv
  end
  #--------------------------------------------------------------------------
  # * Start Execution of Battle Processing
  #--------------------------------------------------------------------------
  def execute_action
    actorbattler_ea
    $game_temp.battle_main_phase = true
  end
end


I figured, 'Hey, its less than 200 lines of code, maybe I culd do it myself!'
So I took the liberty of investigating methods and all that from XP vs. VX...
and discovered things that perhaps could aid someone else in doing this:

When I pop it directly into VX with no conversion, the first thing it complains about...
A lack of Phase4 in Scene_Battle!

Phase4, from my checking it out, contains 6 parts.
p1-action preparation (win/lose)
p2-start action
p3-animation of performer
p4-animation for target
p5-damage display
p6-refresh

For those of you unfamilier with VX, it went back to rm2k-style of a message battle format!

So phase4_part3 simply doesn't seem to exist in any sense of the idea.
When you are attacked, the screen flashes(if there is a screen flash in the animation) and it make the sound effect.

Phase4_part4 seems to exist under a different name to some extent: def display_action_effects.

Another difference I've found in the XP script is the reference to armor.guard_element_set.
In VX however, it refers to it as elemental_rate, or element_ranks...

So in all the accumulations of knowledge thus far, I mutated the script to look like this:
Spoiler: ShowHide
#==============================================================================
# * Hima's Elemental Reflector v. 1.3
#------------------------------------------------------------------------------
#     This script will allow you to set your character or enemies to reflect any element
#    you want. You can also create armors or skills that create elemental reflector.
#
#    Version History
#    ---------------------------------------------------------
#    1.0    -    First Released
#    1.1    -    Fixed infinite reflect problem
#    1.2    -    More features added
#                a.) You can now choose to reflect any physical or magical skill.
#                b.) Physical reflect will also reflect any basic attack.
#                c.) Basic attack with element will also be reflected from elemental reflector.
#    1.3    -    Fixed some bugs that occur when you don't put all the ELEMENTS you defined into the database.
# ---------------------------------------------------------
# contact : ninomiya_mako@hotmail.com
#==============================================================================
module HIMA_REFLECT
    #--------------------------------------------------------------------------
  # - Customize Point -
    # ELEMENTS     - This is where you create the name of element you want to reflect. This is how it works
    #           {Name => Reflected Element ID, Name => Reflected Element ID, ...}
    #           The name can be anything, and ID is ID of the element that this will reflect. You have to
    #           create a new element that match what you input here.
    #           Special Element ID are as follows :
    #
    #            "Physical" -> For any physical skill, with atk_f greater than 0
    #            "Magic"    -> For any magic skill, with int_f (mind_f) greater than 0
    #
    #    WORD             - Message that will pop up when reflection occurs.
  #--------------------------------------------------------------------------
    ELEMENTS = {"Reflect Physical" => "Physical",
                "Reflect Heat" => 2,
                "Reflect Cold" => 3,
                "Reflect Thunder" => 4,
                "Reflect Liquid" => 5,
                "Reflect Ground" => 6,
                "Reflect Air" => 7,
                "Reflect Energy" => 8,
                "Reflect Void" => 9,
                "Reflect Magic" => "Magical"}
    WORD = "Reflect"

end

module RPG
    class Skill
        def type_of_skill
            if @spi_f > 0
                return "Magical"
            elsif @atk_f > 0
                return "Physical"
            else
                return nil
            end
        end
    end
end

class Game_Battler
  attr_accessor :reflect                   # Reflect Flag
    alias hima_reflect_init initialize
    def initialize
        @reflect = 0    #0 = no reflect, 1 = basic_attack, 2 = skill_effect
    hima_reflect_init
    end
   
    alias hima_reflect_attack_effect attack_effect
    def attack_effect(attacker)
        # Check for reflect basic attack
        element_to_reflect = HIMA_REFLECT::ELEMENTS.index("Physical")
        reflect_id = $data_system.elements.index(element_to_reflect)
        if reflect_id != nil
            if self.element_reflect(reflect_id) == 1
                if attacker.element_reflect(reflect_id) == 1
                    self.damage = "Block"
                    self.reflect = 0
                else
                    self.damage = HIMA_REFLECT::WORD
                    self.reflect = 1
                end
                return false
            end
        end
        # End of reflect basic attack
       
        # Check for reflect element of basic attack
        for q in 0...attacker.element_set.size
            element_id = attacker.element_set[q]
            element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
            if element_to_reflect != nil
                reflect_id = $data_system.elements.index(element_to_reflect)
                if self.element_reflect(reflect_id) == 1
          if attacker.element_reflect(reflect_id) == 1
              self.damage = "Block"
              self.reflect = 0
          else
              self.damage = HIMA_REFLECT::WORD
              self.reflect = 1
          end
          return false
                end
            end
        end #end for       
        # End of reflect element of basic attack
        hima_reflect_attack_effect(attacker)
    end
   
    alias hima_reflect_skill_effect skill_effect
  def skill_effect(user, skill)
        # Reflect physical or magic skill
        if skill.type_of_skill != nil
            element_id = skill.type_of_skill
            element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
            if element_to_reflect != nil
                reflect_id = $data_system.elements.index(element_to_reflect)
                if reflect_id != nil
                    if self.element_reflect(reflect_id) == 1
                        if user.element_reflect(reflect_id) == 1
                                self.damage = "Block"
                                self.reflect = 0
                        else
                                self.damage = HIMA_REFLECT::WORD
                                self.reflect = 2
                        end
                        return false
                    end
                end
            end
        end
       
        # Reflect specific element
        for q in 0...skill.element_set.size
            element_id = skill.element_set[q]
            element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
            if element_to_reflect != nil
                reflect_id = $data_system.elements.index(element_to_reflect)
                if reflect_id != nil
                    if self.element_reflect(reflect_id) == 1
                        if user.element_reflect(reflect_id) == 1
                                self.damage = "Block"
                                self.reflect = 0
                        else
                                self.damage = HIMA_REFLECT::WORD
                                self.reflect = 2
                        end
                        return false
                    end
                end
            end
        end #end for
        hima_reflect_skill_effect(user,skill)
  end
   
    def element_reflect(element_id)
        if self.is_a?(Game_Actor)
        result = $data_classes[self.class_id].element_ranks[element_id]

            for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
                armor = $data_armors[i]
                if armor != nil and armor.element_set.include?(element_id)
                    result = 1
                end
            end
   
            for i in @states
                if $data_states[i].element_set.include?(element_id)
                    result = 1
                end
            end
        else
            result = $data_enemies[self.enemy_id].element_ranks[element_id]
            for i in @states
                if $data_states[i].element_set.include?(element_id)
                    result = 1
                end
            end
        end
    # Method end
    return result
  end
end

class Game_Enemy < Game_Battler
    attr_accessor        :enemy_id
end

class Scene_Battle
# Displaying the damage of the skill
    alias hima_display_action_effects display_action_effects
  def display_action_effects(target, obj = nil)
        hima_display_action_effects(target, obj)
    reflect = 0
        for target in @target_battlers
          if target.reflect != 0
                reflect = target.reflect
                target.reflect = 0
      end
    end
        if reflect > 0
      @target_battlers = []
            @target_battlers.push(@active_battler)
            case reflect
                when 1
                    @active_battler.attack_effect(@active_battler)
                when 2
                    @active_battler.skill_effect(@active_battler,@skill)
            end #case
            @battle_main_phase = false
        else
      @battle_main_phase = false
    end
  end
end


In which if casting a spell that should be reflected, it pops an error:

Script 'elemental reflect' line 195: NoMethodError occured.
Undefined method `each' for Nil:NilClass.

This error pops in one of 2 places:
If I attack first, the skill will cast and do damage, kill the enemy if it is supposed to kill, then pop the error.
If the enemy attacks first, then this error will pop as soon as it should be my turn to act.

I tried.
I failed.
Can anyone else help me with this?
27
RMXP Script Database / [XP] Damage Font Manipulation
August 24, 2009, 11:01:13 pm
Custom Damage Font
Authors: Unknown
Version: 1.0
Type: Battle Add-on
Key Term: Battle Add-on



Introduction

This script gives the ability to edit the fonts in battle!



Features


  • You can change the font type! (Must possess the font to use it, obviously.)
  • You can change the font size! (Though there is a limit, it seems.)
  • You can change the wordage for 'critical hits'!
  • Its cool!



Screenshots

Ahh, the power of Paint.

Spoiler: ShowHide



Demo

There isn't much a need for a demo, is there?
Its easy to image what #'s looks like when its anything but 'Arial Black'.
If anything, just admire my spectacular screenshot.



Script

Spoiler: ShowHide

#=======================#
# Custom Damage Script? #
#=======================================================================#
# All colors are adjusted like they would be in the Animation Database. #
#=======================================================================#

module RPG
 class Sprite < ::Sprite
   def add_comma(value)
     string = []
     string = value.to_s.scan(/./).reverse!
     for i in 0..string.size-1
       if (i+1)%4 == 0
#=============================================================#
# This line makes it add commas automatically as appropriate! #
#=============================================================#
         string.insert i, ","
       end
     end
     return string.reverse!.to_s
   end
   
   def damage(value, critical)
     dispose_damage
     if value.is_a?(Numeric)
       damage_string = add_comma(value.abs)
     else
       damage_string = value.to_s
     end
     bitmap = Bitmap.new(160, 64)
#=====================================================================#
# Edit here to change the font and such for damage numbers in battle. #
#=====================================================================#
     bitmap.font.name = "Cherry Coke"   #Font Name!
     bitmap.font.size = 32              #Font Size!
     bitmap.font.color.set(0, 0, 0)     #Font Outline Color!
#==============================================================================#
# The commented out lines below of bitmap.draw blah blah add a bolder outline. #
# The shadow looks good on certain fonts, while distorted on others.           #
# As you can guess, Cherry Coke looks lovely with it. Don't have it? Get it :) #
#==============================================================================#

     bitmap.draw_text(-1, 12-1, 160, 64, damage_string, 1)
#      bitmap.draw_text(-2, 12-2, 160, 64, damage_string, 1)
#      bitmap.draw_text(-3, 12-3, 160, 64, damage_string, 1)
     bitmap.draw_text(+1, 12-1, 160, 64, damage_string, 1)
#      bitmap.draw_text(+2, 12-2, 160, 64, damage_string, 1)
#      bitmap.draw_text(+3, 12-3, 160, 64, damage_string, 1)
     bitmap.draw_text(-1, 12+1, 160, 64, damage_string, 1)
#      bitmap.draw_text(-2, 12+2, 160, 64, damage_string, 1)
#      bitmap.draw_text(-3, 12+3, 160, 64, damage_string, 1)
     bitmap.draw_text(+1, 12+1, 160, 64, damage_string, 1)
#      bitmap.draw_text(+2, 12+2, 160, 64, damage_string, 1)
#      bitmap.draw_text(+3, 12+3, 160, 64, damage_string, 1)
     if value.is_a?(Numeric) and value < 0
       bitmap.font.color.set(176, 255, 144) # Color! Adjust if you like.
       value = 0
     else
       bitmap.font.color.set(255, 255, 255) # Color! Adjust if you like.
     end
     bitmap.draw_text(0, 12, 160, 64, damage_string, 1)
     if critical
#=================================================================#
# When you critical hit, this is the shadow/outline of the words. #
#=================================================================#
       @critical_text = "Critical Hit!"  # The shadow of critical hit text!
       bitmap.font.size = 18
       bitmap.font.color.set(0, 0, 0)    # Color! Adjust if you like.
#================================================================#
# This again, is the shadow/outline of the critical hit wordage. #
#================================================================#
       bitmap.draw_text(-1, -1, 160, 20, @critical_text, 1)
#        bitmap.draw_text(-2, -2, 160, 20, @critical_text, 1)
       bitmap.draw_text(+1, -1, 160, 20, @critical_text, 1)
#        bitmap.draw_text(+2, -2, 160, 20, @critical_text, 1)
       bitmap.draw_text(-1, +1, 160, 20, @critical_text, 1)
#        bitmap.draw_text(-2, +2, 160, 20, @critical_text, 1)
       bitmap.draw_text(+1, +1, 160, 20, @critical_text, 1)
#        bitmap.draw_text(+2, +2, 160, 20, @critical_text, 1)
#=================================================================#
# If you want to adjust critical hit wordage & color, this is it! #
#=================================================================#
       bitmap.font.color.set(255, 40, 0) # Color! Adjust if you like.
       bitmap.draw_text(0, 0, 160, 20, "Critical Hit!", 1)
     end
     @_damage_sprite = ::Sprite.new(self.viewport)
     @_damage_sprite.bitmap = bitmap
     @_damage_sprite.ox = 80
     @_damage_sprite.oy = 20
     @_damage_sprite.x = self.x
     @_damage_sprite.y = self.y - self.oy / 2
     @_damage_sprite.z = 3000
     @_damage_duration = 40
   end
 end
end



Instructions

As long as its between the DEFAULT scripts and MAIN, I imagine it should do its job.



Compatibility

I haven't found any issues directly.
Though, it probably won't work with those one Damage modifier scripts...
The ones that replace 'em with pictures 'n stuff though.
Ideally, it should probably go below a CBS just incase the system
feels like tinkering with how damage looks.



Credits and Thanks


  • Err, I found this script in several places, but never have I seen it with a label as to its writer.
        I did find something very similer to this in one of Cogwheel's scripts, though. So...
  • Cogwheel maybe? I dunno.




Author's Notes

None of any note or interest. Just use and enjoy.

28
RMXP Script Database / [XP] Elemental Reflector
August 24, 2009, 09:20:43 pm
Elemental Reflector v1.3
Authors: Hima?
Version: 1.3
Type: Battle Add-on Script
Key Term: Battle Add-on



Introduction

This is a script that allows magic and skills to be reflected by element, rather than 'magic' or not.


Features


  • Reflects everything by elements (like Fire or Ice) rather than INT-F > 0.
  • Can also reflect by INT-F > 0, and also ATK-F > 0!



Screenshots
Rather difficult to take screen shots, but here are 2 anyways.

Spoiler: ShowHide

Spoiler: ShowHide



Demo

http://www.sendspace.com/file/4pnfbo


Script

A good place to put this is probably above MAIN and below the default scripts.
If your using a CBS, if it is to work at all, it'd likely have to be below that.

Spoiler: ShowHide

=begin
#==============================================================================# 
    Hima's Elemental Reflect v. 1.3
#==============================================================================# 

  Using this script will allow a character or enemy to reflect skills by
  element.
 
  ---Version History:

  1.0 -  First Released
  1.1 -  Fixed infinite reflect problem
  1.2 -  More features added
          a.) You can now choose to reflect any physical or magical skill.
          b.) Physical reflect will also reflect any basic attack.
          c.) Basic attack with element will also be reflected from elemental reflector.
  1.3 -  Fixed some bugs that occur when you don't put all the ELEMENTS you defined into the database.
#==============================================================================#
    Of course, all credits of this script go to HIMA, the presumable
    lady who made this script.
   
  contact : ninomiya_mako@hotmail.com
#==============================================================================# 
=end
module HIMA_REFLECT

#=====================================#
#  This is the part you should read.  #
#=====================================#
=begin

The structure:

          ELEMENTS = {"ELEM_REFLECT_ID" => ID_TO_REFLECT}

  "ELEM_REFLECT_ID" = The ID of the element you want to check or raise to 'A'.
                      This can effectively be named whatever you want,
                      though you should probably relate it to the proper element.
                      It must be within the quotes, though.
 
   ID_TO_REFLECT    = This is the ID of the element that will be reflected.

   
   So lets say this is an example:
   
          ELEMENTS = {"Fire Reflector" => 1}

  In this instance, the name of the element that will be reflecting is called:
  "Fire Reflector", when this element is checked (on armor or accessories) or
  raised to 'A' resistance (on enemies) then the element in ID 1 will be
  reflected.
#==============================================================================# 
  SPECIAL ELEMENT WORDS:
 
  "Physical" - using this term in place of the ID_TO_REFLECT will reflect all
               skills with an ATK-Force > 0 and even normal attacks.
           
  "Magical"  - Using this term in place of ID_TO_REFLECT will reflect all types
               of skills with an INT-Force > 0, regardless of element.

Lastly:
   
    WORD  - This is the string that will pop up when a skill is reflected.

Oh, and on a final note:
  If you have cast an element on an enemy, ie, Ice, and both you and the
  enemy reflects the ice element, it will just say "Block".
 
  You can also edit that word if you want to, just CTRL+F "Block", and change
  each one to whatever you want. :)
________________________________________________________________________________
=end
#========================================#
#  This is the tiny part you customize.  #
#========================================#

    ELEMENTS = {"Fire Reflector" => 1,
                "Ice Repel" => 2,
                "Deflection" => "Physical",
                "Reflection" => "Magical"}
    WORD = "Reflected!"
#========================================#
end

module RPG
    class Skill
        def type_of_skill
            if @int_f > 0
                return "Magical"
            elsif @atk_f > 0
                return "Physical"
            else
                return nil
            end
        end
    end
end

class Game_Battler
  attr_accessor :reflect                   # Reflect Flag
    alias hima_reflect_init initialize
    def initialize
        @reflect = 0    #0 = no reflect, 1 = basic_attack, 2 = skill_effect
    hima_reflect_init
    end
   
    alias hima_reflect_attack_effect attack_effect
    def attack_effect(attacker)
        # Check for reflect basic attack
        element_to_reflect = HIMA_REFLECT::ELEMENTS.index("Physical")
        reflect_id = $data_system.elements.index(element_to_reflect)
        if reflect_id != nil
            if self.element_reflect(reflect_id) == 1
                if attacker.element_reflect(reflect_id) == 1
                    self.damage = "Block"
                    self.reflect = 0
                else
                    self.damage = HIMA_REFLECT::WORD
                    self.reflect = 1
                end
                return false
            end
        end
        # End of reflect basic attack
       
        # Check for reflect element of basic attack
        for q in 0...attacker.element_set.size
            element_id = attacker.element_set[q]
            element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
            if element_to_reflect != nil
                reflect_id = $data_system.elements.index(element_to_reflect)
                if self.element_reflect(reflect_id) == 1
          if attacker.element_reflect(reflect_id) == 1
              self.damage = "Block"
              self.reflect = 0
          else
              self.damage = HIMA_REFLECT::WORD
              self.reflect = 1
          end
          return false
                end
            end
        end #end for       
        # End of reflect element of basic attack
        hima_reflect_attack_effect(attacker)
    end
   
    alias hima_reflect_skill_effect skill_effect
  def skill_effect(user, skill)
        # Reflect physical or magic skill
        if skill.type_of_skill != nil
            element_id = skill.type_of_skill
            element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
            if element_to_reflect != nil
                reflect_id = $data_system.elements.index(element_to_reflect)
                if reflect_id != nil
                    if self.element_reflect(reflect_id) == 1
                        if user.element_reflect(reflect_id) == 1
                                self.damage = "Block"
                                self.reflect = 0
                        else
                                self.damage = HIMA_REFLECT::WORD
                                self.reflect = 2
                        end
                        return false
                    end
                end
            end
        end
       
        # Reflect specific element
        for q in 0...skill.element_set.size
            element_id = skill.element_set[q]
            element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
            if element_to_reflect != nil
                reflect_id = $data_system.elements.index(element_to_reflect)
                if reflect_id != nil
                    if self.element_reflect(reflect_id) == 1
                        if user.element_reflect(reflect_id) == 1
                                self.damage = "Block"
                                self.reflect = 0
                        else
                                self.damage = HIMA_REFLECT::WORD
                                self.reflect = 2
                        end
                        return false
                    end
                end
            end
        end #end for
        hima_reflect_skill_effect(user,skill)
  end
   
    def element_reflect(element_id)
        if self.is_a?(Game_Actor)
        result = $data_classes[self.class_id].element_ranks[element_id]

            for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
                armor = $data_armors[i]
                if armor != nil and armor.guard_element_set.include?(element_id)
                    result = 1
                end
            end
   
            for i in @states
                if $data_states[i].guard_element_set.include?(element_id)
                    result = 1
                end
            end
        else
            result = $data_enemies[self.enemy_id].element_ranks[element_id]
            for i in @states
                if $data_states[i].guard_element_set.include?(element_id)
                    result = 1
                end
            end
        end
    # Method end
    return result
  end
end

class Game_Enemy < Game_Battler
    attr_accessor        :enemy_id
end

class Scene_Battle
    alias hima_update_phase4_step5 update_phase4_step5
  def update_phase4_step5
        hima_update_phase4_step5
    reflect = 0
        for target in @target_battlers
          if target.reflect != 0
                reflect = target.reflect
                target.reflect = 0
      end
    end
        if reflect > 0
      @target_battlers = []
            @target_battlers.push(@active_battler)
            case reflect
                when 1
                    @active_battler.attack_effect(@active_battler)
                when 2
                    @active_battler.skill_effect(@active_battler,@skill)
            end #case
            @phase4_step = 4
        else
      @phase4_step = 6
    end
  end
end



Instructions

I hid instructions at the top of the script.
Feel free to download to the demo for demonstration and such.


Compatibility

I don't believe it works with Cogwheel's RTAB.
I haven't tested it with anything else, but it probably doesn't work well with things outside of the DBS.
It does however, work with Ryexander's Asan'Tear Battle System, as its what I use. :]


Credits and Thanks


  • Hima made this! I did not! S/He asked for a name as credit. That is all.



Author's Notes
No special words of advice. Just use and enjoy.
29
Script Requests / A word to an animation...?
August 12, 2009, 09:45:02 pm
I found a script that allows for specific elemental reflection, rather than full magical reflection as in blizz's script.

One thing that bothers me is that when a spell or skill is reflected...the word "Reflect" pops up.
Mind you, the word can be changed to whatever other letters I want, but...what if I want an animation instead?

Here, hopefully someone can look at this and see the error of Hima's ways:

Spoiler: ShowHide
#==============================================================================
# * Hima's Elemental Reflector v. 1.3
#------------------------------------------------------------------------------
#     This script will allow you to set your character or enemies to reflect any element
#    you want. You can also create armors or skills that create elemental reflector.
#
#    Version History
#    ---------------------------------------------------------
#    1.0    -    First Released
#    1.1    -    Fixed infinite reflect problem
#    1.2    -    More features added
#                a.) You can now choose to reflect any physical or magical skill.
#                b.) Physical reflect will also reflect any basic attack.
#                c.) Basic attack with element will also be reflected from elemental reflector.
#    1.3    -    Fixed some bugs that occur when you don't put all the ELEMENTS you defined into the database.
# ---------------------------------------------------------
# contact : ninomiya_mako@hotmail.com
#==============================================================================
module HIMA_REFLECT
   #--------------------------------------------------------------------------
 # - Customize Point -
   # ELEMENTS     - This is where you create the name of element you want to reflect. This is how it works
   #           {Name => Reflected Element ID, Name => Reflected Element ID, ...}
   #           The name can be anything, and ID is ID of the element that this will reflect. You have to
   #           create a new element that match what you input here.
   #           Special Element ID are as follows :
   #
   #    "Physical" -> For any physical skill, with atk_f greater than 0, attacks
   #    "Magic"    -> For any magic skill, with int_f (mind_f) greater than 0
   #
   #    WORD             - Message that will pop up when reflection occurs.
 #--------------------------------------------------------------------------
   ELEMENTS = {"Reflect Physical" => "Physical",
               "Reflect Heat" => 2,
               "Reflect Cold" => 3,
               "Reflect Thunder" => 4,
               "Reflect Ground" => 5,
               "Reflect Air" => 6,
               "Reflect Energy" => 7,
               "Reflect Void" => 8,
               "Reflect Magic" => "Magic"}
   WORD = "Reflect"
end

module RPG
   class Skill
       def type_of_skill
           if @int_f > 0
               return "Magic"
           elsif @atk_f > 0
               return "Physical"
           else
               return nil
           end
       end
   end
end

class Game_Battler
 attr_accessor :reflect                   # Reflect Flag
   alias hima_reflect_init initialize
   def initialize
       @reflect = 0    #0 = no reflect, 1 = basic_attack, 2 = skill_effect
   hima_reflect_init
   end
   
   alias hima_reflect_attack_effect attack_effect
   def attack_effect(attacker)
       # Check for reflect basic attack
       element_to_reflect = HIMA_REFLECT::ELEMENTS.index("Physical")
       reflect_id = $data_system.elements.index(element_to_reflect)
       if reflect_id != nil
           if self.element_reflect(reflect_id) == 1
               if attacker.element_reflect(reflect_id) == 1
                   self.damage = "BLOCK"
                   self.reflect = 0
                 else
                   self.damage = HIMA_REFLECT::WORD
                   self.reflect = 1
               end
               return false
           end
       end
       # End of reflect basic attack
       
       # Check for reflect element of basic attack
       for q in 0...attacker.element_set.size
           element_id = attacker.element_set[q]
           element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
           if element_to_reflect != nil
               reflect_id = $data_system.elements.index(element_to_reflect)
               if self.element_reflect(reflect_id) == 1
         if attacker.element_reflect(reflect_id) == 1
             self.damage = "Block"
             self.reflect = 0
         else
             self.damage = HIMA_REFLECT::WORD
             self.reflect = 1
         end
         return false
               end
           end
       end #end for        
       # End of reflect element of basic attack
       hima_reflect_attack_effect(attacker)
   end
   
   alias hima_reflect_skill_effect skill_effect
 def skill_effect(user, skill)
       # Reflect physical or magic skill
       if skill.type_of_skill != nil
           element_id = skill.type_of_skill
           element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
           if element_to_reflect != nil
               reflect_id = $data_system.elements.index(element_to_reflect)
               if reflect_id != nil
                   if self.element_reflect(reflect_id) == 1
                       if user.element_reflect(reflect_id) == 1
                               self.damage = "Block"
                               self.reflect = 0
                       else
                               self.damage = HIMA_REFLECT::WORD
                               self.reflect = 2
                       end
                       return false
                   end
               end
           end
       end
       
       # Reflect specific element
       for q in 0...skill.element_set.size
           element_id = skill.element_set[q]
           element_to_reflect = HIMA_REFLECT::ELEMENTS.index(element_id)
           if element_to_reflect != nil
               reflect_id = $data_system.elements.index(element_to_reflect)
               if reflect_id != nil
                   if self.element_reflect(reflect_id) == 1
                       if user.element_reflect(reflect_id) == 1
                               self.damage = "Block"
                               self.reflect = 0
                       else
                               self.damage = HIMA_REFLECT::WORD
                               self.reflect = 2
                       end
                       return false
                   end
               end
           end
       end #end for
       hima_reflect_skill_effect(user,skill)
 end
   
   def element_reflect(element_id)
       if self.is_a?(Game_Actor)
       result = $data_classes[self.class_id].element_ranks[element_id]

           for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
               armor = $data_armors[i]
               if armor != nil and armor.guard_element_set.include?(element_id)
                   result = 1
               end
           end
   
           for i in @states
               if $data_states[i].guard_element_set.include?(element_id)
                   result = 1
               end
           end
       else
           result = $data_enemies[self.enemy_id].element_ranks[element_id]
           for i in @states
               if $data_states[i].guard_element_set.include?(element_id)
                   result = 1
               end
           end
       end
   # Method end
   return result
 end
end

class Game_Enemy < Game_Battler
   attr_accessor        :enemy_id
end

class Scene_Battle
   alias hima_update_phase4_step5 update_phase4_step5
 def update_phase4_step5
       hima_update_phase4_step5
   reflect = 0
       for target in @target_battlers
         if target.reflect != 0
               reflect = target.reflect
               target.reflect = 0
     end
   end
       if reflect > 0
     @target_battlers = []
           @target_battlers.push(@active_battler)
           case reflect
               when 1
                   @active_battler.attack_effect(@active_battler)
               when 2
                   @active_battler.skill_effect(@active_battler,@skill)
           end #case
           @phase4_step = 4
       else
     @phase4_step = 6
   end
 end
end


Very useful script, almost emulates the Shin Megami style of battles what with their strengths and weaknesses...but the word reflect, in my opinion, should be replaced with at least a picture.
30
Script Requests / [RESOLVED enough.]ATK+ Scriplet?
August 02, 2009, 07:05:33 pm
I need a scriptlet that I can insert in random places...that will increase the ATK attribute.
For that matter, I need one that will raise PDEF and MDEF and EVA as well.

I know there has got to be some simple 1 line script that does this, but I can't figure it out.

Specifically, just want to raise ACTOR_ID's attack. Or maybe PARTY_SLOT_#'s attack.

just anything that I can use to manipulate those numbers...

Thanks a bundle for sparing me this simple agony.