Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Help with Quest monsters.

Im new to RMXP and have a very basic understanding of events and variables. What i want to know is how do i make a certain item drop off of a random monster once a quest is accepted, but the item only drops once. Ive created a new monster that has the item as a drop, but i cant seem to make it appear for the quest. Ive looked for a tutorial and havent found one :S help or a link to a tutorial will be great :D thanks!
 
well i want them to be just a random encounter, but thats only active during the quest. if thats making sense. So when the quest is accepted, you will be able to encounter the monster and get the item, but when the quest is completed, u cant encounter the monster anymore.
 
Hmm...
If I was doing this, I would make the quest, and the probability of getting the item, a variable. Then, this is what I would do.
@>Control Variables:[0010]+=RandomNo.(0...10)
@>Conditional Branch: Variable[0009]==1
@>Control Variables:[0010]+=RandomNo.(0...10)
@>Conditional Branch: Variable[0010]>=5
@>Text: You gained the item!
@>Change Items: [quest item], +1
@>
: Else
@>Text: You find nothing.
@>Control Variables:[0010]=0
@>
: Branch End
@>
: Else
@>
: Branch End

What that does is, if you have taken on the quest,which you need to get the item, that variable is set to one and the first conditional branch is passed. Then the chance of getting the item is a random number, and the second conditional branch is checking to see if that random number is equal to or above a set value. If it isn't, then you don't get the item and the variable number returns to zero for another try.
If you place that on your random monster troop list, with the variable of enemy HP=0, that should mean that you get the item at the end of the battle.
 
Well, if you only want/need one item, you could add @>Control Variable: [0009=quest]+1 if you get the item, then the quest will be finished and won't match the first conditional branch.

EDIT:
You would still encounter the monster, but you wouldn't get the item.
 
yea, im not too good with understanding the script, so i dont know whats wrong :S ive hopefully followed what you've said correctly, when i test it the item drops before i talk to the quest giver. now wether i've labled the quest wrong i dont know :S
 
ah.. i think tht might be the problem :P this is wot i've got for it...

@>Text: (randon text)
@>Control Self Swtich: A =ON

and thats all :S so i think thats the problem there...
 

Wichu

Member

lnicol1990":2m880lhv said:
@>Control Variables:[0010]+=RandomNo.(0...10)
@>Conditional Branch: Variable[0009]==1
@>Control Variables:[0010]+=RandomNo.(0...10)
@>Conditional Branch: Variable[0010]>=5
@>Text: You gained the item!
@>Change Items: [quest item], +1
@>Control Variables:[0009]=0
@>
: Else
@>Text: You find nothing.
@>Control Variables:[0010]=0
@>
: Branch End
@>
: Else
@>
: Branch End
Try this; I've edited Inicol's event. It will change the quest variable back to 0 after the item drops, disabling the special drop immediately.
 
Huh.... I thought I'd put that in. Good spotting Wichu!

Yeah, you could turn the quest variable to 0, or raise it up to 2, which could signal the completion of the quest. I would personally raise the variable, since if it's at 0, you might be able to do the quest again. And if it's at 2, then you can add an event that will only work once you have completed the quest.
 
You could always directly modify the enemy drops (via scripting and change them back).

Code:
Script: $temp_item_id = $data_enemies[enemy_id].item_id

      $data_enemies[enemy_id].item_id = n

Battle Processing: Troop Name

Script: $data_enemies[enemy_id].item_id = $temp_item_id

Replace enemy_id with the enemy's drop you wish to change.
Replace n with the item id you are wanting to change the drop to.

Simple enough.

@RPGS: Don't spam.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top