Ruby/RGSSx questions that don't deserve their own thread

Grab all items by using $game_party.all_items
Check those items using ".any?" function to check if the item in the said category exist
And if you're using a custom category, it largely depends on how it's done as the default code has no category except if it's being a weapon, armor (which it's an entirely different object), standard item, or key item. So if they're using a custom categorization, you have to make it based on what script they're using.

Also, you probably need a custom refresh function so that it also dynamically change the col_max based on how many categories will be shown. I think this will be the hardest part though.
change the col_max based on how many categories will be shown
That is the easiest part actually. The script does it itself. It's a matter of finding a way to filter categories.
Seiryuki - Categorize item scene.
The make command is
Code:
 alias icat_make_command_list make_command_list
   def make_command_list
  ICAT::VISIBLE_CATEGORY_INDEX.each { |symbol, label|
    add_command(label, symbol)
  }
 end
and I've been trying to figure out a way to adjust that to filter out the category when there are no items for the category.

I tried $game_party.all_items but was unsure of how to specify the category.
Everything I found was for the id or feature or scope. Since items is one group, weapons another and armor another.
Unless I do the check three times for each group, but I also need to figure out checking for custom categories within those three groups
So I'll try $game_party.all_items.any? but it still needs to be checked against the symbol. :item, :weapon, :armor, :Key_item, etc
yes? or is that wrong?

I'm not putting much effort into it, unless it would be easy. I'll continue to work with the problem on and off until I, maybe, figure it out or someone else does.
I don't know the script you mentioned, but let me try to shoot in the dark. Since you've mentioned changing col_max is easy for you, then let's omit that particular part. This particular code, you can try this
Code:
   alias icat_make_command_list make_command_list
   def make_command_list
     ICAT::VISIBLE_CATEGORY_INDEX.each { |symbol, label|
       add_command(label, symbol) if CategoryConditions[:symbol].call
     }
   end
Then you can "hardcode" the condition for each category symbol by using this
Code:
CategoryConditions = {
  :weapon => lambda { !$game_party.weapons.empty? }
  :armor => lambda { !$game_party.armors.empty? }
  # continue yourself
}
The pros of using this, you can even lock/hide a category even by using an entirely separate condition like game switches or variables.
The pros of using this, you can even lock/hide a category even by using an entirely separate condition like game switches or variables.
What other conditions can be used?
I'm trying a combination of things and I can't seem to get anything but the $game_party.... part to work

I used
:key_item => lambda { !$game_party.items.empty? && @item.is_a?(RPG::Item) && @item.key_item? },
but the category does not show up.
I used
:key_item => lambda { !$game_party.items.empty? && @item.is_a?(RPG::Item) && @item.key_item? },
but the category does not show up.
You didn't seem to understand scoping. Adding @ item won't do anything as it does not recognize what @ item is.
In Window_ItemCategory does not even have variable item. And the code block inside lambda does not recognize any local variable within the Window_ItemCategory either.

This seems to be your original intent.
The effect is to hide item screen categories if there are no items for that category.
So you don't check @ item, or whatever the thing you're hoping for. Instead, check the items inside the game party
Code:
$game_party.items.any? {|item| ............... }
So as long as there is at least one item, the category should be shown.
You didn't seem to understand scoping.
Yes, there is much I still haven't grasped yet. Haven't really spent time learning ruby, just tried to learn rpg maker.
So that makes the default categories work Now I just need to figure out the custom ones.

Thanks for the info.
Hi there again, I'm using Napoleons Minimap (https://forums.rpgmakerweb.com/index.php?threads/napoleons-minimap.13801/)
I would like to know if I can make a Mask to make the map circular in scroll mode instead of rectangular , if so how can I ?
Thank you 🙂
//Edit: Managed to find a way to do it on my own. It's not pretty, but it works!

(I'm sorry in advance for a longish post, I'm trying to explain everything! Question is bolded, and posted twice just to make sure it's easy to find!)

I'm using (among others) two scripts: Ace Equip Engine and Weapon Attack Replace (both by Yanfly). I use Weapon Attack Replace to create scaling for weapons (basically, weapon hit for <Weapon.attack + (Actor.attack * MOD)> (Mod depends on "scaling", different for various attack skills). There is 0 variance - weapon always does the same damage.

Is there any way to change how Equip Engine displays attack, so it takes into account the formula of the weapons' skill, instead of the basic Actor.attack + Weapon.attack? If possible, have it as a separate listing (ie. AR) in equip menu?

The way it is currently may be slightly confusing for the player, for example, if we have two weapons:
(Player's attack is at 100)
Weapon A has attack of 120, but poor scaling at only 33% of player's attack.
Weapon B has attack of 75, but godlike scaling at 120% of player's attack.

When equipping, player notices that weapon A puts his attack at 220, while weapon B put it at 175. Well, obviously weapon A is better then, right?
But after taking scaling into account, weapon A will deal ~153 damage, while weapon B deals 195 damage. But, unless player will read about it outside the game, they won't even realize it. So again...

Is there any way to change how Equip Engine displays attack, so it takes into account the formula of the weapons' skill, instead of the basic Actor.attack + Weapon.attack? If possible, have it as a separate listing (ie. AR) in equip menu?


Huge thanks for anyone who might help me with that


//Edit: Managed to find a way to do it on my own. It's not pretty, but it works!
I need a way to check if there's an event at location x y
Excluding the player

Or alternatively, get the ID of an event at location x y
Something like that.
Spoiler
Code:
class Game_Map

  #--------------------------------------------------------------------------
  # * Get Array of Events at Designated Coordinates
  #--------------------------------------------------------------------------
  def events_xy(x, y)
    @events.values.select {|event| event.pos?(x, y) }
  end
  #--------------------------------------------------------------------------
  # * Get Array of Events at Designated Coordinates (Except Pass-Through)
  #--------------------------------------------------------------------------
  def events_xy_nt(x, y)
    @events.values.select {|event| event.pos_nt?(x, y) }
  end
  #--------------------------------------------------------------------------
  # * Get Array of Tile-Handling Events at Designated Coordinates
  #   (Except Pass-Through)
  #--------------------------------------------------------------------------
  def tile_events_xy(x, y)
    @tile_events.select {|event| event.pos_nt?(x, y) }
  end
  #--------------------------------------------------------------------------
  # * Get ID of Events at Designated Coordinates (One Only)
  #--------------------------------------------------------------------------
  def event_id_xy(x, y)
    list = events_xy(x, y)
    list.empty? ? 0 : list[0].id
  end

end

You don't have to insert this code anywhere, it is already included in the default scripts.
If you just need the ID of the event on co-ord XY, you can use:
Code:
$game_map.event_id_xy(x, y)
This returns 0 if there is no event on the specified co-ordinates, and returns the ID of the event if there is.

The other methods I quoted above return array values with events as elements, in case you need the whole event object.
Thank you

Does it return anything if player is there?
No, it only checks for events, just like you wanted.
(I hope this is the appropriate place to post this)
How would I go about making it so that when an actor is successfully hit by an enemy, tp is reduced instead of gained? (There is a reason I can't accomplish this using states).
If you go to line 742 in Game_Battler and change the += to a -= it should take TP off depending on damage suffered.
Quick Edit: I did try this, and it does work.
I would suggest doing the edit in a new script slot though (so practically overwriting the original), its just safer in case you ever forgot that you edited the base scripts...
@Tevi
Thank you, it works perfectly. Thank you for helping me out 🙂
@Engr. Adiktuzmiko
Thank's for reminding me. I'll be sure make this change a separate script.
Well I think this question doesn't need a whole thread.

I tried to find a zoom out script for RMVXA, I found one, someone said that it's in French (it's MGC Zoom Script, I guess so), I clicked to the link but it's seem died (seem likes a whole forum is died). So if someone have a copy of the script here, please help me ._.

Thanks very much.
Well I think this question doesn't need a whole thread.
For more visibility, it deserves its own thread.
If its about looking for a script or especially if about a specific script, it deserves its own thread. 🙂
Okay so I have a thing I need help with now-
In my game, the ATK buffs do literally nothing. How would I go about altering them to give more attack? It's probably really simple and I just can't find it in the Game Objects, hence why it's here.
Edit because I forgot to add somehting: No problem Solr, I love helping when I can.

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/