Dual Wielding plus logic

Feedback on past, current, and future development.
Post Reply
Tarius
Posts: 574
Joined: 24 Oct 2011, 19:29

Dual Wielding plus logic

Post by Tarius »

This idea is directly related to the shield bashing one.

I am good at logic(and had to do some programming for school, but dont have tons of experience), so I will simply layout how code could possibly work in this instance. At its simplest, you would basically have each hand available for an action.
Not sure how good case statements would be to use in this instance, but Im sure something similiar could be used as well.

In inventory/spell menu, it is possible to have specific things specified as equipped. In this case, each hand would be specified as separate; each hand would have an object(weapon, shield, etc) slot and a spell slot.
-When a hand has nothing specified as equipped, spell or object, it could be called as in the default state.
-When a hand has any other object or spell specified as equipped, that hand is in the equipped state.
-When a hand has a two handed object(mostly two handed weapons) equipped, it is considered in the two handed state and equipped state.(as you will see, this would allow you to have separate two handed weapons specified as equipped to each hand, but further logic will of course exclude them both being used at one time.

When the player brings a hand up for use, ie "ready it", whether for a spell or object, a check is made to see which state the hand will go to from the unready state:
1:If hand in question is in the default state,
___Player would "draw" their fist regardless of whether they pressed the button for readying a spell or object; hand is now considered as in a default ready state, it is ready, but nothing is specified as equipped, all they can do is punch with it.
___Any hand in the two handed state is moved(if its in the ready state) to the unready state
2:Hand is in equipped state
__A:Ready object button pressed(such as for readying a weapon)
___Check is made for what is in the object slot and that object is then readied and hand is set to the ready state
_____A1:If hand is in the two handed state,
_______Other hand is immediately moved to a unready state, and the classic two handed stance is activated
__B:Ready spell button pressed
___Check is made for what spell is equipped and that spell is then readied and the hand set to the ready state
___Any hand in the two handed state is moved to the unready state

By extension of this, when a weapon breaks, or the person gets disarmed, the hand is set to the default ready state; they have lost their weapon and now have their fists.

Whatever is in a given hand when the attack button is pushed would determine what action is taken, if a non-combat object is in the hand, then obviously no action would be taken in that case.

As you can see from the above, this would allow dual wielding, dual casting, casting with one hand, using a sword with another, etc.
I am sure I have missed something here as I am currently in a half fogged state, but I believe this is probably the ground logic for a basic equipping system. I know at the very least that this could be expanded.

Two handed weapons make this more complicated than I wish.

This isnt as directly related to shield bashing as I originally figured.
Post Reply