[MOD]Ambidexterity Module (Shield Module Branch)

Show off your mod creations or just a work in progress.
Post Reply
User avatar
Midknightprince
Posts: 1324
Joined: Fri Aug 11, 2017 6:51 am
Location: San Antonio TX
Contact:

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by Midknightprince »

Man that hand thing looks super cool
Check out my YouTube Channel!

l3lessed
Posts: 1403
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Thanks. Heads up, the newest release only has the attack controller state working for one handed attack without shields. So, the directional attack only works on those swings, even with GUI indicator active. Get this fixed soon. Tightening up the indicator and how it works to make it easy for other artists/modders to customize.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1403
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Just updated repo. First version of adjustable attack direction indicator in.

Read repo notes:
- Added rect calculations to align/center with crosshair no matter icon size or screen size.
- Added icon indicator size setting under mod settings for player customization.
- Used triangles with white outline/semi-transparent block center.
Updates slowing down a little. Busy with life stuff little more.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1403
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Updated to be compatible with 10.28+.

Also, updated shield animation code to fix small animation glitch.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1403
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Unique weapon attack length/reach is in.

I spent more time thinking about this than coding it. At first, I thought to hardcode in a case switch and use itemids to set unique attack ranges for each weapon. However, this had some issues up front, the largest being the properties hard coded into the mod. This is an issue because players can't customize what they need to their likes. So, I thought, I'll add mod settings to adjust, but quickly dropped that idea before I began coding it. Sounds great because it solves the player preference being subjective problem. However, it doesn't solve the issue of current and future mods not being able to add custom weapon ranges for their weapons, like the added weapons in the realistic mod on the forum. So, I decided, I will use a txt file to read and store the values, so anyone can customize as much as they need, including other modders adding weapons. So, after some googling and thinking, I created code to read the text file based on a certain formatting standard and dump it into a public dictionary that holds each read property value based on the weapon index used in the text file. And, now players and modders can easily customize and add whatever weapons and settings they need.

text file is merely formatting as follows: itemtemplateid, weaponreach. itemtemplateid needs to match the item you are setting its reach/range.

Brings me to my question for players. What weapon properties could be added I didn't think about?

Currently there is a weapon attack range property. I'm going to add movement modifier properties for each weapon and the players sheath state and attack state, so each weapon will have differing movement for being unsheathed and for attacking. Smaller weapons will be faster of course. There will also be a weapon attack speed modifier, so daggers natural are faster than claymores. But, anything else we need for current or future weapons?
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1403
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Okay, all custom weapon properties are in. I need to add a few more mod settings and update the first post documentation, then I'll drop on github.

Right now weapons have the four below custom weapon properties:
  • Item/Weapon ID: This is used by the code to figure out which properties go to which weapon/item. I've already added the ids for all classic weapons. If you have any custom weapons from mods, you can add them using their itemtemplate id.
  • Reach: The attack range of the weapon. This is a raw float value, with classic defaulting to 2.25f for all weapons.
  • Unsheathed movement: How much the weapon slows you down when unsheathed in hand. This is a float value used to scale base values by percentage. use 1 for default 100% and change from there.
  • Attack movement: How much the weapon slows your during attacks. This is a float value used to scale base values by percentage. use 1 for default 100% and change from there.
  • Attack Speed: How fast or slow compared to classic speed the weapon attack is. This is a float value used to scale base values by percentage. use 1 for default 100% and change from there.
Again, these weapon values can easily be changed by anyone on the fly. I recommend, once I drop the newest release, going in and messing with these values and sharing them on this thread. I'll compile all of them and select some for mod release as community presets. You can modify them in the text document, which will be located in the same folder as the .dfmod file.

When opening, it will look like below. It seems pretty straight forward. Use "-" to add "coding" comments that won't affect the file. After that, just change the values based on the listed weaponid (which is the very first value).

Code: Select all

--This text file contains the custom weapon properties.--
--It can be configured by adding to or editing the current values using the below formatting standard--
--ITEMID,REACH,UNSHEATHEDMOVEMENT,ATTACKMOVEMENT,ATTACKSPEEDMOD--
113,2.25,1,1,1
114,2.25,1,1,1
115,2.25,1,1,1
116,2.25,1,1,1
117,2.25,1,1,1
118,2.25,1,1,1
119,2.25,1,1,1
120,2.25,1,1,1
121,2.25,1,1,1
122,2.25,1,1,1
123,2.25,1,1,1
124,2.25,1,1,1
125,2.25,1,1,1
126,2.25,1,1,1
127,2.25,1,1,1
128,2.25,1,1,1
Also, to make it easy to customize on the fly, it is built to load the properties from the text file every time a new weapon is loaded. So, you can change the values, tab to the game, swap weapons, and feel it in game immediately.

I'll keep values to classic default for now, until we get a good balance down from testing and templates. :D
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
Merlkir
Posts: 25
Joined: Thu Dec 28, 2017 12:23 pm
Contact:

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by Merlkir »

Sorry if this is a stupid question you already answered previously:

How do you handle heavy weapons? Do they just move uniformly slower?
If so, I think the better (looking) solution is to have them move perhaps very slightly slower, but stay in the overswing position for longer. So recovery into a ready state takes longer, in games like Warband they treat this as an "unbalanced" trait. The final effect of the player attacking less often is the same, but it looks a bit more "realistic".

(if you wanted to get real fancy, you could really lean into the whole acceleration business and adjust animation frames. So at the beginning the weapon takes longer to accelerate, then it moves fast and then it takes longer to decelerate and stop. You could even add a visible overswing to the animation - a frame that goes TOO far and just before the weapons stops entirely it jerks back very slightly. This is a pretty common animation trick to make things move with visible heft.)

l3lessed
Posts: 1403
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

If I'm understanding you're thoughts about two handed weapons, you want the attack primer window little longer, but swing speed the same. This way it mimics actual weapon physics. Because in real life heavier things do not move or fall slower once continual momentum/gravity is applied; technically the weapons should be picking up speed through the swing. The primer increase could be done easy and yes a limited priming animation could be used/added. I'll think about it.

I already thought about the second idea. Coding in the lerp math wave function to handle the easing in and out of animations is easy. However, getting it to all line up with original atlas weapon images for all 5 frames is extremely time consuming and maybe impossible for all the animations. Every atlas sprite has a unique x , y position when rendered on screen because of how the rendering works to maintain and work with classic engine. This means there are over thousands of frames of individual animations that would have to be hand coded precisely with my animation smoothing code to ensure no frame skipping jerkiness. 13 weapons * 6 attack types * 5 frames for each attack type = LOTS AND LOTS OF FRAMES.

The way the stand alone alpha worked and this mod will work is by finding the offset of the x, y position between each frame. For each weapon, this stays the same, as long as the attack animation stays in a linear direction. After this, I then had to and still have to figure out the offset values and swap out some animation frames to ensure the weapon sprite doesn't show clipping. This way instead of having 1000+ frames to code and figure out manual offsets, I only have 13 or so weapons to figure out, which is still a lot, because each weapon has 6 different attack animations. It may be possible in some form, as I did something like this in the alpha stand alone build, but I'm not going to worry about it or waste time on it until everything else is done.

Technically, I could just replace the atlas sprite system and use my own stand alone modern sprite of the full weapon, so cutoffs and positioning between frames wasn't even an issue, but then we would not have the classic game or feel anymore. This is what is done for the shield module.

Also, the next release is taking a little longer than I thought. Accidently introduced a few bugs need to fix, and the movement modifier system is taking me a little longer than I thought it would to setup how I want. Almost there though.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

daggerdude
Posts: 241
Joined: Sat May 23, 2015 2:22 pm

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by daggerdude »

l3lessed wrote: Fri Dec 18, 2020 7:55 pm Brings me to my question for players. What weapon properties could be added I didn't think about?

Currently there is a weapon attack range property. I'm going to add movement modifier properties for each weapon and the players sheath state and attack state, so each weapon will have differing movement for being unsheathed and for attacking. Smaller weapons will be faster of course. There will also be a weapon attack speed modifier, so daggers natural are faster than claymores. But, anything else we need for current or future weapons?
What do you think of backstab and crit multipliers on certain weapons as enhancement to vanilla values?
In general daggerfall lumps weapons into the same damage pool and all that matters from the meta is damage output. higher crit and backstab means higher damage whether from a claymore or a dagger.

My opinion:

Stealth modifier - a malus based on length and weight more or less unrestricting daggers and tantos and affecting weapons larger than that incrementally.
Movement modifier- A malus based on weight.

Crit modifier - bonus to short and light weapons to crit damage. the shorter and lighter, the higher the bonus, from vanilla values - daggers being 1.5x or perhaps even x2 from vanilla.

Backstab modifier - bonus to short and light weapons to land backstabs. Again, perhaps 1.5 or 2x vanilla for daggers and the like.

parry/riposte window - an offhand dagger(or mainhand) should be more proficient at parrying and counter attacking than a claymore would.

block amount - i really liked oblivion's block mechanics, but the closest thing would be to use weapon skill as a base for blocking and how much damage you should receive, and then a max amount for each weapon. so 100% skill means 100% damage block, and daggers might only block 33% damage say? perhaps large weapons should give a BONUS to block, so that a relatively underskilled player could receive an immediate benefit. say perhaps a warhammer would be 100% effective at skill 50%?

In general, short blades are the obvious stealth option. vanilla they provided no advantages to bigger better weapons, so using them was a roleplaying choice. With your mod, they now are faster and therefore will do more damage, but balanced because of length. so having enhancements to stealth related skills would really enhance thief classes to a much more survivable level, and adding handling in parries and blocks also adds depth to warrior classes as well. Maybe the barbarian is great with blocking and one hit damage, but the rogue is good with his off hand dagger and riposts and his cutlass?

just some food for thought. also, merry christmas!

daggerdude
Posts: 241
Joined: Sat May 23, 2015 2:22 pm

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by daggerdude »

also also, i am trying to further refine shields, just have been working 50+ hour weeks and such.

Post Reply