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 - Launian

1
Hadn't had time to check it out. It works great (no surprises there :p) Still, will report any bugs I find.

Again, thanks a lot. For this, and all the other amazing scripts you've made for XP
2
RMXP Script Database / Re: [XP] Stat Distribution System
September 29, 2012, 01:07:37 pm
Soooo... it was easier to do that than to ensure it'd round up properly? xD

And, for now, I deleted this part; not sure if it helps:

 def update
    super
    return unless self.active
    if Input.press?(Input::R)
      if Input.repeat?(Input::RIGHT)
        if add_points(100)
          $game_system.se_play($data_system.cursor_se)
          draw_item(self.index)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      elsif Input.repeat?(Input::LEFT)
        if remove_points(100)
          $game_system.se_play($data_system.cursor_se)
          draw_item(self.index)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      end
    elsif Input.press?(Input::L)
      if Input.repeat?(Input::RIGHT)
        if add_points(10)
          $game_system.se_play($data_system.cursor_se)
          draw_item(self.index)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      elsif Input.repeat?(Input::LEFT)
        if remove_points(10)
          $game_system.se_play($data_system.cursor_se)
          draw_item(self.index)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      end
    elsif Input.repeat?(Input::RIGHT)
      if add_points(1)
        $game_system.se_play($data_system.cursor_se)
        draw_item(self.index)
      else
        $game_system.se_play($data_system.buzzer_se)
      end
    elsif Input.repeat?(Input::LEFT)
      if remove_points(1)
        $game_system.se_play($data_system.cursor_se)
        draw_item(self.index)
      else
        $game_system.se_play($data_system.buzzer_se)
      end
    end
  end


And left just the add_points(1) parts.
3
RMXP Script Database / Re: [XP] Stat Distribution System
September 29, 2012, 12:46:28 pm
Because you don't like decimals? Lol I have no idea. I guess it was easier than scripting it so it wouldn't draw the numbers as 999.899999997 or something, right? Easier to write something like "if string is negative, @spent = @spent * string)" than making a function for rounding up the result, I guess.

And yes, my example is bad, and I should feel bad. Please refrain from pointing out :P

EDIT: It seems to work great! I just found a little bug: say you have a MaxHP of 500, then add 200 HP to it. Then, you hold the R key and click the left arrow (R+key adds/substracts 1000), and you'd end up with -300 MaxHP and 80 DP more than whatever you started with. Same with the L key. And it is possible to lower your MaxHP with this.

Anyways, thank you for the script! =D
4
RMXP Script Database / Re: [XP] Stat Distribution System
September 28, 2012, 01:19:24 pm
Ok then, apology accepted  :haha: No, seriously, thank you. Can't imagine how many questions and requests like this you get per script, and considering just how many you make...
5
RMXP Script Database / Re: [XP] Stat Distribution System
September 28, 2012, 03:52:35 am
Yeah, I tried setting up the costs as 0.1, but it did turn the results on decimals, and I'd end up with 999.899999995 of HP, and stuff like that.

Anyways, thank you for the responses, and I'm sorry for being such a nuisance.
6
RMXP Script Database / Re: [XP] Stat Distribution System
September 28, 2012, 02:00:03 am
Quote from: KK20 on September 27, 2012, 07:58:56 pm
Quote from: Launian on September 27, 2012, 06:24:17 pm
Sadly, this doesn't change the behaivor of the stat distribution window, wich means that, if you allocate 1 DP to your HP, it'll show 501 instead of 510 until you click on Accept Changes. I can't find out how to make it so the window reflects the fact that it adds 10 HP instead of 1, but leaving alone the Stats (STR, DEX, etc.).

That would be this line:
self.contents.draw_text(116, y, 64, 32,
       (@current[i] + @spent[i] / BlizzCFG::ExchangeRates[i]).to_s, 2)
Simple use of case i can make it possible.


Yeah, I found out that was the line that draws the numbers, but I couldn't figure out how to set up the case i function  :( I tried to make it draw the lines separately (using 6 self.content commands), but it wouldn't work. It'd update all the lines whenever I allocated one point to any skill.

Any advice on how to do it? Just a pointer, mind you. It'd be nice to learn how to do it at last.

Edit:

I tried this, but it didn't work; all the text is drawn on the MaxSP place:

    case
    when @actor.maxhp then
    self.contents.draw_text(116, 32, 64, 32,
    (@actor.maxhp + (@spent[i] * 10) / BlizzCFG::ExchangeRates[i]).to_s, 2)
    when @actor.maxsp then
    self.contents.draw_text(116, 96, 64, 32,
    (@actor.maxsp + (@spent[i] * 10) / BlizzCFG::ExchangeRates[i]).to_s, 2)
    when @actor.str then
    self.contents.draw_text(116, 96, 64, 32,
    (@actor.str + @spent[i] / BlizzCFG::ExchangeRates[i]).to_s, 2)
    when @actor.dex then
    self.contents.draw_text(116, 128, 64, 32,
    (@actor.dex + @spent[i] / BlizzCFG::ExchangeRates[i]).to_s, 2)
    when @actor.agi then
    self.contents.draw_text(116, 160, 64, 32,
    (@actor.agi + @spent[i] / BlizzCFG::ExchangeRates[i]).to_s, 2)
    when @actor.int then
    self.contents.draw_text(116, 192, 64, 32,
    (@actor.int + @spent[i] / BlizzCFG::ExchangeRates[i]).to_s, 2)
    end
7
RMXP Script Database / Re: [XP] Diary
September 28, 2012, 01:57:32 am
Quote from: KK20 on September 27, 2012, 07:56:53 pm
Quote from: Launian on September 27, 2012, 03:39:42 pm
Hello. I'm just wondering: is there any way I can put line jumps on the script? I've been fooling around with it, and I can't figure it out.

Clicky


Thank you so much! =D Worked great.
8
RMXP Script Database / Re: [XP] Stat Distribution System
September 27, 2012, 06:24:17 pm
Quote from: sirSLR on March 15, 2012, 03:34:58 pm
can i edit something so that 1 dp rises 10 hp or sp instead of 1=1  ?


Find this part:

def apply_new_attributes
    @actor.maxhp += @spent[0] / BlizzCFG::HP_DP_COST
    @actor.maxsp += @spent[1]  / BlizzCFG::SP_DP_COST
    @actor.str += @spent[2] / BlizzCFG::STR_DP_COST
    @actor.dex += @spent[3] / BlizzCFG::DEX_DP_COST
    @actor.agi += @spent[4] / BlizzCFG::AGI_DP_COST
    @actor.int += @spent[5] / BlizzCFG::INT_DP_COST
    @actor.dp -= @spent.sum
    self.actor = @actor
  end


and then change it for this:

def apply_new_attributes
    @actor.maxhp += (@spent[0] * 10) / BlizzCFG::HP_DP_COST
    @actor.maxsp += (@spent[1] * 10) / BlizzCFG::SP_DP_COST
    @actor.str += @spent[2] / BlizzCFG::STR_DP_COST
    @actor.dex += @spent[3] / BlizzCFG::DEX_DP_COST
    @actor.agi += @spent[4] / BlizzCFG::AGI_DP_COST
    @actor.int += @spent[5] / BlizzCFG::INT_DP_COST
    @actor.dp -= @spent.sum
    self.actor = @actor
  end


Sadly, this doesn't change the behaivor of the stat distribution window, wich means that, if you allocate 1 DP to your HP, it'll show 501 instead of 510 until you click on Accept Changes. I can't find out how to make it so the window reflects the fact that it adds 10 HP instead of 1, but leaving alone the Stats (STR, DEX, etc.).
9
RMXP Script Database / Re: [XP] Diary
September 27, 2012, 03:39:42 pm
Hello. I'm just wondering: is there any way I can put line jumps on the script? I've been fooling around with it, and I can't figure it out.

What I need is to make some sort of list, something like:

Hotkeys:

1 - Equipment Window
2 - Item Window
3 - Status Window
...


Something like that. Any ideas?
10
Quote from: ForeverZer0 on March 11, 2012, 02:46:45 am
Take a closer look at the config:

Spoiler: ShowHide
  # Filenames of character pictures. 
  def self.character_pic(id)
    file = case id
    when 1 then 'Aluxes'
    when 2 then 'Hilda'
    when 3 then 'Basil'
    end
    return file != nil ? RPG::Cache.picture("Journal/#{file}") : Bitmap.new(1,1)
  end



Thanks a lot, I finally found it! Have to replace the code line from the first post with:

Quotebitmap = RPG::Cache.battler("Bio/#{@actor.battler_name}", @actor.battler_hue)


:haha:

Now my problem is that the battlers end up "over" the text (if you think of it as layers, they're on the highest layer), so I can't read the text =/ Any idea how to fix that?
11
Script Requests / Re: FFXIII-like Encyclopedya
March 11, 2012, 02:45:26 am
Yeah, problem is I don't know near enough rgss to do it myself lol Pretty much the only thing I can do is cut/paste/delete, and I really don't have any idea how to go about it. Any suggestions?
12
Thanks; that's pretty much what Rune's script has. My problem is, I want the script to take the image from a certain folder (not the battlers' default one), but I have no idea how to do it <.< Like, if you wanted to put a face, for example, instead of the battler. How'd you do that?
13
Script Requests / FFXIII-like Encyclopedya
March 11, 2012, 01:53:48 am
Well, what I'd like is a script wich behave like a quest book or a bestiary, but is actually made up of entries made through script calls in-game. If anyone has played FFXIII-II, then what I'd like is something like the "Fragments" list: entries wich give the player some info about a certain topic (a person, a town, a group of people), but wich can be updated through script calls.

The only thing I found wich resembles what I want is this script:

Diary - by ForeverZer0

Sadly, with it you can't select wich entry you want, so it'd be annoying when looking for a certain subject.

Well, I hope I made myself clear. And ofc, thanks in advance for any help you can give me.

Yours,
Laun~
14
Hello, everyone. I wanted to know if any of you guys could help me with a little problem I encountered while setting up this script:

When it draws the bio window, it takes the default battler and doubles its size (hence making it all blurry and awful), but I'd like to get a higher-resolution pic in there (I got the pictures alredy, on the subfolder Graphics\Battlers\Bio\).

Now, the part of the code that selects the image (as far as I can tell, anyways) is this:


bitmap = RPG::Cache.battler(@actor.battler_name, @actor.battler_hue)


If anyone knows the answer just from reading my post, great. If not, then here's the whole script:

Spoiler: ShowHide
=begin
=================================
     Character biography script (revised with pictures)
                             By Rune
                 Revision 1.3 by statesman88
            Expanded from Mr. Wiggles' revision
=================================
Introduction
=================================
This is a script that calls a window that displays different
aspects about a character... like their age, height, weight,
gender etc. These can be changed though. This script is
free to use and edit as long as credit is given to me.
=================================
Edits
=================================
-1.3: Fixed $defaultfontsize error
-Deleted Biography subsection, since I don't think you need
a Biography and a History
-Added the battler image of the actor. If the image is small
enough, it will be doubled in size. (To be doubled, the
original image must fit within one of two boxes: 224x144
px OR 112x208 px.)
=================================
Instructions
=================================
Insert this script above main, and call it Scene_Biography.
Then, ctrl + f to search for the different aspects of
characters you wish to change, so for a character's age,
you would search biog_age, and for gender you would
search, biog_gender. Each aspect is listed in the
character's order in the database, and the different stats
of each character are set at default to (what I think of)
the default 8 characters.

Once the script is in your game, you may wish to add it
to your menu. To do so... in Scene_Menu make a new
option, and add it into the comand_window list. Then go
down to the first time it says "when 0", 'when 1" etc and
copy and paste the status, equip or skill responses. Then
go all the way down to where it says "when 1", "when 2"
etc, and type this.

$game_system.se_play($data_system.decision_se)
$scene = Scene_Biography.new(@status_window.index)

If you don't know how to do that then just tell me, and
i'll help you out, and if you need any more help,
PM me ;)
=================================
Any last words?
=================================
Again PM me if you need any help in changing the text or
anything like that, though even non-scripters should be
able to do that. And enjoy ;)
=end


class Window_Base
 def biog_color
   return Color.new(0, 255, 160)
 end
 def draw_actor_name(actor, x, y)
   self.contents.font.color = normal_color
   self.contents.draw_text(x, y, 120, 32, actor.name)
 end
end

class Window_Biography < Window_Base
 def initialize(actor)
   super(0, 0, 640, 480)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = Font.default_name
   self.contents.font.size = Font.default_size
      # Rune's code; may be for compatibility with a certain message system?
      # self.contents.font.name = $defaultfonttype
      # self.contents.font.size = $defaultfontsize
   @actor = actor
   refresh
 end
 def refresh
   self.contents.font.color = biog_color
   self.contents.draw_text(0, 0, 80, 32, "Name:")
   self.contents.draw_text(0, 32, 80, 32, "Age:")
   self.contents.draw_text(0, 64, 80, 32, "Gender:")
   self.contents.draw_text(0, 96, 80, 32, "Race:")
   self.contents.draw_text(0, 128, 80, 32, "Profession:")
   self.contents.draw_text(0, 160, 80, 32, "Height:")
   self.contents.draw_text(0, 192, 80, 32, "Weapon:")
   self.contents.draw_text(0, 224, 80, 32, "From:")
   self.contents.draw_text(0, 256, 80, 32, "Specialty:")
   self.contents.draw_text(0, 288, 80, 32, "History:")
   self.contents.font.color = normal_color
   draw_actor_name(@actor, 96, 0)
   biog_age
   biog_gender
   biog_race
   biog_height
   biog_weight
   biog_weapon
   biog_from
   biog_specialty
   biog_history
   biog_pic
 end
 def biog_age
   case(@actor.id)
   when 1
     self.contents.draw_text(96, 32, 64, 32, "17")
   when 2
     self.contents.draw_text(96, 32, 64, 32, "16")
   when 3
     self.contents.draw_text(96, 32, 64, 32, "19")
   when 4
     self.contents.draw_text(96, 32, 64, 32, "24")
   when 5
     self.contents.draw_text(96, 32, 64, 32, "17")
   when 6
     self.contents.draw_text(96, 32, 64, 32, "14")
   when 7
     self.contents.draw_text(96, 32, 64, 32, "16")
   when 8
     self.contents.draw_text(96, 32, 64, 32, "22")
   end
 end
 def biog_gender
   case(@actor.id)
   when 1
     self.contents.draw_text(96, 64, 96, 32, "Male")
   when 2
     self.contents.draw_text(96, 64, 96, 32, "Female")
   when 3
     self.contents.draw_text(96, 64, 96, 32, "Male")
   when 4
     self.contents.draw_text(96, 64, 96, 32, "Male")
   when 5
     self.contents.draw_text(96, 64, 96, 32, "Female")
   when 6
     self.contents.draw_text(96, 64, 96, 32, "Male")
   when 7
     self.contents.draw_text(96, 64, 96, 32, "Female")
   when 8
     self.contents.draw_text(96, 64, 96, 32, "Female")
   end
 end
 def biog_race
   case(@actor.id)
   when 1
     self.contents.draw_text(96, 96, 96, 32, "Human")
   when 2
     self.contents.draw_text(96, 96, 96, 32, "Human")
   when 3
     self.contents.draw_text(96, 96, 96, 32, "Human")
   when 4
     self.contents.draw_text(96, 96, 96, 32, "Elf")
   when 5
     self.contents.draw_text(96, 96, 96, 32, "Anthalus")
   when 6
     self.contents.draw_text(96, 96, 96, 32, "Half-Elf")
   when 7
     self.contents.draw_text(96, 96, 96, 32, "Elf")
   when 8
     self.contents.draw_text(96, 96, 96, 32, "Human")
   end
 end
 def biog_height
   case(@actor.id)
   when 1
     self.contents.draw_text(96, 160, 64, 32, "5' 7''")
   when 2
     self.contents.draw_text(96, 160, 64, 32, "5' 4''")
   when 3
     self.contents.draw_text(96, 160, 64, 32, "5' 8''")
   when 4
     self.contents.draw_text(96, 160, 64, 32, "6' 0''")
   when 5
     self.contents.draw_text(96, 160, 64, 32, "5' 6''")
   when 6
     self.contents.draw_text(96, 160, 64, 32, "5' 2''")
   when 7
     self.contents.draw_text(96, 160, 64, 32, "5' 5''")
   when 8
     self.contents.draw_text(96, 160, 64, 32, "5' 9''")
   end
 end
 def biog_weight
   case(@actor.id)
   when 1
     self.contents.draw_text(96, 128, 128, 32, "Knight")
   when 2
     self.contents.draw_text(96, 128, 128, 32, "Mage")
   when 3
     self.contents.draw_text(96, 128, 128, 32, "Paladin")
   when 4
     self.contents.draw_text(96, 128, 128, 32, "Assassin")
   when 5
     self.contents.draw_text(96, 128, 128, 32, "Cleric")
   when 6
     self.contents.draw_text(96, 128, 128, 32, "Mage")
   when 7
     self.contents.draw_text(96, 128, 128, 32, "Hunter")
   when 8
     self.contents.draw_text(96, 128, 128, 32, "11 st 2 lbs")
   end
 end
 def biog_weapon
   case(@actor.id)
   when 1
     self.contents.draw_text(96, 192, 128, 32, "Sword")
   when 2
     self.contents.draw_text(96, 192, 128, 32, "Wands")
   when 3
     self.contents.draw_text(96, 192, 96, 32, "Lance")
   when 4
     self.contents.draw_text(96, 192, 160, 32, "Knives/Wristbands")
   when 5
     self.contents.draw_text(96, 192, 160, 32, "Staffs")
   when 6
     self.contents.draw_text(96, 192, 96, 32, "Wands")
   when 7
     self.contents.draw_text(96, 192, 96, 32, "Distance Weapons")
   when 8
     self.contents.draw_text(96, 192, 96, 32, "Rod")
   end
 end
 def biog_from
   case(@actor.id)
   when 1
     self.contents.draw_text(96, 224, 160, 32, "Random Town")
   when 2
     self.contents.draw_text(96, 224, 160, 32, "Random Castle")
   when 3
     self.contents.draw_text(96, 224, 160, 32, "Random City")
   when 4
     self.contents.draw_text(96, 224, 160, 32, "Random Village")
   when 5
     self.contents.draw_text(96, 224, 160, 32, "Random Elf Village")
   when 6
     self.contents.draw_text(96, 224, 160, 32, "Random City")
   when 7
     self.contents.draw_text(96, 224, 160, 32, "Random Village")
   when 8
     self.contents.draw_text(96, 224, 160, 32, "Random Town")
   end
 end
 def biog_specialty
   case(@actor.id)
   when 1
     self.contents.draw_text(96, 256, 160, 32, "High damage")
   when 2
     self.contents.draw_text(96, 256, 160, 32, "Destructive Magic")
   when 3
     self.contents.draw_text(96, 256, 160, 32, "Defender")
   when 4
     self.contents.draw_text(96, 256, 160, 32, "Stealth")
   when 5
     self.contents.draw_text(96, 256, 160, 32, "Healing Magic")
   when 6
     self.contents.draw_text(96, 256, 160, 32, "Support Magic")
   when 7
     self.contents.draw_text(96, 256, 160, 32, "Multi-attacking")
   when 8
     self.contents.draw_text(96, 256, 160, 32, "Black Magic")
   end
 end
 def biog_history
   case(@actor.id)
   when 1
     self.contents.draw_text(96, 288, 288, 32, "Insert first line of history here")
     self.contents.draw_text(96, 320, 288, 32, "Insert second line of history here")
     self.contents.draw_text(96, 352, 288, 32, "Insert third line of history here")
     self.contents.draw_text(96, 384, 288, 32, "Insert fourth line of history here")
     self.contents.draw_text(96, 416, 288, 32, "Insert fifth line of history here")
   when 2
     self.contents.draw_text(96, 288, 288, 32, "Insert first line of history here")
     self.contents.draw_text(96, 320, 288, 32, "Insert second line of history here")
     self.contents.draw_text(96, 352, 288, 32, "Insert third line of history here")
     self.contents.draw_text(96, 384, 288, 32, "Insert fourth line of history here")
     self.contents.draw_text(96, 416, 288, 32, "Insert fifth line of history here")
   when 3
     self.contents.draw_text(96, 288, 288, 32, "Insert first line of history here")
     self.contents.draw_text(96, 320, 288, 32, "Insert second line of history here")
     self.contents.draw_text(96, 352, 288, 32, "Insert third line of history here")
     self.contents.draw_text(96, 384, 288, 32, "Insert fourth line of history here")
     self.contents.draw_text(96, 416, 288, 32, "Insert fifth line of history here")
   when 4
     self.contents.draw_text(96, 288, 288, 32, "Insert first line of history here")
     self.contents.draw_text(96, 320, 288, 32, "Insert second line of history here")
     self.contents.draw_text(96, 352, 288, 32, "Insert third line of history here")
     self.contents.draw_text(96, 384, 288, 32, "Insert fourth line of history here")
     self.contents.draw_text(96, 416, 288, 32, "Insert fifth line of history here")
   when 5
     self.contents.draw_text(96, 288, 288, 32, "Insert first line of history here")
     self.contents.draw_text(96, 320, 288, 32, "Insert second line of history here")
     self.contents.draw_text(96, 352, 288, 32, "Insert third line of history here")
     self.contents.draw_text(96, 384, 288, 32, "Insert fourth line of history here")
     self.contents.draw_text(96, 416, 288, 32, "Insert fifth line of history here")
   when 6
     self.contents.draw_text(96, 288, 288, 32, "Insert first line of history here")
     self.contents.draw_text(96, 320, 288, 32, "Insert second line of history here")
     self.contents.draw_text(96, 352, 288, 32, "Insert third line of history here")
     self.contents.draw_text(96, 384, 288, 32, "Insert fourth line of history here")
     self.contents.draw_text(96, 416, 288, 32, "Insert fifth line of history here")
   when 7
     self.contents.draw_text(96, 288, 288, 32, "Insert first line of history here")
     self.contents.draw_text(96, 320, 288, 32, "Insert second line of history here")
     self.contents.draw_text(96, 352, 288, 32, "Insert third line of history here")
     self.contents.draw_text(96, 384, 288, 32, "Insert fourth line of history here")
     self.contents.draw_text(96, 416, 288, 32, "Insert fifth line of history here")
   when 8
     self.contents.draw_text(96, 288, 288, 32, "Insert first line of history here")
     self.contents.draw_text(96, 320, 288, 32, "Insert second line of history here")
     self.contents.draw_text(96, 352, 288, 32, "Insert third line of history here")
     self.contents.draw_text(96, 384, 288, 32, "Insert fourth line of history here")
     self.contents.draw_text(96, 416, 288, 32, "Insert fifth line of history here")
   end
 end
 def biog_pic
     bitmap = RPG::Cache.battler(@actor.battler_name, @actor.battler_hue)
     @biogpicwidth = bitmap.width
     @biogpicheight = bitmap.height
         # Prepare to align image with upper right corner (32 pixel margin)
     @biogpicx = 602 - @biogpicwidth
     @bigbiogpicx = 602 - bitmap.width
         # Checks whether the image is small enough to be doubled; it will
         # only use stretch_blt if it fits into 224x144 px OR 112x208 px
         # before being enlarged.
    self.contents.stretch_blt(Rect.new(@biogpicx, 32, @biogpicwidth, @biogpicheight), bitmap, Rect.new(0, 0, bitmap.width, bitmap.height))    
 end
end

class Scene_Biography
 def initialize(actor_index = 0)
   @actor_index = actor_index
 end
 def main
   @actor = $game_party.actors[@actor_index]
   @biog_window = Window_Biography.new(@actor)
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @biog_window.dispose
 end
 def update
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to menu screen
     $scene = Scene_Map.new
     return
   end
   if Input.trigger?(Input::R)
     $game_system.se_play($data_system.cursor_se)
     @actor_index += 1
     @actor_index %= $game_party.actors.size
     $scene = Scene_Biography.new(@actor_index)
     return
   end
   if Input.trigger?(Input::L)
     $game_system.se_play($data_system.cursor_se)
     @actor_index += $game_party.actors.size - 1
     @actor_index %= $game_party.actors.size
     $scene = Scene_Biography.new(@actor_index)
     return
   end
 end
end


Nevermind the names or any other info in there =p My project is still a long way from finished.

Anyways, thanks a lot for anyone who takes the time to take a look at this. And if you need any more info, let me know.
15
RMXP Script Database / Re: [XP] Party Item Limit
June 26, 2010, 05:29:47 pm
Quote from: Sacred Nym on June 26, 2010, 04:23:55 pm
I noticed a flaw in this script where it won't check if you can carry your entire purchase when at a shop. If you can't it just gives you what you can carry but you still pay for everything else.


True. Here's a little edit in order to avoid that:

Edited: The last fix had a bug where you couldn't sell items if you had more the max number of items. Anyways, here's another fix, hopefully this one will have no bugs:

Spoiler: ShowHide
Change your Shop_Scene (I'm using the default one) for this one:
#==============================================================================
# ** Scene_Shop
#------------------------------------------------------------------------------
#  This class performs shop screen processing.
#==============================================================================

class Scene_Shop
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   # Make help window
   @help_window = Window_Help.new
   # Make command window
   @command_window = Window_ShopCommand.new
   # Make gold window
   @gold_window = Window_Gold.new
   @gold_window.x = 480
   @gold_window.y = 64
   # Make dummy window
   @dummy_window = Window_Base.new(0, 128, 640, 352)
   # Make buy window
   @buy_window = Window_ShopBuy.new($game_temp.shop_goods)
   @buy_window.active = false
   @buy_window.visible = false
   @buy_window.help_window = @help_window
   # Make sell window
   @sell_window = Window_ShopSell.new
   @sell_window.active = false
   @sell_window.visible = false
   @sell_window.help_window = @help_window
   # Make quantity input window
   @number_window = Window_ShopNumber.new
   @number_window.active = false
   @number_window.visible = false
   # Make status window
   @status_window = Window_ShopStatus.new
   @status_window.visible = false
   # Execute transition
   Graphics.transition
   # Main loop
   loop do
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
     # Abort loop if screen is changed
     if $scene != self
       break
     end
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose of windows
   @help_window.dispose
   @command_window.dispose
   @gold_window.dispose
   @dummy_window.dispose
   @buy_window.dispose
   @sell_window.dispose
   @number_window.dispose
   @status_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @help_window.update
   @command_window.update
   @gold_window.update
   @dummy_window.update
   @buy_window.update
   @sell_window.update
   @number_window.update
   @status_window.update
   # If command window is active: call update_command
   if @command_window.active
     update_command
     return
   end
   # If buy window is active: call update_buy
   if @buy_window.active
     update_buy
     return
   end
   # If sell window is active: call update_sell
   if @sell_window.active
     update_sell
     return
   end
   # If quantity input window is active: call update_number
   if @number_window.active
     update_number
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when command window is active)
 #--------------------------------------------------------------------------
 def update_command
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to map screen
     $scene = Scene_Map.new
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Branch by command window cursor position
     case @command_window.index
     when 0  # buy
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Change windows to buy mode
       @command_window.active = false
       @dummy_window.visible = false
       @buy_window.active = true
       @buy_window.visible = true
       @buy_window.refresh
       @status_window.visible = true
     when 1  # sell
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Change windows to sell mode
       @command_window.active = false
       @dummy_window.visible = false
       @sell_window.active = true
       @sell_window.visible = true
       @sell_window.refresh
     when 2  # quit
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to map screen
       $scene = Scene_Map.new
     end
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when buy window is active)
 #--------------------------------------------------------------------------
 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_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 == 0 ? 99 : $game_party.gold / @item.price
     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)
     @number_window.active = true
     @number_window.visible = true
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when sell window is active)
 #--------------------------------------------------------------------------
 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 == 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 / 2)
     @number_window.active = true
     @number_window.visible = true
     @status_window.visible = true
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when quantity input window is active)
 #--------------------------------------------------------------------------
 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)
     
     # 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
       case @item
       when RPG::Item
         if $game_party.get_item_total + @number_window.number <=  $game_system.max_items
         $game_party.gain_item(@item.id, @number_window.number)
         $game_party.lose_gold(@number_window.number * @item.price)
         $game_system.se_play($data_system.shop_se)
         else
         $game_system.se_play($data_system.cancel_se)
         end
       when RPG::Weapon
       if $game_party.get_item_total + @number_window.number <=  $game_system.max_items
         $game_party.gain_weapon(@item.id, @number_window.number)        
         $game_party.lose_gold(@number_window.number * @item.price)
         $game_system.se_play($data_system.shop_se)
         else
         $game_system.se_play($data_system.cancel_se)
         end
       when RPG::Armor
       if $game_party.get_item_total + @number_window.number <=  $game_system.max_items  
         $game_party.gain_armor(@item.id, @number_window.number)
         $game_party.lose_gold(@number_window.number * @item.price)
         $game_system.se_play($data_system.shop_se)
         else
         $game_system.se_play($data_system.cancel_se)
         end
       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
       case @item
       when RPG::Item
         $game_party.lose_item(@item.id, @number_window.number)
         $game_system.se_play($data_system.shop_se)
         $game_party.gain_gold(@number_window.number * (@item.price / 2))
       when RPG::Weapon
         $game_party.lose_weapon(@item.id, @number_window.number)
          $game_system.se_play($data_system.shop_se)
         $game_party.gain_gold(@number_window.number * (@item.price / 2))
       when RPG::Armor
         $game_party.lose_armor(@item.id, @number_window.number)
          $game_system.se_play($data_system.shop_se)
         $game_party.gain_gold(@number_window.number * (@item.price / 2))
       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



Hopefully that will solve it for good. If you find any bugs... well, I guess I'll try to fix them lol. Or if you can fix them, that's fine with me  :^_^':
16
RMXP Script Database / Re: [XP] Party Item Limit
June 25, 2010, 09:18:37 pm
Well, here are some lines of code that some people might find usefull (to be used with the first version):

To print the current number of items and the max number of items on a window (maybe replacing the steps/playtime window on the menu) :
self.contents.draw_text(4, 20, 120, 32, $game_party.get_item_total.to_s + "/" + $game_system.max_items.to_s)


If you decide to upgrade the "bag" on a constant basis (20 items each time, for example), you can use this to show the next size of your bag:

self.contents.draw_text(4, 60, 120, 32, ($game_system.max_items + 20).to_s)


You can replace the 20 for any other number, so if you have a item cap of 20, it'll show 40.

Also, I guess people know this alredy, but you can use this to sum certain number of items instead of giving a real number (usefull if you want to make some kind of upgrade bag shop, I guess) :

$game_system.max_items = 
$game_system.max_items + n


Where n is the number of allowed items you want to give to the player.

I know it's very basic stuff, but I wanted to thanks for the script, so I thought I'd might as well share the little stuff I found out, in case another noob like me comes and wants to do any of that. So... thanks for the script  :^_^':
17
Well, I was messing around with the Crafting/recipe System made by Deke, wich is posted on Creatium Asylum by Dubealex (Here is a link to the original post. If anyone knows of any problem quoting this script, please let me know.

Well my problem is the following: when I go into the crafting scene, I want the window with the info to show if there's any parameter that is changed by the item (MAxHP/SP, STR, etc.), and to show the name of that parameter, but without having to put all 6 of them on the window. I managed to show the points that the item gives you, but I don't know how to do it for the name of the parameters.

Here's the original script (found on the link above):

#================================
# CRAFTING PROGRAM
#----------------------------------------------------------------
#-written by Deke
#-yes_no window code created by Phsylomortis
#----------------------------------------------------------------
#================================

#updates to Game_Party class

class Game_Party

attr_accessor       :recipes

alias crafting_party_initialize initialize

def initialize
 crafting_party_initialize
 @recipes=[]
end

#----------------------------------------------------------------------
def know?(recipe, version = 1)
 unless recipe.is_a?(Game_Recipe)
   recipe = get_recipe_from_master_list(recipe, version)
 end
 return $game_party.recipes.include?(recipe)
end

#----------------------------------------------------------------------
def learn_recipe(recipe , version = 1)
 unless recipe.is_a?(Game_Recipe)
   recipe = get_recipe_from_master_list(recipe, version)
 end
 if recipe.is_a?(Game_Recipe)
   unless know?(recipe)
     @recipes.push(recipe)
   end
 end
end

#----------------------------------------------------------------------
def forget_recipe(recipe , version = 1)
 if !recipe.is_a?(Game_Recipe)
   recipe = get_recipe_from_master_list(recipe, version)
 end
 if recipe.is_a?(Game_Recipe)
   for i in 0...@recipes.size
     if recipe == @recipes[i]
       index = i
       break
     end
   end
   if index != nil
     @recipes.delete(@recipes[index])
   end
 end
end

#----------------------------------------------------------------------
def get_recipe_from_master_list(item, version)
 index = nil
 for i in 0...$game_temp.recipe_list.size
   if item[0] == $game_temp.recipe_list[i].result and item[1] ==$game_temp.recipe_list[i].result_type
     version -= 1
     if version == 0
       index = i
       break
     end
   end
 end
 if index.is_a?(Integer)
   return ($game_temp.recipe_list[index])
 else
   return false
 end
end

end # of Game_Party updates

#================================
class Game_Recipe

attr_reader :ingredients
attr_reader :quantities
attr_reader :result
attr_reader :result_type
attr_reader :ingredient_types

#----------------------------------------------------------------------
def initialize( ingredients, ingredient_types, quantities, result, result_type)
 @ingredients = ingredients
 @ingredient_types = ingredient_types
 @quantities = quantities
 @result = result
 @result_type = result_type
end

#----------------------------------------------------------------------
def name
 case @result_type
   when 0
     name = $data_items[@result].name
   when 1
     name = $data_armors[@result].name
   when 2
     name = $data_weapons[@result].name
 end
 return name
end

#----------------------------------------------------------------------
def have
 have_all = true
 for i in 0...@ingredients.size
   case @ingredient_types[i]
     when 0
       if $game_party.item_number(@ingredients[i]) < @quantities[i]
         have_all=false
       end
     when 1
       if $game_party.armor_number(@ingredients[i]) < @quantities[i]
         have_all=false
       end
     when 2
       if $game_party.weapon_number(@ingredients[i]) < @quantities[i]
         have_all=false
       end
   end
 end
 return have_all
end

#----------------------------------------------------------------------
def decrement
 for i in 0...@ingredients.size
   case @ingredient_types[i]
   when 0
     $game_party.lose_item(@ingredients[i], @quantities[i])
   when 1
     $game_party.lose_armor(@ingredients[i], @quantities[i])
   when 2
     $game_party.lose_weapon(@ingredients[i], @quantities[i])
   end
 end
end

#----------------------------------------------------------------------
def make
 if have
   case @result_type
   when 0
     $game_party.gain_item(@result, 1)
   when 1
     $game_party.gain_armor(@result, 1)
   when 2
     $game_party.gain_weapon(@result, 1)
   end
   decrement
 end
end

#----------------------------------------------------------------------
def == (recipe)
 if recipe.is_a?(Game_Recipe)
   equal = true
   if recipe.ingredients != self.ingredients
     equal = false
   end
   if recipe.ingredient_types != self.ingredient_types
     equal = false
   end
   if recipe.quantities != self.quantities
     equal = false
   end
   if recipe.result != self.result
     equal=false
   end
   if recipe.result_type != self.result_type
     equal = false
   end
 else
   equal = false
 end
 return equal
end

end # of Game_Recipe class

#===================================

class Window_Craft < Window_Selectable

#--------------------------------------------------------------------------
def initialize
 super(0, 64, 240, 416)
 @column_max = 1
 refresh
 self.index = 0
end

#--------------------------------------------------------------------------
def recipe
 return @data[self.index]
end

#--------------------------------------------------------------------------
def refresh
 if self.contents != nil
   self.contents.dispose
   self.contents = nil
 end
 @data = []
 for i in 0...$game_party.recipes.size
     @data.push($game_party.recipes[i])
 end
 @item_max = @data.size
 if @item_max > 0
   self.contents = Bitmap.new(width - 32, row_max * 32)
   self.contents.font.name = $fontface.is_a?(String) ? $fontface : $defaultfonttype
   self.contents.font.size = $fontsize.is_a?(Integer) ? $fontsize : $defaultfontsize
   for i in 0...@item_max
     draw_item(i)
   end
 end
end

#--------------------------------------------------------------------------
def draw_item(index)
 recipe = @data[index]
 self.contents.font.color = recipe.have ? normal_color : disabled_color
 x = 16
 y = index * 32
 self.contents.draw_text(x , y, self.width-32, 32, recipe.name, 0)
end

#--------------------------------------------------------------------------
def update_help
 current_recipe = recipe
 if current_recipe.is_a?(Game_Recipe)
 case current_recipe.result_type
   when 0
     description = $data_items[current_recipe.result].description
   when 1
     description = $data_armors[current_recipe.result].description
   when 2
     description = $data_weapons[current_recipe.result].description
   end
 else
   description = ""
 end
 @help_window.set_text(description)
 @help_window.update
end

end # of Window_Craft

#=======================================
class Window_CraftResult < Window_Base

#--------------------------------------------------------------------------
def initialize
 super(240, 64, 400, 184)
 self.contents = Bitmap.new(width - 32, height - 32)
 self.contents.font.name = $fontface.is_a?(String) ? $fontface : $defaultfonttype
 self.contents.font.size = 20
 @result = nil
 @type = nil
end

#--------------------------------------------------------------------------
def refresh
 self.contents.clear
 case @type
   when 0
     item = $data_items[@result]
     if item.recover_hp_rate > item.recover_hp
       hp_string = "HP Recovery %:"
       hp_stat = item.recover_hp_rate
     else
       hp_string = "HP Recovery Points:"
       hp_stat = item.recover_hp
     end
     if item.recover_sp_rate > item.recover_sp
       sp_string = "SP Recovery %:"
       sp_stat = item.recover_sp_rate
     else
       sp_string = "SP Recovery Points:"
       sp_stat = item.recover_sp
     end
     @strings = [hp_string, sp_string, "Phy. Def:" , "Mag Def:", "Accuracy:", "Variance:", "Points Raised",]
     @stats = [hp_stat, sp_stat, item. pdef_f, item.mdef_f, item.hit, item.variance, item.parameter_points,
                    $game_party.item_number(@result)]
     @bitmap = RPG::Cache.icon(item.icon_name)
   when 1
     item = $data_armors[@result]
     @strings = ["Phy. Def:", "Mag. Def:", "Evasion plus:", "Strength plus:", "Dex. plus:",
                    "Agility plus:", "Int. plus:"]
     @stats = [item.pdef, item.mdef, item.eva, item.str_plus, item.dex_plus,
                 item.agi_plus, item.int_plus, $game_party.armor_number(@result) ]
     @bitmap = RPG::Cache.icon(item.icon_name)
   when 2
     item = $data_weapons[@result]
     @strings =["Attack Power:", "Phy. Def:", "Mag. Def:", "Strength plus:", "Dex. plus:",
                 "Agility plus:", "Int. plus:"]
     @stats = [item.atk, item.pdef, item.mdef, item.str_plus, item.dex_plus,
                 item.agi_plus, item.int_plus, $game_party.weapon_number(@result) ]
     @bitmap = RPG::Cache.icon(item.icon_name)
 end
 for i in 0...@strings.size
   x = i%2 * 184
   y = i /2 *28 +32
   self.contents.font.color = normal_color
   self.contents.draw_text(x,y,100, 28,@strings[i])
   self.contents.font.color = system_color
   self.contents.draw_text(x + 110, y, 45, 28, @stats[i].to_s)
 end
 self.contents.blt(0, 0, @bitmap, Rect.new(0, 0, 24, 24), 255)
 self.contents.font.color= normal_color
 self.contents.draw_text(40, 0, 300, 28, "Quantity curentley owned:")
 self.contents.font.color = system_color
 count = @stats[@stats.size - 1].to_s
 self.contents.draw_text(294, 0, 45, 28, count )
end
 
#----------------------------------------------------------------------
def set_result(result , type)
 @result = result
 @type = type
 refresh
end

end #of Window_CraftResult

#=======================================
class Window_CraftIngredients < Window_Base

#--------------------------------------------------------------------------
def initialize
 super(240, 248, 400, 232)
 self.contents = Bitmap.new(width - 32, height - 32)
 self.contents.font.name = $fontface.is_a?(String) ? $fontface : $defaultfonttype
 self.contents.font.size = 20
 @ingredients = []
 @types = []
 @quantities = []
 @item = nil
 @count = 0
end

#--------------------------------------------------------------------------
def refresh
 self.contents.clear
 for i in 0...@ingredients.size
   case @types[i]
   when 0
     @item = $data_items[@ingredients[i]]
     @count = $game_party.item_number(@ingredients[i])
   when 1
     @item = $data_armors[@ingredients[i]]
     @count = $game_party.armor_number(@ingredients[i])
   when 2
     @item = $data_weapons[@ingredients[i]]
     @count = $game_party.weapon_number(@ingredients[i])
   end
   y = i *26
   self.contents.blt(0, y, RPG::Cache.icon(@item.icon_name), Rect.new(0, 0, 24, 24), 255)
   self.contents.font.color = @count >= @quantities[i] ? normal_color : disabled_color
   self.contents.draw_text(30, y, 280, 28, @item.name)
   self.contents.draw_text(300, y, 45, 28, @quantities[i].to_s)
   self.contents.font.color = system_color
   self.contents.draw_text(245, y, 45, 28, @count.to_s )    
 end
end
   
#--------------------------------------------------------------------------
def set_ingredients(ingredients , types, quantities)
 @ingredients = ingredients
 @types = types
 @quantities = quantities
 refresh
end

end # of Window_CraftIngredients

#======================================
class Scene_Craft

#--------------------------------------------------------------------------
def initialize(craft_index=0, return_scene = "")
 @craft_index=craft_index
 @return_scene = return_scene
end

#--------------------------------------------------------------------------
def main
 @craft_window = Window_Craft.new
 @craft_window.index=@craft_index
 @confirm_window = Window_Base.new(120, 188, 400, 64)
 @confirm_window.contents = Bitmap.new(368, 32)
 @confirm_window.contents.font.name = $fontface.is_a?(String) ? $fontface : $defaultfonttype
 @confirm_window.contents.font.size = $fontsize.is_a?(Integer) ? $fontsize : $defaultfontsize
 @help_window = Window_Help.new
 @craft_window.help_window = @help_window
 @result_window=Window_CraftResult.new
 @ingredients_window=Window_CraftIngredients.new
 @yes_no_window = Window_Command.new(100, ["Yes", "No"])
 @confirm_window.visible = false
 @confirm_window.z = 1500
 @yes_no_window.visible = false
 @yes_no_window.active = false
 @yes_no_window.index = 1
 @yes_no_window.x = 270
 @yes_no_window.y = 252
 @yes_no_window.z = 1500
 @label_window = Window_Base.new(450,200,190,52)
 @label_window.contents=Bitmap.new(@label_window.width - 32,@label_window.height - 32)
 @label_window.contents.font.size=20
 @label_window.contents.font.color = @label_window.normal_color
 @label_window.contents.font.name = $fontface.is_a?(String) ? $fontface : $defaultfonttype
 @label_window.contents.draw_text(0, 0, @label_window.contents.width, 20, "   Have    Need")
 Graphics.transition
 loop do
   Graphics.update
   Input.update
   update
   if $scene != self
     break
   end
 end
 Graphics.freeze
 @help_window.dispose
 @craft_window.dispose
 @result_window.dispose
 @ingredients_window.dispose
 @confirm_window.dispose
 @yes_no_window.dispose
 @label_window.dispose
end

#--------------------------------------------------------------------------
def update
 @craft_window.update
 @ingredients_window.update
 if $game_party.recipes.size > 0
   @result_window.set_result(@craft_window.recipe.result, @craft_window.recipe.result_type)
   @ingredients_window.set_ingredients(@craft_window.recipe.ingredients,
                                                        @craft_window.recipe.ingredient_types,
                                                        @craft_window.recipe.quantities)
 end
 if @craft_window.active
   update_craft
   return
 end
 if @yes_no_window.active
   confirm_update
   return
 end
end

#--------------------------------------------------------------------------
def update_craft
 if Input.trigger?(Input::B)
   $game_system.se_play($data_system.cancel_se)
   if @return_scene == "menu"
     $scene = Scene_Map.new
   else
     $scene = Scene_Map.new
   end
   return
 end
 if Input.trigger?(Input::C) and $game_party.recipes.size != 0
   @recipe = @craft_window.recipe
   if @recipe.have
     @yes_no_window.active = true
     @craft_window.active = false
   else
     $game_system.se_play($data_system.buzzer_se)
     return
   end
 end
end

#--------------------------------------------------------------------------
def confirm_update
 @craft_index = @craft_window.index
 @confirm_window.visible = true
 @confirm_window.z = 1500
 @yes_no_window.visible = true
 @yes_no_window.active = true
 @yes_no_window.z = 1500
 @yes_no_window.update
 string = "Create " + @recipe.name + "?"
 cw = @confirm_window.contents.text_size(string).width
 center = @confirm_window.contents.width/2 - cw /2
 unless @drawn
   @confirm_window.contents.draw_text(center, 0, cw, 30, string)
   @drawn = true
 end
 if Input.trigger?(Input::C)
   if @yes_no_window.index == 0
     $game_system.se_play($data_system.decision_se)
     @recipe.make
     $game_system.se_play($data_system.save_se)
     $scene=Scene_Craft.new(@craft_index)
   else
     $game_system.se_play($data_system.cancel_se)
     $scene=Scene_Craft.new(@craft_index)
   end
 end
 if Input.trigger?(Input::B)
   $game_system.se_play($data_system.cancel_se)
   $scene=Scene_Craft.new(@craft_index)
 end
end

end # of Scene_Craft


#================================
# Sample master list for crafting script
#----------------------------------------------------------------
#-written by Deke
#----------------------------------------------------------------
#================================

class Game_Temp
attr_reader :recipe_list

alias crafting_temp_initialize initialize

def initialize
  crafting_temp_initialize
  @recipe_list=[]
  get_recipe_list
end

def get_recipe_list
 
  #Polvorine Bar
  ingredients = [33,34,36]
  ingredient_types = [0,0,0]
  quantities = [1,1,1]
  result = 37
  result_type = 0
  @recipe_list.push(Game_Recipe.new(ingredients,ingredient_types,quantities,result,result_type))
 
  #Blood Crystal
  ingredients = [33,34,45]
  ingredient_types = [0,0,0]
  quantities = [1,1,1]
  result = 39
  result_type = 0
  @recipe_list.push(Game_Recipe.new(ingredients,ingredient_types,quantities,result,result_type))

  #Energy Crystal
  ingredients = [33,34,46]
  ingredient_types = [0,0,0]
  quantities = [1,1,1]
  result = 40
  result_type = 0
  @recipe_list.push(Game_Recipe.new(ingredients,ingredient_types,quantities,result,result_type))  

  ingredients = [33,34,46]
  ingredient_types = [0,0,0]
  quantities = [1,1,1]
  result =  17
  result_type = 0
  @recipe_list.push(Game_Recipe.new(ingredients,ingredient_types,quantities,result,result_type))
 
 
 
=begin
  ingredients = []
  ingredient_types = []
  quantities = []
  result =
  result_type =
  @recipe_list.push(Game_Recipe.new(ingredients,ingredient_types,quantities,result,result_type))
=end

 
end # of get_recipe_list method
end # of updates to Game_Temp Class


And here's the modifications I made to it (line 291 and 292) in order to show the points given:

      @strings = [hp_string, sp_string, "Phy. Def:" , "Mag Def:", "Accuracy:", "Variance:", [b]"Points Raised",[/b]]
     @stats = [hp_stat, sp_stat, item. pdef_f, item.mdef_f, item.hit, item.variance, [b]item.parameter_points,[/b]


I highlighted the parts I added, wich were pretty simple to figure out, but I couldn't find a way to show the name. I tried with item.parameter_type, with some if/else if systems, and even tried to make my first case, wich failed miserably. So, if anyone has any ideas, I'd love if you could share them. Just giving some tips would be alright; after all, it's better if I can figure it out almost by myself, isn't it?

Thanks in advance, and sorry for the sucky english.

EDITED: Nevermind, I found a way to show it (by addind a lof of "if" for each parameter  :P ), but now my problem comes with the state changes =( Thing is the same: I want to show just the name of the state the item gives you (for the Sharp, Barrier, Resist and Blink states), but I can not figure out how to get the info on wich states each item gives. I tried with thi:

if item.plus_state_set == 13...


to try and get the Sharp state (it being the no. 13 on my DB), but it didn't worked. So, any ideas on how to get the state id from the database? I can make it to show the text by myself, I alredy figured how to do that xD
18
RMXP Script Database / Re: [XP] Tons of Add-ons
April 09, 2010, 11:43:20 pm
I get an error whever I try to activate the Custom Controls add-on. I deleted BlizzABS as I wasn't using most of its features, and tried to use this one for the Custom Controls thing. However, something's messed up, cuz everytime I try to move on the map, I get an error saying:

 "Script 'Game_Map' line 212: NoMethodError ocurred
undefined method `/' for [i] Array"


Where "i" is the number that the key has on your module Input. This just happens with the movement keys, all the other keys seems to work just fine (at least, whenever I changed the keys for B, they worked). I tried making a new project and using the script, and it ran with no problem, so I'm guessing it has something to do with one of the 200 scripts I got on my project <.< Because I don't remember editing the Game_Map script.

Anyways, the string on Game_Map that throws the error ir this:

   
 # Change direction (0,2,4,6,8,10) to obstacle bit (0,1,2,4,8,0)
    bit = (1 << (d / 2 - 1)) & 0x0f


I know it's hard to ask for a solution if I you don't know what scripts I got, but if you could give me some advice on where to look for incompatibilities...
19
RMXP Script Database / Re: [XP] Blizz-ABS
April 07, 2010, 10:21:43 pm
Is not that I can just set up one hotkey. As far as I can say, items on hotkeys works just fine. It's the skills wich is giving me a hard time. I can't seem to be able to choise wich skill I want to put on the hotkeys, and I don't see anything when I hit the key. If it's still confusing, I'll take a screenshot later, because I'm not on my own PC right now.

Laun~
20
RMXP Script Database / Re: [XP] Blizz-ABS
April 07, 2010, 05:41:46 pm
Well, I'm having some troubles with the Hotkey setup. I can't seem to be able to choose any skill except the first one, as the cursor just appears on the item window, but not on the skill. Also, using the Use Skill button doesn't do anything, and even if I put the first skill on the first hotkey, it doesn't work.

Also, even if I just have an attack skill with the thunder sprite on my hotkey, the sprite will be the one with the green bubbles, but I don't know if it's a bug or just the way it's supposed to be.

If anyone can help, it'd be more than welcome.