Main Menu
  • Welcome to The RPG Maker Resource Kit.

[XP] Scripting Question (Resolved)

Started by Kularian, March 10, 2012, 06:43:57 AM

0 Members and 1 Guest are viewing this topic.

Kularian

Okay, I'm using XP, and there doesn't yet seem to be a limited, personal inventory per character script thingy out yet.  No big deal.  I'm a novice scripter, so I was messing around in the Game_Party Script, and I meandered down to line 179, which is~

@items[item_id] = [[item_number(item_id) + n, 0].max, 99].min

I changed that 99 there to 8, as there will be 8 main characters.  It's not quite a personal inventory, but close enough for government work. 

My question is, in regards to that 99 there, is there some kind of variable I can call in the script to set that number to the number of characters in the party?  i.e. When I have 4 characters in the party, I can have a max of 4 of each item, and 6 characters gives me 6 items, etc etc.  If not, I'll probably find some happy medium at 4 or 6, ala Secret of Mana/Evermore. 

Thanks!

pacdiggity

I don't have XP, but there'll be a variable or method in Game_Party that gives the current members of the party. You'll need to identify this method (it's probably just 'members' or something), and use it in this context:
@items[item_id] = [[item_number(item_id) + n, 0].max, members.size].min
it's like a metaphor or something i don't know

Kularian

Ah-ha.  The method is actors, and it worked like a charm.  Thankee Pac!