Two Handed Weapons and Dual Wielding
Two Handed Weapons and Dual Wielding
? is this possible?
Last edited by Gradunk on Mon Jun 23, 2014 11:53 pm, edited 1 time in total.
I smell you, i do! You GRADUNK! No be hiding on TORGAL!
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: Two Handed Weapons?
While I can't think of an easy way to 'block' the other hand, you could quite simply make it so that attacking with a certain weapon requires the other hand to be empty. You would create an onAttack hook for the Party. In there, check for the ID of the weapon used for the attack - if it matches your weapon ("two_handed_sword") say, then you would check that champions 'other hand' slot for an item. If it's got something in it, printHud("This weapon requires two hands") and return false (which cancels the attack).
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: Two Handed Weapons?
My thought a few days ago on this, would be to have code in the onEquipItem & onUnEquipItem hooks to forcibly add two weapon halves to slot 7 & 8.
Such that to add the weapon to either hand populates both, and to remove it removes both. All the designer needs is two icons (right & left) that meet, or even slightly overlap in the middle.

Such that to add the weapon to either hand populates both, and to remove it removes both. All the designer needs is two icons (right & left) that meet, or even slightly overlap in the middle.

Re: Two Handed Weapons?
Isaac you're bang on with how i was thinking to do it. but i'm wondering about the item swapping part. If the champion has things in both its hands, i can't make both of them go to the mouse pointer, and i can't be sure a specific inventory space would be empty. i don't know how i would code that.
and i can't find anywhere what the command for putting things in or out of the mouse pointer is.
and i can't find anywhere what the command for putting things in or out of the mouse pointer is.
I smell you, i do! You GRADUNK! No be hiding on TORGAL!
Re: Two Handed Weapons?
setMouseItem(spawn("brass_key"))
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: Two Handed Weapons?
SetMouseItem(item)Gradunk wrote:Isaac you're bang on with how i was thinking to do it. but i'm wondering about the item swapping part. If the champion has things in both its hands, i can't make both of them go to the mouse pointer, and i can't be sure a specific inventory space would be empty. i don't know how i would code that.
and i can't find anywhere what the command for putting things in or out of the mouse pointer is.
One snag with this idea is that the icon may look great in the hands, but will look odd split apart in the character sheet. Odd looking, but you'd have two handed weapons.
**Aha... I was too slow.
Re: Two Handed Weapons?
I believe I've seen this done in another game where the hand the 2H weapon was placed in had the full icon and the other hand was either greyed out or had a semi transparent copy of the icon. This would eliminate the problem of the inventory half icons.Isaac wrote:SetMouseItem(item)
One snag with this idea is that the icon may look great in the hands, but will look odd split apart in the character sheet. Odd looking, but you'd have two handed weapons.
Re: Two Handed Weapons?
Not really ~unless I'm missing something. The character sheet duplicates the item icon on the paper-doll. So where the two icons would meet on the portrait GUI (in the lower right); those duplicated icons would not meet up in the character sheet/ paper-doll.Allanius2 wrote:I believe I've seen this done in another game where the hand the 2H weapon was placed in had the full icon and the other hand was either greyed out or had a semi transparent copy of the icon. This would eliminate the problem of the inventory half icons.Isaac wrote:SetMouseItem(item)
One snag with this idea is that the icon may look great in the hands, but will look odd split apart in the character sheet. Odd looking, but you'd have two handed weapons.
The greyed out icon is easy to do as the [off-hand] weapon's icon, but not if it was to be ½ of the weapon image across both hands; it would have to be two swords, one grey-transparent, the other solid (as usual).
**Aside: It seems rather complicated to delete an item in a champion slot from within an onUnEquipItem hook. The item's onUnEquipItem hook is run when you call removeItem().
It might have to require a script object on the map for a timer to call to delete both halves of the weapon.
I have a script that handles the double item two handed weapon... but deleting both items when the player can arbitrarily pick up either one of them first has been challenging to attempt ~without a spawned timer and separate script object.
Re: Two Handed Weapons?
Instead of half items i was thinking of just making it two one handed weapons of the same type, but force the person to have both hands empty in order to equip it. Then once it is equipped, spawn the second weapon in the other hand. I think that would be the easiest way wouldn't it?
as you said the greyed out off hand. is that just an image that you'd place in the hand or something?
as you said the greyed out off hand. is that just an image that you'd place in the hand or something?
I smell you, i do! You GRADUNK! No be hiding on TORGAL!
Re: Two Handed Weapons?
Exactly.Gradunk wrote:Instead of half items i was thinking of just making it two one handed weapons of the same type, but force the person to have both hands empty in order to equip it. Then once it is equipped, spawn the second weapon in the other hand. I think that would be the easiest way wouldn't it?
as you said the greyed out off hand. is that just an image that you'd place in the hand or something?