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,914
Reaction score
643
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,386
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,914
Reaction score
643
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,386
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

zomboars.jpg

Concept art

Zomboars- main enemies in my story
mutant pigs addicted to beer
SF_People1_3 added!
index.php

I haven't been on here in forever wow(missed my forum birthday T-T). Anyways, I'm dabbling in BGMs, here's something I'm actually willing to share.

Binge-watched 6 episodes of the Erased anime... And that means I've watched half of it?! Sigh...

Forum statistics

Threads
109,202
Messages
1,043,007
Members
141,709
Latest member
chonkycat
Top