Jump to content

[Help] Making a new ammo type for Slingshot mod


Recommended Posts

I'm working on a slingshot mod and I want to make special ammo for them.

 

Basically I'm trying to accomplish the following:

 

  • The player and all NPCs can't use this special ammo with regular bows/crossbows.
  • The player and all NPCs can't use regular ammo with the slingshots
  • The special ammo (for the slingshot) doesn't stick to the player and NPCs.

Any advice on how to tackle this?

 

Kind regards

 

Andre

Link to comment
Share on other sites

The crafting isn't really an issue. I want to prevent the regular arrows, to be equipped with the slingshots and special ammo (balls) to be prevented to be equipped when you use normal bows. So, besides arrows and bolts, I basically want a 3rd ammo type. (as bolts can't be use on bows and arrows can't be used on crossbows)

Link to comment
Share on other sites

My idea:

 

quest > player alias > script > onobjectequipped and getequippedweapon:

http://www.creationkit.com/index.php?title=OnObjectEquipped_-_Actor

http://www.creationkit.com/index.php?title=GetEquippedWeapon_-_Actor

 

Then add keywords or make a formlist with slingshot ammo and weapons separately and comapare

 

Onobjectequipped form akbaseobject etc etc

If (akbaseobject.haskeyword(slingshotammo) != getequippedweapon.haskeyword(slingshot) ; missmatch

Unequipitem akbaseobject etc

Endif

Endevent

Edited by FrankFamily
Link to comment
Share on other sites

My idea:

 

quest > player alias > script > onobjectequipped and getequippedweapon:

http://www.creationkit.com/index.php?title=OnObjectEquipped_-_Actor

http://www.creationkit.com/index.php?title=GetEquippedWeapon_-_Actor

 

Then add keywords or make a formlist with slingshot ammo and weapons separately and comapare

 

Onobjectequipped form akbaseobject etc etc

If (akbaseobject.haskeyword(slingshotammo) != getequippedweapon.haskeyword(slingshot) ; missmatch

Unequipitem akbaseobject etc

Endif

Endevent

But will that also work for all NPCs, or just the player? I want to add the Slingshots to the leveled lists so NPCs use them as well.

Link to comment
Share on other sites

That would just work for the player, a method that works for both npcs and player would be to put the same script of the alias above in a passive ability added by the slingshot by while equipped

 

A) onequip/onunequip > add spell/remove spell > passive ability while slingshot equipped > magic effect passive > script.

 

B) Weapon enchantment (offensive) > magic effect offensive > equip ability drop menu (bottom) > passive ability while slingshot equipped > magic effect passive > script. But this would occupy the enchantment slot, it is more reliable than the above though.

 

In any case the above script is missing a check now that i look at it again:

Onobjectequipped form akbaseobject etc etc 
if akbaseobject as Ammo ; First check if it is ammo by casting or maybe a keyword if all ammo shares it
If (akbaseobject.haskeyword(slingshotammo) != getequippedweapon.haskeyword(slingshot) ; missmatch, slingshot ammo with bow or arrows with slingshot
Unequipitem akbaseobject etc ;unequip the ammo
Endif
Endif
Endevent 

EDIT: No wait, if the slingshot adds this then it won't trigger when you try to use slingshot ammo on a bow. So maybe split the two parts of the functionality:

 

Script on the slingshot ammo that checks if you have a slingshot equipped and unequips itself if not, can ammo be scripted? not sure atm

Plus the script above though a passive ability that simply checks if you equip ammo that is not slingshot while the slingshot is equipped.

Edited by FrankFamily
Link to comment
Share on other sites

  • Recently Browsing   0 members

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