Search results

  1. W

    Benchmark Group vs Array of Units vs List of Units vs always use a Filter

    Here is a rather silly benchmark. However, assuming you have a group of units you are always keeping track of, you may want to know (for some inexplicable reason) what is the most optimal structure to hold these units. [Here's a hint as its been the winner in all my benchmarks thus far]. I'm...
  2. W

    Adding a useless buff?

    Hey all, does anyone know how I can create and add a useless buff to a unit? This buff wouldn't do anything, but I'd like it so that I can report data to a player in some way that is part of the command card. I.e. for an equipment system, perhaps it would show a buff of the sword and shield you...
  3. W

    Snippet DbMod-alpha

    Edit updated:: Now its configurable. You can now modify the levels of each sub property, the abilityId and the button positions. I don't know if Lua has a string format like C does, if it does I'll make the tooltip configurable. Here is a resource that is used to manipulate drunken brawler and...
  4. W

    Multiple inventories

    So in my ItemMenu submission, there was some talk about negative item slots and how using them caused the game to crash. Well, if you give a hero 2 inventory abilities 'Ainv;, he can pick up 12 items. However, the first 6 he'll pick up will be invisible. Scripting helps somewhat. You can...
  5. W

    Benchmark Collection shoot out (Array vs Table vs HashSet vs LinkedList)

    Hi all, Here is a benchmark between 4 different types of collections. I am trying 4 different standard things to try against a collection. Each of these collections was populated with the first 1000 values of the function Sum(n), [Sum(n) = (n * n+1)/2]. The benchmarks rules were slacked...
  6. W

    System Caster a type cast library

    Hi all, Here is a typecast library that allows you to cast integers to agent types, and agents to other agents. (as promised from my graveyard-ed box) The library is to help bridge old map to use the fogstate exploit, without alot of effort with a pretty clean syntax. The syntax is the...
  7. W

    Benchmark Benchmarks around dynamic arrays and hashtables

    Hey all, So its a little known fact but SaveAgentHandle fails on storing null in the hashtable. This totally sucks, but as a result I decided to collect some benchmarks. There are 9 results here, #1 is the iteration penalty, quiet frankly its result may be ignored. The other 8 results are...
  8. W

    Snippet typedef integer as int

    Hi all, this is quiet a silly little trick and its more or less a bit of laziness. Here is the library, I'm not even going to bother spoilering it, because well there is no code involved. library int { public struct int[] { } } You can now declare int types. You can then use int...
  9. W

    Snippet Box

    Box is basically object from Java. "Useful" if you need to create indexs out of anything and don't even remotely care about performance. Or if you want to store multiple types in a collection (you should probably use a struct). Or if you are horrendously lazy and want a type cast library and are...
  10. W

    Snippet Dictionary (in zinc)

    Updated:: Dictionary is an associative array, like Vexorian's table. Unlike Table however, Dictionary keeps track of elements stored in it and provides a means to iterate through the collection. This is basically a linked list and a hashtable combined. There is a readonly array struct that will...
  11. W

    Demo Map ItemMenu v3

    Hi all, Here is my latest rendition of itemMenu its included in a demo map. But it can work as a standalone script. ItemMenu is out to make it easy to use items as a menu system. It does so by giving you a bunch of event handlers and having really drop dead simple implementation. Included...
Top