UberFix v1.02

By on January 23, 2010 11:15:45 PM from Demigod Forums Demigod Forums

Ptarth

Join Date 02/2007
+90

UberFix


The UberFix is a compilation of bugfixes for Demigods version 1.2. The patches incorporated into the mod
are listed below along with the creator of the patch.


Download:

v1.02

Installer format: www.box.net (Recommended Download)

filesize: 334,609 bytes

MD5 Checksum: 5322667e9be4dbd0fc9cb44823a6dc81

Source Code: www.box.net


Old Versions


 

v1.01

Installer format: www.box.net

filesize: 322,544 bytes (Downloaded 223 times)

Source Code: www.box.net

 

v1.00

Downloaded 178 times 

zip format:  16.5 KB  v1.00 Mediafire  v1.00 Box.net  

exe format: 301.2KB v1.00 Box.net  

 


Currently Included Patches

Uberfix 1.02 

  1. Lord Erebus Poisoned Blood Potion Fix by Ptarth
    • Poisoned Blood Potions can no longer be used by Lord Erebus to farm himself. He and his teammates treat his Poisoned Blood Potions as regular potions now.
  2. Oculus Electrocution Fix by Ptarth
    • Health and Mana regeneration are now correctly stopped.
  3. Torch Bearer Projectile slowdown Fix by Ptarth
    • Toch Bearer's fireballs and fireblasts now correctly accelerate to maximum speed when their target moves a great distance. This includes his Fireball Ability.
  4. Unclean Beast Ooze Suicide Fix by Ptarth
    • Ooze now correctly ends when the Unclean Beast is low on Health.
  5. Oculus Sacrifice Fix by Ptarth
    • Sacrifice now will heal allied units.
  6. Unclean Beast Post Mortem Plague Conflict Fix by Exxcentric
    • Plague I and II no longer remove the Post Mortem death effect.
  7. Rook Move Attack Fix by Ptarth
    • Rook now attacks while moving correctly.

UberFix 1.01

  1. Lord Erebus Mist Form Fix by Ptarth
    • updated to end when mana drops below 125.
  2. ZikFix (Zikurat Tower Fix) by mrappard
    • The Dark side towers on Zikurat while playing Conquest now spawn correctly, instead of at warscore 6.
  3. 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).

UberFix 1.00

  1. 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
  2. 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
  3. Queen of Thorns Attack Animation Glitch Fix by Ptarth
    • Reduced the lifetime of the QoT's root attack animation to make the animation look better.
    • This is only a cosmetic change.
  4. Oculus Lightning Ball Summons Fix by Ptarth
    • Lightning Balls will no longer summon in map void space.
  5. Oculus Lightning Blast Fix by Ptarth
    • Lightning Blast now occurs at the origin of the target instead of the origin of the unit that procs the effect.
  6. Missing Oculus Shield Effect Fix by Ptarth
    • Oculus now has a visible Shield effect.
  7. Heart of Life and Wings of the Seraphim Healing ends effect 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.
  8. Parasite Egg and Sludge Slinger Partial Fix by Ptarth
    • Changed the Parasite Egg and Sludge Slinger so they can be used, although it isn't perfect.

 

Current Buglist (Todo list: Verified and replicatable)

  1. Rook Shoulder weapons having target locking issues
    • I thought I had something to fix it. However, I'm having problems replicating the effect to test it.
  2. Fix the skill queue.
    •  Eg, if you tell a UB to grasp he tries to get into melee range and execute the grasp. If you tell him to spit, then it gets thrown to the back of the skill queue and he doesn't spit, he continues to follow like an r'tard. To fix it you have to issue a move command, then spit.
    • AbilityTask.lua has the functions related to this. There are many interesting things in it.
    • After finishing a command the demigod reverts to an attack/move order if previously moving towards a target
  3. AA targeting issues
    • Like how Oak frequently swings with his Axe and does no damage or how Sedna will stand by a target without attacking
    • This may be linked to the Rook Shoulder weapon problem or the command queue
    • (http://forums.demigodthegame.com/356419)
    • Demon Assassin stops auto-attack after warp strike. It should continue to attack the locked target... this would be natural.
  4. Rollover Data Error on flag tooltip while being captured behind fog of war.
  5. Demigods do not resume auto-attack immediately or change targets after using an ability.
  6. UB Post Mortem damage does not count as UB damage for the purpose of awarding gold.
  7. Move order is canceled when using effects (http://forums.demigodthegame.com/356694). The move order is turned into an auto-attack order.
  8. Inaccurate health bar on zoom in (http://forums.demigodthegame.com/356347)
  9. Language for engine messages (xxx has left, xxx has joined...) in game lobby uses the hosts language setting (this should be the users language setting): my russian is a bit rusty!
  10. Torchbearer respawns in Ice mode by default. This should be the last used mode (Fire/Ice)! Same for QoT.
  11. Queuing to grab a potion and then being Foul Grasped while picking up the potion and then UB getting Shadow Swaps allows you to pick up the potion instantly as long as you have contiguous line of sight. I've been able to do this roughly 25 in-game yards away.
  12. When a demigod switches primary weapon the window information doesn't update properly (mainly a QoT issue)
    1. This is a visual glitch, the weapon does change, but the window does not update correctly.
  13. Oculus cannot autoattack directly beneath him

Bugs Requiring Research List (requires verification and a reliable replication method)

  1. Light/Dark capping all flags creates "Invalid Game State" error (http://forums.demigodthegame.com/362132)
    1. This happens enough to know that there is an issue, but without a way to replicate it reliably it is beyond me to fix
  2. Torch Bearer's stat progression for PermaFrost Movement Debuff is 3%/10%/15%. It should probably be 5%/10%/15%
  3. "War Score" display at each teams' citadel is incorrect.
    • It shows the average of the two teams' warscore, it really should show just yours.
    • The citadels look to upgrade correctly.
  4. Minions still get stuck in citadels
    • Need a map person to look into hedgie's proposed fix idea
  5. Oculus's Ball Lightnings attack animation sometimes sticks with permanent bolt from minion to target.
  6. Oculus's Chain Lightning effect sticks until his or target's death if target teleports during cast.
  7. Oculus sometimes becomes unresponsive after using Blast Off.
  8. Sedna's Silence debuff never expires under certain circumstances.
  9. Oculus moves very slowly when selected with Ball Lightnings.
  10. Pathing issues on Prison
  11. Selling Monk idols sometimes destroy summoning button
    • To replicate: Summon Monks, Sell Monks (while idol is recharging), Buy a different type of idol (siege archer or warrior, possibly any other item too), Buy new Monk Idol. I can't replicate this any more for some reason.

Current Unfixable Errors (Can't do list)

  1. Sedna's low quality Silence effect causes speakers to silence
    1. Unfixable since we can't access and change the sound files
    2. Setting sound quality to medium fixes this for most people.
  2. Ping times periodically spike in-game (despite sufficient upload bandwidth).
    1. This is not handleable within lua
  3. Multi-game achievements fail to record progress properly.
    1. This is controlled by Impulse
  4. Overlay friend chat buttons constantly reappear.
    1. Controlled by Impulse
  5. Game result stats include players who joined and left lobby before match start.
    1. Controlled by Impulse?
  6. demigods.exe is looking for version 1.20.211 but is version 1.20.214 with the last patch
    1. GPG compiles the exe
  7. warning: 00:03:04: Granny: FileReading (c:\Work\forge\main\code\src\libs\granny\granny_file_info.cpp(152): File has run-time type tag of 0x8000002d, which doesn't match this version of Granny (0x80000026).  Automatic conversion will be attempted.)
    info: 00:03:04: Total Material Count: 24 Total Mesh Count: 24
    info: 00:03:05: Can't find texture "/env/common/layers/none_normal.dds" -- trying fallback.
    1. Internal and Granny related, all GPG accessible only
  8. Oculus Stun Animation does not loop fluidly
    1. The animations are scripted in Granny which we don't have access to.
  9. Demon Assassin's movie on the character select screen was filmed using the wrong skin.
    1. The movie was made using Granny and Bink, we don't have access to Granny
  10. Assorted replay playback issues
  11. Game result stats include players who joined and left lobby before match start.

Current Nonbugs (Feature List)

  1. Mana/Health loss on item drop (http://forums.demigodthegame.com/360939)
    • Working as intended I believe
  2. Oak's Shield can be interrupted
    • This is most likely a lag effect
  3. Scroll of Restoration doesn't cure stuns
    • The scroll only affects debuffs, not stuns

 Bugs Fixed by Previous Official Patches (SD & GPG fixed it list)(not complete, just ones that come up)

  1. Match ending while dead results in "wind" effect persisting until game is closed.
  2. Sound looping issue (http://forums.demigodthegame.com/356935).

Current Potential Additions to the BugFix (Addition list)
    1. SkillInfoMod
    2. AIMod by Peppe


Current Semi-Active Project Members

Ptarth - guy who does stuff

awuffleablehedgie - guy who finds bugs

UhelligGudn - new guy with lots of energy


Plea to Community

If we want Stardock and Gas Powered Games to increase their support of Demigods, we need to demonstrate our commitment and our willingness to support it. If we want to accomplish anything worthwhile to demonstrate our commitment, we need to work together. If you have time, please consider helping out. Every little bit helps.

Locked Post 519 Replies +12
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
January 27, 2010 7:38:39 PM from Demigod Forums Demigod Forums

re:name change

Back with Total Annihilation we called the community fixes either the UberHack or Switeck's BugFix (depending on which set of fixes you used). I really appreciated the work that BraveSirRobin and the rest of the TAEC crew put into the UberHack, so I named my small collection of patches after it as a tribute. More importantly, if this gets implimented into the mainline code, the name won't matter.

re:UB getting XP for Post Mortem

I believe I understand what you are saying, Exxcentric, however I believe you are missing my argument.

Code: c++
  1. ####The following code comes from: HEPA01_Abilities.lua
  2. Important lines are indicated by: ♦♦♦♦♦♦♦♦♦♦♦♦
  3. BuffBlueprint {
  4.     Name = 'HEPA01PostMortemEnemy01',
  5. ....
  6.     OnBuffAffect = function(self, unit, instigator)
  7.         if instigator then
  8.             unit.AbilityData.PostMortem = {}
  9.             unit.AbilityData.PostMortem.Caster = instigator  ♦♦♦♦♦♦♦♦♦♦
  10.             unit.AbilityData.PostMortem.CasterArmy = instigator:GetArmy()
  11.             unit.AbilityData.PostMortem.CasterBp = instigator:GetBlueprint()
  12.             unit.AbilityData.PostMortem.DamageRating = instigator.Sync.DamageRating
  13.         end
  14.         unit.Callbacks.OnKilled:Add(PMExplode, self) ♦♦♦♦♦♦♦♦♦♦♦♦
  15. ...

This is the Post Mortem Buff blueprint. In this case, unit is the target of the buff, self is the buff (I think), and instigator is the Unclean Beast. Here the unit table is given new fields to show the instigator of the buff, i.e, that Post Mortem was caused by the Unclean Beast. It also Adds the PMExplode function to the list of functions that run when the OnKilled Callback is made.

Code: c++
  1. ####The following code comes from: HEPA01_Abilities.lua
  2. Important lines are indicated by: ♦♦♦♦♦♦♦♦♦♦♦♦
  3. PMExplode = function(self, unit)
  4. ...
  5.     local data = {
  6.         Instigator = unit.AbilityData.PostMortem.Caster,
  7.         InstigatorBp = unit.AbilityData.PostMortem.CasterBp,
  8.         InstigatorArmy = unit.AbilityData.PostMortem.CasterArmy,
  9.         Origin = table.copy(unit:GetPosition()),
  10.         Radius = MetaImpactRadius,
  11.         Amount = MetaImpactAmount,
  12.         Category = "METAINFANTRY",
  13.         DamageFriendly = false,
  14.     }
  15.     MetaImpact(data)
  16.     data = table.copy(Damage)
  17.     data.Instigator = unit.AbilityData.PostMortem.Caster  ♦♦♦♦♦♦♦♦♦♦♦♦
  18.     data.InstigatorBp = unit.AbilityData.PostMortem.CasterBp
  19.     data.InstigatorArmy = unit.AbilityData.PostMortem.CasterArmy
  20.     data.Amount = DamageAmt
  21.     data.Origin = table.copy(unit:GetPosition())
  22.     DamageArea(data) ♦♦♦♦♦♦♦♦♦♦♦♦
  23. ...

Here is the PMExplode function. The important part is where the Instigator is assigned to the PostMortem.Caster, which was previously assigned as the Unclean Beast. This is also the instigator that is given into the DamageArea function. Hence the UB should be cited as the cause of the damage. However, something is going wrong at some point.

I've been trying to trace Callbacks.OnKilled back to its roots. I think I see what is going on, and I am suspicious that it only calls the first function on its list of Callbacks. This is a lot of conjecture, but it is my best guess at what is going on.

Reason for Karma (Optional)
Successfully updated karma reason!
January 27, 2010 7:48:13 PM from Demigod Forums Demigod Forums

nt/ double post

Reason for Karma (Optional)
Successfully updated karma reason!
January 27, 2010 7:49:58 PM from Demigod Forums Demigod Forums

Had more of a look into callbacks and had a look at my test scripts again. (from Buff.lua)

    # Call callbacks on the unit based on if this is a removal or addition of affects
    if not afterRemove then
        unit.Callbacks.OnBuffActivate:Call(buffName, instigator, instigatorArmy)
    elseif afterRemove then
        unit.Callbacks.OnBuffDeactivate:Call(buffName, instigator, instigatorArmy)
    end

From what i can infer from this is that this callback adds a single affect but on remove, removes all affects from the table. So i would say that the callback is removing plague and is not actually for the counter. This is replicated sometimes ingame when you post mortem a group of units with plague (with my changes) on they sometimes continue to tick.

2 more options are to add the removecallback from post mortem, and remove it from plague. Or we could add it to post mortem and use

    UnitOnKilledCallback = function( self, unit )    

if not Buff.HasBuff(unit, 'HEPA01PostMortemEnemy01') then

unit.Callbacks.OnKilled:Remove(self.UnitOnKilledCallback)
        #self:DecrementPlagueCounter(unit)

else

unit.Callbacks.OnKilled:Add(PMExplode, self)

end

end,

 

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
January 27, 2010 8:12:30 PM from Demigod Forums Demigod Forums

found a more complex yet elegant solution.

Ok so Post mortem uses a funtion for the damage and the callback removal only removes that function:

Code: c++
  1. #################################################################################################################
  2. # Buff - Post Mortem
  3. #################################################################################################################
  4. BuffBlueprint {
  5.     Name = 'HEPA01PostMortemEnemy01',
  6.     DisplayName = '<LOC ABILITY_HEPA01_0038>Post Mortem',
  7.     Description = '<LOC ABILITY_HEPA01_0039>Will explode when killed.',
  8.     BuffType = 'HEPA01POSTMORTEMENEMY',
  9.     Debuff = true,
  10.     CanBeDispelled = true,
  11.     EntityCategory = 'MOBILE - UNTARGETABLE',
  12.     Stacks = 'REPLACE',
  13.     CallbackDuration = 30,
  14.     Affects = {
  15.         Dummy = {Add = 0},
  16.     },
  17.     Effects = 'PostMortem01',
  18.     EffectsBone = -1,
  19.     OnBuffAffect = function(self, unit, instigator)
  20.         if instigator then
  21.             unit.AbilityData.PostMortem = {}
  22.             unit.AbilityData.PostMortem.Caster = instigator
  23.             unit.AbilityData.PostMortem.CasterArmy = instigator:GetArmy()
  24.             unit.AbilityData.PostMortem.CasterBp = instigator:GetBlueprint()
  25.             unit.AbilityData.PostMortem.DamageRating = instigator.Sync.DamageRating
  26.         end
  27.         unit.Callbacks.OnKilled:Add(PMExplode, self)
  28.         if unit.PostMortemRemoveThread then
  29.             KillThread(unit.PostMortemRemoveThread)
  30.         end
  31.         unit.PostMortemRemoveThread = ForkThread(
  32.             function()
  33.                 WaitSeconds(self.CallbackDuration)
  34.                 if not unit:IsDead() then
  35.                     unit.Callbacks.OnKilled:Remove(PMExplode)
  36.                 end
  37.             end
  38.         )
  39.     end,
  40.     OnBuffRemove = function(self, unit)
  41.         unit.Callbacks.OnKilled:Remove(PMExplode)
  42.     end,
  43.     Icon = '/DGUncleanBeast/NewUncleanPostMortem01',
  44. }
  45. #################################################################################################################
  46. # CE - Post Mortem Explosion
  47. #   Explosion damage tuning - 'DamageAmt'
  48. #################################################################################################################
  49. PMExplode = function(self, unit)
  50.     #unit.IgnoreDeathThreadSequence = true
  51.     local pos = table.copy(unit:GetPosition())
  52.     pos[2] = 100
  53.     local MetaImpactRadius = 3
  54.     local MetaImpactAmount = 8
  55.     local DamageAmt = 150
  56.     local Damage = {
  57.         Radius = 6,
  58.         Type = 'Spell',
  59.         DamageAction = 'HEPA01PostMortemEnemy01',
  60.         DamageSelf = false,
  61.         CanBeEvaded = false,
  62.         CanBackfire = false,
  63.         CanDamageReturn = false,
  64.         DamageFriendly = false,
  65.         ArmorImmune = true,
  66.         CanCrit = false,
  67.         CanMagicResist = false,
  68.         CanOverKill = false,
  69.         Group = "UNITS",
  70.     }
  71.     # create unit post mortem explosion effects
  72.     CreateTemplatedEffectAtPos( 'UncleanBeast', nil, 'PostMortem01', unit:GetArmy(), pos )
  73.     local data = {
  74.         Instigator = unit.AbilityData.PostMortem.Caster,
  75.         InstigatorBp = unit.AbilityData.PostMortem.CasterBp,
  76.         InstigatorArmy = unit.AbilityData.PostMortem.CasterArmy,
  77.         Origin = table.copy(unit:GetPosition()),
  78.         Radius = MetaImpactRadius,
  79.         Amount = MetaImpactAmount,
  80.         Category = "METAINFANTRY",
  81.         DamageFriendly = false,
  82.     }
  83.     MetaImpact(data)
  84.     data = table.copy(Damage)
  85.     data.Instigator = unit.AbilityData.PostMortem.Caster
  86.     data.InstigatorBp = unit.AbilityData.PostMortem.CasterBp
  87.     data.InstigatorArmy = unit.AbilityData.PostMortem.CasterArmy
  88.     data.Amount = DamageAmt
  89.     data.Origin = table.copy(unit:GetPosition())
  90.     DamageArea(data)
  91.     unit.AbilityData.PostMortem = nil
  92. end,

 

In contrast, plague uses the buff script to do the damage and so when it does a callback:remove it has to clear the whole table (as it was not a seperate function that could be removed).

 

Code: c++
  1.     OnApplyBuff = function( self, unit, instigator )
  2.         unit.Callbacks.OnKilled:Add(self.UnitOnKilledCallback, self)
  3.     end,
  4.     OnBuffAffect = function(self, unit, instigator)
  5.         #LOG("*DEBUG: OnBuffAffect unit: "..unit:GetUnitId().. " inst:"..instigator:GetUnitId())
  6.         if unit:IsDead() or instigator:IsDead() or not instigator.Plague then
  7.             return
  8.         end
  9.         # Allows for ignoring OnBuffAffect pulses, so this doesn't trigger immediately on the first
  10.         # application of plague.
  11.         if unit.PlagueInstance.IgnoreAffectPulses then
  12.             unit.PlagueInstance.NumIgnoredPulses = unit.PlagueInstance.NumIgnoredPulses + 1
  13.             if unit.PlagueInstance.NumIgnoredPulses >= self.NumIgnoreSpreadPulses then
  14.                 unit.PlagueInstance.IgnoreAffectPulses = false
  15.             end
  16.             return
  17.         end
  18.         local targets = unit:GetAIBrain():GetUnitsAroundPoint((categories.MOBILE - categories.UNTARGETABLE), unit:GetPosition(), self.AffectRadius, 'Ally')
  19.         PlagueSpread01( instigator, targets, self.AffectChance )
  20.     end,
  21.     OnBuffRemove = function(self, unit)
  22.         #self:DecrementPlagueCounter(unit)
  23.         Buff.ApplyBuff(unit, 'HEPA01PlagueImmune', unit)
  24.     end,
  25.     UnitOnKilledCallback = function( self, unit )
  26.         unit.Callbacks.OnKilled:Remove(self.UnitOnKilledCallback)
  27.         #self:DecrementPlagueCounter(unit)
  28.     end,
  29.     DecrementPlagueCounter = function(self, unit)
  30.         local instigator = unit.PlagueInstance.Instigator
  31.         if not instigator then
  32.             LOG( 'No Instigator' )
  33.         end
  34.         if not instigator:IsDead() then
  35.             instigator.Plague.NumPlaguedUnits = instigator.Plague.NumPlaguedUnits - 1
  36.             unit.PlagueInstance = nil
  37.         end
  38.     end,
  39. }

So change the buff so it acts more like post mortem (ie add a seperate function that does what the buff does now and just call it with the apply buff. You can then remove plague using callback removal that only removes that function:

Also i agree with your reasoning for the gold problem. Although i cant see an obvious flaw which would cause it not to work

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
January 27, 2010 8:23:52 PM from Demigod Forums Demigod Forums

The code block is a forum feature. It doesn't have LUA, and C++ is the best match I found (although I didn't do an exhaustive search. To use it either hit the Insert Code Block button, just to the left of the emoticon button ( ), or you can add the code into your post by hand.

The code for inserting code is:

[]code="c++"[]

insert code here

[/code]

Ignore the invisible letters, that's the only way I could get it to display.

re: plague/post mortem OnKilled.Remove

Can you try to write up the code to use the buff fix? If you are correct, and I think that you are, (although I still haven't quite parsed it, too many functions and tables with too similar names), that would help out a lot. I know it isn't that hard, but I'm trying to delegate tasks so I can work on more things. I want to try to get to the bottom of the post mortem not giving credit problem.

re:Exxcentric

Also, I tried to PM you last night using ReadytoPlay but it thought you were playing demigods and wouldn't send a message through.

re:Frogboy

Can we have a preview button for posts please.

Reason for Karma (Optional)
Successfully updated karma reason!
January 27, 2010 8:35:50 PM from Demigod Forums Demigod Forums

re:Exxcentric

Also, I tried to PM you last night using ReadytoPlay but it thought you were playing demigods and wouldn't send a message through.

yere i got your message and was on r2p but it would allow me to send you an invite

 

re: plague/post mortem OnKilled.Remove

Can you try to write up the code to use the buff fix? If you are correct, and I think that you are, (although I still haven't quite parsed it, too many functions and tables with too similar names), that would help out a lot. I know it isn't that hard, but I'm trying to delegate tasks so I can work on more things. I want to try to get to the bottom of the post mortem not giving credit problem.

yere i can do that. np . shouldnt take me 2 long

Next question, where did you get your auto download counter code from?

Reason for Karma (Optional)
Successfully updated karma reason!
January 27, 2010 9:21:01 PM from Demigod Forums Demigod Forums

more thoughts... not sure what the issue is, but I keep having problems with people having the wrong version or something.  Typically getting invalid gamestates... wonder how we can cut down on those happening...

Reason for Karma (Optional)
Successfully updated karma reason!
January 27, 2010 9:41:52 PM from Demigod Forums Demigod Forums
Code: c++
  1. BuffBlueprint {
  2.     Name = 'HEPA01Plague01',
  3.     DisplayName = '<LOC ABILITY_HEPA01_0061>Plague',
  4.     Description = '<LOC ABILITY_HEPA01_0042>Taking poison damage. Spreads to allies.',
  5.     BuffType = 'HEPA01PLAGUE',
  6.     Debuff = true,
  7.     CanBeDispelled = true,
  8.     EntityCategory = 'MOBILE - UNTARGETABLE',
  9.     Stacks = 'IGNORE',
  10.     Duration = 30,
  11.     DurationPulse = 30,
  12.     Affects = {
  13.        Health = {Add = -10},
  14.     },
  15.     Effects = 'Plague01',
  16.     EffectsBone = -2,
  17.     DamageSelf = true,
  18.     CanBeEvaded = false,
  19.     CanBackfire = false,
  20.     CanDamageReturn = false,
  21.     DamageFriendly = true,
  22.     ArmorImmune = true,
  23.     CanCrit = false,
  24.     CanMagicResist = true,
  25.     #NoFloatText = true,
  26.     AffectRadius = 10,
  27.     AffectChance = 100,
  28.     NumIgnoreSpreadPulses = 1,                      # Number of pulses to wait before spreading plague
  29.     Icon = '/DGUncleanBeast/NewUncleanPlague01',
  30.     OnApplyBuff = function( self, unit, instigator )
  31.             ForkThread(PlagueI, self, unit )
  32.             end,
  33.     OnBuffAffect = function(self, unit, instigator)
  34.         #LOG("*DEBUG: OnBuffAffect unit: "..unit:GetUnitId().. " inst:"..instigator:GetUnitId())
  35.         if unit:IsDead() or instigator:IsDead() or not instigator.Plague then
  36.             return
  37.         end
  38.         # Allows for ignoring OnBuffAffect pulses, so this doesn't trigger immediately on the first
  39.         # application of plague.
  40.         if unit.PlagueInstance.IgnoreAffectPulses then
  41.             unit.PlagueInstance.NumIgnoredPulses = unit.PlagueInstance.NumIgnoredPulses + 1
  42.             if unit.PlagueInstance.NumIgnoredPulses >= self.NumIgnoreSpreadPulses then
  43.                 unit.PlagueInstance.IgnoreAffectPulses = false
  44.             end
  45.             return
  46.         end
  47.         local targets = unit:GetAIBrain():GetUnitsAroundPoint((categories.MOBILE - categories.UNTARGETABLE), unit:GetPosition(), self.AffectRadius, 'Ally')
  48.         PlagueSpread01( instigator, targets, self.AffectChance )
  49.     end,
  50.     OnBuffRemove = function(self, unit)
  51.         #self:DecrementPlagueCounter(unit)
  52.         Buff.ApplyBuff(unit, 'HEPA01PlagueImmune', unit)
  53.         unit.Callbacks.OnKilled:Remove(PlagueI)
  54.     end,
  55.     DecrementPlagueCounter = function(self, unit)
  56.         local instigator = unit.PlagueInstance.Instigator
  57.         if not instigator then
  58.             LOG( 'No Instigator' )
  59.         end
  60.         if not instigator:IsDead() then
  61.             instigator.Plague.NumPlaguedUnits = instigator.Plague.NumPlaguedUnits - 1
  62.             unit.PlagueInstance = nil
  63.         end
  64.     end,
  65. }
  66. PlagueI = function( self, unit )
  67.         #self:DecrementPlagueCounter(unit)
  68.         unit.Callbacks.OnKilled:Remove(PlagueI)
  69. end,

kk fixed.

 

 

This works with no errors i can find. Try it. . Removed the callback on killed and replaced it with a forkthread function on buff remove that did all that the onkilledcallback used to. I still dont think the callbackonkilled did anything but turn off post mortem, and when farming with this i can see why, it is way OP. I maintain that it looks like the devs did this on purpose because of this reason. (any info from them would be great tho!)

Reason for Karma (Optional)
Successfully updated karma reason!
January 27, 2010 10:08:37 PM from Demigod Forums Demigod Forums

Quoting pacov,
more thoughts... not sure what the issue is, but I keep having problems with people having the wrong version or something.  Typically getting invalid gamestates... wonder how we can cut down on those happening...

mostly happens when people extract the mod into mods/uberfix/uberfix/ and not mods/uberfix/.

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 2:30:39 AM from Demigod Forums Demigod Forums

So I'm looking over your code Exxcentric, why did you go with:

31.          ForkThread(PlagueI, self, unit )

instead of just:

unit.Callbacks.OnKilled:Add(PlagueI, self)

?

I don't really understand how ForkThreads works, so that might be the problem too. I mean, I understand the part where they create a second simultaneous microthread that runs independently on the process that called it, I just don't have a feel of how and when they are appropriate at an intuitive level.

re: Post Mortem & Plague are overpowered

I'm not sure that it is a code change and not just how useful Post Mortem/Plague actually is. If someone wants to test it out, I can send you a work-in-progress version or you can add the code in yourself.

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 5:46:46 AM from Demigod Forums Demigod Forums
i have no formal training in lua, and very little other than some html and javascript so i cannot respond on a technical level. However i have done enough coding in this game to understand how the lua responds to the different operators. Forkthread as you say runs a simultaneous function. unit.Callbacks.OnKilled:Add(PlagueI, self) This caused wiping of the on.killed unit table and did not work. The forkthread i used allows the function to activate on ability enable (same as before) but does not use the callback operator, leaving it free for post mortem. I could have used the forkthread to move over all the buff functions, however, this was alot more work, and the simple change that i made seems to work and removes all previous errors i have found in tests of other suggested code changes. Sorry for the highly non-technical reply lol, i can read an interpret the code but my skill at explaining why it works is kinda limited
Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 9:37:41 AM from Demigod Forums Demigod Forums

Hai everybody - Ptarth made a help-me post on the SupCom/FA modding community boards, so I thought I'd drop by and see what I could do to help. I've been modding the moho engine in Lua since November 2006. I'm a student now so oodles of time to help you guys out.

Forkthread does not cause a simultaneous function to be run. It adds it to a list to be run at the next tick. The costs of actually forking a hardware thread are excessive, if you allow it to be called so trivially. Lua does not support and GPG does not use hardware multithreading within the sim. The reason to use this method is so that you can pause them, then resume them an arbitrary time later. This can't be done in a normal function because you'd pause the whole damn sim.

In this instance, you can say that ForkThread causes a function's execution to be delayed slightly until the list is next iterated and executed, and you can wait in it. Else, it has no effect compared to just calling the function in question.

 

Lua doesn't require formal training- it's a really, really, simple language. Just read the manual, there's no complex concepts in there, Lua manages virtually everything behind the scenes for you. GPG used their own co-routine interface, but that's all. Else, you can find the mechanisms behind them fully explained at lua.org

 

If you really need something answered, just email me at wolfeinstein@gmail.com. I'm downloading Demigod now (stopped playing before mod support patch, actually) and am going to see what I can crack out with regards to the list in the OP.

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 10:15:17 AM from Demigod Forums Demigod Forums

perhaps then you can tell me how the communication between the clients is handled? is it possible to send information to the other clients? this could be useful to mod the random select demigod function.

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 1:45:30 PM from Demigod Forums Demigod Forums

mostly happens when people extract the mod into mods/uberfix/uberfix/ and not mods/uberfix/.

Ah.  That's likely it.  Thanks for the clarification. Derog. 

Ptarth - are there any other bug fixes ready to go live at this point?  Would it be possible to get an executable created of uberfix so we can reduce user errors on the install? 

It seems like alot of people that are trying to use this are new to using mods.

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 2:01:32 PM from Demigod Forums Demigod Forums

I've been keeping the original post updated with progress as it occurs.

It would be possible to get the .exe working. Other mods have done it and I recall a setup someone made to do an install. I've always been rather unfriendly towards strange executables running on my machine, especially when provided by a random guy on the internet.

The problem we ran into on Sunday wasn't that it was installed incorrectly. It was that someone with modding knowledge adding a tweak to their own version and didn't remove it.

That being said, why not? I'll look into it.

Update: Thanks for bmann's contribution I was able to do it (rather easily), and it didn't take as long as I thought.

Here is a link to the test executable. I'd like 3 people to test it and confirm it works correctly for them (and not just me). It also should be tested in multiplayer and that it works with other Uberfix users (including the .zip version), before I officially recognize it.

 

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 4:00:29 PM from Demigod Forums Demigod Forums

Quoting pacov,

mostly happens when people extract the mod into mods/uberfix/uberfix/ and not mods/uberfix/.
Ah.  That's likely it.  Thanks for the clarification. Derog. 

Ptarth - are there any other bug fixes ready to go live at this point?  Would it be possible to get an executable created of uberfix so we can reduce user errors on the install? 

It seems like alot of people that are trying to use this are new to using mods.

There is no readme in the zip file. Or at least there wasn't when I downloaded it.

There should be an instruction file that instructs everyone to do it manually (make the folder, copy the files). Extracting directly always makes a mess of things, but exact instructions for doing it manually will clear up any confusion as to where it should be.

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 4:17:00 PM from Demigod Forums Demigod Forums

The readme.txt was nested within the UberFix folder. I suppose an additional readme.txt in the base folder providing installation instructions would be useful.

How is this:

Installation Instructions for Demigods Mods in Archive Format
----------------------------------------------------------------------------------------
Demigods must be updated to version 1.19 or higher.

The exact filenames will differ based upon the version you are using. For these
instructions I will be referring to UberFix v1.00. For later versions replace 1.00 with
your version number.

Extract all of the files from the archive to the ..\bindata\mods\ directory in Demigods.
For most users this will be: C:\Program Files\Stardock Games\Demigod\bindata\mods

The files should be nested within a folder, such as ..\bindata\mods\UberFix or ..\bindata\mods\UberFixv1.00
Please ensure that the files are not double nested, such as ..\bindata\mods\UberFix\Uberfix.
If the files are double nested, simply move the contents of ..\bindata\mods\UberFix\Uberfix into ..\bindata\mods.
If your directory setup contains ..\bindata\mods\UberFix\hook your setup is correct.

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

To delete a mod, simply delete the Mods directory under ..\bindata\mods\.
Do not delete ..\bindata\mods unless you wish to remove all mods.

If you have problems, please consult the Official Demigod Forums at: http://forums.demigodthegame.com/

Enjoy,
Ptarth

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 5:48:44 PM from Demigod Forums Demigod Forums

Update: Thanks for bmann's contribution I was able to do it (rather easily), and it didn't take as long as I thought.

Here is a link to the test executable. I'd like 3 people to test it and confirm it works correctly for them (and not just me). It also should be tested in multiplayer and that it works with other Uberfix users (including the .zip version), before I officially recognize it.

I just uninstalled my original version (deleted) and used your executable.  Works fine and installed to the proper location.  Windows 7 64 bit.  Trouser did the same (vista 64) and joined a game I hosted.  Game worked without any issues. 

Had Kalel join as well (vista 64) and test.  No issues.  So, 3 users tested and confirmed.  Front page plz so I can direct folks to that instead of reply #90. 

tested with zip version and exe version as well.  no problems.

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 7:34:12 PM from Demigod Forums Demigod Forums

Added Link to initial post. Thanks pacov.

Reason for Karma (Optional)
Successfully updated karma reason!
January 28, 2010 9:50:44 PM from Demigod Forums Demigod Forums

No prob.  Thanks for adding it to the 1st post.  Much appreciated. 

Reason for Karma (Optional)
Successfully updated karma reason!
January 30, 2010 1:46:04 AM from Demigod Forums Demigod Forums

So... I set out tonight to be very patient and play only uberfix mod games.  I managed to get > 10 like minded individuals.  We took the time, had everyone 1 by 1 uninstall any existing uberfix mod they had, download the current executable, run the current executable, and then launch the game again.  So, it was reasonably precise.  No instant invalid gamestates.  But, each one of these games invalid gamestated at some point in the game.  We played maybe 5-6 games - all ended with invalid gamestates at some random duration during the game.  Then, I finally gave up and disabled the mod - no more invalid gamestates the rest of the night with pretty much the same people. 

This makes me wonder if mods increase the potential for an invalid gamestate to occur.  Granted, it could have simply been a number of factors that added up to the invalid gamestates, but I'm quite confident no one was pulling an exploit.  I have the unique luxury of being able to reasonably consistently get 5v5 games going now, so that will be my choice for game types.  I'm not really sure.  I want to use this mod 100% of the time. 

Anyway - to summarize:  5v5 games with uber fix mod resulted in invalid gamestates in >5 minutes in 100% of those games.  All with people who installed the mod correctly.  When the mod was disabled, no more invalid gamestates occurred. 

Possible causes of the problem: user error (i doubt, but still possible), issues with individuals internet connections (possibe - teseer had a few crashes with uberfix DISABLED and kalel and I crashed once), coding of this mod (i really have no idea), the way mods are handled in 5v5 games (possible), and whatever else I'm not thinking of.

 

Reason for Karma (Optional)
Successfully updated karma reason!
January 30, 2010 2:25:05 AM from Demigod Forums Demigod Forums

The .exe version contains nothing new, it is the same version as the 1.00 zip version. Pacov confirmed this himself in his previous tests. Additionally, prior to today I haven't heard of any issues (that the mod was responsible for). I don't disbelieve pacov's report, but I'm pretty sure it isn't the UberFix. As he states, it may simply be that mods add another layer of complexity. Sometimes Demigods crashes (Total Flag control crash for example), anything additional may increase that chance.

Did you check your log file to see if anything shows up in it?

Reason for Karma (Optional)
Successfully updated karma reason!
January 30, 2010 12:24:52 PM from Demigod Forums Demigod Forums

Did you check your log file to see if anything shows up in it?

Nothing struck me as off... just typically desync/eject messages.  I'll give this another go today or tomorrow and will save the log files.

Reason for Karma (Optional)
Successfully updated karma reason!
January 30, 2010 12:34:51 PM from Demigod Forums Demigod Forums

Hmmm I think we all forgot about this one...

A controversial bug to be sure...

Oak's soul power

Soul Power 1's spirit damage bonus should be capped at 3 spirits?
Sould Power II's spirit damage bonus should be capped ar 6 spirits?

Reason for Karma (Optional)
Successfully updated karma reason!
January 30, 2010 12:37:18 PM from Demigod Forums Demigod Forums

Heart of Fire and Soul of Ice descriptions reversed.

There is an icon for each of these modes to let you know you are in it.

The fire one says "Soul of Ice" and the ice one says "Heart of Fire".

Cosmetic, but a bug none the less.

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108433  walnut3   Server Load Time: 00:00:00.0000781   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright © 2016 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. © 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.