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.
Item Limitation and multiple item drop RPG MAKER XP

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 67
RMRK Junior
1. How do you limit the item drop? i mean making the item unique that if the player gained the item ones, it will never drop again from monsters.
2. I am making a rpg of retrieving lost pages so after making limitations of only 1 copy of each page, i need to make it like: after the player gained the 1st page, the next item to be dropped by monsters is the 2nd or 3rd pages.

need help ! tnx !  ;D

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
hrm... when it comes down to it, it might be better to have the pages appear as a boss battle ending, as an scripted event (that is, an event that is part of the story, not an event through a script) or have pages be one item that you get several of, each time, you learn more.
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.

**
Rep:
Level 76
Interested RMKR
I can't help you do it perfectly without scripting, but there is a way to event it to work similarly.

Make a new event on EVERY map where the monsters are that will drop page 1. Make all monsters drop page 1.

Make the event a parallel event (check the lower left corner where it says Trigger and let the trigger be the action button)

@Control Variable [A] = [Page 1]    (Note that A is any number to your liking. Choose a variable)
@Conditional Branch: Variable [A] > 1
   @Change Items [Page 1], -1
   @Change Items [Page 2], +1
@else


@control Variable = [Page 2]
@Conditional Branch: Variable > 1
   @Change Items [Page 2], -1
   @Change Items [Page 3], +1

etc. etc. and let's say you want 10 pages?

@Loop
   @Control Variable [J] = [Page 10]
   @Conditional Branch: Variable > 1
      @Change Items [Page 10], -1
@Else
@Repeat Above



     

**
Rep:
Level 67
RMRK Junior
 :D thanks ! i'll try it !
but its ok for me to use scripting if you'll kindly provide codes. ^_^
i am used to coding, but not this ruby language? i think.
« Last Edit: July 16, 2011, 03:31:59 PM by kenth21v »

**
Rep:
Level 76
Interested RMKR
lol... Yeah, I know what you mean. I can program some, just not in ruby ^^

No worries, but eventing is a lot like coding. You have a goal and you just need to think exactly how you're going to get it. You just don't know all the functions yet, but you will.

**
Rep:
Level 67
RMRK Junior
lol... Yeah, I know what you mean. I can program some, just not in ruby ^^

No worries, but eventing is a lot like coding. You have a goal and you just need to think exactly how you're going to get it. You just don't know all the functions yet, but you will.
can you show me how to script this:
eg. Bronze sword drop rate is 50% while mithril sword has 10% drop rate in same monster.
i think it required scripting. or if not please show me. :lol:
i made something like
Control Variable:[Treasure] = Random no. (0-9)

Conditional Branch: Variable[Treasure] == 0
              $data_enemies[33].item_id = 1                         >>>>>for example is the bronze sword
Branch End
Conditional Branch: Variable[Treasure] == 1
              $data_enemies[33].item_id = 2                         >>>>>for example is the mithril sword
Branch End

there, so if i can just make it like "Conditional Branch: Variable[Treasure] == 0 - 4" then it will be a 50% drop rate right? how can i do that?

hoping for help from you or anyone... Thanks guys ! :D

**
Rep:
Level 76
Interested RMKR
Yeah.

Try this:
Make an event (in battle) with the starting trigger to be: Enemy #1, "dead" (or whatever) inflicted.
Conditional Branch: Variable[Treasure] <= 4 (less than or equal to)
     Add item:
     Show text: You got  ____
Else
Conditional Branch: Variable[Treasure] ==5
   Add item:
   show text: you got ____
Else
Conditional Branch: Variable[Treasure] =>6
Else



That way you can just get the item mid battle anyway xD

*
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
Alternatively, through script, first assign your variable normally through event commands. Then,
Code: [Select]
if $game_variables[VARIABLE_ID] == 0
  $data_enemies[ID].item_id = 1
elsif $game_variables[VARIABLE_ID] == 1
  $data_enemies[ID].item_id = 2
elsif $game_variables[VARIABLE_ID] == 2
  etc...
end
it's like a metaphor or something i don't know

**
Rep:
Level 67
RMRK Junior
Alternatively, through script, first assign your variable normally through event commands. Then,
Code: [Select]
if $game_variables[VARIABLE_ID] == 0
  $data_enemies[ID].item_id = 1
elsif $game_variables[VARIABLE_ID] == 1
  $data_enemies[ID].item_id = 2
elsif $game_variables[VARIABLE_ID] == 2
  etc...
end

i think i'll use this. but thanks to everyone who replies. i also tried those. ^_^ i really appreciate your help guys.

*
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
There's a quicker way to do that, I realized.
Code: [Select]
for i in 0..99 (or however many items you have)
  if $game_variables[VARIABLE_ID] == i
    $data_enemies[ENEMY_ID].item_id = i
  end
end
That will make the enemy specified have an item with the ID of the variable.
it's like a metaphor or something i don't know

**
Rep:
Level 67
RMRK Junior
ahh yes looping tnx tnx.. uhm...
What is the alternative of "Conditional Branch:[Bronze Sword] in inventory" in scripts?
can you give me some lecture in scripting?  :)
stuffs like these:
$game_variables[1]
$data_enemies[1]

i love using scripts, it makes me do more.
thanks.

*
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
Well, XP isn't my native engine, but lemme take a look...
It seems that it's hidden in the weapon_number method of Game_Party.
Perhaps:
Code: [Select]
if $game_party.weapon_number(ID)

And for the other things, $game_variables is what the game saves the used instance of the Game_Variables class. The index included after, in the braces, is the index in the array that is referenced. The same applies to $data_enemies, except not for Game_Variables, it's a reference to the data file Enemies. The index represents which enemy is being referenced, because (I believe) the enemies' data is stored in a compact array.
it's like a metaphor or something i don't know