Jump to content

A way to enhance a weapon the more it kills


Recommended Posts

I'm looking to make a weapon mod which becomes more powerful the more undead it kills, but am unsure of how to do this. Is there a weapon that does this in-game already that I can model the effect after, or will I need to make something completely new? I would need assistance with this if I have to construct the effect from scratch.

Link to comment
Share on other sites

  • 1 month later...

If you want 'growing' weapons, there are some ways.

when you want to enchance weapon's enchanting power by kills, just use script effect magic.

For example, you can use weapon's enchanting script as follow.

 

---------------------------------------------------------------------------------------------------------------------

Scn GrowingWeaponScript

 

Ref target (cf. It means enermy)

Short kill (cf. It means numbers of kill)

 

Begin scripteffectstart

 

Set target to getself

If Kill >= 100

XmarkerActor.Moveto Target

XmarkerActor.Cast DamageSpellStrong Target (cf. XmarkerActor is reference. you can use Xmarker as Actor to cast spell)

 

Elseif Kill >= 50

XmarkerActor.Moveto Target

XmarkerActor.Cast DamageSpellWeak Target

 

.......

 

endif

 

 

Begin Scripteffectfinish

 

If Target.Getdead == 1

Set Kill to (Kill + 1) (cf. It means +1 enemy dies = +1 weapon's kill count)

endif

 

end

-----------------------------------------------------------------------------------------------------------------------

 

If you want to enhance Weapon's bagic damage, you can use SetattackDamage function.

 

For example,

 

-----------------------------------------------------------------------------------------------------------------------

Scn GrowingWeaponScript

 

Ref Weap

Float WeapDamage

.....

Set Weap to Player.Getequippedobject 16

Set Weapdamage to Getattackdamage Weap

.....

 

Begin ScriptEffectFinish

 

If Target.Getdead == 1

Set Kill to (Kill + 1)

Endif

 

If Kill >= 100

Set WeapDamage to (WeapDamage + 2)

SetattackDamage Weap Weapdamage

Set kill to 0

endif

----------------------------------------------------------------------------------------------------------------------------------

I didn't test it. For more details, Go to Constrution Set Wiki and find Scripting - All functions - SetAttackDamage, GetattackDamage.. and so on.

 

God bless your mod :)

Link to comment
Share on other sites

  • 4 months later...

Months later, but I released a growth weapon to the nexus recently, Growth Weapon -- Shurifen. It gains power with every successful hit rather than every successful kill, so it's not exactly what you're looking for. That said, you can use it as reference and pull the OnKill code from Dawn/Duskfang and then filter by Undead by checking NPC faction and/or name. Maybe undead have their own race, too... 'd have to check.

Edited by VencGanence
Link to comment
Share on other sites

  • 3 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...