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

Pages: [1] 2 3 ... 144
1
Resources / Re: problem to open mrmx-os
« on: June 23, 2017, 10:06:32 AM »
Do you mean when you try to open Game.rxproj, you get an error window saying something about it being from an older version? In that case, just right-click the file, open it with Notepad or any kind of text editor, and change the number to whatever version of RMXP you're using, like 1.02.

2
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: June 23, 2017, 05:18:35 AM »
It was just because he had a
Code: [Select]
__END__ at the top of the Circular Motion script. As stated in his reply,
Quote
I didn't add this line, it's straight out of demo.
Which I find particularly odd.

3
Surprised that -1 even did something for you. I would just see \e[-1] in the message window.

In the script, there are two instances of this line:
Code: [Select]
text.gsub!(/\\[Ee]\[([0-9]+)\]/) doChange both of them to
Code: [Select]
text.gsub!(/\\[Ee]\[(-?[0-9]+)\]/) do
After that, the only thing that would prevent moving the message box is the use of train_actor (\ta[N]). You have to make sure that it is also set to -1 in order for \e[-1] to work, as the script shows:
Code: [Select]
if $game_system.message_event == -1 and $game_system.train_actor == -1
      if $game_system.window_justification == RIGHT
        self.x = 640 - $game_system.window_width
      elsif $game_system.window_justification == LEFT
        self.x = 0
      else # center
        self.x = (640 - self.width) / 2
      end

4
https://pastebin.com/Qrj2N9zW

I also noticed a small bug as well. I had to reset the Font in the window's contents before every draw to ensure that they wouldn't affect calculating the correct size for the window. For example, I had an event use bold in the first message and none in the second. The bold flag was still on when it was calculating the text width for the second message, so the resulting window width was larger than expected.

However, this bug is still present if you abuse any of the commands that affect the shape of the text (bold, italics, changing the font name, maybe shadows?). The resulting window size might be too small. Basically just avoid using those :P

5
Quote
To resize the inventory call with script call
Script : $game_party.resize_inventory(new_size)
or
Script : resize_inventory(new_size)
You just have to handle when the inventory size should change yourself through a common event.

6
There are a couple ways I would do this, both having to be completely new scripts.

1. Have a global inventory so all gained items go there. Then you use a separate scene to actually equip items to actors.
2. Every time there is an instance where an item is gained, it does an item management scene.

I don't like the way this script handles new items gained. It's too automatic and clunky in design.

7
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: June 20, 2017, 09:27:25 PM »
Well shit you're right. How this escaped me for this long, I do not know.
Find this in the script (around line 920)
Code: [Select]
            (1...MAX_PRIORITY_LAYERS).each{ |index|
              @layer_sprites[num-index].bitmap.fill_rect(0, (index - 1) * 32, width, 32, Color.new(0,0,0,0))
            }
Just remove a period in the 1...MAX_PRIORITY_LAYERS bit.

Thanks for finding this :P

8
In the Author's Notes:
Quote
Check an actor has a full inventory:
Code: [Select]
if $game_party.type_number(ACTOR_ID) == $game_party.type_max(ACTOR_ID)
Or does this not suffice?

9
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: June 20, 2017, 08:39:27 PM »
That's been fixed in an update to the Tilemap. The current XPA package still uses an older version.

10
I downloaded the Steam version of RMXP to test the weird issues it was having with XPA projects. One of them was the location of the RTP. Sure this can be easily resolved by either loading your project with all the RTP assets or installing the RTP package from the official RPG Maker website, but I found a way to read the registry of the RTP location. It seems to reside in
Code: [Select]
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Enterbrain\RGSS\RTPso, knowing that, I updated the Load RTP script like so:
(change is in RPG::Path.getRTPPath)
Code: [Select]
#===============================================================================
# Load RTP File
# Author: joe59491, edit by LiTTleDRAgo
# Version : 1.40
#-------------------------------------------------------------------------------
# [ Description ]
# Loads RMXP RTP assets so that the user does not have to manually import all of
# them into their project.
#
# [ Instructions ]
# There is nothing to do here.
# Please keep this script in its current location.
#
# It is highly advised to not modify this script unless you know what you are
# doing.
#===============================================================================
if XPA_CONFIG::RTP_LOADER

module Load_RTP_File
 
  RMXP  = true
  RMVX  = false
  RMVXA = false

end
 
#==============================================================================
# ** Ini
#------------------------------------------------------------------------------
#  
#==============================================================================
module Ini
  #--------------------------------------------------------------------------
  # * self.readIni
  #--------------------------------------------------------------------------
  def self.readIni(item = "Title")
    buf = 0.chr * 256
    @gpps ||= Win32API.new("kernel32","GetPrivateProfileString","pppplp","l")
    @gpps.call("Game",item,"",buf,256,"./Game.ini")
    buf.delete!("\0")
    return buf
  end
end

#==============================================================================
# ** String
#------------------------------------------------------------------------------
#  
#==============================================================================
class String
  #--------------------------------------------------------------------------
  # ● UTF8_to_unicode
  #--------------------------------------------------------------------------
  def to_unicode 
    @mbytetowchar ||= Win32API.new("kernel32","MultiByteToWideChar",'ilpipi','I')
    len = @mbytetowchar.call(65001, 0, self, -1, 0, 0) << 1
    @mbytetowchar.call(65001, 0, self, -1, (buf = " " * len), len)
    return buf
  end
end

#==============================================================================
# ** RPG::Path
#------------------------------------------------------------------------------
#  
#==============================================================================
module RPG
  module Path
    #--------------------------------------------------------------------------
    # * Constant
    #--------------------------------------------------------------------------
    FindFirstFile = Win32API.new("kernel32", "FindFirstFileW", "PP", "L")
    FindNextFile  = Win32API.new("kernel32", "FindNextFileW", "LP", "I")
    ReadRegistry = Win32API.new("advapi32","RegGetValue","lppllpp","l")
    #--------------------------------------------------------------------------
    # * getRTPPath
    #--------------------------------------------------------------------------
    def self.getRTPPath(rgss,rtpname)
      return "" if rtpname == "" or rtpname.nil?
      size = [256].pack("L")
      # Get the registry value's length
      ReadRegistry.call(
        0x80000002, # HKEY_LOCAL_MACHINE
        "SOFTWARE\\Wow6432Node\\Enterbrain\\RGSS\\RTP",
        "Standard",
        2, # REG_SZ
        0, # Null
        0, # Null, so that we can get value's length
        size)
      buffer = size.unpack("L")[0] # Length stored in 'size'
      path = "\0" * buffer         # Now we know how long the string is
      # Get the registry value itself
      ReadRegistry.call(
        0x80000002, # HKEY_LOCAL_MACHINE
        "SOFTWARE\\Wow6432Node\\Enterbrain\\RGSS\\RTP",
        "Standard",
        2, # REG_SZ
        0, # Null
        path,
        size)
      path.delete!("\0")
      path = path + '/' # Ensure trailing forward slash to path name
      path = path.gsub("\\","/").gsub("//","/")
      path
    end
    #--------------------------------------------------------------------------
    # * Class Variable
    #--------------------------------------------------------------------------
    @@RTP = []
    if Load_RTP_File::RMXP
      @@RTP << self.getRTPPath('RGSS','Standard')
      (0..3).each do |i|
        @@RTP << self.getRTPPath('RGSS',Ini.readIni("RTP#{i.to_s}"))
      end
    end 
    @@RTP << self.getRTPPath('RGSS2',"RPGVX")    if Load_RTP_File::RMVX
    @@RTP << self.getRTPPath('RGSS3',"RPGVXAce") if Load_RTP_File::RMVXA
    @@RTP.reject! {|rtp| rtp.nil? || rtp.empty?}
    #--------------------------------------------------------------------------
    # * self.findP
    #--------------------------------------------------------------------------
    def self.findP(*paths)
      findFileData = " " * 596
      result = ""
      for file in paths       
        unless FindFirstFile.call(file.to_unicode, findFileData) == -1
          name = file.split("/").last.split(".*").first
          result = File.dirname(file) + "/" + name
        end
      end
      return result
    end
    #--------------------------------------------------------------------------
    # * self.RTP
    #--------------------------------------------------------------------------
    def self.RTP(path)
      @list ||= {}
      return @list[path] if @list.include?(path)
      check = File.extname(path).empty?
      rtp = []
      @@RTP.each do |item|
        unless item.empty?
          rtp.push(item + path)
          rtp.push(item + path + ".*") if check
        end
      end
      rtp.push(path)
      rtp.push(path + ".*") if check
      pa = self.findP(*rtp)
      @list[path] = pa == "" ? path : pa
      return @list[path]
    end
  end
end

#==============================================================================
# ** Audio
#------------------------------------------------------------------------------
#  
#==============================================================================
class << Audio
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  [:bgm_play,:bgs_play,:se_play,:me_play].each do |meth|
    $@ || alias_method(:"#{meth}_path", :"#{meth}")
    define_method(:"#{meth}") do |*args|
      args[0] = RPG::Path::RTP(args[0]) if args[0].is_a?(String)
      send(:"#{meth}_path",*args)
    end
  end
end

#==============================================================================
# ** Bitmap
#------------------------------------------------------------------------------
#  
#==============================================================================
class Bitmap
  #--------------------------------------------------------------------------
  # ● Alias Method
  #--------------------------------------------------------------------------
  $@ || alias_method(:rtp_path_init, :initialize)
  #--------------------------------------------------------------------------
  # ● Object Initialization
  #--------------------------------------------------------------------------
  def initialize(*args)
    args[0] = RPG::Path::RTP(args.at(0)) if args.at(0).is_a?(String)
    rtp_path_init(*args)
  end
end

#==============================================================================
# ** Graphics
#------------------------------------------------------------------------------
#  This module handles all Graphics
#==============================================================================
class << Graphics
  #--------------------------------------------------------------------------
  # ● Alias Method
  #--------------------------------------------------------------------------
  $@ || alias_method(:rtp_path_transition, :transition)
  #--------------------------------------------------------------------------
  # ● transition
  #--------------------------------------------------------------------------
  def transition(*args)
    args[1] = RPG::Path::RTP(args.at(1)) if args[1].is_a?(String)
    rtp_path_transition(*args)
  end
end

end
I only tested this on a Win7x64. No guarantees if this is 100% foolproof.

11
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: June 19, 2017, 09:14:48 AM »
Code: [Select]
__END__This was at the very top of your Circular Motion script. What it does is effectively ignore everything below it. The game didn't even load the script.

12
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: June 19, 2017, 08:24:01 AM »
Want to give me a demo then? I got it working fine on my end.

13
RMXP Script Database / Re: [XP] Heretic's Circular Sprite Motion
« on: June 18, 2017, 11:53:00 PM »
Kise reported having issues setting up the event to make the circular motion. Perhaps a rewrite of the instructions is in order (maybe with a text-based example too, like what you did with the script call options). Make it clear that each spin configuration needs to be in a separate comment (or change the script to allow it all in one comment instead). Also, you list the options with a forward slash when they should be backslashes.
Code: [Select]
#  /spin              - Enables Circular Motion Effects
#  /spin_radius[N]    - Distance in Pixels from actual Event Map location
#  /spin_radius[N, N] - Distance in X, Y Distance for a Elliptical Movement
#  /spin_speed[N]     - Speed in Degrees Per Frame
#  /spin_speed[N, N]  - X and Y have different Rotational Speeds (non circles)
#  /spin_angle[N]     - Initial Angle (0.0 - 360.0)
#  /spin_angle[N, N]  - X and Y have different Inital Angles

14
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: June 18, 2017, 10:50:20 PM »
Emotions Script:
Let me guess...you tried to play an emotion over the LAST EVENT ID on the map. If your map had only one event, obviously its ID would be 1. So your script call would look like
Code: [Select]
$scene.emotion(ID, 1)But this would play over the player.
The author clearly did not test their code at all. If you were to create a second event on the map, you will actually see the emotion effect play over this new event instead. In short, the event ID you want the emotion to play over is actually one less than the event's actual ID.

Here's the fix. Find and replace this class in the Emotions script
Code: [Select]
class Spriteset_Map
  def emotion (id,ev=-1,ig=DEFAULTFILE,wt=false)
    if ev.to_i > 0
      @frames = @character_sprites[ev - 1].emotion(id,ig,wt)
    else
      @frames = @character_sprites[@character_sprites.size - 1].emotion(id,ig,wt)
    end
    return @frames
  end
end

Circular Motion:
First off, the script mentions you need Modular Passable placed above Circular Sprite Motion.
Secondly, your event page should look something like this:
Code: [Select]
Comment: \spin
Comment: \spin_radius[N]
Comment: \spin_speed[N]
Note the BACKSLASH. It's not FORWARD SLASH as the instructions make it out to be. Also, these have to be three separate comment commands, not one comment with all three lines in it.

15
Still not sure what you're saying. It sounds like you need a full script for that, not an event command or script call.

Yeah, immortal is kinda hidden to begin with in RM (having to right click a troop enemy to access it). Fortunately, Game_Battler's @immortal instance variable is "accessible", so you can access and modify it from anywhere. A lot of classes have these that, as mentioned before, are too much to list.

16
By using "Change Equipment" and equipping "None" to any slot, you effectively unequip the weapon/armor and return it to the inventory. So...not sure what you are talking about making separate conditions for each item as that is clearly not necessary.

There is no built-in way to change fixed equipment for actors. There are some scripts out there that do a locked equipment add-on.

There are too many things you can do with script calls to even list them all. You're better off just asking what can and can't be done.

17
Welcome! / Re: OI
« on: June 15, 2017, 07:38:12 AM »
One post, last active May 23, 2017, 09:12:16 AM

I don't think they're around anymore.

18
You mention the event moves towards the player. Where and how are you making the event move back to its starting location?
I get the question now...

Yes, you should use a path-finding script since it's not built-in to RMXP's default move event commands.

19
A quick look through the code shows that you have conflicting version numbers set up in your client and server.

For the server, open file cfg.ini and change GAME_VERSION.
For the client, open the scripts, go to (RMX-OS) Options and change GAME_VERSION.

But I'm curious how one of the numbers is 2.05. The download I have shows both are 1.0
Where did you get your download?

20
Are you saying you have unique animations for each battler?

In any case, add this method to the Interpreter class in my script (will edit previous post to include this):
Code: [Select]
  def targetted?(actor_id)
    # Script command does nothing if currently not in battle
    return unless $scene.is_a?(Scene_Battle)
    $scene.target_battlers.each { |battler|
      return true if battler.id == actor_id
    }
    false
  end
Use a conditional branch and choose script. Making the condition this
Code: [Select]
targetted?(1)will return TRUE if Aluxes (actor ID 1) is being targetted, FALSE otherwise.

Pages: [1] 2 3 ... 144