Viuys

Villager
Member
Joined
Jan 20, 2013
Messages
5
Reaction score
0
First Language
Polish
Primarily Uses
N/A
I'm making an inventory system for my Survival Horror game and I wanted to make the items in the inventory to be sorted from oldest to newest acquired.
I'm using FenixFyreX's Manual Item Sorting if it helps in any way.
Can anyone help?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,890
Reaction score
642
First Language
English
Primarily Uses
RMVXA
I believe you would have to add in an item time tracking. By default there is no option to sort by time acquired.
After doing so you could use Hime's Inventory sorting to reorganize them by the data you created.
I can only see this being done by adding a game time parameter to the items.
Someone better than me could probably do it.
 

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
812
Reaction score
1,383
First Language
English
Primarily Uses
N/A
This script was from this thread- (sort newest to oldest)
https://forums.rpgmakerweb.com/index.php?threads/skill-item-list-based-on-learn-obtain-order.19050/

Allows you to show the skill and item list based on the order that you learned the skills (obtained items) instead of the default which uses the database ID to determine sort order.

I wonder if this can be edited to do the opposite.

Code:
class Game_Actor < Game_Battler
  def skills
    (@skills | added_skills).collect {|id| $data_skills[id] }
  end
end
class Game_Party < Game_Unit
  def items
    @items.keys.collect {|id| $data_items[id] }
  end
  def weapons
    @weapons.keys.collect {|id| $data_weapons[id] }
  end
  def armors
    @armors.keys.collect {|id| $data_armors[id] }
  end
end
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,890
Reaction score
642
First Language
English
Primarily Uses
RMVXA
edited to do the opposite.
You would just encompass the statement with brackets and then put .reverse!
Ruby:
(@items.keys.collect {|id| $data_items[id] }).reverse!
This is from Hime's Inventory sorting script
 

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
812
Reaction score
1,383
First Language
English
Primarily Uses
N/A
Neat!

Potion will be the first for both test. Original script is based on the order obtained.

vanilla script
-
1. Potion
2. Hi-Potion
3. Full Potion

.reverse script
-
3. Full Potion
2. Hi-Potion
1. Potion

Note: Order doesn't update for duplicate items that you already have in your inventory.

Works like a charm! I appreciate your input.

Ruby:
class Game_Actor < Game_Battler
  def skills
    (@skills | added_skills).collect {|id| $data_skills[id] }
  end
end
class Game_Party < Game_Unit
  def items
    @items.keys.collect {|id| $data_items[id] }.reverse!
  end
  def weapons
    @weapons.keys.collect {|id| $data_weapons[id] }
  end
  def armors
    @armors.keys.collect {|id| $data_armors[id] }
  end
end

Edit: found Hime's Inventory Sorting script that you're referring to
 

Latest Threads

Latest Posts

Latest Profile Posts

AeroPergold wrote on LUKElcs's profile.
Its-a me, Pergold from Gamejolt!
I added footstep sounds to our content that I posted in a previous thread. I was unable to edit the post, so if you're interested, see below.

DOWNLOAD LINK

I've started working on rpg maker again, and I can see a lot of improvement from when I was 13. I still have a long way to go, but I'm proud that I've gotten this far.
Animated Title screen is by SharkerrBlue(SB)
I am using the Nightmare Land pack.
I just can't walk to the store for lunch without walking past people smoking. It not only smells bad, it's probably poisoning me. I'm afraid I'll eventually have to be hospitalized. I can't take another path because there's too much traffic and drivers in the plaza are reckless sometimes. I almost got run over once, even after looking both ways.
RyanYe wrote on whtdragon's profile.
Your art works about Wyrvens and Dragons are sooooooooo cooooooooool~! I like them so bad
Can you create more? like Archangels, Devils, Titans, Cyclops!!

Forum statistics

Threads
108,810
Messages
1,039,645
Members
141,255
Latest member
yam655
Top