Jump to content
EleTD.com
Sign in to follow this  
Guest cohadar

Upgrading OnDamage system

Recommended Posts

Guest cohadar
will be interested to see the final product, and the fps gain

if I am not mistaken, Kara you said it ran at 34 fps before or something?

still do not quite understand what you are doing there

on another note, the new Dialog system has been incorporated into the map for testing, works fairly well, but there are still a few kinks to work out, but once its done, this shall be a huge advancement for the map

It will be quite easy to understand once I publish it.

I will also add documentation as always.

Btw I hope that dialog system is something based on hotkeys...

Share this post


Link to post
Guest emjlr3

it contains hotkeys, yes, its mainly just a huge improvement upon the current Dialog system

Share this post


Link to post
Guest cohadar
it contains hotkeys, yes, its mainly just a huge improvement upon the current Dialog system

Well since current system is in GUI even typing random jass keywords would be an improvement :D

Anyways just make it not pop-up windows at you while you are trying to build

it pisses me off so much.

Adding "Would you like to vote? yes/no" dialog at the beginning could be a good idea as well.

Share this post


Link to post
Guest cohadar

I have a small dilemma, and I would like to ask everybody here to give their opinion.

It seems that Sunburn ability (Penitence trigger) is causing 50% of all overhead in damage detection.

New system I made does not support Sunburn kind of abilities.

I have 2 options:

* Extend the system I currently have to support Sunburn

and leave sunburn as is (and make everything 2 times slower)

* Leave the system as is and change sunburn

Also if option 2 prevails what should I change sunburn to?

Give me some ideas plz.

I can make stuff like this for example:

When unit is hit by a sunburn it will take 10% extra damage on next sunburn attack

Next time it is hit it will take 12% extra dmg and so on...

When unit dies it will explode or something...

It sounds like Incinerate from firelord right?

Well yes, but differences are that this is percent based

and that damage is increased only if it is hit again by sunburn not by any other tower

I could also make a non-linear percent increase or something if it turns out it needs balancing.

If you have some other more interesting ideas please tell me.

Share this post


Link to post
Guest Sancdar
I can make stuff like this for example:

When unit is hit by a sunburn it will take 10% extra damage on next sunburn attack

Next time it is hit it will take 12% extra dmg and so on...

When unit dies it will explode or something...

Flame needs to stay a single-target slow with some sort of damage effect, but not one that leads to stacking Flame towers as your defense. Ice, for example, has a good DoT but it requires micro/placement because it doesn't stack.

Share this post


Link to post
Guest cohadar

PROGRESS REPORT:

    // penitence/sunburn
    constant integer TOWER_FLAME = 'h00D'
    constant integer TOWER_SOLAR = 'h01F'
    constant integer TOWER_SUN   = 'h033'
    
    // time warp
    constant integer TOWER_JINX = 'h010'
    constant integer TOWER_HEX  = 'h02J'        
    
    // sporadic damage
    constant integer TOWER_DEATH     = 'h00C'
    constant integer TOWER_DOOM      = 'h00P'
    constant integer TOWER_DAMNATION = 'h02T'
    
    // greed
    constant integer TOWER_GOLD   = 'h019'
    constant integer TOWER_WEALTH = 'h02Q'
    
    // spout
    constant integer TOWER_HYDRO  = 'h00B'
    constant integer TOWER_SPOUT  = 'h00O'
    constant integer TOWER_GEYSER = 'h02Z'
    
    // flesh growth
    constant integer TOWER_GOLEM       = 'n01C'
    constant integer TOWER_ABOMINATION = 'n021'    
    
    // instant death
    constant integer TOWER_DROWNING = 'h00Z'
    constant integer TOWER_KRAKEN   = 'h02B'

The towers you see in this list have been plugged-in.

I think I am somewhere half-way now (this is a fucking hard job)

Hopefully we will have a beta test version tomorrow.

(As noted before I had to remove damage effect from penitence,

the slow and shiny effects are still there however)

Share this post


Link to post

The problem with Penitence is the overhead. It is the only thing in the DDS that requires the DDS to know when any tower is attacking, as opposed to a specific tower. As a result, as it is now is bad. I've come up with a creative way to keep Penitence (Sunburn) without slowing down the DDS. Remember that all it does is amplify damage by X%, so envision this instead:

Duration is 5 seconds. When casted, starting HP of creep is stored. 1 second later, difference between current and starting HP is found, and X/5% of that is subtracted from the creep HP. 1 second later, current HP is compared to HP one second ago, and the process repeats. This does lead to some compounding, the alternative is to simply wait 5 seconds, compare difference and subtract X%, but things like healing creeps will interfere with this. Anyway it comes down to being almost the same thing, without slowing down the DDS.

Share this post


Link to post
Guest Sancdar

You definitely need a shorter interval than 5 seconds or you have the same problem as Jinx (backtrack tower?) where the amplified damage is often done after you've already done 100% to the creep.

Share this post


Link to post
Guest cohadar
You definitely need a shorter interval than 5 seconds or you have the same problem as Jinx (backtrack tower?) where the amplified damage is often done after you've already done 100% to the creep.

If some towers have "problems" now would be the best time to offer me suggestions on how would you like it fixed.

About sunburn:

what karawasa proposed is imho a bad idea, too many things could go wrong when you make approximation spells like that.

Perhaps this: when creep gets hit with a sunburn it records damage at that point, after 5 sec it calculates the absolute difference in HP in those 5sec and deals it (with a multiplier?) as damage.

This would be non-stackable ofc, you cannot sunburn a creep that is already sunburned, so you could basically sunburn a creep only every 5 sec.

Share this post


Link to post
Guest emjlr3

that works, I suppose

is there no WC3 base ability we can use, such as berserk, or something

creep gets hit, order creep to berserk, order creep to move

Share this post


Link to post
Guest cohadar
that works, I suppose

is there no WC3 base ability we can use, such as berserk, or something

creep gets hit, order creep to berserk, order creep to move

BRAVO!

BTW: berserk does not stop the current order of caster so it is even easier.

Soooooo imba.

Share this post


Link to post
You definitely need a shorter interval than 5 seconds or you have the same problem as Jinx

Thats absolutely true, if the spell is not applying damage each second, the skill will be wortless and sooner or later be axed, then it doesnt matter anymore if it is likely to go wrong or not.

Is there any solution to have the skill be applied to incoming damage every second without troubling?

Share this post


Link to post
Guest cohadar

I have been busy these days.....

I heard you were looking for me karawasa.

Is it ORBEngine related or something else?

Btw: new version of pyramidal defence is out :D

Share this post


Link to post
Guest cohadar

Well of course they do, they have just recently been implemented.

I will be on MSN these days, when you catch me, we will fix it.

Share this post


Link to post
Guest cohadar

Ok here is the "sell tower with orb ability" problem fix,

replace this function inside ORBEngine

//===========================================================================
private function UnregisteredOrbAttack takes nothing returns nothing
    if GetWidgetLife(GetEventDamageSource()) > 0.405 then
        call BJDebugMsg("ORBEngine: unit " + GetUnitName(GetEventDamageSource()) + " has unregistered Orb attack.")
    endif
endfunction

As for creeps stopping spawning at random level, I have no idea why that happens. It seems all ok inside spawn trigger.

You will have to locate the problem by further debugging.

for example add debug messages like shown here:

//===========================================================================
function Start_Level_Spawns takes nothing returns nothing
    set udg_Spawn_Loop = udg_Spawn_Loop + 1
    if udg_Spawn_Loop>31. then
        debug call BJDebugMsg("//=== udg_Spawn_Loop>31. ===//")  // <-------------------<<
        call EndTimer(GetExpiredTimer())
        return
    endif
  
    set udg_Player_Group = GetPlayersMatching(Condition(function AlivePlayerFilter))
    call ForForce( udg_Player_Group, function SpawnCreep )
    call DestroyForce(udg_Player_Group)
endfunction

Also make a player chat command(for beta testers) that displays values of critical game variables so they can list them and see at any point if any of them has invalid values for some reason.

Share this post


Link to post
Guest emjlr3

i told him to go through and do that a few days ago, prob is i am not sure he can make it happen reliably enough for this option to be viable

Share this post


Link to post
Guest Neverdweller

Seriously there isnt any lag caused by damaging units at all.. if there are, i sure dont see it, framerate stays steady, i guess its becuase im not running a tandy 2000 ^_^

I REALLY dont see any need to do any extensive retriggering that he is talking about.

and what are these towers that ignore armor O_o hmmmmmm o_O

Root tower is one perhaps ;)

Share this post


Link to post
Seriously there isnt any lag caused by damaging units at all.. if there are, i sure dont see it, framerate stays steady, i guess its becuase im not running a tandy 2000 ^_^

I REALLY dont see any need to do any extensive retriggering that he is talking about.

and what are these towers that ignore armor O_o hmmmmmm o_O

Root tower is one perhaps ;)

That is only the case because we did the extensive retriggering. Also, no towers ignore armor anymore.

Share this post


Link to post
Guest cohadar

Ok I think it is best we continue here the discussion we had on TH.

Forget about what I said there, I have a better solution.

Instead of adding mana check in ORBEngine do that mana registration but in a non-leaking way.

Like ORBEngine does for damage triggers:

library MechanicalActivate uses PUI

globals
    private trigger array PUI_Trigger
endglobals

//===========================================================================
private function ForceField takes nothing returns boolean
    local integer id = GetPlayerId(udg_CreepOwner[GetUnitUserData(GetTriggerUnit())])
    local location temp
    call IssueImmediateOrderBJ( GetTriggerUnit(), "divineshield" )
    call SetUnitState(GetTriggerUnit(), UNIT_STATE_MANA, 0.0)
    // you should probably precalculate this as udg_Region_X and udg_Region_Y
    // so you don't have to create/destroy location every time
    set temp = GetRectCenter(udg_Region_Leak[id])
    call IssuePointOrderLocBJ( GetTriggerUnit(), "move", temp )
    call RemoveLocation(temp)
    set temp = null
    return false
endfunction

//===========================================================================
public function Register takes unit whichUnit return nothing
    local integer index  = GetUnitIndex(whichUnit)
    
    if PUI_Trigger[index] != null then
        call DestroyTrigger(PUI_Trigger[index])
    endif
    set PUI_Trigger[index] = CreateTrigger()

    call TriggerRegisterUnitStateEvent(PUI_Trigger[index], whichUnit, UNIT_STATE_MANA, GREATER_THAN_OR_EQUAL, 12.00)
    call TriggerAddCondition(PUI_Trigger[index], Condition(function ForceField))
endfunction

endlibrary

        if IsUnitType(u, UNIT_TYPE_MECHANICAL) == true then
            call MechanicalActivate_Register(u)
        endif

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...