I am looking for a script that changes the way items are drawn in a window.
Consider the item window. Imagine you have a million items in your inventory. The engine first grabs all of the items, creates a bitmap large enough to hold all of them, and then draws every single item.
This is not an issue with the default engine, because the database limits are done in such a way that you cannot draw more than 1000 items in a window. Introduce some database limit breakers or instance items, and suddenly you may be drawing 10000 items easily.
The solution is quite simple: why are we drawing things we don't need to see?
The default window only shows 22 items; it is not necessary to draw a million other items that you will likely never see.
What I am looking for is a smarter item list: it will only draw a very small subset of items, for example 40, instead of a million.
The bitmap will be redrawn as necessary if the player is trying to view items outside of the current range. For example, suppose you have 100 items in your inventory, and you have just opened up the item window and see the first 40 items in two columns. Now, the player starts scrolling down, and once they reach the last row and want to keep scrolling down, now you need to shift your offset from 0 to 2, because instead of showing items 0 to 40, you now need to show items 0 to 42.
This will greatly improve all item-drawing performance, and allow you to carry a million items without the game crashing on you because it couldn't draw a bitmap that was a 32 million pixels in height.
It can be written for any RM. Preferably Ace, since then I can just use it, but otherwise I don't mind porting it over since this is an essential script.
Consider the item window. Imagine you have a million items in your inventory. The engine first grabs all of the items, creates a bitmap large enough to hold all of them, and then draws every single item.
This is not an issue with the default engine, because the database limits are done in such a way that you cannot draw more than 1000 items in a window. Introduce some database limit breakers or instance items, and suddenly you may be drawing 10000 items easily.
The solution is quite simple: why are we drawing things we don't need to see?
The default window only shows 22 items; it is not necessary to draw a million other items that you will likely never see.
What I am looking for is a smarter item list: it will only draw a very small subset of items, for example 40, instead of a million.
The bitmap will be redrawn as necessary if the player is trying to view items outside of the current range. For example, suppose you have 100 items in your inventory, and you have just opened up the item window and see the first 40 items in two columns. Now, the player starts scrolling down, and once they reach the last row and want to keep scrolling down, now you need to shift your offset from 0 to 2, because instead of showing items 0 to 40, you now need to show items 0 to 42.
This will greatly improve all item-drawing performance, and allow you to carry a million items without the game crashing on you because it couldn't draw a bitmap that was a 32 million pixels in height.
It can be written for any RM. Preferably Ace, since then I can just use it, but otherwise I don't mind porting it over since this is an essential script.
Last edited by a moderator:


