Please help me with item editing

i need somebody to help me make this item mod work cause i cant seem to get it working in-game so i want somebody to tell me what to do and or make it work by doing it yourself

heres the code i was working on (its based off all fathers ring)

 

Code: c++
  1. #################################################################################################################
  2. # Almighty
  3. #################################################################################################################
  4. ItemBlueprint {
  5.     Name = 'Item_Artifact_130',
  6.     DisplayName = '<LOC ITEM_Artifact_0030>Almighty/'s ring of faith,
  7.     Tooltip = {
  8.         Bonuses = {
  9.             '<LOC ITEM_Artifact_0097>+[GetHealthBonus] Health',
  10.             '<LOC ITEM_Chest_0025>+[GetRegenBonus] Health Per Second',
  11.             '<LOC ITEM_Artifact_0098>+[GetManaBonus] Mana',
  12.             '<LOC ITEM_Boot_0012>+[GetManaRegenBonus] Mana Per Second',
  13.             '<LOC ITEM_Artifact_0099>+[GetArmorBonus] Armor',
  14.             '<LOC ITEM_Glove_0001>+[GetDamageBonus] Weapon Damage',
  15.             '<LOC ITEM_Glove_0003>+[GetAttackSpeedBonus]% Attack Speed',
  16.             '<LOC ITEM_Artifact_0100>+[GetMovementBonus]% Movement Speed',
  17.             '<LOC ITEM_Boot_0013>+[GetDodgeBonus]% Dodge',
  18.         },
  19.         MBonuses = {
  20.             '<LOC MBONUS_0000>+[GetMinionHealthBonus] Minion Health',
  21.             '<LOC MBONUS_0003>+[GetMinionArmorBonus] Minion Armor',
  22.             '<LOC MBONUS_0004>+[GetMinionDamageBonus] Minion Damage',
  23.             '<LOC MBONUS_0006>+[GetMinionROFBonus]% Minion Attack Speed',
  24.         },
  25.         TargetAlliance = 'Ally',
  26.     },
  27.     GetHealthBonus = function(self) return Buffs['Item_Artifact_130'].Affects.MaxHealth.Add end,
  28.     GetRegenBonus = function(self) return Buffs['Item_Artifact_130'].Affects.Regen.Add end,
  29.     GetManaBonus = function(self) return Buffs['Item_Artifact_130'].Affects.MaxEnergy.Add end,
  30.     GetManaRegenBonus = function(self) return Buffs['Item_Artifact_130'].Affects.EnergyRegen.Add end,
  31.     GetArmorBonus = function(self) return Buffs['Item_Artifact_130'].Affects.Armor.Add end,
  32.     GetDamageBonus = function(self) return Buffs['Item_Artifact_130'].Affects.DamageRating.Add end,
  33.     GetAttackSpeedBonus = function(self) return math.floor( Buffs['Item_Artifact_130'].Affects.RateOfFire.Mult * 100 ) end,
  34.     GetMovementBonus = function(self) return math.floor( Buffs['Item_Artifact_130'].Affects.MoveMult.Mult * 100 ) end,
  35.     GetDodgeBonus = function(self) return Buffs['Item_Artifact_130'].Affects.Evasion.Add end,
  36.     GetMinionHealthBonus = function(self) return Buffs['Item_Artifact_130Army'].Affects.MaxHealth.Add end,
  37.     GetMinionArmorBonus = function(self) return Buffs['Item_Artifact_130Army'].Affects.Armor.Add end,
  38.     GetMinionDamageBonus = function(self) return Buffs['Item_Artifact_130Army'].Affects.DamageRating.Add end,
  39.     GetMinionROFBonus = function(self) return math.floor(Buffs['Item_Artifact_130Army'].Affects.RateOfFire.Mult * 100) end,
  40.     Mesh = '/meshes/items/chest/chest_mesh',
  41.     Animation = '/meshes/items/chest/Animations/chest_Idle_anim.gr2',
  42.     MeshScale = 0.10,
  43.     Icon = 'NewIcons/Ring/Ring6',
  44.     Abilities = {
  45.         AbilityBlueprint {
  46.             Name = 'Item_Artifact_130',
  47.             AbilityType = 'Quiet',
  48.             Icon = 'NewIcons/Ring/Ring6',
  49.             FromItem = 'Item_Artifact_130',
  50.             Buffs = {
  51.                 BuffBlueprint {
  52.                     Name = 'Item_Artifact_130',
  53.                     BuffType = 'IARTSTATSRING',
  54.                     Debuff = false,
  55.                     EntityCategory = 'ALLUNITS',
  56.                     Stacks = 'ALWAYS',
  57.                     Duration = -1,
  58.                     Affects = {
  59.                         MaxHealth = {Add = 20000, AdjustEnergy = true},
  60.                         Regen = {Add = 300},
  61.                         MaxEnergy = {Add = 15000, AdjustEnergy = true},
  62.                         EnergyRegen = {Add = 250},
  63.                         Armor = {Add = 4000},
  64.                         DamageRating = {Add = 200},
  65.                         RateOfFire = {Mult = .40},
  66.                         MoveMult = {Mult = 0.30},
  67.                         Evasion = {Add = 30},
  68.                     },
  69.                     Effects = 'SingleRing01',
  70.                 }
  71.             },
  72.             OnAbilityAdded = function(self, unit)
  73.                 unit:GetAIBrain():AddArmyBonus( 'Item_Artifact_130Army', unit )
  74.             end,
  75.             OnRemoveAbility = function(self, unit)
  76.                 unit:GetAIBrain():RemoveArmyBonus( 'Item_Artifact_130Army', unit )
  77.             end,
  78.         }
  79.     },
  80. }
  81. ArmyBonusBlueprint {
  82.     Name = 'Item_Artifact_130Army',
  83.     ApplyArmies = 'Single',
  84.     UnitCategory = 'MINION',
  85.     RemoveOnUnitDeath = true,
  86.     Buffs = {
  87.         BuffBlueprint {
  88.             Name = 'Item_Artifact_130Army',
  89.             BuffType = 'IARTSTATSRING',
  90.             Debuff = false,
  91.             Stacks = 'REPLACE',
  92.             Duration = -1,
  93.             Affects = {
  94.                 MaxHealth = {Add = 1000, AdjustEnergy = false},
  95.                 Armor = {Add = 375},
  96.                 DamageRating = {Add = 10},
  97.                 RateOfFire = {Mult = .15},
  98.                 MoveMult = {Mult = 0.1},
  99.             },
  100.         }
  101.     }
  102. }
  103. __moduleinfo.auto_reload = true


1,784 views 1 replies
Reply #1 Top

There is more to adding an item then just this part.

You also need to add the item to the appropriate shop layout and give it a price. In this case you'll want to do this to the files located in 'units\ug\b\ugbshop06' for the trinket shop.

UGBShop06_ShopLayout
UGBShop06_unit

Also check out this forum post.
http://forums.demigodthegame.com/376116