Thrown items as melee and vice versa?

正在查看此主题的用户

Zandman

Sergeant at Arms
I'm making a mini-mod (http://forums.taleworlds.com/index.php/topic,49398.0.html), and I wonder if it's possible to duplicate the "throwing axe" item (e.g.), make it a melee item and just rename it?
I know I CAN, but will there be an issue with changing where the character grips the axe/which direction it's facing and other problems I may not be aware of?
This also goes for making short spears into one-time throwing weapons, javelins into short melee spears, throwing knives into regular knives, etc. (TESTED)

NOTE: I'm primarily using the Item Editor and editing the .txt files - I haven't learned Python thing yet.


[EDIT 2008-11-14]

I've now tested out a couple of things: Making jarids, javelins and throwing axes into melee weapons is easy - just using the Item Editor.
Making throwing knives and throwing daggers into melee weapons requires for them to be rotated 180 degrees first.

Making a melee weapon like a shortened spear, e.g., into a throwing weapon proved to me more troublesome, though:
* Duplicated the "shortened spear" item and renamed the duplicate: "shortened throwing spear".
* Edited the item in Item Editor to be a thrown weapon (behaving like a javelin) with an ammo setting of 1.
PROBLEM:
The "shortened throwing spear" rests on my back, as normal. When I pick it up and ready it for attack, and when I throw it, everything looks normal...
Right after the attack, though, the spear returns to my back, and in the inventory I see that the ammo of the spear reads 1/1, and not 0/1, as I had hoped and expected.

Why doesn't it count down to zero? How can I fix that, and will that take care of my problem?
 
The problem with that is that the engine isn't made for it. You can throw away your spear and still fight with it, or throw all your axes and whip out one to fight with.

And well, just use other items as reference, shouldn't be too hard to position them. Knives need to be turned over, axes should be fine almost like they are, and javelins need to be turned over, I think.
 
Silver 说:
The problem with that is that the engine isn't made for it. You can throw away your spear and still fight with it, or throw all your axes and whip out one to fight with.

And well, just use other items as reference, shouldn't be too hard to position them. Knives need to be turned over, axes should be fine almost like they are, and javelins need to be turned over, I think.


OK, thanks!
Not sure what you meant with the first part, though. If I make a spear into a throwing weapon and the ammo amount to 1, the unit would throw it like any old javelin and the ammo would be depleted, right? I meant to implement it as a completely separate item: so if I duplicate "Spear" (and not change the original), I'd just make a new "Spear (thrown)", which acts as thrown, ammo 1.

I don't need the unit to first fight with, say, an axe as a melee weapon and then throw the same axe at you.
 
Yeah, I meant that that was going to happen. Someone can equip a spear, and a spear (thrown), which makes it look pretty ugly since they just threw away their weapon and still hits you with it.
 
But can't I fix that if I simply control the placement of the spear on the body?
Then it wouldn't look as the same spear: a unit could charge at you, throw the spear (thrown) and then equip his other spear (melee) and fight you with it.
Worst case scenario, the unit would come at you with the melee spear, change spears and throw the throwing spear before changing BACK to the melee spear, but I could live with that - maybe the unit knows something I don't know.

Worst worst case scenario, I'll just see to it that no unit that is equipped with a throwing spear also has the same melee spear.

Or... did I miss something?
 
Have you try to duplicate the hatchet, then replace the original hatchet mesh with the throwing axe mesh?

IIRC, the BRF Edit can do scaling and resetting the origin (hand placement). If not, get Wing3D. Export the model with BRF Edit. Import it into Wing 3D. Do scaling, moving hand placement. Save. Import it back into brf using BRF Edit.
 
can you give melee weapons "ammo" and make it so the ammo of the melee weapon depletes to 0 if you use a duplicate ranged version?,
if not ignore the rest of this reply and forgive my ignorance.

To make it look as though the weapon is disappearing and actually being thrown you could attach the animation of the mesh scaling down to 0 onto the same animation the quiver uses. At ammo 1 the weapon will be usable and visible and at ammo 0 it will disappear and be unusable...would also have to remove the "you have no ammo for this weapon".
 
No, you can't. At least not in earlier versions, I don't think it's something that has changed.
 
Nethoras 说:
firstly, why? whats wrong with probable throwing weapons?

Surely, you're not trying to tell me that throwing a spear is improbable?
 
Zandman 说:
Nethoras 说:
firstly, why? whats wrong with probable throwing weapons?

Surely, you're not trying to tell me that throwing a spear is improbable?

in quantaties of more than one for a man on foot, yes and in quantaties of one, largely useless unless your making some kind of hoplite/legioninaire/ any form of multipurpose foot troop en masse.

also there is a script that makes it so certain ammo types only fit certain guns,I beleive it worked by checking you equipped items at the start of a battle, and replacing wrong ammo with someting, or simply remoiving it. You could tweak this to run of a certain keystroke, and instead of checking your firearms and ammo, it went through a list of melee weapons that you deem should be throwable, and replaced said melee weapon with the throwing weapon f your choice. I know it sounds really confusing, but its not ALL that cmplicated, just rather time consuming I would assume.

but if you were to make it this way, the melee item and the thrown would be gone when you throw it, which would make sense and actually be a kinda cool feature :p also once you worked out the script it could be used for plenty of things that the community could use, affixxing bayonets, changing the grip on a weapon, crossbow bludgeoning :p

anyways sorry for long post, but I hope this helps
 
Well, now I've tried a few things out, with varying degrees of success:

Making javelins and jarids into melee weapons (via Item Editor) was easy. Didn't even have to rotate the objects, just change their properties from "thrown" to "one-handed weapon", tweak a few settings and voilà! - mini-spears.
Did the same thing with throwing axes, but I haven't had the time to test them yet.

Trying to make a shortened spear into a throwing weapon was a different matter:
The placement of the spear was fine, and I threw it all right, but the spear didn't disappear from my back after I threw it. It DID look right as I picked it up and as I threw it, but it reappeared after the throw. When I looked at it in the inventory, it said that my "ammo" wasn't depleted. I've set the spear as a throwing weapon with ammo of 1, but it doesn't reach "ammo: 0/1" the same way a jarid, e.g., reaches "ammo: 0/7" when you've thrown the last one.
I don't know why this is - I can't quite see the logic of it.

What to do, what to do? How can I get the ammo to "count down", and will the whole problem be fixed if I manage to make the ammo deplete?
 
Thrown items as melee and vice versa? yes. you can. heres how.

it involves the modifying Shield Bash Script in a manner that another key takes an assigned polearm stabbing animation and applies it to the javelin in a ready weapon slot, and applies random damage like the shield bash.

if the regular attack key (mouse button, usually) the javelin is thrown. if the assigned alternate key is used, an effect like a stabbing spear is applied. you can prolly assign the same to axes and daggers and knives.

simple - not. but doable. 9/10's of the work is already in the bash script. maw
 
maw 说:
Thrown items as melee and vice versa? yes. you can. heres how.

it involves the modifying Shield Bash Script in a manner that another key takes an assigned polearm stabbing animation and applies it to the javelin in a ready weapon slot, and applies random damage like the shield bash.

if the regular attack key (mouse button, usually) the javelin is thrown. if the assigned alternate key is used, an effect like a stabbing spear is applied. you can prolly assign the same to axes and daggers and knives.

simple - not. but doable. 9/10's of the work is already in the bash script. maw

Thanks a lot - that's actually really interesting! But that's actually way more complex than what I had in mind. I don't need to put differens functions to the same item; only one function to one item for now... until I learn more about modding.

See, I have a separate item I've called "Shortened Spear (thrown)" that looks like a polearm, but behaves exactly like a javelin, only it isn't seven of them - only one.
So I've set the spear's ammo to 1, and I've made it into a thrown weapon instead of a polearm, but (as I've said in my previous post) it won't count down from 1 ammo to 0 ammo after I've thrown it, and just reappears.

That's all I want fixed: Special throwing spear on my back. I throw spear. Spear gone.
 
maw 说:
Thrown items as melee and vice versa? yes. you can. heres how.

it involves the modifying Shield Bash Script in a manner that another key takes an assigned polearm stabbing animation and applies it to the javelin in a ready weapon slot, and applies random damage like the shield bash.

if the regular attack key (mouse button, usually) the javelin is thrown. if the assigned alternate key is used, an effect like a stabbing spear is applied. you can prolly assign the same to axes and daggers and knives.

simple - not. but doable. 9/10's of the work is already in the bash script. maw

That is awesome...

But... Would that still work even after you're out of ammo, since you technically still have a weapon equipped?
 
you'd have to set the conditions to address the things you mentioned - no ammo would have to create a conditional block and stop the use it as a thrusting weapon, essentially.

Zand, i'm thinking you have a imodbits_polearm mixed with an imodbits_thrown... somehow.... so that even though the 'ammo count' drops to zero, it pops up.... i have a javelin that has two tossess and its dry...

post the item line?

i'm wondering not if we can put multiple or compound imodbits in an item line, or create a hybrid by assigning something like:

imodbits_throw_spear = imodbits_polearm + imodbits_thrown

at the beginning of module_items.py or, can we put imodbits_polearm|imodbits_thrown at the end of an item line. anyone try it? might do something cool - or it might just casue errors, or it might do nothing and accept the first imodbits assignment.

point is, play with it, be inmaginative. maw
 
Argh... still too complex for me. I've hardly used Python yet, remember?

Like I've said before:
All I did was use the Item Editor and
(1) duplicated the "Short Spear"
(2) renamed the duplicate to "Short Throwing Spear"
(3) changed the "Short Throwing Spear" properties so that it behaved similar to Javelins/Jarids
(4) changed the amount of ammo for the "Short Throwing Spear" to 1 (instead of 7, which is normal for Javelins/Jarids).

So what I wanna know is:
Since the javelins disappear after you throw the last one - why doesn't my "Short Throwing Spear" go away? Why won't the spear ammo read 0/1, but remains at 1/1?
 
There's probably a checkbox you missed or a flag that the item editor doesn't let you edit?  If you do the opposite of what you tried it should work:  Duplicate the javelin instead of the short spear, rename it to 'short throwing spear', change the mesh to use the short spear instead of the javelin, switch the quantity to 1, etc...
 
HokieBT 说:
There's probably a checkbox you missed or a flag that the item editor doesn't let you edit?  If you do the opposite of what you tried it should work:  Duplicate the javelin instead of the short spear, rename it to 'short throwing spear', change the mesh to use the short spear instead of the javelin, switch the quantity to 1, etc...

Damn... that actually makes so much sense that I feel like a dork now.
Thank you very much - I'll try it as soon as I get the chance. *fingers crossed*

[EDIT:]

No... that didn't work either. I'm starting to get really frustrated now.
 
... and I stumbled across something else that puzzled me:

If I wield some OTHER kind of ammo - say, a quiver of arrows - the throwing spear behaves perfectly!
Then, after throwing the Short Throwing Spear, the character seems to switch to the quiver, and no new spear pops up on my back.
The spear's ammo count still doesn't display as 0/1, though.

The more I poke into this problem, the less I understand. Argh.  :???:
 
后退
顶部 底部