- Joined
- Dec 26, 2013
- Messages
- 2,124
- Solutions
- 14
- Reaction score
- 1,518
- Location
- USA
- GitHub
- Codinablack
It's not that optimization doesn't matter but number camparison (if modalWindowID == 0x01 then) is such a quick job it doesn't hurt performance to keep them together for organization. When you're dealing with more complex tasks optimization plays a larger role. For example in nested loops optimization can make a huge difference.
I'm not sure what function you are referring too. The only ones I see are those you use to create modal windows and they don't refer to storage values at all.
I "hardcode" my windows, I don't feel like it's less work setting up tables and passing them to a function, I can just ass well create the window and add the buttons and choices directly. I suppose if the windows are static it may be quicker but I almost always pass some data that gets processed to determine how the window gets constructed.
I would be very interested to see a before and after on your benchmark results. Of course along with what differes betwen the scripts.
You are always doing stuff more advanced than I
I only recently learned that you could pass a table as variable thanks to @artofwork with his advice on my potions system. So yeah I wasn't even doing this like you and evan... Time for me to step my game up!
You are right about the functions I posted, they really don't have any correlation to my storage values, but I also hadn't seen any reason why when initially opening the window it displays the value correctly, but after going into another window then back it shows -1
As for the before and after benchmark results... I will post them when I have completed.. As for the scripts... I suppose I could post them on here or pastebin and link it... My only issue is I don't really want to release this for public, but I suppose since my system relies on libs that aren't going to be posted there are no worries, because anyone on this thread that would see the code could easily do the same system on their own or even better... So once I get done with this, I will post here for you guys