Mods / Melee Weapons Framework
Set to published to be listed. A draft mod is still visible to everyone via direct link
Author: Maltiez
Side: Both
Created: Apr 26th at 5:41 PM
Last modified: May 20th at 4:27 PM
Downloads: 1879
Follow Unfollow 57
Latest file for v1.19.4:
meleeweaponsframework_0.0.15.zip
1-click install
Requires: Animation Manager
For other modders
Would be nice to collaborate on combat related mod. Would be nice to have somebody to test features, to animate player and items, may be even to write some code, or just do research part.
Description:
Beware, this mod is still very early in development, it can be unstable and was not properly tested and polished.
Reworks vanilla swords and spears to use collision based hit detection, changes how shields behave (now they have perfect block mechanic but no passive bonuses, block with LMB instead of sneaking).
Library for adding melee weapons with collision based hit detection and block with perfect block mechanic. On its own just adds this functionality to vanilla shields, spears and swords (optional, can be turned off with config lib). In the future, Spears and Swords mods will use this instead of FSMlib. For details of how to use it, feel free to ping me in official VS discord server.
Library has two already implemented classes for sword-like and spear-like weapons, you need only json to use them. But also, the library provides a powerful tool for implementing your own custom control schemes using its C# API.
Example of implementing vanilla like weapon control scheme: link to github.
Immersive First Person is not supported and will never be.
Supports Config lib.
Features for players:
On its own, this mod reworks vanilla swords, spears and shields. It leaves vanilla animations and balance for weapons, but shields are rebalanced due to having a different mechanic. Due to being early in development, sounds for attacks are missing, will be fixed soon. All these features can be turned off individually using Config lib.
- Collision based hit detection for swords and spears - changes how weapons interact with enemies. Now you have to aim your weapon model when attacking instead of selecting an entity with reticle. Ranged is based on animations and weapon length and not just hardcoded value. Reticle color does not indicate if enemy is in reach anymore.
- Hit multiple enemies with single attack - if while attacking your weapon goes through several enemies, all of them will receive damage
- Block with shield using RMB instead of sneak - now to block with shield you have to hold it in offhand and press Right Mouse Button (or some other button if you remapped it) to block enemy attack. Shield no longer provide passive protection.
- Cant block enemies behind you - now shields can block only attack coming from 240 degrees arc in front of you
- Perfect block - if you press block right before an enemy attack, you will perform a perfect block that will block 100% of the damage, sound of successful perfect block is also different
Features for modders:
- Collision based hit detection instead of vanilla mechanism of selecting entity's selection box. Each weapon can have multiple colliders that will collide with entities and terrain, and you can decide what to do in each case, you will also get point of intersection between collider and entity or terrain collision boxes. You can play sounds, spawn particles, stop attacks, play stagger animations - and all the other stuff.
- Attack direction selector - each weapon can specify a set of direction that can be selected like in Mordhau or For Honor games, it will be passed to your methods that handles attacks, and you can choose what animation to play (in the future directional blocking for players will be added, so it will move pvp closer to mentioned games)
- Block and Perfect Block - adds more traditional blocking system (with also directional block), block set amount of damage, if timed right will block all damage (perfect block), can have different coverage (direction from attacker to attacked is compated with attacked line of sight, and checked against coverage angles of block being used, default is +-120 deg in pitch and yaw)
- Custom control schemes - the library provides a convenient and easy way to implement any control scheme. You can add handlers to any events from EnumEntityAction enum, and action state (like being pressed, active, inactive, released or held).
- Animation Manager lib based animations with more procedural control and entity behavior that manages them and makes sure that player won't stack in animation after death or in any other case of weapon disappearing from player's hands, same goes for stats (like movement speed).
- Synchronization - weapon logic is purely client side and only for the player that runs the client. All the synchronization and validation is done by the library. It makes it much easier to manage more complex weapons.
If you want to support me financially, I made an account on Boosty: boosty.to/maltiez
Feedback: Im on VS version 1.19.5 (Stable) mod version 0.0.12.
I made a Crude shield and tried it out. Normally when you right click to interact with something its instantaneous, however with shield in left hand you have to hold right click until the shield is raised up. When holding a spear, right clicking makes you aim the spear to throw in addition to raising the shield. Of course in most situations you would want one or the other to happen. Lastly raising the shield does not actually block any attacks, at least from drifters, the shield does not even lose durability.
I also tried fighting with a spear. The collision works really well, too well even. Spears are capable of hitting multiple targets(tested on fish) but if there is a block to your right or in front of you on foot level, then using the spear becomes impractical as it will be hitting those blocks.
I see there is a Training sword added to the game but there is no recipe in the handbook. I noticed your last commit just says "stopped". I hope everything is going okay for you, Im sure many are looking forward to this mod as combat rework is something desirable.
can't really aim in first person, but I don't use immersive first person, it also becomes hard if like you haim at their feet and the top half is blocked by a block or your in close quarters like a 1x2 tunnel or on a ladder shaft. situations where aiming in third person is aweful atleast for me.
the issue specifically is it just doesn't do an animation for the spear thrust, and no damage is done, it's quite frustrating to just not be able to melee.
the spear needs more work tbh
based mod
Ifp is not supported, and most probably will never be.
Bullseye not supported yet, throwing is just a vanilla one
This mod has a lot of potential, but i've noticed lots of bugs/inconsistencies that crop up if you use the immersive first person mode. I think since the animations in third person can't be aimed, you can't aim while in first person and it causes a lot of problems with trying to hit anything.
Something else i've noticed, this mod is incompatible with bullseye's different aiming modes, at least for spears, and seems to make throwing weird and inconsistent as a result
This has been great so far, now my weapons feel like there is actual range to em!
I want to like this mod but everything feels really off, even when I try with multiple/different weapons. Maybe when there's some more work done it, it'll feel less weird. 🔍
is the mod compatible with other mods that add more weapon types?
Very interesting, will definitely require some changes to current animations of weapons in order to make it feel right. Shall watch this with great interest!
Wandour
It is a bug, I left some debug imgui tools in Release build, fixed in 0.0.3
could be outdated which is the cause of the crash
but this is the log just incase
Game Version: v1.19.7 (Stable)
4/27/2024 1:51:41 AM: Critical error occurred in the following mod: meleeweaponsframework@0.0.2
Loaded Mods: game@1.19.7, animationmanagerlib@0.7.14, creative@1.19.7, survival@1.19.7, meleeweaponsframework@0.0.2
System.IO.FileNotFoundException: Could not load file or assembly 'VSImGui_DebugTools, Version=0.0.5.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'VSImGui_DebugTools, Version=0.0.5.0, Culture=neutral, PublicKeyToken=null'
at MeleeWeaponsFramework.AttackDirectionController.OnGameTick()
at MeleeWeaponsFramework.MeleeWeaponPlayerBehavior.OnGameTick(Single deltaTime) in D:\Projects\VintageStory\meleeweaponsframework\meleeweaponsframework\source\Integration\EntityBehavior.cs:line 57
at Vintagestory.API.Common.Entities.Entity.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\Entity.cs:line 896
at Vintagestory.API.Common.EntityAgent.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\EntityAgent.cs:line 539
at Vintagestory.API.Common.EntityPlayer.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\EntityPlayer.cs:line 678
at Vintagestory.Client.NoObf.ClientSystemEntities.OnGameTick(Single dt) in VintagestoryLib\Client\Systems\Entities.cs:line 95
at Vintagestory.Common.GameTickListener.OnTriggered(Int64 ellapsedMilliseconds) in VintagestoryLib\Common\Model\GameTickListener.cs:line 27
at Vintagestory.Common.EventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world) in VintagestoryLib\Common\EventManager.cs:line 57
at Vintagestory.Client.NoObf.ClientMain.MainRenderLoop(Single dt) in VintagestoryLib\Client\ClientMain.cs:line 838
at Vintagestory.Client.NoObf.ClientMain.MainGameLoop(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 730
at Vintagestory.Client.GuiScreenRunningGame.RenderToPrimary(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 163
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 676
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 651
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 88
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 324
at Vintagestory.Client.ClientProgram.<>c__DisplayClass9_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 128
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93
wow this might actually revolutionize the game
i see great things to be born from this framework. congratz.