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?
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.
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 🙂
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 😉
For the record, the new item indicator shows when a player sees an item for the first time
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.
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.
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!
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, 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.
That video, lol, the same bug I encountered. 😀
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. 😀
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. 😀
PS: Yeah, I just want the steal feature added as soon as possible, lol. 😀
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.
You mean you write scripts and addons without actually testing them? 😳
That I could never do, lol. 😀
Btw, you are better than me in scripting, no need to tell it. 😛
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. 😀
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! 😀
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.
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?
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.