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.

Messages - KK20

2901
file.each_line {|line| book << line}
You're telling it to store the lines of strings into an array. Then, you are trying to pass this array into the slice_text method. The parameter text needs to be a string.

Like so:

file.each_line {|line| book << line}
book = book.join(" ")
2902
Script Requests / Re: [XP] Modified SP problem
December 01, 2012, 11:28:11 pm
Just saw this too:
Quotealias tdks_spg_make_skill_action_result make_skill_action_result
  def make_basic_action_result #<- should be that  ^^^
    if @active_battler.is_a?(Game_Actor)
      sp_gain = SP_Gain_Config.sp_gain(4)
      @active_battler.sp += @active_battler.max_sp * sp_gain / 100
    end
    tdks_spg_make_skill_action_result
  end

Probably why it didn't work.
2903
Chat / Re: The Official Pony Topic
December 01, 2012, 11:24:59 pm
Sorry, didn't go. Parents had some work for me to do around the house and then help transport firewood to my dad's friend place. Pretty bummed about it, but oh well. Today's episode was enough to redeem my day~
2904
By the default damage pop, you mean the method 'damage' in RPG::Sprite? If that's the case, just rewrite the method by locating
@_damage_sprite = ::Sprite.new(self.viewport)

Instead of self.viewport, create a new viewport that has a higher z-value than your window's viewport.
2905
RMXP Script Database / Re: [XP] Advance Wars Engine
December 01, 2012, 02:17:10 am
Soon-ish? I can't really pinpoint a date yet as I'm not sure how much stuff I've got left in those three weeks. I guess if I really wanted to, I could release it now, but it's missing some key features as well as buggy at the moment (missile silos are wonky, cruisers and aircraft carriers don't work properly with loaded units, etc.).

Just keeping my fingers crossed I can get it out before the end of the year.
2906
Script Requests / Re: [XP] Modified SP problem
December 01, 2012, 01:37:12 am
lol you forgot the case TD
  def self.sp_gain(action_id)
    case action_id
    when 0 then return 10
    when 1 then return 2
    else return 0
    end
  end


edit: whoops didn't see the missing 'end'.
2907
RMXP Script Database / Re: [XP] Advance Wars Engine
December 01, 2012, 01:26:29 am
No problem at all. I've still got another 2 weeks plus finals week.

I don't think I have anything for you to play around with until the first release though. It's probably way easier to find what could use some help when you actually play the game :P
2908
RMXP Script Database / Re: [XP] Advance Wars Engine
November 29, 2012, 07:52:50 pm
@Memor-X
Oh I am well aware of that--probably pulled off a collection of sprites from there. Most of the sprites I've been using are from another AW project: Custom Wars.

@Zexion
It's nothing fancy that I'm looking for. Mainly just spicing up the simple graphics I've made (i.e. menu screens, status windows, cursor graphic, etc.). Basically I'm using the sprites from the original series and creating any makeshift graphics as the current placeholders for now; I won't update them unless someone would like to change them for the heck of it.

Here's an example of what I mean:
Spoiler: ShowHide
It does what it should do, but it's pretty plain in detail.

If you are willing to join the team, then I would greatly love your help!
2909
Yeah, you just had to right click the "Restriction" drop down and it explains it all.

Couldn't you just event those custom states? For example, the low HP one is just calling a common event and adding/removing the state if the actor's HP is within the range. Is there some level of complexity that you're aiming for?
2910
Script Requests / Re: Help me! Script Capture moster
November 29, 2012, 07:35:44 pm
Other than what I have already said, there's not enough explained for there to be any reason to script this. Just use a Party Switcher script and create actors that mimic the monsters, adding them in after you kill them with a script call.
2911
RMXP Script Database / Re: [XP] Advance Wars Engine
November 29, 2012, 01:59:53 am
Worked on the map select and CO select screens over Thanksgiving break. Going to rewrite the main battle processing and finish up on those last sub-menus. First beta release is mainly just to show off what I've got, get some playtests in, and just receive feedback. Scripters are welcome to edit it if they want (but that will be futile unless you share those edits with me since I've still got more updating to do).

I want to add that I'm kinda looking for spriters or anyone good with making graphics if you want to make the default systems look nicer/better. I'm not desperate, but if you like this project and feel you want to help make it look its best, I'd appreciate it ;) (otherwise, everyone will just have to love my amateur spriting).

Also, if you would like to make a logo for the project, go for it. The only program I've ever needed to used is Paint, so my experience with graphics is pretty much zero. Again, I'm not desperate, but if you would like to support, please <3
2912
Script Requests / Re: Help me! Script Capture moster
November 29, 2012, 01:48:30 am
You're going to have to explain the system in way more detail than that. I already have a bunch of "what if" and "how" questions popping in my head.

You can use pets.
You can use a party switcher script.
After killing an enemy add the monster actor to the party.
Are monsters unique? How do you catch them? Is it 100% successful?
2913
Firstly, this: http://forum.chaos-project.com/index.php/topic,12231.0.html

I'm sure you are aware that 'Can't Use Magic' = Cannot use skills whose Attack Power F is 0.
2914
Forgot about the "if the enemy is eaten, no exp or items are rewarded" part. Here's the rewrite:
Spoiler: ShowHide
#=============================================================================
# BlueMageSystem                                                    Ver 1.0
# By KK20                                                           [11/22/12]
# Requested by leeman27534
#=============================================================================
module BlueMageSystem
#*******************************************************************************
#         B E G I N   C O N F I G U R A T I O N
#*******************************************************************************

  # Define what actors will use this system. Use actor's ID.
  ACTORS = [1]
 
  # Setup what skills can "eat"
  EATING_SKILLS = [81,82,83]
 
  def self.give_stats(enemy_id)
    case enemy_id
    #--------------------------------------------------------------------
    # Define what stats the enemy gives to the player upon absorbtion
    # level-up. The stats you can use are:
    # 'str', 'dex', 'int', 'agi', 'atk', 'pdef', 'mdef', 'eva', 'maxhp', 'maxsp'
    #--------------------------------------------------------------------
    when 1 then return [['str',10],['dex',10],['maxhp', 10],['maxsp',10],['atk',10]]
    when 2 then return [['pdef',5]]
    #when enemy_id then return [[stat, amount added to stat], ... ]
   
    #--------------------------------------------------------------------
    else
      return []
    end
  end
 
  def self.give_skills(enemy_id)
    case enemy_id
    #--------------------------------------------------------------------
    # Define what skill the enemy gives/levels up upon absorption level-up.
    # Number should be the skill's ID.
    #--------------------------------------------------------------------
    when 1 then return 20 # Greater Earth
    #when enemy_id then return skill_id
   
    #--------------------------------------------------------------------
    else
      return 0
    end
  end
 
  def self.exp_list(enemy_id)
    case enemy_id
    #--------------------------------------------------------------------
    # Define the number of times the player must absorb the enemy to level-up.
    # The maximum number of level-ups that can be earned is based on the size
    # of the array.
    #--------------------------------------------------------------------
    when 1 then return [2,5,10,20,40] # Maximum level is 5
    #when id then return [1,2,3,4,5, ... ]
    else
      #--------------------------------------------------------------------
      # This is the universal EXP list for all enemies undefined above
      #--------------------------------------------------------------------
      return [5,10,15,20,25]
    end
  end
end
#*******************************************************************************
#         E N D   O F   C O N F I G U R A T I O N
#*******************************************************************************

#=============================================================================
# Game_Actor
#=============================================================================
class Game_Actor < Game_Battler
  attr_reader :eat_counter
 
  alias apply_blue_mage_init initialize
  def initialize(actor_id)
    if BlueMageSystem::ACTORS.include?(actor_id)
      @eat_counter = []
    end
    @atk_plus = 0
    @pdef_plus = 0
    @mdef_plus = 0
    @eva_plus = 0   
    apply_blue_mage_init(actor_id)
  end
 
  def increase_stats(list)
    return if list.size == 0
    list.each{|stats|
      eval("self.#{stats[0]} += #{stats[1]}")
    }
  end

  def atk
    n = base_atk + @atk_plus
    for i in @states
      n *= $data_states[i].atk_rate / 100.0
    end
    return Integer(n)
  end

  def pdef
    n = base_pdef + @pdef_plus
    for i in @states
      n *= $data_states[i].pdef_rate / 100.0
    end
    return Integer(n)
  end

  def mdef
    n = base_mdef + @mdef_plus
    for i in @states
      n *= $data_states[i].mdef_rate / 100.0
    end
    return Integer(n)
  end

  def eva
    n = base_eva + @eva_plus
    for i in @states
      n += $data_states[i].eva
    end
    return n
  end
 
  def atk=(atk)
    @atk_plus += atk - self.atk
    @atk_plus = [[@atk_plus, -999].max, 999].min
  end
 
  def pdef=(pdef)
    @pdef_plus += pdef - self.pdef
    @pdef_plus = [[@pdef_plus, -999].max, 999].min
  end
 
  def mdef=(mdef)
    @mdef_plus += mdef - self.mdef
    @mdef_plus = [[@mdef_plus, -999].max, 999].min
  end
 
  def eva=(eva)
    @eva_plus += eva - self.eva
    @eva_plus = [[@eva_plus, -999].max, 999].min
  end
end

class Game_Troop
  attr_accessor :enemies
end

#=============================================================================
# Scene_Battle
#=============================================================================
class Scene_Battle
  alias apply_blue_mage_skills make_skill_action_result
  def make_skill_action_result
    # Alias method
    apply_blue_mage_skills
    # If the battler is a blue mage actor using an "eating" skill
    if @active_battler.is_a?(Game_Actor) and
        BlueMageSystem::ACTORS.include?(@active_battler.id) and
        BlueMageSystem::EATING_SKILLS.include?(@skill.id)
      # Create a dummy interpreter to use DerVVulfman's Skill Leveling Script
      dummy_intrp = Interpreter.new
      # Loop through each enemy battler
      @target_battlers.each{|battler|
        next if battler.is_a?(Game_Actor)
        # Find the EXP list for this enemy
        exp_list = BlueMageSystem.exp_list(battler.id).sort
        # Initialize the value of the actor's EXP list if it doesn't exist
        @active_battler.eat_counter[battler.id] = 0 if @active_battler.eat_counter[battler.id].nil?
        # If the enemy died from the skill and potential to "level-up"
        if battler.dead? and @active_battler.eat_counter[battler.id] < exp_list[exp_list.size-1]
          # Remove battler from the troop to prevent EXP/Item rewards
          $game_troop.enemies.delete(battler)
          @active_battler.eat_counter[battler.id] += 1
          # If level up
          if exp_list.include?(@active_battler.eat_counter[battler.id])
            # Increase stats
            @active_battler.increase_stats(BlueMageSystem.give_stats(battler.id))
            # If the actor does not know the skill, learn it
            # Otherwise, level the skill up
            skill_id = BlueMageSystem.give_skills(battler.id)
            if @active_battler.skill_learn?(skill_id)
              dummy_intrp.skill_level_up(@active_battler.id, skill_id)
            else
              @active_battler.learn_skill(skill_id)
            end
          end
        end
      }
    end
  end
end

I thought I did a pretty good job with the instructions (pretty standard for most scripts), but I guess I can give examples.

Assuming this is a new project in RMXP, Ghost is given an ID of 1 since it is the first monster in the database. If you want it so that when you eat this Ghost you are rewarded 5 STR, then do this under give_stats:
when 1 then return [['str',5]]
1 being the Ghost's ID, 'str' being the stat you want modified (and yes, it needs the quotes), and 5 being how much the stat increases. I already provided an example of how to do multiple stats (and single stats) in the script.

So if you want Basilisk (ID 2) to give 5 Weapon Defense, that would be
when 2 then return [['pdef',5]]


As for rewarding after one eat, that would be in exp_list. So if your boss monster had an ID of 20, it would look like
when 20 then return [1,#,#,#,#]

The first number should be a 1. The other 4 numbers (marked with # above) can be anything you want them to be.
2915
Spoiler: ShowHide
#=============================================================================
# BlueMageSystem                                                    Ver 1.0
# By KK20                                                           [11/22/12]
# Requested by leeman27534
#=============================================================================
module BlueMageSystem
#*******************************************************************************
#         B E G I N   C O N F I G U R A T I O N
#*******************************************************************************

  # Define what actors will use this system. Use actor's ID.
  ACTORS = [1]
 
  # Setup what skills can "eat"
  EATING_SKILLS = [81,82,83]
 
  def self.give_stats(enemy_id)
    case enemy_id
    #--------------------------------------------------------------------
    # Define what stats the enemy gives to the player upon absorbtion
    # level-up. The stats you can use are:
    # 'str', 'dex', 'int', 'agi', 'atk', 'pdef', 'mdef', 'eva', 'maxhp', 'maxsp'
    #--------------------------------------------------------------------
    when 1 then return [['str',10],['dex',10],['maxhp', 10],['maxsp',10],['atk',10]]
    when 2 then return [['pdef',5]]
    #when enemy_id then return [[stat, amount added to stat], ... ]
   
    #--------------------------------------------------------------------
    else
      return []
    end
  end
 
  def self.give_skills(enemy_id)
    case enemy_id
    #--------------------------------------------------------------------
    # Define what skill the enemy gives/levels up upon absorption level-up.
    # Number should be the skill's ID.
    #--------------------------------------------------------------------
    when 1 then return 20 # Greater Earth
    #when enemy_id then return skill_id
   
    #--------------------------------------------------------------------
    else
      return 0
    end
  end
 
  def self.exp_list(enemy_id)
    case enemy_id
    #--------------------------------------------------------------------
    # Define the number of times the player must absorb the enemy to level-up.
    # The maximum number of level-ups that can be earned is based on the size
    # of the array.
    #--------------------------------------------------------------------
    when 1 then return [2,5,10,20,40] # Maximum level is 5
    #when id then return [1,2,3,4,5, ... ]
    else
      #--------------------------------------------------------------------
      # This is the universal EXP list for all enemies undefined above
      #--------------------------------------------------------------------
      return [5,10,15,20,25]
    end
  end
end
#*******************************************************************************
#         E N D   O F   C O N F I G U R A T I O N
#*******************************************************************************

#=============================================================================
# Game_Actor
#=============================================================================
class Game_Actor < Game_Battler
  attr_reader :eat_counter
 
  alias apply_blue_mage_init initialize
  def initialize(actor_id)
    if BlueMageSystem::ACTORS.include?(actor_id)
      @eat_counter = []
    end
    @atk_plus = 0
    @pdef_plus = 0
    @mdef_plus = 0
    @eva_plus = 0   
    apply_blue_mage_init(actor_id)
  end
 
  def increase_stats(list)
    return if list.size == 0
    list.each{|stats|
      eval("self.#{stats[0]} += #{stats[1]}")
    }
  end

  def atk
    n = base_atk + @atk_plus
    for i in @states
      n *= $data_states[i].atk_rate / 100.0
    end
    return Integer(n)
  end

  def pdef
    n = base_pdef + @pdef_plus
    for i in @states
      n *= $data_states[i].pdef_rate / 100.0
    end
    return Integer(n)
  end

  def mdef
    n = base_mdef + @mdef_plus
    for i in @states
      n *= $data_states[i].mdef_rate / 100.0
    end
    return Integer(n)
  end

  def eva
    n = base_eva + @eva_plus
    for i in @states
      n += $data_states[i].eva
    end
    return n
  end
 
  def atk=(atk)
    @atk_plus += atk - self.atk
    @atk_plus = [[@atk_plus, -999].max, 999].min
  end
 
  def pdef=(pdef)
    @pdef_plus += pdef - self.pdef
    @pdef_plus = [[@pdef_plus, -999].max, 999].min
  end
 
  def mdef=(mdef)
    @mdef_plus += mdef - self.mdef
    @mdef_plus = [[@mdef_plus, -999].max, 999].min
  end
 
  def eva=(eva)
    @eva_plus += eva - self.eva
    @eva_plus = [[@eva_plus, -999].max, 999].min
  end
end
#=============================================================================
# Scene_Battle
#=============================================================================
class Scene_Battle
  alias apply_blue_mage_skills make_skill_action_result
  def make_skill_action_result
    # Alias method
    apply_blue_mage_skills
    # If the battler is a blue mage actor using an "eating" skill
    if @active_battler.is_a?(Game_Actor) and
        BlueMageSystem::ACTORS.include?(@active_battler.id) and
        BlueMageSystem::EATING_SKILLS.include?(@skill.id)
      # Create a dummy interpreter to use DerVVulfman's Skill Leveling Script
      dummy_intrp = Interpreter.new
      # Loop through each enemy battler
      @target_battlers.each{|battler|
        next if battler.is_a?(Game_Actor)
        # Find the EXP list for this enemy
        exp_list = BlueMageSystem.exp_list(battler.id).sort
        # Initialize the value of the actor's EXP list if it doesn't exist
        @active_battler.eat_counter[battler.id] = 0 if @active_battler.eat_counter[battler.id].nil?
        # If the enemy died from the skill and potential to "level-up"
        if battler.dead? and @active_battler.eat_counter[battler.id] < exp_list[exp_list.size-1]
          @active_battler.eat_counter[battler.id] += 1
          # If level up
          if exp_list.include?(@active_battler.eat_counter[battler.id])
            # Increase stats
            @active_battler.increase_stats(BlueMageSystem.give_stats(battler.id))
            # If the actor does not know the skill, learn it
            # Otherwise, level the skill up
            skill_id = BlueMageSystem.give_skills(battler.id)
            if @active_battler.skill_learn?(skill_id)
              dummy_intrp.skill_level_up(@active_battler.id, skill_id)
            else
              @active_battler.learn_skill(skill_id)
            end
          end
        end
      }
    end
  end
end

I wrote this while testing the Skill Leveling script at the same time. Looked fine to me.
2916
I'll see what I can do. Sounds like I need a module for configuration and modify Game_Actor/Battler.
2917
RMXP Script Database / Re: [XP] Advance Wars Engine
November 22, 2012, 05:31:29 pm
For the first release, I didn't plan on having that yet.
For controlling inventions, just give the player control of it before the battle begins (I mean, that's how they do it in the games).
2918
RMXP Script Database / Re: [XP] Advance Wars Engine
November 21, 2012, 09:03:44 pm
Wow, glad to see some nice responses! Makes me feel all the more motivated to get this out ASAP.  8)

@Memor-X
Oh damn. That's...a lot of ideas there. I was planning to allow players to control Black Hole inventions, but not the ability to capture them. I'll also add a configuration option that the user can set to make unit limits and restrictions. From a tournament perspective, some of those ideas are quite broken in power :haha: But, hey, this is an engine. What you do with it is totally up to you.

@candi
Thanks, I'd appreciate that. ;)

I hope to have a playable beta sometime next month. My checklist is quite heavy right now (mainly because the main menu stuff is 0% done right now...lots of notes and drawings though), but I guess it really all depends on how much school stuff is left to do (from the looks of it, not much).
2919
It should all be there in the User Manual.
5.1. Sprite Reference
2920
RMXP Script Database / [XP] Advance Wars Engine
November 20, 2012, 08:51:57 pm
Advance Wars Engine
Authors: KK20
Version: 0.1b
Type: Engine
Key Term: Misc System



Introduction

I wouldn't expect a large majority of you to know what the game Advance Wars is, so I might as well explain it briefly. Developed by Intelligent Systems (whom also did Fire Emblem, a game you should probably all be familiar with), Advance Wars is a turn-based strategy game of 2-4 players. Players control their own armies of tanks, battleships, and jet fighters to take down their opponents. Players also choose a Commanding Officer who has special abilities and skills to aid in combat (one CO can heal his units while another prefers using air units than sea units). There are a number of maps for players to choose from as well as a Campaign mode that pits the player to complete a number of objectives to a storyline.

This project/script will provide you with the necessary tools to create your own Advance Wars game (or just play a quick game with friends if you're not interested in making your own--the demo provides enough maps, units, and COs to play with).


Features


  • Comes packed with the basic essentials for any typical Advance Wars game.

  • Open Source--Write your own add-ons or edit the existing code.

  • More to come...




Screenshots

Videos of progress:
Gameplay Test #1
Update #6
Channel

Screenshots (OLD): ShowHide

CO Select Screen


Fog of War


User Interface stuff


Grit's Rocket attack range



Script
-GitHub Repository-
https://github.com/tcrane20/AdvanceWarsEngine

-Official Releases-
Version
v0.1b


Instructions

Instructions are located in the ReadMe.txt and UserManual.pdf files.


Compatibility

This engine is a complete backhand to RPG Maker XP. Of course any scripts meant for actual RPGs in mind will not work here at all. I don't see why you would even need to add any outside scripts to this engine anyways.


Credits and Thanks


  • KK20 - Project Leader

  • Blizzard - Multiple Inputs script and how to write errors to text files

  • game_guy - Manipulate comment lines in events and screenshot script

  • ForeverZer0 - Advanced Weather script and console debugging tool

  • GubiD - References to GTBS script

  • Selwyn - Window Class rewrite

  • Cogwheel - Audio MP3 Loop script (possibly be substituted for another script)

  • DerVVulfman - Mouse Input script

  • Legacy - High Priority script

  • Nintendo & Intelligent Systems - For creating the Advance Wars series and using their sprites and audio




Author's Notes

Spoiler: ShowHide

So why are you doing this?

Simple: I love this game. What? Not good enough of a reason?

For some of you RPG Maker XP users, you may have heard of a script called GubiD's Tactical Battle System. It was mentioned that an Advance Wars add-on would be created. Upon returning to the RMXP community, he replied that such a thing was already possible to make with the heavy use of events. I shook my head at this comment--there are WAY too many variables and factors you have to consider, so much so that eventing it would be a nightmare.

There have also been a few Advance Wars engines created, one of which is open-source (but in Java...my enemy) and another which allowed users to create their own campaigns, units, and CO's with a simple GUI. However, none of these felt like a true Advance Wars recreate, not to mention some had bugs, graphical errors, and (worst of all) I would not be able to change any of it.

I also started this project around the time I joined this website. I found it as a test of my Ruby scripting knowledge I've accumulated over the years. Plus, the feeling of doing something from scratch to completion is a great sensation.


What do you plan on doing?

Right now, I'm still in the "get everything finished so that I can release some kind of demo as soon as possible" mode. The engine has seen some changes:

  • Battle calculations have been changed

  • CO's have been modified

  • Friendlier user interface


But I also plan on trying to add as many features as possible of the original Advance Wars into the engine (some animations, AI, Campaign, Map Maker, and possibly online matches). I probably will include more features if this project gets further in the design process, but as of now, I just want a working game going.


Anything I can do to help?

As of now, I am doing all of this solo.

When the time comes around, I'd sure like some Testers. Throughout my scripting process, I have always come upon some small bugs that were difficult to find and reproduce, so many hands would be appreciated.

If you are super knowledgeable with Ruby scripting (and possibly RMX-OS when I get that far), I may require a couple Programmers.

Knowledgeable with the series in general? I'd love to hear some feedback, suggestions, and ideas. I'd love to do a few rounds with you as well (but as of now the only way I can play with others is through TeamViewer...trust issues ya know?)

Quote from: KK20 on November 29, 2012, 01:59:53 am
I want to add that I'm kinda looking for spriters or anyone good with making graphics if you want to make the default systems look nicer/better. I'm not desperate, but if you like this project and feel you want to help make it look its best, I'd appreciate it ;) (otherwise, everyone will just have to love my amateur spriting).

Also, if you would like to make a logo for the project, go for it. The only program I've ever needed to used is Paint, so my experience with graphics is pretty much zero. Again, I'm not desperate, but if you would like to support, please <3


Since I am not currently looking to make a standalone game, I'm not in the need of composers or writers.