• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
neku99
Reaction score
20

Profile posts Latest activity Postings Experience Resources About

  • Wait a global timer, won't it bug when I , for example pause the timer. Won't it pause all the loops? (btw I dunno how to use timers)
    you can learn how to do that by looking at the nova system...

    basically for a movement spell you create a real struct member which will determine the distance travelled every loop, now set it to the max distance upon create and reduce it by the distance travelled per loop, now if it become <= 0.00, the spell is finished


    struct movement

    static method looper takes nothing returns nothing
    local integer i
    loop
    exitwhen i > .TOTAL
    set data = .INDEX[.TOTAL]
    set data.distance = data.distance - .dpl
    if data.distance <= 0.00 then
    endif
    endloop
    endmethod

    endstruct


    ofc this is a blank sample
    to index it just create an integer array and an integer variable global or static struct members

    struct sample

    static thistype data
    static integer TOTAL
    static integer array INDEX

    static method create takes nothing returns sample
    //we allocate an instance
    set data = allocate()
    //we increase the number of instances in use
    set .TOTAL = .TOTAL + 1
    //we set the struct instance into the array
    set .INDEX[.TOTAL] = data
    endmethod
    endstruct


    for unit movement, there are some of that in the spells section...

    basically you make a periodic loop which moves the unit...
    I recycle the instances once they are not needed anymore (e.g. when the effect finishes)

    About the in-use:

    basically like that, and

    I mean rather than looping through all the possible struct instances (8190 I think) it will only loop the currently in use instances.

    See the loop,

    exitwhen i > TOTAL
    //Total is equal to the number of instances that are currently in use
    yup, basically the struct instance is an integer... but you cannot directly use it effectively... because allocation of structs are a bit random from my experience.

    example: I have missile spells, then I added debug messages which gave me the instance of each missile created, it gives something like, [1,2,3,5] or [1,4,2,10] so its pretty hard to use the instances as an index directly... well you can loop from 1-8190 but it would be inefficient...

    so we use an indexing system instead to loop only the in-use struct instances.
    because the action of the system happens over time not instant, so I used a periodic loop, it has the same logic as that in GUI because structs are just variable arrays...
    yup, I save the min and max of each Unit Type...

    I do it this way:
    -I decide how much min and max damage the unit will have
    -then initialize it at the library
    -then on the OE, I calculate the correct amount of base damage, number die, sides per die to achieve the min and max that I want so that the unit's UI show the correct amount... ^_^

    Min damage -> Base + NumberOfDie
    Max damage ->Base + NumberOfDie*SidesPerDie

    The indexing is to loop thru all the instances of the struct... Remember that structs are just a collection of arrays so that indexing is the same as the normal recycling indexing methods used on GUI triggers.

    I have an update for Arzachel. you might want to check it out on the map dev... ^_^
    yup... the damage percent of the attack-types on the gameplay constants doesn't affect the damage which shows on a unit's UI... ^_^

    and its a sure thing, why?

    because aside from the UnitId check, I also check if the damage dealt is 0.00 so its working 100%.
    yup, I'm talking bout my map...

    unit's have a min and max damage right? the one you see on the UI... ex: 1-10

    -This is an example which I used in my map-

    well since the DDS will fire off when a unit is damaged you need to somehow add a condition.

    On my case, I use a dummy unit to cause the "real damage"(the triggered one) whenever a unit gets damaged by a unit(B) (and on my case damage done by other units is 0.00 because of the settings)

    So the DDS checks if the UnitId that caused the damage is the same as the Id of the dummy unit, and if not (meaning the damage is not yet the calculated) the DDS will run its actions
    -Get the damage of the unit (via a library that saves a unit's min and max damage)
    -Apply reduction calculations on the damage value
    -Make the dummy unit owned by the player which owns the unit(B) deal the calculated damage amount to the damaged unit.
    What I did on my map was this:

    On the gamelay constants:
    I've set the damage dealt by all attack-types to 0.00 except for attack-type Chaos
    -basically Chaos would still deal 100% for all armor types while the others deal 0.00 so dont give attack-type chaos to any unit in the map

    Then I made a library which stores every UnitIds min and max damage value.

    Then made a dummy unit that will be the one that will cause the "real damage".

    Then create one dummy per player

    Then made a DDS which checks if the damager's unitId is the not equal to the dummy unit.
    -If not then we will calculate damage by getting a random real between the unit's saved min and max damage
    -then reduce it by the value of the damaged unit's reduction...
    -and make the dummy of the damager's owner to deal the calculated damage (using ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DIVINE)

    -And basically all damages will have to be made custom, especially spells, so no default spells-
    your suggestion is fine, but that would result to more code rather than the user just initializing every unit... mainly because I would then need to have two libraries, one will have the armor value for every unitId, and then DRT...

    while if the user wil just do it, another library isnt really needed... the user can do it on map init

    Pick - every unit
    If-then-else
    If-conds
    Unit-Type is equal to blahblah
    Then - actions
    call ......

    now that would be shorter than if I make a new library and will take less map space since you dont need to save the armor value per UnitId anymore...

    basically, its more efficient if the user himself initializes every unit rather than me providing another library that would "automize" it a little bit.
    This sets the reduction value of units, when you initialize them. Basically you need to initialize EACH individual unit that will use the system. And you can dynamically change the reduction values of each individual unit in-game. Instructions included on the code.

    I have another one on my comp which is easier to use (uses UnitIds rather than units, so you only need to initialize each unitId and it will affect all units with that Id). BUT since it uses a common reduction per UnitId, you cannot change a single unit's reduction without affecting similar units.

    And that's why I have uploaded the Per Unit DRT, rather than the Per UnitId...
    Yup, though the system doesn't support armor types... and it must be used in a custom damage system...

    And the ItemTable is only useful if you will use the normal wc3 inventory or an ordinary bag system...
    Anyway if you can use an FSI or any other inventory, it wont be a problem integrating the ReductionTable. (I managed to integrate it with The_Witcher's Inventory system)
    Finally its working!!!

    Well, DamageReductionTable isnt a Damage system, its just a reduction table. Its meant to be used in a SIMPLE custom damage system since its kinda lacking advanced features (like different armor types, but the user can do that in their damage system themselves... ^_^)...

    ItemTable lets you set the reduction values of an Item type and automatically updates a unit's reduction values when it picks/drop/pawn an item...
    doing an ItemTable for the DamageReducitonTable which somehow I cant seem to make it work...
    Shadows of Everwood... an ORPG... there's a link on my sig, I'm working as a coder...

    but it seems you found it... ^_^
    thanks!!! but maybe we can say that is an early alpha demo... ^_^...

    yup, its a single player RPG.

    btw, progress is kinda slow because I work on SoE... ^_^

    gotta sleep, good morning... ^.^
    oh, yeah the website... havent updated it in a while... though what's posted there is still true. ^_^

    the demo will come surely before the end of this year but it will not be as big as I have planned... ^_^

    and yeah, the inheritance thing is great... and most full vJASS systems like Berb's Projectile, requires that (you cannot use his system effectively without using inheritance)...
    my own proj, hmmm....

    doing some terraining and finishing the game cache save system...

    right now I decided to finish at least 4 spells for one character and then I'll code some quest and I'll release a very small, pre-alpha demo...
    Here's the link, I only made the code but I added instructions in case you want to test it (basically you just need to create a dummy spell and edit some lines)

    NovaSystem with Tranq
    I'll try to do it tomorrow, kinda sleepy, though its only a few lines... hmmm... I'll try to make it now...
    the BuffNova dont do damage, but others do damage, but NOT ON THE MAGNATAURS coz they're magic immune and all of those spells use ATTACK_TYPE_MAGIC...

    btw, if you want a tranquility spell example using the system, I can code you one tomorrow... with comments so you can study it... ^_^
    yup... I added a new sample nova which improves the stats of a hero hit by that nova by 10 permanently... ^_^
    I updated the Nova System, now you can create a supportive nova spell via struct inheritance coz of the new interface method OnHit...
    I dont just watch it, I've WATCHED it over and over... maybe about 10 times now (season 1 and 2)...
    oh... I LOVE THAT ANIME... I just didnt notice, maybe because of the color... its a bit monotone...
    ^.^

    but I always wake up early despite of sleeping late... but when I'm studying, I fall to sleep easily... ^_^

    hmmm... whos that character on the sig?
    tnx! somehow I wanted to give rep to you, but It seems like I havent gave enough rep to others... ^_^...
    nope, it took me more than an hour because of the EndChannel... I did not know that EVENT_ISSUED_ORDER only fires at orders with no target, and it tokk me more than an hour to realize
    ....

    about the triple thistype, actually its just to make sure it would not bug...
    My rep message failed...

    Pumalpak yung dapat sasabihin ko...

    Well, anyway.
    ----------
    Wow thanks for the trouble dude highly appreciate it
    ----------
    LOLOLOLOLOLOLOLOLOLOL

    You deserve it for that quote. :p
    ur pinoy? me too... ^^... @Lynx: use of non-english is strictly prohibited in posts...
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top