Pistol crossbow

正在查看此主题的用户

Maenardil

Sergeant Knight
I'm trying to make a crossbow that can be fired like a pistol from one hand. Pistol crossbow, hand crossbow - you name it. I made a mesh, added an"itcf_shoot_pistol" and it works quite well. With only two problems:
1. When you point the crossbow straight, you can see an arrow pointing 45 degrees upward. I guess it's because I rotated a model, but arrow position is somehow relative to the model position. Rotation was necessary, two-handed crossbow is supported from below with right hand, and pistol crossbow has a grip. If you just leave the way it was, and add itcf_shoot_pistol, whole crossbow is pointing 45 degrees upward. How can I change arrow position?
2. While holding crossbow in standing position (not pointing it), left hand is still bend as if supporting weapon - and again, arrow is floating in the air. I want body position be the same as when holding pistol and arrow in the right place.

I was thinking of a different approach. Maybe I can make hand crossbow of pistol type, that would solve some problems. But I guess in that case:
1. Pistol crossbow accuracy would depend on "Firearms" skill and not "Crossbow"
2. It would shoot bullets, not arrows.

Can somebody help me to make it work?
 
That would take quite some advanced coding; The reason that the hand is placed as if there is a pistol there, is because everything under the istance of firearm is like this. You could edit the skeleton with BRF editor and make a new one, but I don't think that would fully work.

As for making a crossbow pistol instead; you can change what it shoots. I made a gun that shot rocks.
I also think you can change what skills it depends on, this would probably be the easier approach.
 
As for making a crossbow pistol instead; you can change what it shoots. I made a gun that shot rocks.

Didn't that change all guns in the game to rock-shooters? Point is to have bows, guns and crossbows together. If you did manage to have guns that shot bullets and one gun that shot rocks, could you please give a hint how? By "shot" I mean "accept only this type of ammunition". As far as I see, there are only three types of ammo: "arrows", "bullets" and "bolts". Sort of workaround would be to make an invisible arrow, not very pretty but still better then hovering arrow. But If I make an invisible arrow, can I see it in inventory? So maybe changing a mesh to invisible one after loading?

because everything under the instance of firearm is like this.

I was able to change animation from shooting crossbow to shooting pistol, adding just one flag. Perhaps there's also a way to change standing posture/walking animation? I'm afraid if I edit the skeleton, it would be changing all crossbows. But posture is not so terrbile, more annoying is arrow in mid air.
 
If you copy and paste the code of Stones and put it below cartidges, then change

插入代码块:
itp_type_thrown |itp_merchandise|itp_primary ,itcf_throw_stone, 1 , weight(4)|difficulty(0)|spd_rtng(97) | shoot_speed(30) | thrust_damage(10 ,  blunt)|max_ammo(18)|weapon_length(8),imodbit_large_bag ],

to:

插入代码块:
itp_type_bullets|itp_merchandise, 0, 41,weight(2.25)|abundance(90)|weapon_length(3)|thrust_damage(1,pierce)|max_ammo(40),imodbits_missile],
And change the name from
插入代码块:
Stone
to
插入代码块:
Shooting Stone
That will make the stones stats exactly the same as a bullet, but will make it look like a stone, because it is telling it to shoot the mesh:
插入代码块:
throwing_stone
.

Same can be done with bolts:
Change the mesh to the mesh of your bolt (default:
插入代码块:
bolt
)
And change all the itp type etc to make it appear to be a bullet, and this should work.
As for changing the walking animation:
I'm afraid I don't have much knowledge on the movement of the characters, as I've never had much need for a change in it.
 
rickyduck 说:
That would take quite some advanced coding; The reason that the hand is placed as if there is a pistol there, is because everything under the istance of firearm is like this.

Up to this point, you're somewhat correct. However, it requires absolutely no advanced coding.


You could edit the skeleton with BRF editor and make a new one, but I don't think that would fully work.

This, however, is completely wrong.

All you have to do is rotate the crossbow and the projectile in the BRF by 45 degrees so it matches the player's hand.

As for the ammo, make a mesh with itp_type_bullet. You can set whatever ammo mesh you want it it use in the mesh list.

Simply,
Winter
 
After clicking rotate in BRF nothing happens. I can't see any change in arrow position. I can do you in Wings 3D I think, but I don't know if that would solve my problem. If I rotate the arrow, it would display itself correctly when loaded to hand crossbow. But it would be rotated -45 degree if I load it to normal crossbow.
What am I missing here?
 
Winter 说:
rickyduck 说:
That would take quite some advanced coding; The reason that the hand is placed as if there is a pistol there, is because everything under the istance of firearm is like this.

Up to this point, you're somewhat correct. However, it requires absolutely no advanced coding.


You could edit the skeleton with BRF editor and make a new one, but I don't think that would fully work.

This, however, is completely wrong.

All you have to do is rotate the crossbow and the projectile in the BRF by 45 degrees so it matches the player's hand.

As for the ammo, make a mesh with itp_type_bullet. You can set whatever ammo mesh you want it it use in the mesh list.

Simply,
Winter

Well, I haven't coded for a long time  :oops:

Also, I've already said about the itp_type_bullet thing..
 
Actually, in the seiges mod made by DarkAnd there is a pistol crossbow, and its quite nice. The mod is still in very early developing stages, so its not that great, but he does have a pistol crossbow in it.
 
Winter 说:
All you have to do is rotate the crossbow and the projectile in the BRF by 45 degrees so it matches the player's hand.

As for the ammo, make a mesh with itp_type_bullet. You can set whatever ammo mesh you want it it use in the mesh list.

Simply,
Winter

Won't that mean that other firearms can use that mesh as well? I.e. any other firearms will be able to shoot 45 degree rotated bolts?
 
Not to be an ass but the whole one handed crossbow things stupid, it would have like no powr and be awkward as hell to load, but what the hey It''s ur mod do wut u want
 
DJNad 说:
Won't that mean that other firearms can use that mesh as well? I.e. any other firearms will be able to shoot 45 degree rotated bolts?

They CAN use that mesh, yes. But they won't unless you set them to use that mesh. The weapon mesh and the ammo mesh are both set individually in the item entry in module_items.


Nethoras 说:
Not to be an ass but the whole one handed crossbow things stupid, it would have like no powr and be awkward as hell to load, but what the hey It''s ur mod do wut u want

"Not to be an ass, but hey, I'll go ahead and be an ass."
 
Winter 说:
DJNad 说:
Won't that mean that other firearms can use that mesh as well? I.e. any other firearms will be able to shoot 45 degree rotated bolts?

They CAN use that mesh, yes. But they won't unless you set them to use that mesh. The weapon mesh and the ammo mesh are both set individually in the item entry in module_items.

And then:

mkeller 说:
From looking at the python scripts, it appears that it is possible to edit the number/type of weapons used in a given module.  I, however, am not experienced enough in python, mbscript, or hex-editing to know how.  Does anyone else?

What I want to do is create three different weapon classes that have the same properties of the default crossbow or firearms class (ranged, must be reloaded before firing again), but each with their own type of ammo, that cannot be interchanged.  Is this possible?
Hellequin 说:
Only with some tricky coding to explicitly detect inappropriate combinations and unequip them; as far as the core engine is concerned, all item-type-crossbows fire all item-type-bolts and so forth.  But you can set up a trigger (timed, at start of encounter, whatever) which detects that the player has a "flechette crossbow" equipped along with "arbalest bolts" and removes-and-returns the latter item (thus unequipping it).  For NPCs you have to actually take it away for the duration of the combat since remove-and-return doesn't have that effect.

Basically, no, but it's workaroundable.

I dunno if I am on the totally wrong track here :wink:
 
后退
顶部 底部