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.
Random Spawn Items

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 81
Ok I'm sorry if this has been asked before but I'm new to this forum. Anyway I was looking for a script or just a method for random, or rather levelled lists, of spawning items. What I am attempting is to make a Growbag, which will grow items randomly, or per number of steps. Not important items really, more of a novelty. I am attempting to make a Dark Tower game, which for those of you that don't know, is a series of books written by Stephen King. Its an epic journey of a sort of knight. Anyway there are plenty of magical things including a pouch that produces things like tobacco and small gems randomly. I'm using modern algebra's Grid Inventory System v.1.0b if it matters.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
I would agree that you might need a script for this. You could do this with events by having a common event set on a random timer using variables that will give the player random items at different times, however, it gets really tricky the deeper and more items you want to have given. Not to mention that it seems like you'd probably need an event per item and a way to turn it all off or on. Complicated to dance with events like this.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, you could do a combination of what grafikal is suggesting with my Item Drop Ranks script. You could have the common event set a variable to steps and check how many steps are taken, and then give a dummy item which randomly distributes any item of the same rank, meaning that you can increase the rank as you go along as well. I am actually not positive it works with Grid Inventory, but try putting it below the Grid Inventory in the editor and see if it works. I *think* it should
« Last Edit: April 18, 2010, 07:43:43 PM by modern algebra »

**
Rep: +0/-0Level 81
This may be a dumb question... But how do I make events happen without any activated button or anything. Meaning something that happens while just walking?  Like for my growbag to have items when it is checked after a while?

****
Rep:
Level 83
if your doing it in a script or common event you could make it turn a switch on, that would make an event that is on the map (like in the corner) that would transfer to the players location.  Then a conditional branch that uses a number in a variable that would be the random item they obtained, this can all be done with a common event.

I made a demo.

If you want it to be an item that you have to use to check, have the item non consumable, and then run a common event that contains the same stuff that is in the event that i created on the map, excluding the self switch, just make a condition for the "time for item" switch if on run random variable, if off say its empty.
« Last Edit: April 21, 2010, 08:59:55 PM by Mr_Wiggles »
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


**
Rep: +0/-0Level 81
I don't quite understand the first part... You make an event transfer to the player so it sets itself off? And will this event continue counting steps throughout the game?

I mean all I really need is an event that counts steps and automatically adds items to an inventory throughout the game. If it can do that automatically, then thanks to modern algebra, the item drops will be no problem.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I haven't looked at Mr_Wiggle's event, but:

how do I make events happen without any activated button or anything. Meaning something that happens while just walking?  Like for my growbag to have items when it is checked after a while?

All you need to do is set the event to trigger on parallel process instead of Action Button.

****
Rep:
Level 83
Well turn its self off, was because the event would continue to transfer its self to the players location.  Sorry if that was confusing.  Also if you just want it to add directly into the inventory look over what i did and combine every thing into one common that will just add an item to the inventory.  Like in the event on the map where it will use a random number through the inventory, just make that in the event.  Sorry, it's easier for me to just make demos then it is to tell how to do something. I'm throwing another demo together.

set up a common event like this:

   
« Last Edit: April 21, 2010, 09:32:15 PM by Mr_Wiggles »
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


**
Rep: +0/-0Level 81
Ok I tried to do it on a parallel process, but when I set off the switch, it just dumped a bunch of items into the inventory. I tried to set it to drop an item after 10 steps and restart that variable, but I messed up somewhere.

****
Rep:
Level 83
The set up that i created in the common in the pictures in my post ^ should work just fine. you can change stuff of course and add more items into the mix.
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com


**
Rep: +0/-0Level 81
Excellent Mr_Wiggles. I appreciate your effort, it seems to work just fine. I'll just tweak the steps and items. Thank you modern algebra and grafikal.

**
Rep: +0/-0Level 81
Sorry. One more thing. I seem to be an idiot when it comes to scripting. Or anything really. But the grid inventory script... I want the item to appear in the container. The item being 0023: dumb and I need quantity one to appear in container one. Can you help a sorry idiot out?   
« Last Edit: April 22, 2010, 09:32:28 AM by fredcowgill »