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 ... 147
1
Script Troubleshooting / Re: NoMethodError Help
« on: Today at 01:19:57 AM »
Yep, it's his bug.

Problem is with the logic regarding recent items.
Code: [Select]
for i in 0...$recent_items.size
  puts [i, $recent_items[i]].inspect
  if $recent_items[i].id == $data_items[item_id].id && $recent_items[i].is_a?(RPG::Item)
    $recent_items.delete_at(i)
  end
end
$recent_items.push(item)
if $recent_items.size > 40
  $recent_items.delete_at(0)
end
If you are to gain another item that you recently obtained, it deletes the item from the $recent_items list and then re-adds it again. However, if you were to gain item A, then item B, then item A, the use of $recent_items.delete_at(i) modifies the array WHILE we are currently iterating through it in the loop. This created a nil record, hence the error message received.

He should have used delete_if instead. I went ahead and modified the methods to do this. I also checked if he made this delete_at error anywhere else, and found out that the lose_item/weapon/armor methods he rewrote are completely wrong. I fixed those as well.

Replace the Game_Party class in the script with this:
Code: [Select]
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
#  This class handles the party. It includes information on amount of gold
#  and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party
  #--------------------------------------------------------------------------
  # * Gain Items (or lose)
  #     item_id : item ID
  #     n       : quantity
  #--------------------------------------------------------------------------
  def gain_item(item_id, n)
    # Update quantity data in the hash.
    if item_id > 0
      @items[item_id] = [[item_number(item_id) + n, 0].max, 99].min
      gain_recent_item(item_id) if n >= 0
    end
  end
  #--------------------------------------------------------------------------
  # * Gain Weapons (or lose)
  #     weapon_id : weapon ID
  #     n         : quantity
  #--------------------------------------------------------------------------
  def gain_weapon(weapon_id, n)
    # Update quantity data in the hash.
    if weapon_id > 0
      @weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, 99].min
      gain_recent_weapon(weapon_id) if n >= 0
    end
  end
  #--------------------------------------------------------------------------
  # * Gain Armor (or lose)
  #     armor_id : armor ID
  #     n        : quantity
  #--------------------------------------------------------------------------
  def gain_armor(armor_id, n)
    # Update quantity data in the hash.
    if armor_id > 0
      @armors[armor_id] = [[armor_number(armor_id) + n, 0].max, 99].min
      gain_recent_armor(armor_id) if n >= 0
    end
  end
  #--------------------------------------------------------------------------
  # * Lose Items
  #     item_id : item ID
  #     n       : quantity
  #--------------------------------------------------------------------------
  def lose_item(item_id, n)
    # Reverse the numerical value and call it gain_item
    gain_item(item_id, -n)
    if $game_party.item_number(item_id) == 0
      $recent_items.delete_if { |i| i.id == item_id && i.is_a?(RPG::Item) }
    end
  end
  #--------------------------------------------------------------------------
  # * Lose Weapons
  #     weapon_id : weapon ID
  #     n         : quantity
  #--------------------------------------------------------------------------
  def lose_weapon(weapon_id, n)
    # Reverse the numerical value and call it gain_weapon
    gain_weapon(weapon_id, -n)
    if $game_party.weapon_number(weapon_id) == 0
      $recent_items.delete_if { |i| i.id == weapon_id && i.is_a?(RPG::Weapon) }
    end
  end
  #--------------------------------------------------------------------------
  # * Lose Armor
  #     armor_id : armor ID
  #     n        : quantity
  #--------------------------------------------------------------------------
  def lose_armor(armor_id, n)
    # Reverse the numerical value and call it gain_armor
    gain_armor(armor_id, -n)
    if $game_party.armor_number(armor_id) == 0
      $recent_items.delete_if { |i| i.id == armor_id && i.is_a?(RPG::Armor) }
    end
  end
  #--------------------------------------------------------------------------
  # * Gain Recent Items
  #     item_id  : item ID
  #--------------------------------------------------------------------------
  def gain_recent_item(item_id)
    item = $data_items[item_id]
    $recent_items.delete_if { |i| i.id == item.id && i.is_a?(RPG::Item) }
    $recent_items.push(item)
    if $recent_items.size > 40
      $recent_items.delete_at(0)
    end
  end
  #--------------------------------------------------------------------------
  # * Gain Recent Weapons
  #     weapon_id : weapon ID
  #--------------------------------------------------------------------------
  def gain_recent_weapon(weapon_id)
    weapon = $data_weapons[weapon_id]
    $recent_items.delete_if { |i| i.id == weapon.id && i.is_a?(RPG::Weapon) }
    $recent_items.push(weapon)
    if $recent_items.size > 40
      $recent_items.delete_at(0)
    end
  end
  #--------------------------------------------------------------------------
  # * Gain Recent Armor
  #     armor_id  : armor ID
  #--------------------------------------------------------------------------
  def gain_recent_armor(armor_id)
    armor = $data_armors[armor_id]
    $recent_items.delete_if { |i| i.id == armor.id && i.is_a?(RPG::Armor) }
    $recent_items.push(armor)
    if $recent_items.size > 40
      $recent_items.delete_at(0)
    end
  end
  #--------------------------------------------------------------------------
  # * Gain Items (or lose)
  #     item_id : item ID
  #     n       : quantity
  #--------------------------------------------------------------------------
  def equip_item(item_id, n)
    # Update quantity data in the hash.
    if item_id > 0
      @items[item_id] = [[item_number(item_id) + n, 0].max, 99].min
    end
  end
  #--------------------------------------------------------------------------
  # * Gain Weapons (or lose)
  #     weapon_id : weapon ID
  #     n         : quantity
  #--------------------------------------------------------------------------
  def equip_weapon(weapon_id, n)
    # Update quantity data in the hash.
    if weapon_id > 0
      @weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, 99].min
    end
  end
  #--------------------------------------------------------------------------
  # * Gain Armor (or lose)
  #     armor_id : armor ID
  #     n        : quantity
  #--------------------------------------------------------------------------
  def equip_armor(armor_id, n)
    # Update quantity data in the hash.
    if armor_id > 0
      @armors[armor_id] = [[armor_number(armor_id) + n, 0].max, 99].min
    end
  end
end

2
Script Troubleshooting / Re: NoMethodError Help
« on: October 23, 2017, 11:06:16 PM »
Can you post a demo instead? If it does happen to be another script conflicting with it, I will need that other script too. I can say for certainty that it has nothing to do with XPA.

Regarding the line
Code: [Select]
if $recent_items[i].id == $data_items[item_id].id
I'm betting that item_id is 0. That would mean albertfish's script has a bug.

3
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: October 19, 2017, 11:35:15 PM »
Advanced Weather is going to need to be modified a bit. Take a look here
http://forum.chaos-project.com/index.php/topic,7947.0.html
You'll see an entry for Advanced Weather fix. Try it out. Obviously, replace SCREEN with SCREEN_RESOLUTION.

I'm putting compatibility patches on my To-Do list.

4
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: October 19, 2017, 08:20:50 AM »
Can you describe the situation a bit more? The scripts do work together and I see no conflicts at all. The only issue would probably be that Advanced Weather assumes a default 640x480 resolution. XPA Tilemap's weather adjustment setting only applies to the default RMXP weather effects.

5
Troubleshooting / Help / Re: class changeing in single character arpg
« on: October 19, 2017, 08:18:19 AM »
You're using the wrong game engine for bullet hells then. I know with VXA and older, rendering a lot of sprites can be taxing on the frame rate. If we're talking pixel-based (not tile-based) movement patterns, definitely look into some other game engine.

If all you want is just a fair amount of projectiles moving on the screen, then Blizz-ABS will suffice. I don't have much experience with other ABS systems nor any knowledge of what exists. You should ask on the actual RM forums for guidance instead.

6
Troubleshooting / Help / Re: class changeing in single character arpg
« on: October 18, 2017, 09:28:03 PM »
  • An Action RPG Battle System script
  • Eventing abilities
...and that's pretty much it. There might be some scripts out there that have a class switching UI to make things pretty, but I'm not aware of them. Doesn't matter which RM you use as all of them (not sure about MV but wouldn't surprise me) have an ABS script.

7
RPG Maker Scripts / Re: [MV] DoubleX RMMV Unit Filters
« on: October 18, 2017, 09:17:17 PM »
Oh no I don't mean the literal code tag. I mean the ones in the header:
Code: [Select]
[CENTER][SIZE=24pt][b]<SCRIPT NAME>[/b][/SIZE]
[SIZE=16pt]Authors: <AUTHORS, NO SPECIAL THANKS HERE>[/SIZE]
[SIZE=16pt]Version: <NUMBER>[/SIZE]
[SIZE=14pt]Type: <DETAILED TYPE>[/SIZE]
Key Term: <KEY TERM (COMMON TYPE), SEE FURTHER BELOW FOR ALL ALLOWED TERMS>[/CENTER]
Like CENTER and SIZE. Those need to be in caps.

8
RPG Maker Scripts / Re: DoubleX RMMV Unit Filters
« on: October 18, 2017, 10:33:28 AM »
Can't move to database because
1. Missing engine tag in subject
2. Header needs to be formatted as
Code: [Select]
[CENTER][SIZE=24pt][b]<SCRIPT NAME>[/b][/SIZE]
[SIZE=16pt]Authors: <AUTHORS, NO SPECIAL THANKS HERE>[/SIZE]
[SIZE=16pt]Version: <NUMBER>[/SIZE]
[SIZE=14pt]Type: <DETAILED TYPE>[/SIZE]
Key Term: <KEY TERM (COMMON TYPE), SEE FURTHER BELOW FOR ALL ALLOWED TERMS>[/CENTER]
specifically where the code tags are in all caps. This is necessary for the post to be correctly parsed when put into the database.

I've done this for you a couple times now; it's your turn.

9
Script Troubleshooting / Re: Compatibility fix and question.
« on: October 17, 2017, 09:45:31 PM »
You needed to set the variable that allowed the window cursor to slide to its destination in X frames.
Code: [Select]
  #--------------------------------------------------------------------------
  # * Track the position of the mouse cursor
  #--------------------------------------------------------------------------
  def mouse_cursor(index)
    return if @index == index
    @scroll_wait -= 1 if @scroll_wait > 0
    row1 = @index / @column_max
    row2 = index / @column_max
    bottom = self.top_row + (self.page_row_max - 1)
    if row1 == self.top_row and row2 < self.top_row
      return if @scroll_wait > 0
      @index = [@index - @column_max, 0].max
      @cursor_duration = [7 - @cursor_speed, 1].max
      @scroll_wait = 4
    elsif row1 == bottom and row2 > bottom
      return if @scroll_wait > 0
      @index = [@index + @column_max, @item_max - 1].min
      @cursor_duration = [7 - @cursor_speed, 1].max
      @scroll_wait = 4
    else
      @index = index
      @cursor_duration = [7 - @cursor_speed, 1].max
    end
    $game_system.se_play($data_system.cursor_se)
  end

Not sure about the other question. I feel like I've seen it somewhere before.
EDIT: Thinking about it, it would probably be too much effort to be worth it. You would need to generate a new charset graphic every time then alter the Sprite_Character class to somehow draw another sprite and layer the two together. Because using Bitmap#blt multiple times could get slow, a DLL would be recommended. So it's already a lot of work just for one little thing.

I say just use Sprite#flash or RPG::Sprite#blink_on/_off and be done with it.

10
RMXP Script Database / Re: [XP] Blizz-ABS
« on: October 16, 2017, 04:33:02 AM »
Fairly certain that enemy events need to have an explicitly defined trigger (see 4.3.8 in help manual) in order to run an event (IOW, you can't use any of the 5 event page triggers in the editor window). Looking at the list of triggers, Autorun and Parallel Process do not exist.

You should explain what it is you're trying to do because it can probably be done in a better way.

11
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: October 13, 2017, 08:22:19 PM »
Largely because I never looked into it fully. RMXP is picky when it comes to fullscreen, namely that it always changes the monitor resolution to 640x480. You have to use Win32API calls to forcefully change the monitor resolution to a custom size. Same thing occurs when switching back to window mode.

I can take another look at it this weekend.

12
Nobody uses VX around here, so your help will be limited.

You are right that you will need to update the stamina window's coordinates based on the Game Player's sprite coordinates. Where this should be done is within Scene_Map#update:
Code: [Select]
alias jet5021_update update unless $@
def update
$game_stamina.update_stamina
if !$game_switches[MAP_ONOFF_SWITCH] && STAMINA_ON_MAP
@stamina_window.visible = false
elsif STAMINA_ON_MAP
@stamina_window.visible = true
end

#==========================================
if STAMINA_ON_MAP
  @stamina_window.x = # Game_Player sprite X + offset
  @stamina_window.y = # Game_Player sprite Y + offset
  @stamina_window.update
end
#==========================================

if @stamina_window.visible && !$game_player.dash?
@stamina_window.opacity -= 1
if @stamina_window.opacity == 3
@stamina_window.openness -= 1
end
elsif @stamina_window.visible && $game_player.dash?
@stamina_window.opacity += 1 unless @stamina_window.opacity == 5
@stamina_window.openness += 1 unless @stamina_window.openness == 5
end
jet5021_update
end
You will need to figure out what methods fill in the blanks.

13
RMXP Script Database / Re: [XP] XP Ace Tilemap
« on: October 12, 2017, 07:57:53 PM »
That's impossible unless the scripter of the HUD allowed their script to adjust its positioning based on the game's resolution. How is XPA Tilemap supposed to be aware of these scripts and change their coordinates accordingly?

14
But only if you put = false on the same line, which is why I formatted my post like so.
But I'm sure Kise is veteran enough to know that bug exists.

15
Just quickly messed with it and this is what I got:

I have Dynamic Sound v2.04 and Dynamic Effects Engine v1.61.
I also have Heretic's Dynamic Sounds Patch above your post.

In Heretic's script, I removed the little message at the top of the script
Code: [Select]
if DEE::DEE_VERSION > 1.6 and RyexCFG::D_S::VERSION > 2.0
  print "ERROR: Ryex\'s Dynamic Sounds Patch isnt needed with\n",
        "versions higher than version 1.6, you may wish to\n",
        "remove the Patch."
end

In your event, do the script call
Code: [Select]
$game_system.disable_dee = trueand then do your Fade BGS.

And then when you want to re-enable, just do
Code: [Select]
$game_system.disable_dee =
false

16
Event System Troubleshooting / Re: Problem with default mechanics.
« on: October 05, 2017, 11:07:37 PM »
I can understand why it's like that to begin with. Take a look at the '051-Undead01' character sprite. Notice that the yellow dots are the same pattern in every column. Meanwhile, the ghost itself is facing the same direction in each row. This allows you to spin the ghost around while making it play its step animation, preventing the disruption of the animating dots. Essentially, you have two animations play on one character graphic.

In code, the game only resets the walk animation of the character if its new pattern does not match its previous (by pattern I mean what frame of the walk animation you select in the character sprite). In your demo, if you made the second page's graphic be the 2nd (or 3rd or 4th) frame of the walk animation, you will notice that the walk animation stops immediately.

For what you want, you're going to need to do a bit of a trick. On the first page, do a Set Move Route and change the graphic of the event to a different frame than the page's (in case of your demo, anything but the 1st frame). This will trick RMXP into resetting the walk animation so that when you transition to page 2, the step animation will immediately stop.

17
No problem :) I'm still very active regarding XP scripts, so give me a ping if you ever encounter any. I briefly check the RM reddit and don't have an account on any other forum.

18
Script Troubleshooting / Re: Blizz Abs and Custom resolution problem???
« on: September 29, 2017, 08:07:49 PM »
Use v.96 instead: https://pastebin.com/raw/M657TjVg

I didn't look at v.97 fully at the time (LiTTleDRAgo did this one). He changed a lot of the way the script was originally structured that it's no longer compatible with the Blizz-ABS fix. v.96 is still compatible, I checked.

And, again, you want to have Custom Resolution and the fix BELOW all 3 Blizz-ABS scripts. Your Scripts.rxdata indicated otherwise.

19
Script Troubleshooting / Re: Blizz Abs and Custom resolution problem???
« on: September 27, 2017, 09:38:43 PM »
You do need the Custom Resolution fix for Blizz-ABS from the topic http://forum.chaos-project.com/index.php/topic,7947.0.html
since the issue does appear to be a centering problem.

I'm not sure how you're getting the error message though. You didn't replace Custom Resolution with the above fix, did you? You need both scripts in your project, Custom Resolution being on top of the fix in script list order, with both of them below all the Blizz-ABS scripts.

If you're still seeing issues, please send your Scripts.rxdata so I can have a better look.

20
Script Troubleshooting / Re: Blizz Abs and Custom resolution problem???
« on: September 27, 2017, 05:48:17 PM »
The black rectangle at the bottom? Will take a look at it today after work.

Pages: [1] 2 3 ... 147