• 🏆 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!

Newgen limits

Status
Not open for further replies.
Level 7
Joined
Mar 5, 2009
Messages
254
Hello,i have newgen and it doesn't let me write values lower than 0.01 armor damage reduction multiplier or hero attack speed per agility point.Is there a way to make values lower than 0.01 ?The default values are 0.02 for attack speed and 0.09 for armor damage reduction which doesn't give me a big choice to modify what i want.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Hello,i have newgen and it doesn't let me write values lower than 0.01 armor damage reduction multiplier or hero attack speed per agility point.Is there a way to make values lower than 0.01 ?The default values are 0.02 for attack speed and 0.09 for armor damage reduction which doesn't give me a big choice to modify what i want.

Have you tryed shift + clicking on the field?
This gives you the ability to enter any positive or nagetive number.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
yeah well it lets me enter 0.005 for example,but when i click OK it becomes 0.00 and even 1000 armor has 0% damage reduction

u can use lower value than 0.01 that right but u can make your own system for that.

example i turned the bonuses in gameplay constats to 0 and i add manually like this

(these abilities are item based abilities, based on glove of haste and permanent damage)

here i calculate it from stat (statattackspeed is variable, i store here the attackspeed what coming from every item/unit etc then i add 0.5% attack speed for each agility, its mean if i got 100 agility then +50% attackspeed )
JASS:
udg_Stat_AttackSpeed + (GetHeroAgi(u, true) / 2)

JASS:
function AddDMG takes boolean DMG, unit u returns nothing
    local integer i
    local integer n
    local integer a1
    local integer a2
    local integer a3
    local integer a4
    local integer p = GetPlayerId( GetOwningPlayer( u ) ) + 1
    if udg_Class2 < 3 then
        set udg_Total_Dmg = udg_Stat_Dmg + udg_Stat_Dmg * (GetHeroStr(u, true) / 400)
    elseif udg_Class2 < 5 then
        set udg_Total_Dmg = udg_Stat_Dmg + udg_Stat_Dmg * (GetHeroAgi(u, true) / 400)
    endif


    if not DMG then
        set a1 = udg_Abilities2[14]
        set a2 = udg_Abilities2[15]
        set a3 = udg_Abilities2[16]
        set i = udg_Stat_AttackSpeed + (GetHeroAgi(u, true) / 2)
        set n = i / 100 + 1
        call SetUnitAbilityLevel( u, a3, n )
        set i = i - ( i / 100 ) * 100
        set n = i / 10 + 1
        call SetUnitAbilityLevel( u, a2, n )
        set i = i - ( i / 10 ) * 10
        set n = i + 1
        call SetUnitAbilityLevel( u, a1, n )
    else
        set a1 = udg_Abilities2[17]
        set a2 = udg_Abilities2[18]
        set a3 = udg_Abilities2[19]
        set a4 = udg_Abilities2[20]
        set i = udg_Total_Dmg
        set n = i / 1000 + 1
        call SetUnitAbilityLevel( u, a4, n )
        set i = i - ( i / 1000 ) * 1000
        set n = i / 100 + 1
        call SetUnitAbilityLevel( u, a3, n )
        set i = i - ( i / 100 ) * 100
        set n = i / 10 + 1
        call SetUnitAbilityLevel( u, a2, n )
        set i = i - ( i / 10 ) * 10
        set n = i + 1
        call SetUnitAbilityLevel( u, a1, n )
    endif
endfunction
here i type directly the attack speed what i want, or damage
JASS:
function AddDMGEx takes boolean DMG, boolean newunit, unit u, integer value returns nothing
    local integer i
    local integer n
    local integer a1
    local integer a2
    local integer a3
    local integer a4
    local integer p = GetPlayerId( GetOwningPlayer( u ) ) + 1
   
    if newunit then
        call UnitAddAbility(u, udg_Abilities2[14])
        call UnitAddAbility(u, udg_Abilities2[15])
        call UnitAddAbility(u, udg_Abilities2[16])
        call UnitAddAbility(u, udg_Abilities2[17])
        call UnitAddAbility(u, udg_Abilities2[18])
        call UnitAddAbility(u, udg_Abilities2[19])
        call UnitAddAbility(u, udg_Abilities2[20])

    endif

    if not DMG then
        set a1 = udg_Abilities2[14]
        set a2 = udg_Abilities2[15]
        set a3 = udg_Abilities2[16]
        set i = value
        set n = i / 100 + 1
        call SetUnitAbilityLevel( u, a3, n )
        set i = i - ( i / 100 ) * 100
        set n = i / 10 + 1
        call SetUnitAbilityLevel( u, a2, n )
        set i = i - ( i / 10 ) * 10
        set n = i + 1
        call SetUnitAbilityLevel( u, a1, n )
    else
        set a1 = udg_Abilities2[17]
        set a2 = udg_Abilities2[18]
        set a3 = udg_Abilities2[19]
        set a4 = udg_Abilities2[20]
        set i = value
        set n = i / 1000 + 1
        call SetUnitAbilityLevel( u, a4, n )
        set i = i - ( i / 1000 ) * 1000
        set n = i / 100 + 1
        call SetUnitAbilityLevel( u, a3, n )
        set i = i - ( i / 100 ) * 100
        set n = i / 10 + 1
        call SetUnitAbilityLevel( u, a2, n )
        set i = i - ( i / 10 ) * 10
        set n = i + 1
        call SetUnitAbilityLevel( u, a1, n )
    endif
endfunction
 
Status
Not open for further replies.
Top