Storage Boxes

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
Sixth, what a great contribution, thanks so much!

For us neophytes, do we just paste this script under the main script and the theo addon, making it the third?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Yup, paste it below both IMP1's script.


Or you can paste it into IMP1's addon, below his script part to keep all Theo's Inv Limit patches together.
 

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
61
Reaction score
44
First Language
English
Primarily Uses
RMVXA
You forgot the most important part for making a compatibility patch for Theo's Inv Limit script.


The restriction of taking items when the player's inventory lacks space.


I made a little snippet for it.


It also replaces the info shown on the player's info box (where it shows only "Bag" by default.


It now shows the players inventory info.


And made the help window's height change-able. 1 line is just not sufficient for many games.


Also added a compatibility patch for Galv's New Item Indicator script too. This part won't trigger if someone doesn't use that script, so there should be no issue with it.


Here is the snippet:


[sNIP]


With your just released addon and with this little snippet, Theo's script is fully compatible with yours. :)


What I couldn't manage to fix is the refreshing of the help window. Even if I put in '@help_window.refresh', it won't refresh itself. -.-


I am talking about the bug what Dymdez already reported.
Thanks very much! I will definitely add some of this functionality (multiple-lined help window) to the base script, and add the restriction of limited play inventory (and the displaying of that info) to the add-on.
I don't know what 'Galv's New Item Indicator' does. What does it do?


Also, until I finish the sound playing at the beginning and the end, you can have your own sounds play in an event, but you need to do something weird. Play a sound (using the event command) before you call the item storage scene with the script call, and after the script call in your event, have an empty Set Move Route (with wait for complettion checked), and then have another sound play event after that.
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
Weird that that works! Thanks! Now it won't be so weird when I exit checking a corpse and it sounds like a drawer closing :)
 

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
61
Reaction score
44
First Language
English
Primarily Uses
RMVXA
I've also fixed the help window being refreshed, so don't worry about that, but I've not updated the script yet. I'll do that when I've added a few more features ;)
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
For the record, the new item indicator shows when a player sees an item for the first time
 

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
61
Reaction score
44
First Language
English
Primarily Uses
RMVXA
So 1.3 now has the option of multiple lines for your help window, and a fixed help-window refresh.


I've also edited the addon to (hopefully) display the information about how full the player's inventory is.


So, assuming that second thing works, the only thing I've not added from Sixth's ideas is the new item indicator thing.
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
So 1.3 now has the option of multiple lines for your help window, and a fixed help-window refresh.

I've also edited the addon to (hopefully) display the information about how full the player's inventory is.

So, assuming that second thing works, the only thing I've not added from Sixth's ideas is the new item indicator thing.
Have you tested 1.3? I can't remove items from boxes :)

Edit: looks like the addon is not compatible with 1.3 or do we not need the addon anymore?
 
Last edited by a moderator:

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
61
Reaction score
44
First Language
English
Primarily Uses
RMVXA
You shouldn't need the add-on anymore, except for the Galv New Item Indication thing, which I'm going to add at some point when I understand what it's doing and where it's doing it.
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
But you said you edited to addon to support Theo's script?

Window refresh works, but 1.3 doesn't support Theo's script. With the addon, which does support Theo's script, there is a bug preventing you from removing items.

Edit: The addon, with the exception of the bug, does display the inventory correctly and reduces the 25 arrows from taking up 25 slots to taking up 0 slots, which is awesome!
 
Last edited by a moderator:

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
61
Reaction score
44
First Language
English
Primarily Uses
RMVXA
Sorry, you shouldn't need Sixth's addon, but without my addon, there won't be any support for Theo's script.


Are you saying with my addon, there is a bug which means you cannot take items from the box to the inventory?
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
Sorry, you shouldn't need Sixth's addon, but without my addon, there won't be any support for Theo's script.

Are you saying with my addon, there is a bug which means you cannot take items from the box to the inventory?
Yes, Among other things.. it's getting weird haha want a video?
 

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
61
Reaction score
44
First Language
English
Primarily Uses
RMVXA
Yes, however I'm afraid right now is my bedtime. I'll be back tomorrow at some point, and I'll find and fix this bug then.


Sorry for the delay. Time zones and all that.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
That video, lol, the same bug I encountered. :D

When I made my snippet for Theo's stuffs, I encountered that bug with the player's inventory size display too and took me quite some time to figure it out.

It won't refresh just by simply making a draw method where you did, IMP1. That will only refresh if the player leaves and enters the scene again.

Take a look at my snippet, it works like that. Ignore the many (often useful) alias methods, I just made those for making my debugging easier with some other scripts.

You need to change the update method to sync the player's inventory size in real time. Else it just won't refresh itself for some odd reason.

And simply leaving it as "if box.nil?" will make the FPS drop, because that will constantly redraw the stuff. That is why I made another argument in your title window, so that it stores the item amount before the transfer, and if the old amount is not the new amount, it refreshes once and makes the old item amount the same as the new one after to stop the drawing after the first refresh.

To be honest, making that many lines just for a single extra check at the move_item definition seems a bit overdone (even I did more checks than necessary, lol). And it looks like it messed up something. :D

For Galv's new item indicator, there really is no simpler and shorter way to make than what I made, so really, there is no need for you to waste more time on these stuffs.

No idea why would you try something different than a working method, unless it is shorter and more efficient than the working method.

I mean, if you someone wants it, they can use my snippet too combined with your first addon snippet, which works 100%.

So you can move on to make your own "to do list" (the "coming soon" features).

The 'call_update_help' method... I learned something today too, thanks. :D

PS: Yeah, I just want the steal feature added as soon as possible, lol. :D
 

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
61
Reaction score
44
First Language
English
Primarily Uses
RMVXA
I wanted to add them in to my script for a couple of reasons. Firstly, I edited my script slightly in order to make some of the additions easier, and I don't think this made the base script worse at all, while it did make it more extensible. Secondly it seems silly for me to have an add-on for Theo's script that needs more addons to make my base script work better with Theo's script. Either I would get rid of that add-on entirely (not really what I want to do), or have the add-on function sufficiently.


I also feel like I have done it in a slightly better way. I've actually gotten around to puting Theo's script in my game (which does make it a lot easier to test the add-on), and my solution (that is working) doesn't involve updating the box_title windows, so no drop in FPS is necessary. No check to see if the inventory size is not equal is needed. No extra instance variables are needed. I just added a refresh call in the scene when items are moved. I also had a < when I should have had a <, which is obviously silly, and I'm not saying I'm better than you are or anything (I really am grateful for your input!), I just wanted my script to be able to do the things it should be able to do.


I've almost finished with the sounds, and I think all the issues with Theo's script are fixed now.


I'll update soon with the latest version and then I'll look into the New Item thing.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
You mean you write scripts and addons without actually testing them? o_O


That I could never do, lol. :D


Btw, you are better than me in scripting, no need to tell it. :p


I am in my learning stages, writing scripts mostly for personal use. If it works, then I move on to the next script, until I learn something new. When that happens, I rewrite my scripts, and move on again. Rinse and repeat. :D


I never wrote that any of your updates made your script worse, I am sure there are many reasons to do what you did. Separate definitions for each thing in a script is always a good thing for extending it in later stages, like you wrote, also helps in making compatibility patches easier without many issues.


Don't bother with the new item thingy! Make the steal feature! :D
 

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
61
Reaction score
44
First Language
English
Primarily Uses
RMVXA
So I'm actually nearly done with the stealing script. And I'm writing the default probability of theft for an item. What variables would people like to be able to use? I've got the item's gold value and the maximum gold value of all the items. Is there anything else that should matter? I'll probably make it so key items can't be stolen.
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
Just add a notetag that will assign some items as not stealable, not all unique items are necessarily so important and if they are remember you can always designate them as not stealable.

Will this next update solve the bugs in that video?
 
Last edited by a moderator:

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
61
Reaction score
44
First Language
English
Primarily Uses
RMVXA
I think so. Again, I'm off to bed. But I think it's all pretty much working now.


So tomorrow I will add the <not stealable> tag, which shouldn't take very long to do, and upload the add-on and latest version of the base, which should fix everything!


I also got sounds working and stuff.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top