RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[XP] Scripting Question (Resolved)

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 86
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~

Code: [Select]
@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!
« Last Edit: March 10, 2012, 07:04:25 AM by Kularian »

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
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:
Code: [Select]
@items[item_id] = [[item_number(item_id) + n, 0].max, members.size].min
it's like a metaphor or something i don't know

**
Rep:
Level 86
Ah-ha.  The method is actors, and it worked like a charm.  Thankee Pac!