| 04-05-2011, 04:44 PM | #1 |
So I wanted to make a non-shitty set item system and so I did. Now I want to show it off so I am. This is basically a system for updating the item tooltip to display the correct completion of the set (e.g. which pieces it has and which ones it's missing, along with whatever bonuses it's adding). I also wrote a lua to auto-generate the |
| 04-05-2011, 09:22 PM | #2 |
So, you have a lua script that generates all variations of an item, depending on how many items a set has. And based on the items raw code, you determine the bonuses that it will give to the hero? Pretty sweet. Are you gonna use this somewhere? |
| 04-06-2011, 12:05 AM | #3 |
That's almost right. The lua generates all the variations. You also have to do a setup with the item system (using a struct to define item types and sets) so you'll want to make that stuff match the lua. The item system checks which pieces you have when you pickup/drop a set item and then adjusts the item accordingly. Hopefully it'll get used :p |
| 04-06-2011, 10:31 AM | #4 |
Since the library has nearly two thousand lines of code, it would help if you included some documentation. |
| 04-06-2011, 11:03 AM | #5 |
It's for my own personal use. I just wanted to show off the end result. |
| 04-08-2011, 02:49 AM | #6 |
1900 lines of code for item system? must be hardcore. hope it's not some incomprehensible or inconsequential trash like some other expansively coded systems. |
| 04-09-2011, 12:42 PM | #7 |
Eh, a lot of that is setting up the bonuses for structs/adding/applying them. Also that version has the old offset setup function (although commented out). A stripped down version without that stuff + the map specific code I also have in there is only about 700 lines (with 300 of those being used to setup the offset hashtable). The proper version is 1319 lines. But yeah, as I said before I didn't post the map so people would check the code. Just wanted to show the set itemness. |
| 04-12-2011, 06:19 PM | #8 |
outstanding, can be useful for an RPG i guess, but i prefer the art of simplicity more and i don't really thing such overload of space and virtual memory is so necesary |
