All times are UTC





Post new topic Reply to topic  [ 99 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7
Author Message
 Post subject: Re: API Requests
PostPosted: Wed Oct 16, 2013 2:22 pm 
Offline
YouTD Admin
YouTD Admin

Joined: Wed Oct 12, 2011 1:36 pm
Posts: 1186
YouTD Score: 28
Also, looking at the towers I work with, it would be reallllly greatly appreciated if there was a way to have a modifier change a given value to another value. Err, that sounds stupid, but as opposed to currently, where if I want some tower to have, say, buff duration equal to ANOTHER tower, I have to do wierd modifications where I negate existing bonuses, add new ones, and this resets oddly...
TL;DR:
method setStaticModification takes integer modId, real baseValue, real levelAdd returns nothing
//Changes the value of the given modId to the baseValue given.


Top
 Profile  
 
 Post subject: Re: API Requests
PostPosted: Wed Oct 16, 2013 10:42 pm 
Offline
YouTD developer
YouTD developer
User avatar

Joined: Wed Dec 29, 2010 12:20 pm
Posts: 4508
Location: Australia
YouTD Score: 32
I guess it'd be possible to make a modification override for a given unit, but it'd take a while to do due to the way modifications are currently handled.
Also it'd raise the following question: how would they stack?
Eg. Tower a has a special ability that sets its buffduration to a static 100%. Then it picks up an item that sets buffduration to a static 50%. Which one prevails? Compromise? The answer to this, is I guess this sort of thing would be restricted to being applied on the caster only.
How bout for now, implement either deemzul's or palandu's approach (see xeno research facility) and I'll see if it'd be feasible adding some sort of static modification option to the API.

@dave, I'll add them in this weekend. (and axllow's request too)

_________________
Goldcost to waveLevel & elementLevel relationship
Incremental Testmap Stub & Tower Creation Map


Top
 Profile  
 
 Post subject: Re: API Requests
PostPosted: Wed Oct 16, 2013 11:00 pm 
Offline
YouTD Admin
YouTD Admin

Joined: Wed Oct 12, 2011 1:36 pm
Posts: 1186
YouTD Score: 28
I already implemented an approach, but it's not a clean one, will check those ones. Maybe have things cast on self be highest priority? I understand the question, and it does bring up an interesting point of tower interaction, namely where changing the towers around yours is how its balanced..


Top
 Profile  
 
 Post subject: Re: API Requests
PostPosted: Thu Oct 17, 2013 3:56 pm 
Offline
Power User

Joined: Thu Jan 05, 2012 7:49 pm
Posts: 554
Location: Italy
YouTD Score: 103
Sorry to be a bother but i'd also like the same thing for attack speed if possible, cause getCurrentAttackspeed returns the actual cooldown and not the bonus

edit: i swear this is the last request...getFollowingTower to get the tower wich you replace the current tower with


Top
 Profile  
 
 Post subject: Re: API Requests
PostPosted: Sun Oct 20, 2013 12:24 pm 
Offline
YouTD developer
YouTD developer
User avatar

Joined: Wed Dec 29, 2010 12:20 pm
Posts: 4508
Location: Australia
YouTD Score: 32
-Added a getBuffType method to the AutocastType struct.
-Added a bunch off accessors for attackmods to the Unit struct: getProp_Attackspeed, getProp_DamageBase, getProp_DamageBasePerc, getProp_DamageAdd, getProp_DamageAddPerc

Check my sig.
Haven't gotten round to the rest yet. My weekend ended up being more busy than anticipated sorry. Lemme know if there are any issues with the new methods, as i didn't test them.

_________________
Goldcost to waveLevel & elementLevel relationship
Incremental Testmap Stub & Tower Creation Map


Top
 Profile  
 
 Post subject: Re: API Requests
PostPosted: Tue Apr 15, 2014 3:16 pm 
Offline
YouTD Admin
YouTD Admin

Joined: Wed Oct 12, 2011 1:36 pm
Posts: 1186
YouTD Score: 28
So since I have mysteriously revived, getting that 'getDebuffs()' would be really nice... so I can finish one of my towers finally..


Top
 Profile  
 
 Post subject: Re: API Requests
PostPosted: Mon Sep 08, 2014 12:07 pm 
Offline
YouTD Admin
YouTD Admin

Joined: Wed Oct 12, 2011 1:36 pm
Posts: 1186
YouTD Score: 28
getDebuffs() RAWRRRRRR!

I have never worked with the WC3 base code, but I think I will just do that, and ill post the getDebuffs() method here. If it's shit, you or like... Deemzul, he does this stuff?, can fix.

EDIT: OH GOD THE WC3 CODE OH GOD HELP MEEEEEE


Top
 Profile  
 
 Post subject: Re: API Requests
PostPosted: Mon Aug 13, 2018 3:25 pm 
Offline
YouTD Admin
YouTD Admin

Joined: Wed Oct 12, 2011 1:36 pm
Posts: 1186
YouTD Score: 28
I'd really appreciate that getDebuffs(), which returns the pure number of negative (tower placed) buffs on a creep.


Top
 Profile  
 
 Post subject: Re: API Requests
PostPosted: Mon Aug 13, 2018 11:03 pm 
Offline
YouTD Admin
YouTD Admin

Joined: Sat Jan 16, 2010 2:35 am
Posts: 1693
YouTD Score: 86
You said you'd do it.
This isn't limited to tower placed negative buffs:
Unit:
method countDebuffs takes nothing returns integer
   return .negativeBuffs.getSize()
endmethod
// You don't need an API method for this though, you can just do
   local integer debuffCount = tower.negativeBuffs.getSize()
// Although you'll need to add the negativeBuffs member to Unit and define the List struct with size member somehwere in the creation map.

But this is:
method countDebuffs takes boolean positive returns boolean
    local ListElement l
    local Buff b
    local integer i = 0
    set l = .negativeBuffs.getFirst()
    loop
        if l == 0 then
            return i
        endif
        set b = l.getContent()
        if b.getCaster().isATower() then
            set i = i + 1
        endif
        set l = l.next
    endloop
    return i
endmethod


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 99 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group