| 03-20-2010, 08:14 PM | #2 | |
So this is only accurate to 10? Also it doesn't allow for negative values. Quote:
I would consider this a pretty major limitation, considering the "clunky" option which you don't want to use (using abilities) allows for this, and handles values that are not multiples of 10. I would assume the fact that you are creating an item automatically makes this system's overhead greater than the alternative option (abilities) --but I don't know much about that kind of thing. |
| 03-20-2010, 11:07 PM | #3 |
I would look at using binary values to add the tomes in (1, 2, 4, 8, 16, etc...) This will reduce the number of loops/tomes required for the majority of values. TheKid does have a point though, I think abilities would be faster than tomes as there is less overhead (abilities don't require handle creation/destruction). Although someone would need to stopwatch it. |
| 03-21-2010, 12:36 AM | #4 |
A bigger problem than handle creation is that this does not work on units without an inventory. |
| 03-21-2010, 02:07 AM | #5 |
The ability-based variety will always be much faster, and not prone to the requirement of an inventory. Even if the bug is eventually fixed at some time in the future (which I highly doubt), one can just use BonusMod to apply somewhat limited health changes. The ability variant also has the advantage of handling mana, too. Also, my vJASS implementations of UnitMaxState (and BonusMod) are lightning fast while also being trivial to use, and they even use Mike's ObjectMerger to generate the needed abilities with little to no configuration required by the end user. (Links in my signature, if you're curious.) I really don't see any advantages to this method over the method I used. I especially don't see how my implementations could be called "clunky" :( They literally Just Work™. (Yes, this post is a bit of a shameless plug. I blame Space Hitler and his nazi moon base.) |
| 03-21-2010, 07:48 AM | #6 | ||||||
Quote:
The only downside is as you said the items, but as I said I dont really know too much advanced stuff. I would assume that adding/removing 10 items wouldn't be too bad. Quote:
If you have funky health values in your map, then you should modify the system (which is easy anyway) to do what you want. Quote:
Quote:
The 'requirement of an inventory' could be seen as a part of the system, also stops it from accidently being used on non inventory units, a sort of failsafe. Quote:
I also don't like having all these other things required to do just a simple task. Its great for you guys who love your JASS and love all your fancy interwoven systems, but I'm not really into that :P (inb4 flame; its personal preference) Quote:
|
| 03-21-2010, 02:05 PM | #7 | |
Quote:
|
| 03-21-2010, 02:56 PM | #8 |
He said a bunch of names and whatnot, I assumed they were needed. I'm not really down with the JASS scene etc. |
| 03-21-2010, 04:35 PM | #9 | ||||||
Quote:
1500: 1000 100 100 100 100 100 1500: 1024 256 128 64 16 2 Equal iterations. 9: 1 1 1 1 1 1 1 1 1 9: 8 1 Not so equal. Powers of 2 are much better, speed-wise. Quote:
The point of libraries is that users don't have to modify them. They are black boxes which do exactly what they say they do, saving the user from having to write it themselves. One shouldn't ever have to understand how a library does something to use it. Quote:
Quote:
Quote:
Quote:
------------------------------ Just to be clear, I'm not trying to insult you or discourage you or anything of the sort. I am simply being honest with my years of experience. |
| 03-21-2010, 09:19 PM | #10 | |
Quote:
Its not like you slip, fall, and irreversibly add unintended life to a unit. |
| 03-23-2010, 08:08 AM | #11 | |
It's much appreciated Earth :) Fixing up system now! Where can I find Mike's ObjectMerger? Quote:
|
| 03-23-2010, 05:31 PM | #12 |
Its part of the JNGP. You can find examples of how to use it in the Grimex Manual (check the Grimex folder in the JNGP folder). As for using LUA (which I recommend for more than 1 object) you can checkout http://www.wc3c.net/showpost.php?p=1120806&postcount=2 and http://www.wc3c.net/showthread.php?t=107940 (the bonus mod main library). |
