System GTrigger Event System

Then i will probably use it.
"But" (Not your fault) that's a shame that we can't use the Null of the ascii table, we would be allowed to make "easy" mathematical links between stuff in the object editor.
ASCII1.GIF
 
This system must hate PolledWait() (Or PolledWait2())....

It makes the PolledWaits skip the remaining actions.

Don't flame me for using Polled Wait please :p
 
Oh.

Who reads the full instructions here anyways? xD

All I read is how to use it, and what commands there were.
 
I replaced my creating triggers and such with this and I have to say I ROCKS!!!

Also, I want to suggest something, Add another Unit Event, When a unit is attacked, it will check whether the attacked unit has the ability. And another unit event than will check the attacked unit's unit-type id (Raw Code)
 
>another Unit Event, When a unit is attacked, it will check whether the attacked unit has the ability
I thought about it, and that doesn't follow the hashing princible GTrigger is based on. Internally it would have to check, unlike for the other events where it actually performs an array read. :)

If you want to do this though, you can use Event with an And boolexpr, or just however you like...

>And another unit event than will check the attacked unit's unit-type id (Raw Code)
Ah. I may be able to do this. Hmmm. What should I call it, though? Lol... Hmm..
 
I like this after using it for 10 minutes, just one question.
JASS:
...
    static method attackcheck takes nothing returns boolean
        return GetAttacker() == Data(filter).caster and Data(filter).ticks > 0
    endmethod
...

private function qwe takes nothing returns nothing
    local trigger t2 = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t2, EVENT_PLAYER_UNIT_ATTACKED)
    call TriggerAddCondition(t2, Condition(function Data.attackcheck))
    call TriggerAddAction(t2, function Data.stopattack)
endfunction

How would I make a GTrigger event with a condition, like how this is
JASS:
call TriggerAddAction(GT_RegisterStartsEffectEvent(CreateTrigger(), ID) , function a)
all in one line.
 
What advantage does this have over SpellEvent by Anitarf? Why doesnt this use function interfaces? Why doesnt it use Table to map AbilityIDs to triggers/functions (which would, now that we have hashtables, be the faster way)?
 
What advantage does this have over SpellEvent
Dynamic triggers, adding/removing events, multiple triggers per spell, functions like a real WC3 event, and it's probably more efficient (haven't benchmarked). Also has events for items and all kinds of things.
Why doesnt this use function interfaces?
Because this is meant to simulate a real WC3 event, not some vJass magic. This is much more efficient. I don't know if function interfaces even existed when I released this.
Why doesnt it use Table to map AbilityIDs to triggers/functions (which would, now that we have hashtables, be the faster way)?
Not only is that an unfounded assumption, but I thoroughly believe it to be wrong. I don't think hashtables existed when I released this, either.

Can I note two things: I'm happy to assume this is faster than function interfaces and faster than hashtables until anyone benchmarks otherwise, and also that this was released well before SpellEvent and the like. This is also compatible through all versions of WC3. Indeed, it was released in the days of
JASS:
function H2I takes handle h returns integer
    return h
    return 0
endfunction

and I can't see any proven way to improve it. :thup:

If I may make myself clearer: I don't think that hashtables are faster than [LJASS]abil-(abil/8191)*8191[/LJASS] with my collision detection.
 
Dynamic triggers
Thats not an advantage.
adding/removing events
Why would you EVER want to remove an event?
multiple triggers per spell
Which is not an advantage.
functions like a real WC3 event
Meh, dont care much for that.
and it's probably more efficient
I dont care for speed. Its not like this is a system where speed is mission-critical.
Also has events for items and all kinds of things.
Do you use them?

Because this is meant to simulate a real WC3 event, not some vJass magic.
Once you realize vJass magic is better (for you, mostly) than a "real WC3 event", this point becomes void.
This is much more efficient.
Yeah, because using triggers is SO different from function interfaces.
I don't know if function interfaces even existed when I released this.
Yes, function interfaces already existed. Else, Anitarf wouldnt have used them in his system, which was released only 9 days after yours.

Not only is that an unfounded assumption
Yes, i havent done hashtable benchmarks myself, and from what i heard hashtables take about twice the time arrays take (feel free to refer me to better benchmarks). Your system does two arrays accesses PLUS HASHING.
I don't think hashtables existed when I released this, either.
No, they probably didnt, but that shouldnt stop you from using them NOW.

and I can't see any proven way to improve it.
I can: use table and function interfaces.
 
from Troll-Brain:
Then i will probably use it.
"But" (Not your fault) that's a shame that we can't use the Null of the ascii table, we would be allowed to make "easy" mathematical links between stuff in the object editor.

We can't simply press SHIFT and then edit and type a space then press ok? At least for somethings that work like names. There used to be tests done in which you can actually code straight from the object editor pretty much, but it just did not turn out too well.
 
Yup. Well, it did. I don't really know if it still does.
We can't simply press SHIFT and then edit and type a space then press ok?
Using the object merger, I'm pretty sure it can be achieved.
I dont care for speed. Its not like this is a system where speed is mission-critical.
...
Yes, i havent done hashtable benchmarks myself, and from what i heard hashtables take about twice the time arrays take (feel free to refer me to better benchmarks). Your system does two arrays accesses PLUS HASHING.
Make your mind up.
I can: use table and function interfaces.
The one thing I do aside from writing efficient code with simple interfaces is I support backwards compatibility. There is no advantage from either table or function interfaces (the system already supports having a one-line spell event registration just like using function interfaces would) so I'm lost as to why you're suggesting this at all.

I've heard hashtables are from 2x-7x the speed of arrays.

Now, lastly, if you're into vJass magic and bells and whistles, you should be looking at SpellStruct. That uses function interfaces with hashtables (with good reason).
 
Make your mind up.
Why? My mind is already made up. Those two sentences dont contradict each other.

There is no advantage from either table or function interfaces (the system already supports having a one-line spell event registration just like using function interfaces would) so I'm lost as to why you're suggesting this at all.
Except that using function interfaces would clean up the API (as you wouldnt have to return false), and that using Table would simplify internal code, no, theres no other reason than "good style".
 
Maybe, if using function interfaces had been considered before, you wouldnt have to choose between retaining backwards compat and using a "proper" API now.
 
using a "proper" API now.
Portraying highly opinionated comments as absolute truth leads to flame wars (please don't).

I consider this proper - I provide an intuitive (JASS style) event interface which is more efficient than the alternative interface you propose. Based on these facts, not only am I satisfied not to change, but I would make the same decision again.

This API lets me do whatever I like behind the scenes to provide people a better product, in general.

you should be looking at SpellStruct.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    We have some elderly guests that regularly come hang out at the bar at the end of the night, and every once in a while we don't see someone for a few weeks and then someone shows up with their obituary.
  • Varine Varine:
    We usually let them do their memorials there in the morning if they want to and I'll make them some snacks and drinks. There was one guy named Tom that came in like every night and would sit by himself and get a bunch of soup and a glass of wine. idk why but he LOVED our fucking soup, like he would order a fucking quart of it at a time and would always get so sad when we stop doing it for the summer.
    +1
  • Varine Varine:
    But he also loved our calamari, which is another thing I hate but it sells super well so I can't change it. There was one day he came in and was asking me how to make it, because he tried to at home once in the off season when we stop running it and he really wanted it lol
  • Varine Varine:
    I think he's one of the only people I've made recipes for for free because he really wanted a broccoli cheddar, and it was like dude I don't have a recipe, it's just whatever I have, but here, this is how you do it
  • Varine Varine:
    I don't think he ever figured out how to do the calamari in a pan though, like idk how to do that either. He was afraid of the at home deep fryers though and it's like yeah, that's fair, I am too
  • Varine Varine:
    He was just such a sweet old man, we had two servers pregnant and they held a baby shower together, he was soooooo fucking excited to get to see a baby. Unfortunately he died a month or so before they were born
  • The Helper The Helper:
    So I decided to Google some people that I had not seen or heard from in a while and sure enough one of my old best friends, we had a falling out years ago but whatever, find out he died of Pancreatic Cancer in January. I have also lost a few of my closer acquaintances from growing up the last year. Getting old - people die - I kinda thought it was going to be this way a few years ago....
    +2
  • The Helper The Helper:
    Forum running super slow again
  • Ghan Ghan:
    Not really clear from the stats as to what is causing the slowness.
  • Ghan Ghan:
    We get a lot of guest traffic so it may just be the load is getting too high and not from any particular source.
  • Ghan Ghan:
    Looks like the server is maxed out on CPU.
  • Ghan Ghan:
    Oh it looks like a lot of the traffic is Silkroad Forums. That domain isn't protected by Cloudflare.
  • Ghan Ghan:
    But the old Silkroad site is still on its own server. I just had a test site set up on this server for it.
  • Ghan Ghan:
    I just disabled that test site. Let's see if that helps the load.
  • Ghan Ghan:
    Looks much better already.
  • The Helper The Helper:
    I had actually forgot about the Silkroad site. I had asked
  • The Helper The Helper:
    SD Ryoko about it and he said the couple of people left on there really like it, that was a few years ago, maybe I should check back
  • jonas jonas:
    I guess when you're getting old, and the last day of soup season draws near, you start wondering
  • jonas jonas:
    will I make it to the start of the next season? or was this the last time I'll ever have my favorite dish?
  • The Helper The Helper:
    I am doing my first Vibe Coding project. In installed the environment and tools according to instructions but it is all chat doing this for me at my direction. It is fun really and holy shit I might finish in 2 hours what it would have taken a day to in my Access and this would be an electron app complete new
  • Ghan Ghan:
    Good stuff.
  • Ghan Ghan:
    Just make sure it is secure. :)
    +1
  • The Helper The Helper:
    It will only be on internal network
  • jonas jonas:
    Man the AI is good about gaslighting about security though. I've had several times where I pointed out security problems and it tried to convince me that with a tiny tweak it suddenly becomes secure
  • jonas jonas:
    Like using a distrobox as a "secure" container, and when I point out that's not secure at all, it claimed that specifying home will make it secure

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top