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

1
Script Troubleshooting / Re: Smithing Animation scene...
November 17, 2009, 07:12:21 pm
Ok, new question... how can I darken the color tone of just the tileset, but leave the Event sprites at normal color tone?


Is there a script command I can use on a single drawing layer? (I'm assuming tiles are on a separate viewport from sprites... )

EDIT: Actually... I need to change the color tone for everything but a specific few events...
2
Script Troubleshooting / Re: Smithing Animation scene...
November 17, 2009, 04:49:04 pm
Quote from: legacyblade on November 17, 2009, 04:44:04 pm
You could have the script flip an event's self switch upon exiting the menu. That would probably do the trick.


I suppose that could work... though first I'll have to learn to interface script with events... (something I've never quite grasped)


I will screw around with that plan for now... I still would like to know how to do it script'ly... I eventually need to make my battle system for the game as well... so complex graphical mechanisms will need to be learned either way... but now I'm distracted by yet another side-quest!
3
RPG Maker Scripts / Re: Just a suggestion
November 17, 2009, 04:45:33 pm
Hmm... that's a pretty simple thing to change I'd imagine... though having it in the config might be nice too...


Then again I'm not sure if it's changed since 2.23, which is the latest I have ATM...

I may look through the newest code and replace the Color.new's with variables for simple modification... (if it hasn't changed beyond my recognition)

EDIT: On second thought... there's a lot going on here that I just can't efficiently modify like I thought...
4
Script Troubleshooting / Re: Smithing Animation scene...
November 17, 2009, 04:14:26 pm
Quote from: Blizzard on November 17, 2009, 03:09:45 pm
You should probably just use an auto-animated event for that. o.o


For the whole screen? This is something I need to happen directly from a menu, and then back to a menu after the animation. I don't want NPC's to be on the screen, just the background animation events.


How do you suggest I do that?
5
Script Troubleshooting / Smithing Animation scene...
November 17, 2009, 02:29:42 pm
Ok, I'm trying to make a scene that uses the current map (including a number of events that I need to play the background animations) to play an animation of the character and his partner hammering the sword on an anvil...

But, as I've never messed with displaying a map scene or battle scene... or any scene other than basic menus... I'm a little unsure how to do this...

It will only last for a few seconds and I don't want any interactions to be possible during the demo.


Can anyone help me with stuff like displaying the map and events and all? I tried looking at the Game_Map Spriteset_Map, but I really am not sure what's doing what...
6
Script Troubleshooting / Re: Help in Pixelmovement Script
November 16, 2009, 08:56:02 pm
The size of the event is measured from the very bottom pixel of the event. If it didn't work, I'd imagine it's because you were measuring incorrectly or are using a different version of the script...

This is the version I have.
Spoiler: ShowHide
#===============================================================================
# ** Pixelmovement Script
#-------------------------------------------------------------------------------
#
# f0tz!baerchen
# v1.3
# 10.12.2006
#
#-------------------------------------------------------------------------------
7
Script Troubleshooting / Re: Help in Pixelmovement Script
November 16, 2009, 06:33:48 pm
f0tz!baerchen's pixel script has the option of changing event sizes.

I'm not sure what script that is, but I suggest using f0tz!' script. (I'm using it now that I know more about it)

For his script you just add a comment to the first line of the event that says
event_size: (width in pixels),(height in pixels)



EDIT: Ok having rechecked, it is his script... anyway... that's the syntax.

here is my character size (I made mine a bit larger than the default I think)

event_size: 32,24
8
The latest set, the one on the left looks like Riza Hawkeyefrom FMA...

The same-headed one in the first post reminds me of Saber from F/SN...

I like them all.
9
RPG Maker Scripts / Re: General RGSS/RGSS2/RGSS3 Help
November 15, 2009, 08:20:52 pm
1. use a $ for global, not an &
2. Try adding "p $data_enemies[1].exp" on a line and see if it's producing the right info.
10
Script Troubleshooting / Re: [RESOLVED]Bitmap Text
November 15, 2009, 08:13:33 pm
Quote from: Longfellow on November 15, 2009, 06:08:50 pm
Have you considered using ".each_byte"? It's slightly inconvenient, but you might be able to trim down a lot of code and potentially speed up your script.


my code is only long due to the case statement that defines each letter/symbol's offset in the image file...
11
Script Troubleshooting / Re: Bitmap Text
November 15, 2009, 06:03:52 pm
Quote from: Longfellow on November 15, 2009, 05:17:04 pm
Quote from: Blizzard on November 15, 2009, 04:23:03 pm
Use "my_text.clone.slice!" instead of "my_text.slice!". The latter alters your original string, hence it isn't the same later. Generally methods with an exclamation mark at the end are destructive (meaning that they alter calling the object rather than returning a new object after the operation).


Or just "my_text.slice"?


No, it removes a single letter everytime a letter is drawn, that way the next letter is drawn instead of the first letter being drawn over and over.

EDIT: I'm gonna do a few more tests, but for the time being, I'm calling this done.

If I understand the usage of the method used in Window_Message...
12
Script Troubleshooting / Re: Bitmap Text
November 15, 2009, 04:46:16 pm
Quote from: Blizzard on November 15, 2009, 04:23:03 pm
Use "my_text.clone.slice!" instead of "my_text.slice!". The latter alters your original string, hence it isn't the same later. Generally methods with an exclamation mark at the end are destructive (meaning that they alter calling the object rather than returning a new object after the operation).


I see, thanks. I didn't know that about the !. I'll try it and see what happens.

EDIT: Well, that SEEMS to have fixed the issues I was having... I'll keep testing... but I think this script is finished... I won't [RESOLVE] until I'm sure though.

I thank you once again, my friend.
13
Script Troubleshooting / [RESOLVED]Bitmap Text
November 15, 2009, 03:41:23 pm
Spoiler: ShowHide
class Bitmap
 
 $bitfont = Bitmap.new("graphics/pictures/fontmap.png")
 
#def draw_fontmap_text(start_x, y, dummyx, dummyy, my_text, my_bitmap = self.contents)
def draw_text(start_x, y, dummyx = 0, dummyy = 0, my_text = '', a = 0)
 if start_x.is_a?(Rect)
     start_x, y, dummyx, dummyy, my_text, a = start_x.x, start_x.y, start_x.width, start_x.height, y, dummyx
     if dummyx.is_a?(Fixnum)
       a = 255
     end
     
   else
     start_x, y, dummyx, dummyy, my_text, a = start_x, y, dummyx, dummyy, my_text, a
     if a.is_a?(Fixnum)
       a = 255
     end
   end
 x2 = start_x
 #my_bitmap = Bitmap.new(640,480)
 while  ((@letter = my_text.slice!(/./m)) != nil)
   case @letter
   when "A"
     letteroffset = 14 * 0
     caseoffset = 26 * 0
   when "B"
     letteroffset = 14 * 1
     caseoffset = 26 * 0
   when "C"
     letteroffset = 14 * 2
     caseoffset = 26 * 0
   when "D"
     letteroffset = 14 * 3
     caseoffset = 26 * 0
   when "E"
     letteroffset = 14 * 4
     caseoffset = 26 * 0
   when "F"
     letteroffset = 14 * 5
     caseoffset = 26 * 0
   when "G"
     letteroffset = 14 * 6
     caseoffset = 26 * 0
   when "H"
     letteroffset = 14 * 7
     caseoffset = 26 * 0
   when "I"
     letteroffset = 14 * 8
     caseoffset = 26 * 0
   when "J"
     letteroffset = 14 * 9
     caseoffset = 26 * 0
   when "K"
     letteroffset = 14 * 10
     caseoffset = 26 * 0
   when "L"
     letteroffset = 14 * 11
     caseoffset = 26 * 0
   when "M"
     letteroffset = 14 * 12
     caseoffset = 26 * 0
   when "N"
     letteroffset = 14 * 13
     caseoffset = 26 * 0
   when "O"
     letteroffset = 14 * 14
     caseoffset = 26 * 0
   when "P"
     letteroffset = 14 * 15
     caseoffset = 26 * 0
   when "Q"
     letteroffset = 14 * 16
     caseoffset = 26 * 0
   when "R"
     letteroffset = 14 * 17
     caseoffset = 26 * 0
   when "S"
     letteroffset = 14 * 18
     caseoffset = 26 * 0
   when "T"
     letteroffset = 14 * 19
     caseoffset = 26 * 0
   when "U"
     letteroffset = 14 * 20
     caseoffset = 26 * 0
   when "V"
     letteroffset = 14 * 21
     caseoffset = 26 * 0
   when "W"
     letteroffset = 14 * 22
     caseoffset = 26 * 0
   when "X"
     letteroffset = 14 * 23
     caseoffset = 26 * 0
   when "Y"
     letteroffset = 14 * 24
     caseoffset = 26 * 0
   when "Z"
     letteroffset = 14 * 25
     caseoffset = 26 * 0
   when "a"
     letteroffset = 14 * 0
     caseoffset = 26 * 1
   when "b"
     letteroffset = 14 * 1
     caseoffset = 26 * 1
   when "c"
     letteroffset = 14 * 2
     caseoffset = 26 * 1
   when "d"
     letteroffset = 14 * 3
     caseoffset = 26 * 1
   when "e"
     letteroffset = 14 * 4
     caseoffset = 26 * 1
   when "f"
     letteroffset = 14 * 5
     caseoffset = 26 * 1
   when "g"
     letteroffset = 14 * 6
     caseoffset = 26 * 1
   when "h"
     letteroffset = 14 * 7
     caseoffset = 26 * 1
   when "i"
     letteroffset = 14 * 8
     caseoffset = 26 * 1
   when "j"
     letteroffset = 14 * 9
     caseoffset = 26 * 1
   when "k"
     letteroffset = 14 * 10
     caseoffset = 26 * 1
   when "l"
     letteroffset = 14 * 11
     caseoffset = 26 * 1
   when "m"
     letteroffset = 14 * 12
     caseoffset = 26 * 1
   when "n"
     letteroffset = 14 * 13
     caseoffset = 26 * 1
   when "o"
     letteroffset = 14 * 14
     caseoffset = 26 * 1
   when "p"
     letteroffset = 14 * 15
     caseoffset = 26 * 1
   when "q"
     letteroffset = 14 * 16
     caseoffset = 26 * 1
   when "r"
     letteroffset = 14 * 17
     caseoffset = 26 * 1
   when "s"
     letteroffset = 14 * 18
     caseoffset = 26 * 1
   when "t"
     letteroffset = 14 * 19
     caseoffset = 26 * 1
   when "u"
     letteroffset = 14 * 20
     caseoffset = 26 * 1
   when "v"
     letteroffset = 14 * 21
     caseoffset = 26 * 1
   when "w"
     letteroffset = 14 * 22
     caseoffset = 26 * 1
   when "x"
     letteroffset = 14 * 23
     caseoffset = 26 * 1
   when "y"
     letteroffset = 14 * 24
     caseoffset = 26 * 1
   when "z"
     letteroffset = 14 * 25
     caseoffset = 26 * 1
   when "1"
     letteroffset = 14 * 0
     caseoffset = 26 * 2
   when "2"
     letteroffset = 14 * 1
     caseoffset = 26 * 2
   when "3"
     letteroffset = 14 * 2
     caseoffset = 26 * 2
   when "4"
     letteroffset = 14 * 3
     caseoffset = 26 * 2
   when "5"
     letteroffset = 14 * 4
     caseoffset = 26 * 2
   when "6"
     letteroffset = 14 * 5
     caseoffset = 26 * 2
   when "7"
     letteroffset = 14 * 6
     caseoffset = 26 * 2
   when "8"
     letteroffset = 14 * 7
     caseoffset = 26 * 2
   when "9"
     letteroffset = 14 * 8
     caseoffset = 26 * 2
   when "0"
     letteroffset = 14 * 9
     caseoffset = 26 * 2
   when "."
     letteroffset = 14 * 10
     caseoffset = 26 * 2
   when "'"
     letteroffset = 14 * 11
     caseoffset = 26 * 2
   when "?"
     letteroffset = 14 * 12
     caseoffset = 26 * 2
   when "!"
     letteroffset = 14 * 13
     caseoffset = 26 * 2
   when ","
     letteroffset = 14 * 14
     caseoffset = 26 * 2
   when " "
     letteroffset = 14 * 26
     caseoffset = 26 * 0
   else
     letteroffset = 14 * 26
     caseoffset = 26 * 0
   end
       
   
   #my_bitmap.blt(x2, y, $bitfont, Rect.new(letteroffset,caseoffset, 14, 26))
   self.blt(x2, y, $bitfont, Rect.new(letteroffset,caseoffset, 14, 26))
   
   x2 += 14
   
 end
end
end


For some reason, the string values of most menu options get removed after seemingly any command menu is closed...
14
RPG Maker Scripts / Re: General RGSS/RGSS2/RGSS3 Help
November 15, 2009, 03:20:25 pm
Quote from: game_guy on November 15, 2009, 03:09:06 pm
all it does is call Spriteset_Map, and I'm trying to do that but I'm trying to make it a small rectangle and center that rectangle on the player. I'm trying to understand spriteset_map some more.

>__> this is confusing >.<


call that first, than BLT a portion of it to a variable, and save that variable to the save file...?

I can't say I'd know how to do it myself, but recently I have found block transfer to be invaluable for just about any drawing method...

Alternately you could save the transfered image to a new file and have the save files look up an image file with a corresponding name...


I regret that I'm too inexperienced to explain HOW to do any of that... but I can at least give the suggested modus operandi...
15
RPG Maker Scripts / Re: General RGSS/RGSS2/RGSS3 Help
November 13, 2009, 05:08:52 am
Lol, Thanks again... I swear you fix things so easily and make it seem obvious... It's like looking back at childhood and wondering how 8 * 2 was ever a tough problem...(Ironically I always had issues with 8's... now they're the ones that come most naturally... binary and hexadecimal have changed my life.)

Eventually I'll probably find myself making a new battle system... but that's a ways off...

Thanks again.
16
RPG Maker Scripts / Re: General RGSS/RGSS2/RGSS3 Help
November 12, 2009, 06:27:00 pm
Ok, I'm trying to make ONLY weapons display in this menu, and each weapon separate(Instead of
  • Iron Sword: 2,

    it would be

  • Iron Sword
  • Iron Sword)

    I'm trying to modify the existing draw_item code (in a new class) but it doesn't seem to be working...

      def draw_item(index)
       item = @data[index]
       case item
       when RPG::Weapon
         number = $game_party.weapon_number(item.id)
       end
       if item.is_a?(RPG::Weapon)
         self.contents.font.color = normal_color
       end
       
       if number != nil
       for i in 1..number
         x = 4 + index % 1 * (288 + 32)
         y = index / 1 * 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(item.icon_name)
         opacity = self.contents.font.color == normal_color ? 255 : 128
         self.contents.blt(x - 2, y + 2, bitmap, Rect.new(0, 0, 28, 28), opacity)
         self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
         if number > 1
           index += 1
           number -= 1
         end
         
         #self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
         #@number -= 1
       end
       end
     end


    What am I doing wrong exactly?
17
I figured it out. I just had to change the dispose method to only happen if the "\K" kill command exists in the message... If it does it will dispose of the sprite after the message is closed... a simple fix, I declare this script finished.


Now I can work solely on my Smithery skill... which I could probably do with an event of sorts... but... I need the RGSS experience.


Expect to see me again XD
18
Ok, I have a script that is mostly working... (I get no syntax problems) but there are a few issues I'm not sure how to deal with.

First, here are my scripts and Window_Message inserts
  def sat_init
 
   
   @messchar = ['','Senna/','Az/']
   @messface = ['','norm.png','angry.png','happy.png']
 
   if $game_temp.message_text != nil
     text = $game_temp.message_text
     
     text.gsub!(/\\[Rr]\[([0-9]+),([0-9]+)\]/) {|r| ""}
     @rpic = $&
     if @rpic != nil
       @rpic = @rpic.scan(/\d+/)
       @rpic = [@rpic[0].to_i, @rpic[1].to_i]
     end
     
     text.gsub!(/\\[Ll]\[([0-9]+),([0-9]+)\]/) {|l| ""}
     @lpic = $&
     if @lpic != nil
       @lpic = @lpic.scan(/\d+/)
       @lpic = [@lpic[0].to_i, @lpic[1].to_i]
     end
     
     if (@lpic != nil && @lpic[0] != 0 && @lpic[1] != 0)
       @lefty = Left_Face.new unless @lefty != nil
       @lefty.bitmap = Bitmap.new("Graphics/Faces/"+@messchar[@lpic[0]]+@messface[@lpic[1]])
     end
     
     if (@rpic != nil && @rpic[0] != 0 && @rpic[1] != 0)
       @righty = Right_Face.new unless @righty != nil
       @righty.bitmap = Bitmap.new("Graphics/Faces/"+@messchar[@rpic[0]]+@messface[@rpic[1]])
     end
   end
 end


#Window_Message code truncated...(The code is not modified, just removed for forum display)

# If waiting for a message to be displayed
   if $game_temp.message_text != nil
     
     
     sat_init###########################################
     
     
     text = $game_temp.message_text
     # Control text processing

#more text removed for space saving

# Open gold window
   if @gold_window != nil
     @gold_window.dispose
     @gold_window = nil
   end
   if @lefty != nil
     @lefty.dispose
     @lefty = nil
   end
   if @righty != nil
     @righty.dispose
     @righty = nil
   end



The issue is this:

I need to figure out how to KEEP the displayed faces when they are not changed, BUT dispose them when there are no more text messages in the event.

As the code is now, I can keep the images by using the same tags with each message, but they blink (the sprite is disposed and recreated).

Can anyone help me out with this?
19
Actually it was the comma. Commas apparently don't need escape sequences, so "\," and "," are effectively the same. It was looking for two commas. And I forgot why I even put the \i in there anyway, the original scripts don't have it and I certainly don't see a need for case-insensitive when I'm only working with r and R...

Incidentally, I am far (sort of) past this issue now, but I will likely have more issues with the rest of the script. Thanks for the help thusfar.
20

This is my current method... or the relevant part anyway (the rest is working and has no volatile code so I've ruled it out as having an impact at all)


   if $game_temp.message_text != nil
     text = $game_temp.message_text
   
     text.gsub!(/\\[Rr]\[([0-9]+)\,([0-9]+)\], /i) {|r| ""}
     p rpic = $&
     
   end


What is strange with this is that it ONLY finds the pattern (which should look like this: \R[0,0]) if it is trailed by a comma, like this: \R[0,0],

With the comma it seems to work fine, but without it, it ignores that entire pattern...

To better illustrate...

"\R[0,0] I like pie."

will output "\R[0,0] I like pie."

"\R[0,0], I like pie."

will output "I like pie"


So what's the deal?


EDIT: I forgot to mention that I read Zeriab's regular expression tutorial and mostly understand how gsub is supposed to work now... but mine isn't working like the other gsub's in the window_message script do (despite being almost identical... I only added a second number section and a comma to the pattern)

EDIT2: Also, am I posting my questions wrong? Should I be asking this type of question in a different section until I finish writing the actual script?

EDIT3: For some strange reason I'm uncertain of, \i was causing my comma issues... no more questions YET...