Throwing Knives Mod Help

Post » Tue Jun 19, 2012 4:27 pm

Zuldova, I've been having the "resisted effect" bug. Every time I hit a target, I get a "____ resisted Knife Impact" message. There's a short delay and then the damage is done, but not nearly as much damage as before. The really weird part is that I get this message even if I throw the knives into a dead guy.

I decided to look at the mod myself, even though I'm totally bad at this. I opened the mod in the CK. Since it's a resistance message, which is a spell thing, I decided to look up the magic effect entries for the knife throwing script. There's a script on all of them called "KnivesDamage." I tried to look at the script's properties and it threw an error at me:

"SCRIPTS: Cannot open store for class "KnivesDamage", missing file?"

It might just be doing that because I'm bad at this, but I went ahead and looked it up on the CK wiki:
"Cannot open store for class X, missing file?"
This error appears when the game tries to load a requested script, but the file for it cannot be found. Double-check that the pex file is in the appropriate folder (Data/Scripts).

From what I can tell, it looks like the script that controls the knife impact spell is missing from the mod install. I think. I'm very new to modding and even newer to scripting, but maybe the game refuses to let the spell effect do anything if the script is missing, which is causing the resistance message and the lowered damage?

Hope this helps. I absolutely love this mod, and I'll be happy to see it back on its feet again.

Edit: By the way, with the projectile recovery stuff, maybe you could look at the way Bethesda does it. There's a conjuration spell, I think it's called "Spectral Arrow" or something, that shoots a ghost arrow every time you cast it, though I don't know if you can recover those arrows, either.
User avatar
Kill Bill
 
Posts: 3355
Joined: Wed Aug 30, 2006 2:22 am

Post » Tue Jun 19, 2012 5:21 pm

hi, thanks for answer, i think that resist message its just a small bug because the damage is make by a script, but i dont know why that happens. about the script that you can't find, i think is because the scripts are into the .bsa file, so you will not find it in your script folder, about the Spectral Arrow spell, i check the missile type and it can not be pick up, i mean, the option "can be pick up" is uncheck, the reason why i dont check that option on knifes is because my game crasesh when i pick up the projectyle, thats why i uncheck it, i cant find a solution :S
User avatar
Frank Firefly
 
Posts: 3429
Joined: Sun Aug 19, 2007 9:34 am

Post » Tue Jun 19, 2012 6:00 pm

I was wondering, do you need to copy and rename the script for each weapon? or can u use the same script and script name?

For the two throwing knives I've made, I've had to make two different scripts and link each one to the different knives.
User avatar
FirDaus LOVe farhana
 
Posts: 3369
Joined: Thu Sep 13, 2007 3:42 am

Post » Tue Jun 19, 2012 10:17 am

I just tested out an idea for firing in third person and it works pretty well for aiming. Basically, I put an ability on the player to check when he is in 1st person or 3rd person. When he's in 3rd person, the ability's script will spawn a disabled weapon (codename: source) at the player's location. When the player goes back to 1st person, source is deleted.

Whenever the player tries to throw a knife in third person, the source is moved to the player's location and the ammo fires from the source instead of the player. Testing it out in game, the aim is right on. However, there are some problems... Mainly, the player is not considered the one hitting the NPCs, therefore no crime is occurring. And since it's not fired from the player, the damage is very low.

Getting around the second problem is easy. Instead of using a source weapon, use a source NPC that's basically a clone of the player in terms of stats and perks. Not sure about the first problem though...
User avatar
lolli
 
Posts: 3485
Joined: Mon Jan 01, 2007 10:42 am

Post » Tue Jun 19, 2012 8:31 am

I had already tried what you say but I could not make it work, because I did not try to place the weapon initially disabled ... you solved it this way?

ObjectReference AimWeapon = self.PlaceAtMe(Knife, 1, True)Knife.Fire(AimWeapon, KnifeAmmo)

another thing ... how do you know when the player is in first person view or third person view? I have not found any script function to know that
User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Tue Jun 19, 2012 4:36 pm

I was wondering, do you need to copy and rename the script for each weapon? or can u use the same script and script name?

For the two throwing knives I've made, I've had to make two different scripts and link each one to the different knives.

for this issue, on the last script i using form list...i have all my knifes on a list, so when i need one, i just have to call it
User avatar
Erika Ellsworth
 
Posts: 3333
Joined: Sat Jan 06, 2007 5:52 am

Post » Tue Jun 19, 2012 10:12 pm

I had already tried what you say but I could not make it work, because I did not try to place the weapon initially disabled ... you solved it this way?

ObjectReference AimWeapon = self.PlaceAtMe(Knife, 1, True)Knife.Fire(AimWeapon, KnifeAmmo)

another thing ... how do you know when the player is in first person view or third person view? I have not found any script function to know that

Credits for figuring out if the player is in 1st or 3rd person view goes to kuertee. Check out http://www.gamesas.com/topic/1354316-conditions-in-papyrus/.

And this is the function I use to throw the knife:

Function ThrowKnife()    if (PC1stPerson)        ThrowingKnife.Fire(Player, ThrowingKnifeAmmo)    else        SourceWeapon.MoveTo(Player, 50 * math.sin(Player.GetAngleZ()), 50 * math.cos(Player.GetAngleZ()), 0.75 * Player.GetHeight(), true)        SourceWeapon.SetAngle(SourceWeapon.GetAngleX() - 5, SourceWeapon.GetAngleY(), SourceWeapon.GetAngleZ())        ThrowingKnife.Fire(SourceWeapon, ThrowingKnifeAmmo)    endif        if (Player.GetItemCount(ThrowingKnife) <= EquippedKnifeCount)        Player.UnequipItem(ThrowingKnife, false, true)    endif        Player.DropObject(ThrowingKnife, 1)EndFunction

Makes it easier so you don't have to figure out the angles yourself. I had to move the weapon 50 units in front of the player so that you don't get hit by your own knives when you throw while running forward.
User avatar
Erich Lendermon
 
Posts: 3322
Joined: Sat Nov 03, 2007 4:20 pm

Post » Tue Jun 19, 2012 11:18 am

this is really a great help, I jumped on one foot when I saw this, I will try it ... thanks, you've restored my faith in humanity
User avatar
Natalie Taylor
 
Posts: 3301
Joined: Mon Sep 11, 2006 7:54 pm

Post » Tue Jun 19, 2012 10:35 am

I tried this and it works perfect, knives go where I'm pointing, the only problem is it takes a second to throw:

Function ShootingKnives(weapon ShootingWeapon, int round, int InfiniteAmmo, ammo ShootingAmmo)while (round > 0)   knifeRef = self.PlaceAtMe(ShootingWeapon, 1, True)   knifeRef.MoveTo(self, 50 * math.sin(self.GetAngleZ()), 50 * math.cos(self.GetAngleZ()), 0.75 * self.GetHeight(), true)   knifeRef.SetAngle(knifeRef.GetAngleX() - 5, knifeRef.GetAngleY(), knifeRef.GetAngleZ())   ShootingWeapon.Fire(knifeRef, ShootingAmmo)   knifeRef.disable()   round = round - 1endWhileOnAttack = trueif(KnifeInfiniteType != InfiniteAmmo)   self.DropObject(ShootingWeapon, round)endifendFunction

do not know if I'll be doing well, but that takes away a bit of fluidity to the animation ... I'll try to make it work ... thank you very much, this is helpful
User avatar
Conor Byrne
 
Posts: 3411
Joined: Wed Jul 11, 2007 3:37 pm

Post » Tue Jun 19, 2012 6:37 pm

Hey I was thinking, once you get this mod working, we can make other projectile weapons, such as CROSSBOWS.

I call dibs on crossbows!

That will be my next little addon for Moar Kontent after I've finished all my throwing weapons next week.

Moar Kontent now has throwing knives.
http://skyrim.nexusmods.com/downloads/file.php?id=9700
User avatar
Nick Tyler
 
Posts: 3437
Joined: Thu Aug 30, 2007 8:57 am

Previous

Return to V - Skyrim