miriyaka

UberFix 1.06 [1/18/2012]

UberFix 1.06 [1/18/2012]

The UberFix is a compilation of bug fixes for Demigod version 1.3.

OFFICAL DEMIGOD PATCH NOTE:
Demigod must be updated to version 1.3 or higher to take advantage of several of the fixes contained herein.  Additionally, any bugfixes found in Demigod Patch 1.3 have been dropped from the UberFix code for purposes of maximum compatibility with version 1.3, so using an older version of Demigod with this release of the UberFix will re-introduce many bugs.

To insure that the latest Demigod patch is installed, enter the Multiplayer screen in the main menu, choose Internet, and log in with your Impulse username and password.  The game will be automatically patched.


Download v1.06:

http://www.box.com/s/hdsoycixo3p8f5fs82aj


Installation Instructions for Demigod Mods in Archive Format:
If you have downloaded the executable, it should place the files automatically.
If you downloaded the zipped version, use the following instructions:

1) Locate your Demigod mod directory.  This will be \bindata\mods, within your Demigod install folder. The default location for this is C:\Program Files\Stardock Games\Demigod\bindata\mods.

2) Extract the mod archive directly into this folder.  If you are using a program like Winrar or 7zip to extract the archive via a drag action, make sure you choose the first option to extract files directly into the mods folder, rather than the second option to extract into a sub-folder with the same name as the archive file.

3) The result should be a folder within \mods called e.g. 'UberFix 1.05', containing several files and sub-folders.  If instead you see only one folder with the same name as the archive (e.g. 'Uberfix105') and an 'UberFix 1.05' folder within, then you chose the wrong option when extracting, and will need to move that sub-folder back one level into the mods folder, or delete the result and re-extract the archive into \mods without specifying a sub-folder.

To enable the mod, run Demigod, select the Mod Manager, select the UberFix, and click enable. If the mod is properly enabled it will show up in the right pane of the Mod Manager screen.

To delete a mod, simply delete the that mod's individual folder in \bindata\mods\. Do not delete \bindata\mods unless you wish to remove all mods!


New in v1.06:

-Created new UID
-Fixed code error in Regulus' Vengeance skill, now properly does a metahit
-Fixed code error introduced with previous Iron Walkers fix
-Fixed Theurgist's Hat description, it is a weapon proc, not an armor proc


Version History

v1.05

 

Minion and Reinforcement Base Armor Not Applied Until Armor Is Buffed
Units with a blueprint base armor value (most idol summons and heavy reinforcement units) will now correctly have this armor value applied.  Previously, this value only took effect once the unit was affected by some other armor buff, remaining if that armor buff was removed.

 

Regulus Maims Allies When Using Universal Gadget
The previous fix for Regulus' self-maiming already solved the unreported issue of self-maiming via potion use.  The fix has been expanded to insure against any maim application on negative damage (healing) as well as on allied or self damage.

 

All Valor Flag Bonuses Lost When Enemy Valor Flag Is Captured And Lost
This was accidentally introduced in the 1.04 release with the ArmyBonus stacking protection fix.  This fix now always allows stacking unless the buffs the ArmyBonus contains have the REPLACE stacking flag.

 

Miscellaneous Small Fixes

Gloves of Despair now show their existing 8% attack bonus

 


v1.04

Ranged Demigod Attack Stutter
Ranged Demigods (other than Regulus in Angelic Fury) would have their attacks repeatedly interrupted due to constant stop and start while chasing a slower target, effectively penalizing greater speed.  They are now able to successfully attack periodically in this situation, though not from a standstill.  This is intended, to preserve the advantage bestowed by Regulus' Angelic Fury lock-on bonus.

Queen of Thorns Extreme Rate of Fire
Related to the above fix, Queen of Thorns will no longer be able to attack far more rapidly than should be possible while chasing a target or when stuck on map geometry.

Queen of Thorns Compost Uses Incorrect Buff Levels And Adds Infinite ArmyBonuses
Despite using a similar buff counting method to Oak's Soul Power, Compost started at 'rank 0' internally and caused the level 6 buff to go unused regardless of skill rank and compost level.  It now uses exactly the same calculation method as Soul Power.
Additionally, it would add an ArmyBonus every time it gained or lost a level, potentially causing the game to process hundreds or even thousands of ArmyBonuses and their associated buff add/removes every time one of Queen of Thorns' minions was summoned or killed.  All buffs and ArmyBonuses added by Compost are now correctly removed, which should significantly reduce the sim overhead of this ability.

Unclean Beast Ooze Suicide
Ooze is now completely incapable of causing suicides.  Unclean Beast will be left with one hitpoint in any situation where Ooze damage occurs in the same tick (but just after) any other damage event.

Rook Shoulder Weapon Stuck And Illegal Targets
These weapon addons should no longer become fixated on a single target that is out of range or is no longer visible, and should be unable to fire on non-structure targets that are not currently visible.  Structures in the fog of war can still be attacked as intended.

Rook AI Movement Stutter

This was caused by the high rate of fire of Rook's arrow towers.  Their ROF has been quartered and damage quadrupled, for the same overall DPS.  Poison chance and duration have been increased slightly to give the same chance per second of poison activation, as well as the same chance per poison cycle of renewal under consistent fire.

Torch Bearer Permafrost I Debuff

This aura level is now in-line with all other levels, at -5% ROF from -3%.

Torch Bearer Frost Nova Slow Duration
The snare duration for this ability now takes into account the duration of its freeze, each level providing a full 5 seconds of slow post-unfreeze as the description indicates (instead of as little as 2s at level III).

Oculus Ball Lightning Produce Nightwalkers/Spirits On Death
Due to the disposable nature of Ball Lightning (particularly with Explosive End), this caused an extremely exploitable level of synergy with Oak and Erebus allies, and can safely be inferred as unintended and a consequence of Oculus' poor testing.

Oculus Blast Off! I Radius
This ability level is now in-line with all other levels, at 6 radius from 3.

Sedna Horn of the Yeti IV Buff
Sedna's Yetis will now correctly receive the level IV buff with this ability.  Existing Yetis now also receive the appropriate level of buff upon ability upgrade, as was the case with Shamblers and Entourage.

Absorption Refresh On Addition/Removal
Shield buffs such as Bramble Shield and Groffling Warplate will no longer cause all related buffs to be fully recharged any time one is added or removed.  Additionally, absorption damage float text is now only displayed for both involved parties (like all other damage float text) and displays the amount of damage done.

Illegal AI Area-Targeted Ability Lock-on
The effect location of area-targeted abilities e.g. Hammer Slam will no longer illegally follow a moving unit whose position the AI chose for a target location.

Ability Tooltips Display Unmodified Cooldown Time While Cooling Down
The correct total cooldown time is now always shown in all ability bar tooltips.  Skill sheet and inventory tooltip cooldown times remain unmodified, as intended. 

Map Domination Voice-Over On Loss Of Map Control (Second Attempt)
The map domination voice-over now correctly activates on flag capture for the team gaining map control any time they capture a flag above the domination threshold.  In addition, the map domination threshold is read from game settings instead of being fixed at 75%.  This fix was absent from the released 1.03 code, despite being listed in changelog.

Trebuchet Damage Unaffected By Tower Strength Citadel Upgrade
The tower strength upgrades will now affect both Fort-upgrade Trebuchets and flag-controlled Trebuchets.

ROLLOVER DATA ERROR Or No Rollover On Flag Mouseover
Flags captured by the enemy team behind the Fog of War should now always display the correct rollover information.  This issue was caused by an engine bug related to non-visible unit replacement and could not be directly fixed via Lua.  Fortunately, a workaround involving giving the opposing team momentary 1-radius visibility on any captured flag to allow the engine to report the correct flag unit to the rollover system seems to have resolved it in practice.

 

Miscellaneous Small Fixes
Cosmetic changes (thanks to Lord Orion for finding most of these):

  • Compost and Soul Power now show their current level in the buff icon (thanks to Ptarth for the IV-VI Compost icons)
  • Torchbearer's mode-change buffs now show the correct names
  • Warlord's Punisher now uses the correct cast animation for its cast time
  • As noted above, absorption damage float text now displays the amount of damage done in a different format than normal damage float text, and will show critical hits in yellow.  Shielded minions will show absorption damage float text to their demigod as well.

Small functional/internal changes:

  • Demon Assassin's Warp Area ability now has a pre-cast check that prevents it from being cast when no targets are in range (it has no range ring, and unlike other instant-cast area abilities, does not work on a variety of target types)
  • Regulus can no longer Maim himself with self-damaging abilities (this only affected mod items)
  • Made several changes to the AIBrain functions RemoveArmyBonus and AddArmyBonus to prevent endless ArmyBonus stacking (which carries a fairly heavy sim performance penalty in extreme cases e.g. vanilla Compost)
  • Ability damage now has the CanEvade flag set to false by default.  This is the intended functionality, as all abilities other than Unclean Beast's Venom Spit specifically disable this.  Practically speaking, in vanilla Demigod this only affects Spit damage-over-time, which can no longer be inexplicably dodged.
  • Wyrmskin Gauntlets' ranged on-hit chance is now in line with every other ranged on-hit chance (10% from 8%, 66% of melee chance)
  • Weapons with a blueprint-specified DamageRadius can no longer have their splash damage reduced unless the buff doing the reduction is flagged as a debuff.  This was necessary to keep the Tower Strength citadel upgrade from reducing the splash damage of Trebuchets.


Feature Additions
Mod UI texture/icon support has been added:

Any .dds files in your mod folder within /textures/ui/common will have their path relative to the mod folder cached in a table that the UIFile function looks at when assigning most non-background, in-game UI textures.  This can be used both for adding and overriding existing textures without having to use relative paths.  This (along with the mod-folder doscript hook included) allows you to change the name of your mod folder between versions without having to update any of your code.

For example, the path:
    /mods/mymod/textures/ui/common/abilities/dgqueenofthorns/newqueenclose.dds
Would override the existing file:
    /bindata/textures/ui/common/abilities/dgqueenofthorns/newqueenclose.dds

Adding a new file:
    /mods/mymod/textures/ui/common/abilities/mymod/myicon_01.dds
Would let you assign this icon to a buff or ability the same as you would an existing icon in that relative path, by setting its blueprint's Icon field to:
    'mymod/myicon_01'

This affects any UI texture calls that use UIUtils.UIFile, including buff and ability icons, shop tab icons, and many UI window elements.
As UIFile only returns paths within /textures/ui/common, it does not affect any files outside of that path, and there are quite a few files within that path that do not use UIFile.  Expanding this support to all of these files would require hooking every UI creation function that ignores UIFile and directly assigns a texture path, which would unfortunately involve 30+ file hooks and upwards of a hundred destructive function overrides (as most texture path variables are declared local within a function).

Several new BuffAffects have been added for use by mods:

  • EnergyAdd: Functions like LifeSteal, adding energy based on a percent of damage done (works on grunts and minions)
  • EnergyLeech: As above, except that energy is stolen from the target based on a percent of damage (demigods only)
  • EnergyDrain: A one-off application of EnergyLeech, like a normal negative Energy.Add buff that transfers between demigods


Additional Sync variables for displaying unit information in the UI have also been created, in addition to those from 1.03 (note that some of the associated buffs are currently unused in stock Demigod):

New BuffAffects:

  • EnergyAdd
  • EnergyLeech

Existing BuffAffects:

  • Absorption
  • AbsorptionMult
  • MagicResistance
  • MissChance
  • Invincible
  • StunImmune
  • DebuffImmune
  • BountyGivenMod
  • BountyReceivedMod

Weapon BuffAffects:

  • SplashMult
  • DamageRadius
  • FiringRandomness
  • MetaRadius
  • MetaAmount

Note: The secondary weapon stats and associated UI hooks from 1.03 have been removed, and replaced by an entirely sim-side system where each Demigod tracks the stats for all of its main weapons and updates the primary weapon sync variables any time its weapon/mode is changed.


Several other internal changes and additions have been made to facilitate easier and more non-destructive modding of BuffAffects.  See the comments in /hook/lua/sim/BuffAffects.lua for details.


v1.03 

Knockback Kill/Damage Credit (Ptarth)
Creeps killed by knockback damage (e.g. Post-Mortem, Ring of Divine Might, etc) now correctly give a share of credit for their death to the instigating demigod, as well as contribute toward that demigod's cumulative damage statistics.

Lord Erebus Poisoned Blood (Ptarth & Mithy)
Updated so that the correct audio cue and visual effects are now played when Erebus or his allies are healed by his poisoned potions.

Instant-Cast Item Activation (Ptarth & Mithy)
The fix for Sludge Slinger and Parasite Egg not activating unless the activating demigod was facing its target (present in 1.02) was not taking effect due to an error in implementation.  This fix is now fully functional, and is also now applied to Deathbringer's silence ability.

Ironwalkers and Desperate Boots Persistent Buff (Mithy)
The conditional buffs for these items are now properly rescinded when the item is removed from inventory by any means.

Ironwalkers Always-On for Rook (Mithy)
The item's speed condition now compares against a percent (90%) of the demigod's base speed, for a similar activation threshold (<= 5.4, from 5.5) for most demigods.

Late Map Control Voice-Over (Mithy)
The map control voice-over now correctly activates any time the dominating team captures a flag with over 75% map control, rather than when a flag is lost above 75%.

Oak Raise Dead Ward Skill Level Crossover (Mithy)
All raise dead chances, spirit levels, and spirit caps now conform to the correct skill level of the demigod for whom the spirit is raised, as was already the case with Lord Erebus' Conversion Aura.

Gold Loss/Gain On Unsuccessful Item Transaction (Mithy)
Item transaction events now insure against gold loss or gain when the item itself cannot be bought or sold, e.g. when dying.

Enemy Gold Amounts Visisble In UI Mods (Mithy)
Enemy gold values are no longer accessible to the UI.  Existing UI mods that previously displayed enemy gold amounts will now only show zero.

Modal Demigod Weapon Stats (Mithy)
The UI will now correctly show the damage, rate of fire, and DPS calculations for the demigod's currently selected weapon.  Without other mods in effect, this only affects Queen of Thorns' packed mode, but the fix will allow the display of asymmetric changes to Torchbearer's weapons as well.

Oculus Ball Lightning Auto-Attack/Advance (Mithy)
Ball Lightning now correctly attack-move to the location specified by the reticle, instead of ignoring the reticle and only attacking nearby targets.

Oculus Ball Lightning Health Bar (Mithy)
Ball Lightning now have a normal, fully-visible health bar above their mesh, like every other unit and minion.

Oculus Ball Lightning Formation Movement (Mithy)
Ball Lightning no longer cause Oculus and other minions selected and commanded with them to move slowly and attempt to join a formation.  Ball Lightning will now behave exactly like other minions when given movement commands.

Oculus 'Sticky' Chain Lightning and Ball Lightning Effects (Mithy)
These lightning attacks should no longer break and create persistent lightning effects attached between the attacker and the former location of the target.

AI Citadel Upgrade Purchasing (Mithy)
AI are now able to purchase citadel upgrades that do not have a buff with the same name, e.g. Experience. Standard Demigod AI will still not purchase any upgrades unless a mod that enables this (such as the Skirmish AI Mod) is also used.

Experience Citadel Upgrade Persistence (Mithy)
Experience IV now correctly removes the Experience III bonus when purchased.


Feature Additions:
Several additional unit stats are now added to the Sync, allowing UI mods to display them for allied Demigods.
More details can be found in the comments in BuffAffects.lua.  The added stats are as follows:

  • Evasion Chance
  • Slow Cap
  • Life Steal
  • Damage Return
  • Damage Reduction
  • Vision Radius
  • Omni Radius
  • Gold Production
  • Experience Multiplier
  • Death Penalty Multiplier


Previous fixes removed due to inclusion in Demigod Patch 1.3:

  • Oculus Sacrifice not healing allied units
  • Oculus Ball Lightning summoning in map void
  • Unclean Beast Plague/Post-Mortem conflict
  • Minion summoned hitpoints
  • Heart of Life and Wings of the Seraphim halting on healing

Previous fixes left in due to the patch 1.3 solution being insufficient/ineffective:

  • Oculus Electrocution ineffectuality
  • Lord Erebus Mist deactivation threshold
  • Unclean Beast Ooze deactivation threshold

v1.02

Oculus Sacrifice Fix by Ptarth
Sacrifice now will heal allied units.

Unclean Beast Ooze Suicide Fix by Ptarth
Ooze now correctly ends when the Unclean Beast is low on Health.

Lord Erebus Poisoned Blood Fix by Ptarth
Poisoned Blood Potions now act like the potions they disguise themselves as to the team whose Lord Erebus dropped them. This prevents Lord Erebus from farming his death and stops his team from being penalized for his skill choice.

Oculus Electrocution Fix by Ptarth
Health and Mana regeneration are now correctly stopped when a unit is under the effect of Electrocution.

Torch Bearer Projectile slowdown Fix by Ptarth
Torch Bearer's fireballs and Ice blasts now correctly home in on targets. This includes his Fireball ability.

Unclean Beast Post Mortem Plague Conflict Fix by Exxcentric
Plague I and II no longer remove the Post Mortem death effect.

Rook Move Attack Fix by Ptarth
Rook now is able to move attack properly.


v1.01

Orb of Veiled Storms Fix by Ptarth (bug reported by awuffleablehedgie)
The Orb of Veiled Storms now deals ArmorImmune damage like every other demigod ability and weapon ability (except for the Doomspite Grips and Girdle of Giants, which have a cleave attack).

Lord Erebus Mist Form by Ptarth
Fixed Mist Form ability so that it correctly ends when Lord Erebus has less than 125 mana.

ZikFix (Zikurat Tower Fix) by mrappard
The Dark side towers on Zikurat while playing Conquest now spawn correctly.


v1.0

Minion +hp Fix by Ptarth
Minions summoned by Demigods Generals [Sedna, Lord Erebus, Oak, Queen of Thorns, Oculus] with +minion hp items now have the correct health.

Oculus Brain Storm Fix by Ptarth
Brain Storm now has a visual effect at all levels, instead of only when Oculus has Mental Agility Brain Storm now removes debuffs on targeted unit as specified by the rollover tooltip text.

Queen of Thorns Attack Animation Glitch by Ptarth
Reduced the lifetime of the QoT's root attack animation to make the animation look better. This is only a cosmetic change.

Oculus Lightning Ball Summons by Ptarth
Lightning Balls will no longer summon in map void space.

Oculus Lightning Blast by Ptarth
Lightning Blast now occurs at the origin of the target instead of the origin of the unit that triggers the effect.

Missing Oculus Shield Effect by Ptarth
Oculus now has a visible Shield effect.

Heart of Life and Wings of the Seraphim Healing Fix by Ptarth (awuffleablehedgie provided starter code)
The Heart of Life and Wings of Seraphim no longer stop their regeneration effects when the user is healed.


Outstanding Bugs/Issues

Solvable Issues:
Modal Demigods spawning in default mode rather than last used mode
This is trivial to implement if there is popular support for it.  At this point, I'd consider two or three votes 'popular', so make it known if you'd like this to be changed (or not).

Plague causes massive sim slowdowns
This is fixable, but will require a full re-write of how Plague works and infects units.  Some balance changes may need to be made to reduce the check rate and radius of infection, as well as to reduce the overall run time of each Plague infection.  This should result in similar overall effectiveness, with slightly less infection but faster damage delivery.

Unsolvable Issues:
Minion pathing issues / stuck minions
This is caused by poor handling of the pathfinding map's edges, usually around corners or the citadel.  Without the ability to alter these pathing maps (they use a raw image format of some kind), there is nothing that can be done about this.

Unreliable multiplayer connectivity
This is contained completely within the engine/Impulse.

Achievements fail to record progress properly
As above.


Credits

Ptarth - the original creator of the Uberfix, responsible for most of the fixes prior to 1.03

Mithy/miriyaka - took the reins for 1.03, currently maintaining the project

awuffleablehedgie - bug reports and suggestions

pacov - lots of testing, feedback, and motivation

605,552 views 296 replies | Pinned
Reply #76 Top

Oh, and if a FavorMod ability causes the sticky effects thing, it means he probably just copied code from Chain Lightning.  The functional code for each demigod/item's ability is unique, so the UberFix wouldn't help or hurt a FavorMod item that works similarly to CL.

 

had wondered how you had fixed this. 

 

Hijacked :), ROFL 

 

ty miriyaka!!

Reply #77 Top

Quoting OMG_ZEX, reply 72

Quoting GM-McShane87, reply 69Who uses blast off 1 anyway? You use your mana to chain the tower as a creep wave is coming, everyone knows that. 

Agreed, the only thing it would do is give oc a potential kill at level 2 with a jump/double jump + chain on a squishy DG. I can't really see this happening unless a reg is on the same team as an oculus. Doing a jump to get that pesky reg behind his tower at level 2 would almost certainly get you killed, no mana, no escape route. If the other team has a port your dead.

Making this change seems logical to me and as far as balance goes I can't see oculus ever touching tier 1.

 

Yea if some noob tries to get fresh then of course I'm gonna jump right on his head, but other than that it's not as good as zapping the towers. 

 

Reply #78 Top

Quoting GM-McShane87, reply 77



Quoting OMG_ZEX,
reply 72

Quoting GM-McShane87, reply 69Who uses blast off 1 anyway? You use your mana to chain the tower as a creep wave is coming, everyone knows that. 

Agreed, the only thing it would do is give oc a potential kill at level 2 with a jump/double jump + chain on a squishy DG. I can't really see this happening unless a reg is on the same team as an oculus. Doing a jump to get that pesky reg behind his tower at level 2 would almost certainly get you killed, no mana, no escape route. If the other team has a port your dead.

Making this change seems logical to me and as far as balance goes I can't see oculus ever touching tier 1.

 


Yea if some noob tries to get fresh then of course I'm gonna jump right on his head, but other than that it's not as good as zapping the towers. 

 

God I hate it when noobs get fresh 8D

Reply #79 Top

Hi Mithy

 

I have a conflict with the latest version of uberfix.

 

I know that you have updated the buffAffect.lua file in uberfix to provide more options to sync with the ui, however, due to constraints of my mod i have had to alter this file as well :(.

 

Anyway here is the code i am using: (buffAffects.lua)

 

Code
  1. local Buff = import('/lua/sim/buff.lua')
  2. ######## BEGIN BUFF TYPE FUNCTION DEFINITIONS ############
  3. <strong>function Health( unit, buffName, buffDef, buffAffects, instigator, instigatorArmy, bAfterRemove ) </strong>
  4.    #Note: With health we don't actually look at the unit's table because it's an instant happening.  We don't want to overcalculate something as pliable as health. 
  5. if bAfterRemove then return end
  6.     local health = unit:GetHealth()    
  7. local val = ((buffAffects.Health.Add or 0) + health) * (buffAffects.Health.Mult or 1)    if instigator and not instigator:IsDead() and buffAffects.Health.DamageRatingMult then      
  8.  val = val + buffAffects.Health.DamageRatingMult * CalculateDamageFromRating(instigator.Sync.DamageRating)  
  9.  end    
  10. if buffAffects.Health.MaxHealthPercent then      
  11.  val = val + unit:GetMaxHealth() * buffAffects.Health.MaxHealthPercent  
  12.  end
  13. #######################CHANGE BY EXXCENTRIC FOR FAVORMOD
  14. <span> </span>if buffAffects.Health.MaxHealthPercentlvl then  
  15.      local playerlevel = unit:GetLevel()          
  16. val = val - 100 - 19*playerlevel * buffAffects.Health.MaxHealthPercentlvl  # Code For Priest Change  
  17.  end
  18. #######################END CHANGE BY EXXCENTRIC FOR FAVORMOD
  19.  
  20.     local healthadj = val - health    
  21. local data = {      
  22.  Instigator = instigator,  
  23.      InstigatorBp = false, 
  24.        InstigatorArmy = instigatorArmy,
  25.         Amount = -healthadj,    
  26.    Type = buffDef.Type or 'Spell',  
  27.      DamageAction = buffName or 'Unknown',  
  28.      Radius = buffDef.DamageRadius or 0,      
  29.  DamageSelf = buffDef.DamageSelf or false,      
  30.  DamageFriendly = true,    
  31.    ArmorImmune = true,    
  32.    CanBackfire = true,    
  33.    CanCrit = true,      
  34.  CanDamageReturn = false,      
  35.  CanBeEvaded = true,      
  36.  CanOverKill = true,      
  37.  Vector = VDiff(instigator:GetPosition(), unit:GetPosition()),  
  38.      Group = "UNITS",    } 
  39.    if instigator and not instigator:IsDead() then  
  40.      data.InstigatorBp = instigator:GetBlueprint()    
  41. end
  42.     data.CanMagicResist = buffDef.CanMagicResist  
  43.  if buffDef.CanMagicResist == nil and data.Amount &lt; 0 then  
  44.      data.CanMagicResist = false  
  45.  elseif buffDef.CanMagicResist == nil and data.Amount &gt; 0 then 
  46.        data.CanMagicResist = true    end
  47.     if buffDef.DamageFriendly == false then    
  48.    data.DamageFriendly = false  
  49.  end    
  50. if buffDef.ArmorImmune == false then    
  51.    data.ArmorImmune = false 
  52.    end  
  53.  if buffDef.CanCrit == false then    
  54.    data.CanCrit = false  
  55.  end
  56.     if buffDef.CanDamageReturn then  
  57.      data.CanDamageReturn = buffDef.CanDamageReturn 
  58.    end    if buffDef.CanBackfire == false then  
  59.      data.CanBackfire = false  
  60.  end  
  61.  if buffDef.CanBeEvaded == false then  
  62.      data.CanBeEvaded = false  
  63.  end
  64.     if buffDef.CanOverKill == false then    
  65.    data.CanOverKill = false    
  66. end
  67.     if buffDef.IgnoreDamageRangePercent then  
  68.      data.IgnoreDamageRangePercent = buffDef.IgnoreDamageRangePercent
  69.     end
  70.     data.NoFloatText = buffDef.NoFloatText
  71.     DealDamage(data,unit)    #LOG('*BUFF: Unit ', repr(unit:GetEntityId()), ' Health adjusted to ', repr(val))
  72. end
  73. <strong>function MaxHealth( unit, buffName )  </strong>
  74.  local oldMaxHealth = unit:GetMaxHealth()
  75. local unitbphealth = unit:GetBlueprint().Defense.MaxHealth or 1  
  76.  local newMaxHealth = BuffCalculate(unit, buffName, 'MaxHealth', unitbphealth)
  77. ###############################EXXCENTRIC - ADDED TO RESYNC MINION HEALTH AFTER BUYING AN UPGRADE#############<span> </span>
  78. <span> </span>if Buff.HasBuff(unit, 'MinionHealthandDamageBOOSTA') then<span> </span>  
  79.  <span> </span>local aiBrain = unit:GetAIBrain()<span> </span>local hero = aiBrain:GetHero()
  80. <span> </span>local herolvl = hero:GetLevel()<span> </span><span> </span>newMaxHealth = newMaxHealth + 50 *  herolvl 
  81.        end  
  82.  <span> </span>if Buff.HasBuff(unit, 'MinionHealthandDamageBOOSTB') then<span> </span>    
  83. <span> </span>local aiBrain = unit:GetAIBrain()
  84. <span> </span>local hero = aiBrain:GetHero()<span> </span>
  85. <span> </span>local herolvl = hero:GetLevel()
  86. <span> </span><span> </span>newMaxHealth = newMaxHealth + 95 *  herolvl    
  87.          end 
  88.    ################################################# 
  89.    unit:SetMaxHealth(newMaxHealth) 
  90.    unit.Sync.MaxHealth = newMaxHealth
  91.     # Adjusts current health by the amount of the MaxHealth buff    
  92. local maxHealthAdjustment = newMaxHealth - oldMaxHealth 
  93.    local currentHealth = unit:GetHealth()
  94.     # If we are decreasing max health, then apply the descrease 
  95.    if maxHealthAdjustment &lt; 0 then      
  96.  if(currentHealth + maxHealthAdjustment &lt;= 0) then  
  97.          unit:AdjustHealth(-currentHealth + 1)  
  98.      else      
  99.     unit:AdjustHealth(maxHealthAdjustment)        
  100. end  
  101.  # Otherwise we are increasing max health. The bp tells us whether or not to adjust the current health
  102.     else    
  103.    if(Buffs[buffName].Affects.MaxHealth.AdjustHealth == true) then  
  104.          if(currentHealth + maxHealthAdjustment &lt;= 0) then  
  105.              unit:AdjustHealth(-currentHealth + 1)        
  106.    else              
  107.  unit:AdjustHealth(maxHealthAdjustment)          
  108.  end  
  109.      end  
  110.  end
  111.     #LOG('*BUFF: Unit ', repr(unit:GetEntityId()), ' buffed max health to ', repr(val))
  112. end
  113. <strong>function DamageRating( unit, buffName )</strong>
  114.     local val = BuffCalculate(unit, buffName, 'DamageRating', 0, 0)
  115. #######################CHANGE BY EXXCENTRIC FOR FAVORMOD - Resync minion damage after buying and upgrade
  116.  
  117.     if Buff.HasBuff(unit, 'MinionHealthandDamageBOOSTA') then<span> </span>  
  118.  <span> </span>local aiBrain = unit:GetAIBrain()<span> </span>local hero = aiBrain:GetHero()<span> </span>
  119. <span> </span>local herolvl = hero:GetLevel()<span> </span><span> </span>val = val + 2 *  herolvl  
  120.      end    
  121. <span> </span>if Buff.HasBuff(unit, 'MinionHealthandDamageBOOSTB') then<span> </span>  
  122.  <span> </span>local aiBrain = unit:GetAIBrain()
  123. <span> </span>local hero = aiBrain:GetHero()
  124. <span> </span>local herolvl = hero:GetLevel()<span> </span><span> </span>val = val + 3 *  herolvl    
  125.          end  
  126.  
  127. #######################END OF CHANGE BY EXXCENTRIC FOR FAVORMOD
  128.  unit.Sync.DamageRating = val  
  129.  local basedamagerating = unit:GetBlueprint().Stats.DamageRating
  130.     if unit.Sync.PrimaryWeaponDamage and not unit:IsDead() then  
  131.      local wep = unit:GetWeapon(1)  
  132.      if wep then      
  133.      local damage = wep:GetBaseDamage()          
  134.  unit.Sync.PrimaryWeaponDamage = damage    
  135.        unit.Sync.DamageRatingIncrease = damage - basedamagerating    
  136.    end  
  137.  end
  138. end
  139.   
  140.  

 

Can you suggest a less destructive way that i can import these altered function back into the game? 

 

Any Help would be Appreciated

Exx

Reply #80 Top

Ok i think that i have a fix but i would like conformation that this is not going to cause errors with uberfix (it doesnt seem to, but i am not too sure how hooking functions like this works), 

Solution was pretty simple :

OK so i added in your guys change for uberfix :

 

Code: c++
  1. if unit.Sync.PrimaryWeaponDamage2 and not unit:IsDead() then  
  2.      local wep = unit:GetWeapon(2)    
  3.    if wep then      
  4.      local damage = wep:GetBaseDamage() 
  5.            unit.Sync.PrimaryWeaponDamage2 = damage      
  6.      unit.Sync.DamageRatingIncrease2 = damage - basedamagerating    
  7.    end  
  8.   end

into function DamageRating. Nothing seems to have been done to the other 2 functions i have changed within this file.

 

Any help greatly appreciated

 

Exx

Reply #81 Top

Just posted in the FavorMod thread about this-- there's no way to hook these non-destructively.  The changes you made look fine, but if you have a log from a game where this was causing errors, I'd love to see it so I can fix my fix (welp) so it doesn't spew errors whenever it's missing a variable.  I thought I had it checking for all of them, but apparently I missed something somewhere.

Reply #82 Top

i can give you the link for the version that was causing the error

FM 2.0F

http://www.mediafire.com/?mp0kp659puws9ih

 

Load up with uberfix and start as tb.

 

Purchase anything in new achievement shop (prefereably one of the new summonables) then summon them and switch form

 

Hope that helps

Reply #83 Top

Yeah, found it.  My UI hook was only looking for mode changes, without checking for PrimaryWeaponDamage2 (and making sure it's >0).  It broke the inventory/stat display, and dumped about 2mb of errors to the log in like 15 seconds. o_o

It'll be fixed in the next version, although any mod that overwrites a weapon-related BuffAffect will still need to have the secondary weapon stat support or the UberFix will just display the primary stats as in normal Demigod.

Reply #84 Top

This and favormod makes for insanely OP AI its hillarious.

Reply #85 Top

Quoting WallofChaos, reply 84
This and favormod makes for insanely OP AI its hillarious.

Just curious. but what are you finding that makes the AI op in this mod?  I know rook can attack move correctly at least, but I'm curious what else is standing out to you from uberfix that enhances the ai. 

Reply #86 Top

Quoting WallofChaos, reply 84
This and favormod makes for insanely OP AI its hillarious.

Once you hit level 10-12 the AI loses any advantage over human players manly being gear + higher level skills is the AI's early game advantage.

If you are having a hard time just sit tight, get your items, level best as you can and then you can roll the AI's

EDIT: I hope your talking about the skirmish mod being enabled and not favor because Uber and Favor do nothing to AI's

Reply #87 Top

He's probably thinking of another mod, as the only AI changes here are already mirrored in Peppe's AI mod (Rook stutter fix, experience purchase fix, etc).

 

Quick update - I haven't really done any work on the last remaining fixes this week.  Need to get around to documenting them on the google code site too.  If you guys find new issues, feel free to post them there, as I'm not always great at recording what I'm working on or needing to work on, and that'll help keep me on task.

I took a look at the cooldown display bug, and I cannot figure out how it would be happening; cooldown is only added to sync in one place that I can find, and any cooldown buff bonuses are taken into account there.  I'll keep looking at it, but as it isn't that important, I won't let it hold up a release.

Experimented with forced limitations on QoT's weapon arcs to help with the attack-move weirdness, but it did nothing - her weapons can attack in any direction they so please while the problem is in effect, regardless of turret settings.  As best I can tell, this is caused entirely by a bug the engine, and the weapon lua does absolutely nothing w/r/t target handling.  The only thing left to try is to stop her weapons from being able to fire at all when their target isn't her assigned attack target, but I have a feeling that will break normal attack-move behavior (as if anyone even uses that).

 

If there are any other issues that have been mentioned recently, I've forgotten what they are.  Already fixed the UI crash that Exxentric brought to my attention, and I'm still mulling over the Erebus potion re-work.  It'll be a lot more work, but it sounds like a fun challenge, so I'll probably work on it some when I feel the urge.  I'm also still considering the Oak/Erebus aura re-work as well-- that is, giving each aura of each type a statistically equal chance at raising on death, instead of the all-or-nothing time-share method they use now.

Definitely going to do the TB 'balance' fixes (Permafrost I ROF, Frost Nova slow) in the next release, as well as making Ball Lightning immune to raise dead auras.  I did a few games as Oc with an Erebus and Oak teammate, and he can pretty much provide infinite minions for his allies WHILE blowing up towers and high-level creeps; it's insanely imbalanced and definitely unintended.

Reply #88 Top

Oh, and I'm testing a fix for ranged Demigod attack stutter when following/stuck, by having it only cancel its attacks for the first 0.2s, and skipping cancels for the next ~0.8s.  This means that when a ranged demigod is force-attacking a target while stopped, and the target moves out of range, it gets its current in-progress (but not yet fired) attack canceled, gets any too-rapid retries canceled for the next fifth of a second (this is to preserve the value of Regulus' winged lock-on bonus which totally skips cancels), but then if it happens to be faster than its target and stops and starts within a second, it doesn't get that attack canceled as well.

This basically removes the ridiculous penalty that non-Regulus ranged demigods get for being faster than their targets, without giving them the full ability to lock-on like Reg does.  I'll play around a bit with the actual delays involved, and might end up making them based on the weapon's ROF, since I don't have any idea how this solution works with maxed out ROF (although again, the idea is only to cancel their first attack when they start moving, and then if they're faster, let them more or less proceed with further attacks).

This'll also fix the rapid-attack stutter that happens when a demigod is following / force attacking something and they get stuck on a corner, causing them to do the beginning of their attack animation over and over without firing anything.

 

 

Edit: If someone could confirm whether or not the cooldown display bug (cooldown time tooltip value on the ability button resets to default while the ability is cooling down; must have either a Celerity Flag or a -cooldown item) happens to abilities WITHOUT a shared cooldown, e.g. standalone items like Orb of Defiance or Wand of Speed, I'd appreciate it.

Reply #89 Top

Edit: If someone could confirm whether or not the cooldown display bug (cooldown time tooltip value on the ability button resets to default while the ability is cooling down; must have either a Celerity Flag or a -cooldown item) happens to abilities WITHOUT a shared cooldown, e.g. standalone items like Orb of Defiance or Wand of Speed, I'd appreciate it.

tested.  The cooldown issue DOES NOT impact orb of defiance.  It seems to work as expected and shows the correct cooldown values.

Reply #91 Top

While avoiding looking at UI tooltip code (ugh) I stumbled upon an issue with how absorption is calculated, namely that getting two absorption buffs on at once will 'refresh' values for the existing one as long as it still has at least 1 point of absorption left.

This can only occur with one Bramble Shield and one Groffling Warplate buff; different levels of BS simply replace each other completely with no regard to which is superior; only the last one is used.  Practically speaking, this means that a Bramble Shield IV that hasn't been totally depleted yet will be completely re-filled and added to if Groffling Warplate triggers while it's still active, resulting in 1450+300 = 1750 total absorption, even if BS IV only had 1hp of absorption left.  This creates a bit too much synergy between these two abilities.

However, may not be an easy fix for this that won't result in Groffling either overwriting and removing Bramble Shield, or not refreshing itself should it trigger a second time while still enabled (however unlikely that is to happen).

 

My initial reaction would be to simply have the Groffling buff set to the same buff type ('ABSORB') and turn on its 'IGNORE' flag for existing buffs, causing it to do nothing if itself or an existing Bramble Shield (again, astoundingly unlikely) already exists.

Otherwise, I can try having the Absorption buff affect ignore BuffCalculate, only look at the buffdef for the incoming buff, and manually add it to the unit's existing absorption.  Don't know what side effects-- if any-- this might have, other than overriding the Absorption BuffAffect (which I was going to do to add UI support for it anyway).  I'd have to figure out a way to do this where Bramble Shield would still replace itself, however.  Confusing.

Reply #92 Top

Found a pretty decent fix for this, considering how horribly broken the whole absorption system is:

Code: c++
  1.     if buffAffects.Absorption.Add then
  2.         if bAfterRemove then
  3.             unit.Absorption = math.max(0, unit.Absorption - buffAffects.Absorption.Add)
  4.         else
  5.             unit.Absorption = math.max(0, unit.Absorption + buffAffects.Absorption.Add)
  6.         end
  7.     end
  8.     
  9.     if unit.Absorption == 0 then
  10.         import('/lua/sim/buff.lua').RemoveBuffsByAffect(unit, 'Absorption')
  11.     end

This retains the same functionality for buffs of the same type (types being Groffling or Bramble Shield), but allows co-existence of different buff types without having them refresh each other on both add and remove.

 

Example 1:  900 of 1450 BS IV remaining, Groffling (+300) engages--

Before this change: Absorption jumps to 1450+300 for 1750 total.  Gain: 550

  • If BS IV wears off first: Absorption jumps to 300 regardless of damage done.
  • If Groffling wears off first: Absorption jumps to 1450 regardless of damage done.  Gain: 550+

After this change: Absorption gains +300 for 1200 total

  • If BS IV wears off first: Absorption takes a -1450 hit, effectively removing it.
  • If Groffling wears off first: Absorption takes a -300 hit, returning to 900.

 

Example 2:  150 of 300 Groffling remaining, BS IV (+1450) engages--

Before this change: Absorption jumps to 1450+300 for 1750 total.  Gain: 150

  • When Groffling wears off: Absorption jumps to 1450 regardless of damage done.

After this change: Absorption gains +1450 for 1600 total

  • When Groffling wears off: Absorption takes a -300 hit, dropping to 1300.

 

The removal situation is not ideal, but is the best that can be done without a massive rewrite of the absorption system.  Think of it as the new buff taking on any damage done to the previous buff.

Absorption Mults (which are horribly broken and still cause any buffs containing them to be removed when absorption Adds run out) are now ignored.

 

This is not strictly a balance change.  The way absorption works right now is exploitable and broken, since both add and remove events fully refresh existing buffs, causing unintentional and excessive synergy between the two separate sources of it.  The only alternative to this method is making Groffling replace Bramble Shield, which seems a far more harsh alternative to me.

Reply #93 Top

good find. I support this... 

Reply #94 Top

very good find. I support this.

 

Also i might have to  make sure that my mod does not do the same thing

 

WD!

 

 

Reply #95 Top

Will groffling proc when there is an absorption effect active? I thought I remembered the proc code coming only after the absorption check.

Reply #96 Top

Another bug - this one will likely be hard to track down as its somewhat random, but just occurred in my last game.  Trebuchet on rook no longer fires.  I noticed this when I was a level 9 or so.  Once I hit level 10, it started firing again.  It initially targeted an enemy demigod at this point.  I'm wondering if it can somehow be triggered when a dg tps away while a trebuchet is locked on and firing at them.  Minor theory - maybe it started firing again when the dg that ported away can back into view?

Don't know...

Reply #97 Top

Pacov, towers suffer from that exact defect. If they are targeting a demigod and that demigod ports away they will stop firing until the demigod comes back again. 

Reply #98 Top

Saw where it stopped working exactly watching the replay.  I'm level 8 attacking an enemy rook (elmnar).  The enemy rook gets pushed back and walks out of range... my trebuchet stops firing.  My trebuchet starts firing again the moment I come into contact with elmnar again (10 min or so).  Then, when he's out of range again, it stops firing and won't reacquire any targets.  I fight 2 enemy dgs and a tower, but treb does not fire again as neither of the dgs I'm fighting is elmnar.  Elmnar walks close enough for my treb to acquire and it starts attacking him again.

Elmnar fights for a bit, then tps out.  My treb stops firing again.  Elmnar comes back into view.  My treb attacks him again.

So - what ends the treb only targeting the 1 dg?  That dg dying.  I noticed that I had 0 deaths and so did elmnar.  Once I killed him the trebs were acquiring targets left and right.  Its possible that the targeting issue would end if I died as well, but I can't confirm that. 

Trigger event.  Here's the precise scenario that occurred.  Me(rook) vs 3 ai rooks near my tower on cata near cd flag.  I hit level 8 while while I'm still near the 3 ai.  I kill 2 of the ai, then get trebuchets.  This leaves me vs elmnar (ai). My treb starts hitting elmnar and I engage.  Elmnar is forced to retreat and walks away into the fog of war (note - elmnar does not tp away, but walks to the crystal).  From this point on, until elmnar is killed, my trebucet will ONLY fire at him when he is in range. 

Action that ends the event:  death of the dg that has been locked on (possibly death of the dg that has the "stuck" trebuchet as well")

Solution:  modify trebucet acquisition to believe the target is dead if it is out of los?

edit - hmm... I tried to replicate this in a 1v1 human v human rook game.  Starting level 10.  Test on cata.  Both rooks goto mana flag with trebs engaged.  Wait until both rooks are targeting each other with trebs.  Walk away.  1 rook stays on mana, the other goes to health.  Trebs continued to fire, so couldn't replicate this way.  Test 2 - Do not get trebs until both rooks are near each other and will only target each other with trebs.  Both players get trebs, the targeting goes as expected.  1 rook backs away.  The other rook backs up as well, but close enough to hit creeps.  The trebs on both rooks continue to work normally.  So, I could not replicate the problem this way. 

Reply #99 Top

This bug was one of my major "bugs of interest". It happens for the Rook's Tower of Light and for the Trebuchet. There are several threads on it across the forums. I don't know if it also affects the archer towers. I could never find a way to fix it, the scripting commands that should have done it never worked and are all internal engine commands.

Reply #100 Top

I might actually be able to fix that.

It sounds like the treb is keeping a target that doesn't have a visible recon blip - target loss conditions are outside the purview of the lua, but it's easy enough to periodically check a weapon's target for a recon blip, and do a ResetTarget() if it doesn't have one.  I don't want this looping on all weapons unnecessarily, so I'll just try it on the treb towers first.  If you can absolutely confirm the problem for other units/weapons (and this fix works), then I'll add it to those.

Actually, this may not be a weapon problem at all.  I just realized that the treb is a separate unit attached to Rook with its own weapon.  So it's probably the same old goddamn no-recon unit lock-on problem from FA.  Except DG actually has a working attack manager, so if this is the case, I can still probably de-acquire the target.

If the latter is the issue, it definitely won't affect the archer towers - they're actual weapons on Rook.  Which is what causes the retarded AI movement stuttering, but at least that's more easily fixed.

 

Quoting awuffleablehedgie, reply 97
Pacov, towers suffer from that exact defect. If they are targeting a demigod and that demigod ports away they will stop firing until the demigod comes back again. 

Are you sure about that?  I've seen the treb bug before, but never this.  Nor have I ever heard about it affecting ToLs and archer towers.

 

Quoting Ptarth, reply 95
Will groffling proc when there is an absorption effect active? I thought I remembered the proc code coming only after the absorption check.

Absorption doesn't interrupt the flow of DoTakeDamage.  Also, even if Groffling couldn't turn on, it can still be refreshed when Bramble Shield is cast, and it will still refresh any Bramble Shield when it turns off.

Depending on how long I take to do the next release, I might just do a full tabled absorption implementation that accounts for separate buffs.  It's not that difficult at all, actually-- all absorption code is contained entirely within ForgeUnit.DoTakeDamage and BuffAffects.Absorption.