• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Drawer/Cabinet Script

Resource Drawer/Cabinet Script N/A

TechSkylander1518 submitted a new resource:

Drawer/Cabinet Script - Let the player select from a display of items!

View attachment 2858
To see this script in action, check out The Last Nurse Joy!​


Here's a little something that I put together for The Last Nurse Joy, from an idea by AnonAlpaca!


Code
Ruby:
Expand Collapse Copy
ItemArrays = [
[:POTION,:SUPERPOTION,:HYPERPOTION,:POKEBALL,:RARECANDY,:REPEL,:ULTRABALL,:REPEL],
[:POTION]...

Read more about this resource...
 

WolfTaiko

Ex-Ace Gamer
Member
Joined
Jul 30, 2020
Posts
224
I'm having trouble, I ran the code pbDrawer(1), I uncommented pbReceiveItem(item) in the code, and I got this error message.
---------------------------
Pokemon Dragon Siege
---------------------------
[Pokémon Essentials version 18.1]

Exception: RuntimeError

Message: Script error within event 8 (coords 7,5), map 22 ():

Exception: NoMethodError

Message: (eval):1:in `pbExecuteScript'undefined method `pbDrawer' for #<Interpreter:0xee7c0a8>



***Full script:

pbDrawer(1)




Backtrace:

Interpreter:197:in `pbExecuteScript'

Interpreter:1458:in `eval'

Interpreter:197:in `pbExecuteScript'

Interpreter:1458:in `command_355'

Interpreter:359:in `execute_command'

Interpreter:155:in `update'

Interpreter:102:in `loop'

Interpreter:158:in `update'

Scene_Map:162:in `update'

Scene_Map:160:in `loop'





Backtrace:

Interpreter:246:in `pbExecuteScript'

Interpreter:1458:in `command_355'

Interpreter:359:in `execute_command'

Interpreter:155:in `update'

Interpreter:102:in `loop'

Interpreter:158:in `update'

Scene_Map:162:in `update'

Scene_Map:160:in `loop'

Scene_Map:169:in `update'

Scene_Map:229:in `main'



This exception was logged in

C:\Users\USERNAME\Saved Games\Pokemon Dragon Siege\errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
 

ghostofherooftime

Novice
Member
Joined
Dec 3, 2020
Posts
13
I like where this script is going, but I think there needs to be some quality of life improvements such as
1. Being able to select multiple or all at once
2. Actually having the item be removed from the drawer once you select it.

If i knew anything about coding I'd help but sadly I don't. I hope you're able to implement these in the future, but great base work so far!
 
I like where this script is going, but I think there needs to be some quality of life improvements such as
1. Being able to select multiple or all at once
2. Actually having the item be removed from the drawer once you select it.

If i knew anything about coding I'd help but sadly I don't. I hope you're able to implement these in the future, but great base work so far!
Thanks for the suggestions!

I hadn't considered doing anything like 1 before, but it shouldn't be too hard to implement! I could see it being used for something like finding someone else's stuff and having consequences for taking more from it!

2 was something talked about while TLNJ was getting made, but where I run into trouble is in getting the game to remember what's been taken. Global variables could get awkward for developers, and since the arrays are stored in a script rather than called in the event, I can't really use self-switches. The best I can come up with would be to store it as an attribute in the player themselves, which bothers me because it doesn't really seem like where it should be, but I guess there's not really any reason that this would be intrusive for devs or for players, so I might just go ahead and try that angle.
 
Back
Top