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 ... 153
1
We're not really known for VXA support, but I was able to figure what was wrong. Replace your script with this one:
(click to show/hide)
Problem was his use of $game_party.members. When in battle, this returns up to the first 4 actors only. Originally in the script, he did this
Code: [Select]
      if $data_system.opt_extra_exp
         @result_member_max = $game_party.members.size
      else
         @result_member_max = $game_party.battle_members.size
      end
Essentially, @result_member_max would always return up to 4 regardless of "Reserve Party Members' EXP" setting. Changing it to all_members fixes this.
Other change was in the loop where actor EXP was awarded:
Code: [Select]
      for battler_id in @result_member_id..@result_member_max
          actor_result = $game_party.members[@result_member_id]
          ...
          actor_result.gain_exp($game_troop.exp_total) rescue nil
Again, $game_party.members would only return the first 4 actors, so simply changing it to all_members here resolves it.

2
RMXP Script Database / Re: [XP] Blizz ABS Active Action Info
« on: May 21, 2018, 02:11:35 AM »
Seems like, at the time, Drago forgot Arrays are 0-indexed. How this went unnoticed for years is beyond me.
For the sake of keeping the fix easy, find this around line 38 and make sure it looks like this
Code: [Select]
def mpit() @mpit ||= [nil, 0, 0, 1, 1, 0, 0] end
@Drago: Problem lines are
Code: [Select]
# Scene_Map#main
@mpit.visible, @mpit.contents_opacity = true, $game_system.mpit[6]

# Scene_Map#update
@mpit.contents_opacity, @mpit.visible= $game_system.mpit[6], true
$game_system.mpit[6] -= 3
The mpit variable was only an array of 6 elements, hence mpit[6] returned nil.

3
RMXP Script Database / Re: [XP] Blizz-ABS
« on: May 15, 2018, 07:59:14 PM »
Yeah, explore with events first. You don't want to cheese a HUD script to affect the environment.
Besides, I think the alternative would be a custom tilemap script that allows you to alter individual tiles dynamically.

4
Welcome! / Re: New Kid In Front Of The Computer
« on: May 15, 2018, 04:05:09 AM »
sup dude

Weird that you think that way with FES. I found it harder to do the easy things in FES than in XP or even 2k3. Something like a push puzzle takes a ton of events when PC versions requires one event and (optionally) a parallel process.

Then again, I'm a scripter so I can basically do whatever I want in XP and not be limited to hard restrictions.  ¯\_(ツ)_/¯

5
RMXP Script Database / Re: [XP] Blizz-ABS
« on: May 15, 2018, 03:59:42 AM »
1. Considering that the help file states to use an "animated spriteset", I'd assume that would be a character graphic. So make your gold graphic as if it were a character (4x4 spritesheet)
2. Blizzard's scripts were designed to be compatible with each other. I find it hard to believe that his mouse script doesn't work.
3. I know in Tons Of Add-ons there's a script that will display an arrow over the player when hidden behind tiles, so it could be possible to extend that script to apply for all events. I think there was a script that made higher priority tiles transparent when the player moved behind them, but don't know what it was called. You could try Drago's script to draw the name of events. It looks like the name will be displayed above tiles.

6
Script Troubleshooting / Re: [RMMV] Problem with language on mobile
« on: April 19, 2018, 08:24:00 PM »
Did you contact the author? I feel they would be more helpful than any of us (largely because everyone that's still active here doesn't do MV script support).

7
Thanks for the QA, I must have been in a drunken stupor last night.
The DLL is fine by the way.

Reverted to 2.31 until I fix it.
EDIT: 2.32 is back up

8
Quick update to 2.32
  • Forgot to update XPA Tilemap's DLL from version 0.4, whoops :P (thanks tasuku13 for reporting this)
  • Input module's constants are now integers (as they are in XP) instead of symbols (as they are in VXA). You can still use XP's or VXA's way of handling input, like so
Code: [Select]
Input.trigger?(Input::C) # XP
Input.trigger?(:C)       # VXA

9
It does return something now if you try to access the window's viewport, yes. But the way the viewport is used is not how XP does it. I know that the way you implemented it was more so for convenience in positioning all the window's elements and not having to move all of them when--as an example--Window#x changes (as the top left corner of the window will always be at [0,0]; just only need to move the viewport).

IOW, your rewrite always creates a viewport the same size as the window. As such, the window is always in full view. You also cannot initialize the window to another viewport.
XP doesn't create a viewport unless explicitly initialized with one. And it behaves like any Sprite would (contents being clipped out if not contained fully in the viewport, etc.).

But default XP scripts never initializes any of the window sub-classes with a viewport. Hence, no one should be using the Window's viewport anyways. Only example I have seen so far is that online script whitespirits mentioned, where the author was drawing item description sprites to the Item Window's viewport, which were being clipped using XPA_Window (basically, there was no reason for the author to be initializing these sprites to the window's viewport).

10
Hidden classes are exactly as they read: hidden. You don't have access to the underlying code-base for these classes. Any rewrites to these classes are the scripter's best interpretation of how the script works (usually) in pure Ruby. The Tilemap class, for example, is most likely largely written in C code since the amount of drawing it does is performance heavy.

btw Selwyn's Window class rewrite is not a perfect copy of Window. Blizzard's is nearly an exact replica where Viewports are not necessarily used correctly, but no one should be accessing a Window's viewport to begin with. Try using this windowskin and compare the two scripts

You should see the difference at the title screen, namely the cursor.

That script you linked from the ARC dev thread just grabs a list of the classes' methods and variables. Again, there's no actual source code because it's hidden. This was used mainly to get an idea of what they needed to implement their own version of the hidden classes.

For getting the fonts, it probably just uses the Windows' environment variables. For example, in Windows Explorer, typing %windir%\Fonts will bring you to the fonts folder. If the font isn't found, then RMXP just doesn't draw anything (I mean, there's nothing wrong with that). There isn't a way to manipulate the underlying code to look elsewhere for font files, so you have to use a script to get that done.

11
Troubleshooting / Help / Re: [XP] Undo UMS changes to choice window?
« on: April 15, 2018, 01:48:23 AM »
I don't see any natural way to do it. Window_Message is rewritten heavily and uses another class to handle choices now. In theory, it is possible to revise the script to do so, but I don't think anyone here will do it.

12
Script Troubleshooting / Re: Image Map Maker issue
« on: April 11, 2018, 04:57:49 AM »
Give this a shot.
Code: [Select]
tilesets = load_data('Data/Tilesets.rxdata')
changed_maps = []

Dir['Data/Map*.rxdata'].each do |f|
  Graphics.update
  next unless f[/Map\d+/]
  map = load_data(f)
  tileset = RPG::Cache.tileset(tilesets[map.tileset_id].tileset_name)
  max_id = tileset.height / 32 * 8 + 383
  overwrite_file = false
 
  for z in 0..2
    for y in 0...map.data.ysize
      for x in 0...map.data.xsize
        if map.data[x,y,z] > max_id
          map.data[x,y,z] = 0
          overwrite_file = true
          changed_maps << f unless changed_maps.include?(f)
        end
      end
    end
    Graphics.update
  end
 
  if overwrite_file
    save_data(map, f)
  end
end

changed = "Changed the following maps:\n"
changed_maps.each do |map|
  changed << "#{map}\n"
end
print changed

exit
Paste above main, testplay your project. It'll spit out a message box and close afterwards. Reopen your project and it should be fixed. Didn't test it for large maps nor scanning more than 2 maps in a project.

13
Script Troubleshooting / Re: Image Map Maker issue
« on: April 10, 2018, 11:44:02 PM »
You'll need to manually go to those places on your map and draw over them with the blank tile ID at the top left of the tileset.

I would make a script that just scans all your maps and replaces invalid ones but currently at work.

14
Script Troubleshooting / Re: Image Map Maker issue
« on: April 10, 2018, 11:14:56 PM »
It's not the tileset itself that's the problem. Like, let's say for example (note, this is not how it actually is,  but just to make it easier to explain) your tileset graphic has 80 tiles on it. The top left tile is tile ID 0. Immediately right of it is tile ID 1, then 2, then 3...and the tile immediately below 0 is tile ID 7. Using that logic, the bottom right tile on the tileset will be tile ID 79.

So you make your map, using all the tiles your tileset has. Then, at some later point in time, you go "do I really need 80 tiles?" and change the tileset graphic to something smaller in size (let's say 40 tiles in total). While your map no longer draws the tile IDs 40-79 anymore, they still exist in the map data. This is what your error most likely is--your map is using a tile ID that the tileset graphic does not support.

You can put this script above Main
Code: [Select]
class Game_Map
  alias check_invalid_tiles setup
  def setup(map_id)
    check_invalid_tiles(map_id)
   
    bitmap = RPG::Cache.tileset(@tileset_name)
    maxtileid = (bitmap.width / 32) * (bitmap.height / 32) - 1
   
    for x in 0...@map.data.xsize
      for y in 0...@map.data.ysize
        for z in 0...@map.data.zsize
          if @map.data[x,y,z] - 384 > maxtileid
            p("[#{x},#{y},#{z}] = " + @map.data[x,y,z].to_s)
          end
        end
      end
    end
  end
 
end
and put your character in the problem map. If there are invalid tile IDs, a message window will pop up showing the [x, y, layer] coordinates.

15
Script Troubleshooting / Re: Image Map Maker issue
« on: April 10, 2018, 10:10:38 PM »
Line in question is pointed out below
Code: [Select]
  def initialize(x, y, tile_id, z = 4)
    @tile_id = tile_id
    @opacity = 255
    @x = x
    @y = y
    @z = z # Used for tie-breaker in comparison
    @sx = x * 32
    @sy = y * 32
    @sz = (y + $game_map.priorities[@tile_id]) * 32 + 33   #<============================
    # If tile ID value is valid
    if @tile_id >= 48
      @bitmap = RPG::Cache.tile!($game_map.tileset_name,
                                 $game_map.autotile_names, @tile_id)
      @rect = Rect.new(0, 0, 32, 32)
    else
      @bitmap = Default_Bitmap
      @rect = @bitmap.rect
    end

Since you mention this happens on some maps, I take it you have some invalid tile IDs drawn somewhere on them (i.e. a tile ID that is larger than the total number of tiles the tileset has).

16
Troubleshooting / Help / Re: [XP] Multiple MESSAGE WINDOWS at once?
« on: April 09, 2018, 05:34:24 AM »
I don't think any message window script will help you out here. This sounds way too custom that it needs to be its own script.

18
RMXP Script Database / Re: [XP] Blinking Characters
« on: April 07, 2018, 09:43:11 AM »
As raised up by Shrimpses, there's some potential bugs with the script. Posting a general fix here in case others happen to use this script.
Code: [Select]
#==============================================================================
# ** Game_Character (part 4)
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player and Game_Event classes.
#
#   This section covers the main body of the blinking.
#   The only things you should need to change are the blink states and the blink
#   frames. The frames decides a rough guide for how long the eyes should be open
#   for. The blink states decide how the eyes act.
#     -1 = No blinking graphic
#      0 = Forced no blinking
#      1 = Normal blink(Eyes open)
#      2 = Normal blink(Eyes closed)
#      3 = Forced eyes closed
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
 
  attr_accessor :base_character_name      #Base character file
  attr_accessor :blink_state              #Blink boolean
  attr_accessor :blink_frames             #Blink frame interval (average)
  attr_accessor :blink_count              #Current blink count
  attr_accessor :close_count              #Close rnd
  attr_accessor :open_count               #Open rnd
 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias extinit initialize
  def initialize
    extinit
    @base_character_name = @character_name
    @has_blink = (RPG::Cache.character("#{@character_name}_Blink", 0) && true rescue false)
    @blink_state = 1
    @blink_frames = 80
    @blink_count = 0
    @close_count = 0
    @open_count = 0
  end
 
  alias blinkupdate update
  def update
    blinkupdate
    if @base_character_name != @character_name.chomp('_Blink')
      @base_character_name = @character_name
      @blink_count = 0 if @blink_state == -1
      @blink_state = 1
      @has_blink = (RPG::Cache.character("#{@character_name}_Blink", 0) && true rescue false)
    end
    update_blink
  end
 
  def update_blink
    if !@has_blink && @blink_state < 2
      @blink_state = -1
      return
    end
    bs = sprintf("%s_Blink", @character_name)
    if @blink_state == 1
      @blink_count += 1
      if @blink_count >= @open_count
        @base_character_name = @character_name
        @blink_count = 0
        @blink_state = 2
        @character_name = bs
        @close_count = (6 * (rand + 0.5))
      end
    end
    if @blink_state == 2
      @blink_count += 1
      if @blink_count >= @close_count
        @blink_count = 0
        @blink_state = 1
        @character_name = @base_character_name
        @open_count = @blink_frames * (rand + 0.5)
      end
    end
    if @blink_state == 3
      bs = sprintf("%s_Blink", @base_character_name)
      @blink_count = 0
      if @character_name != bs
        @character_name = bs
      end
    end
  end
 
  def blink_reset_base
    @base_character_name = @character_name
  end

  def blink_refresh(frames)
    @blink_count = 0
    @blink_frames = frames
  end
 
  def blink_set_state(state)
    return unless state.between?(-1, 3)
    @blink_state = state unless (state >= 2 && !@has_blink)
    @blink_count = 0
    @character_name = @base_character_name if state <= 1
  end
end

class Interpreter
 
  alias command_322_blink command_322
  def command_322
    $game_player.blink_state = 1 if $game_player.blink_state == -1
    command_322_blink
  end
 
  def blink_refresh(eventid, frames)
    # Branch by parameter
    case eventid
    when -1  # player
      $game_player.blink_refresh(frames)
    when 0  # this event
      events = $game_map.events
      events[@event_id].blink_refresh(frames)
    else  # specific event
      events = $game_map.events
      events[eventid].blink_refresh(frames)
    end
  end
 
  def blink_set_state(eventid, state)
    # Branch by parameter
    case eventid
    when -1  # player
      $game_player.blink_set_state(state)
    when 0  # this event
      events = $game_map.events
      events[@event_id].blink_set_state(state)
    else  # specific event
      events = $game_map.events
      events[eventid].blink_set_state(state)
    end
  end
 
end

19
The problem is because the graphic is requesting a change at the same time it is returning from a closed eyes to open eyes state. The notion that "the script uses move routes to briefly swap actors with their 'blink' sprites" is not correct.

When the eyes are requested to close, a variable holds the original name of the graphic.
Code: [Select]
@base_character_name = @character_nameWhen the eyes reopen, it resets the name back
Code: [Select]
@character_name = @base_character_name
I'll look into fixing this later this week.

Also, it's okay to necro if the question is related to the topic at hand.

20
Script Requests / Re: 2x Double Scaling Script in RMXP?
« on: April 03, 2018, 07:11:55 AM »
Convert your project to XPA.
http://forum.chaos-project.com/index.php/topic,12899.0.html
Since it runs on VXA's engine, it naturally supports upscaling.

Vanilla XP...never heard of one.

Pages: [1] 2 3 ... 153