Update FancyHandwork, add BrutalHandwork
This commit is contained in:
@@ -11,4 +11,4 @@
|
||||
<m_Type>STRING</m_Type>
|
||||
<m_StringValue>GridlePan</m_StringValue>
|
||||
</m_Conditions>
|
||||
</animNode>
|
||||
</animNode>
|
||||
|
||||
@@ -11,35 +11,14 @@
|
||||
<m_Type>STRING</m_Type>
|
||||
<m_StringValue>FH_Boop</m_StringValue>
|
||||
</m_Conditions>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01</boneName>
|
||||
<weight>0.00</weight>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_R_Clavicle</boneName>
|
||||
<weight>0.80</weight>
|
||||
<includeDescendants>false</includeDescendants>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_R_UpperArm</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_R_Forearm</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_R_Hand</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_R_Finger0</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_R_Finger0Nub</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_R_Finger1</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_R_Finger1Nub</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_Prop1</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Translation_Data</boneName>
|
||||
<weight>0.4</weight>
|
||||
<weight>0.25</weight>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_Events>
|
||||
<m_EventName>SetVariable</m_EventName>
|
||||
|
||||
@@ -11,35 +11,14 @@
|
||||
<m_Type>STRING</m_Type>
|
||||
<m_StringValue>FH_BoopL</m_StringValue>
|
||||
</m_Conditions>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01</boneName>
|
||||
<weight>0.00</weight>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_L_Clavicle</boneName>
|
||||
<weight>0.80</weight>
|
||||
<includeDescendants>false</includeDescendants>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_L_UpperArm</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_L_Forearm</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_L_Hand</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_L_Finger0</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_L_Finger0Nub</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_L_Finger1</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_L_Finger1Nub</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
<m_SubStateBoneWeights>
|
||||
<boneName>Bip01_Prop2</boneName>
|
||||
</m_SubStateBoneWeights>
|
||||
|
||||
@@ -12,7 +12,7 @@ local function doOverride()
|
||||
|
||||
function ISHotbar:equipItem(item)
|
||||
-- Get Modifier
|
||||
local mod = isFHModKeyDown()
|
||||
local mod = isFHModBindDown(self.chr)
|
||||
local primary = self.chr:getPrimaryHandItem()
|
||||
local secondary = self.chr:getSecondaryHandItem()
|
||||
local equip = true
|
||||
|
||||
@@ -94,18 +94,19 @@ end
|
||||
local _ISAddItemInRecipe_start = ISAddItemInRecipe.start
|
||||
function ISAddItemInRecipe:start()
|
||||
local base = nil
|
||||
|
||||
if luautils.stringStarts(self.baseItem:getType(), "GridlePan") or luautils.stringStarts(self.baseItem:getType(), "GriddlePan") then
|
||||
local baseType = self.baseItem:getType()
|
||||
if string.find(baseType, "GridlePan") or string.find(baseType, "GriddlePan") then
|
||||
base = "GridlePan"
|
||||
elseif luautils.stringStarts(self.baseItem:getType(), "WaterSaucepan") or luautils.stringStarts(self.baseItem:getType(), "Saucepan") then
|
||||
elseif string.find(baseType, "Saucepan") then
|
||||
base = "SaucePan"
|
||||
elseif luautils.stringStarts(self.baseItem:getType(), "WaterPot") or luautils.stringStarts(self.baseItem:getType(), "Pot") then
|
||||
elseif string.find(baseType, "Pot") then
|
||||
base = "CookingPot"
|
||||
elseif luautils.stringStarts(self.baseItem:getType(), "RoastingPan") or luautils.stringStarts(self.baseItem:getType(), "RoastingPan") then
|
||||
elseif string.find(baseType, "RoastingPan") then
|
||||
base = "RoastingPan"
|
||||
else
|
||||
base = self.baseItem:getStaticModel() or "FryingPan"
|
||||
end
|
||||
|
||||
self:setAnimVariable("BaseType", base)
|
||||
self:setActionAnim("AddToPan")
|
||||
self:setOverrideHandModelsString(self.usedItem:getStaticModel(), base)
|
||||
@@ -201,3 +202,36 @@ function ISWearClothing:new(...)
|
||||
|
||||
return o
|
||||
end
|
||||
|
||||
--- DON'T LOOK AT ME! :O
|
||||
---- I'm trying to add some new animations for Transfer Actions, but wasn't able to get this completed before the next update.
|
||||
-- -- Fix for the Transfer action.
|
||||
-- --- Player will now only pick items off the ground when they are on the ground :)
|
||||
-- local _ISInventoryTransferAction_doActionAnim = ISInventoryTransferAction.doActionAnim
|
||||
-- function ISInventoryTransferAction:doActionAnim(cont)
|
||||
-- _ISInventoryTransferAction_doActionAnim(self, cont)
|
||||
-- if self.srcContainer:getType() == "floor" then
|
||||
-- local worldItem = self.item:getWorldItem()
|
||||
-- if worldItem then
|
||||
-- --worldItem:removeFromSquare()
|
||||
-- local anim = (self.item:getActualWeight() <= 1.0 and "FancyLoot") or nil
|
||||
-- local posAnim = (anim and "FH_Hand") or "LootPosition"
|
||||
-- local z = worldItem:getWorldPosZ() - self.character:getZ()
|
||||
-- local position
|
||||
-- if z > 0.1 then
|
||||
-- position = (anim and ((ZombRand(3) == 1 and "left") or "right")) or "Mid"
|
||||
-- elseif z > 0.5 then
|
||||
-- position = "High"
|
||||
-- end
|
||||
-- if position == "left" then
|
||||
-- self.action:setOverrideHandModels(nil, self.item)
|
||||
-- else
|
||||
-- self.action:setOverrideHandModels(self.item, nil)
|
||||
-- end
|
||||
-- if anim then
|
||||
-- self:setActionAnim(anim)
|
||||
-- end
|
||||
-- self:setAnimVariable(posAnim, position)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
@@ -48,7 +48,7 @@ end
|
||||
|
||||
local _ISOvenUITimedAction_perform = ISOvenUITimedAction.perform
|
||||
function ISOvenUITimedAction:perform()
|
||||
ISTimedActionQueue.add(FHBoopAction:new(self.character, { item = self.object, extra = 0 }))
|
||||
ISTimedActionQueue.add(FHBoopAction:new(self.character, { item = self.mcwave or self.stove, extra = 0 }))
|
||||
_ISOvenUITimedAction_perform(self)
|
||||
end
|
||||
|
||||
@@ -110,8 +110,10 @@ function ISInventoryPage:toggleStove()
|
||||
end
|
||||
|
||||
local _ISRadioAction_perform = ISRadioAction.perform
|
||||
|
||||
function ISRadioAction:perform()
|
||||
ISTimedActionQueue.add(FHBoopAction:new(self.character, { item = self.device, extra = 0 }))
|
||||
-- Fix for the infinite error when the device is in your inventory
|
||||
if not (instanceof(self.device, "InventoryItem") and self.device:isInPlayerInventory()) and not self.character:isSeatedInVehicle() then
|
||||
ISTimedActionQueue.add(FHBoopAction:new(self.character, { item = self.device, extra = 0 }))
|
||||
end
|
||||
_ISRadioAction_perform(self)
|
||||
end
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Animation Framework for Project Zomboid
|
||||
---- Code inspired and modifed from "Tsarlib"
|
||||
|
||||
-- next release, this will be removed!
|
||||
|
||||
if not isClient() and not isServer() or AnimationFramework then return end
|
||||
AnimationFramework = true
|
||||
|
||||
|
||||
@@ -14,13 +14,14 @@ local rearObjects = {
|
||||
}
|
||||
|
||||
local function skipInstances(obj)
|
||||
return not obj or rearObjects[obj:getObjectName()]
|
||||
return not obj or rearObjects[obj:getObjectName()] or (obj:getObjectName() == "Thumpable" and obj:isDoor())
|
||||
end
|
||||
|
||||
--character:getModData().FancyHands and not character:getModData().FancyHands.recentMove and (character:getModData().FancyHands.recentMove and not skipInstances(data.item) or true)
|
||||
local function shouldDoTurn(obj, player)
|
||||
if not obj or not player or player:isAiming() or not SandboxVars.FancyHandwork or SandboxVars.FancyHandwork.DisableTurn == 1 then return false end
|
||||
if SandboxVars.FancyHandwork.DisableTurn == 3 then return true end
|
||||
if instanceof(obj, "InventoryItem") and obj:isInPlayerInventory() then return false end -- safeguard
|
||||
if SandboxVars.FancyHandwork.TurnBehavior <= 2 then
|
||||
return (player:getModData().FancyHands and not player:getModData().FancyHands.recentMove)
|
||||
elseif SandboxVars.FancyHandwork.TurnBehavior == 3 then
|
||||
@@ -34,7 +35,6 @@ function FHBoopAction:isValid()
|
||||
return true;
|
||||
end
|
||||
|
||||
-- blech, I really want this, but turning overrides my animation
|
||||
function FHBoopAction:waitToStart()
|
||||
if self.character:isSeatedInVehicle() then
|
||||
-- If we are in a car, we should just stop here actually
|
||||
@@ -48,6 +48,51 @@ function FHBoopAction:waitToStart()
|
||||
return false
|
||||
end
|
||||
|
||||
---Brought to you by ChuckGPT
|
||||
---@param char IsoPlayer|IsoGameCharacter|IsoMovingObject|IsoObject
|
||||
local function getDotSide(char,mouseX,mouseY)
|
||||
|
||||
---@type Vector2
|
||||
local lookVector = char:getLookVector(Vector2.new())
|
||||
local lookVX, lookVY = lookVector:getX(), lookVector:getY()
|
||||
|
||||
local charX, charY, charZ, charNum = char:getX(), char:getY(), char:getZ(), char:getPlayerNum()
|
||||
|
||||
---@type Vector2
|
||||
local charVector = Vector2.new(charX,charY)
|
||||
local charVX, charVY = charVector:getX(), charVector:getY()
|
||||
|
||||
local objX = screenToIsoX(charNum, mouseX, mouseY, charZ)
|
||||
local objY = screenToIsoY(charNum, mouseX, mouseY, charZ)
|
||||
|
||||
---@type Vector2
|
||||
local objVector = Vector2.new(objX-charVX,objY-charVY)
|
||||
objVector:normalize()
|
||||
|
||||
local dot = Vector2.dot(objVector:getX(), objVector:getY(), lookVX, lookVY)
|
||||
|
||||
local front = dot > 0.0
|
||||
|
||||
-- if dot < 0.0 then
|
||||
-- results = false
|
||||
-- else--if (dot < 0.0 and dot < -0.5) then
|
||||
-- results = results.. "BEHIND"
|
||||
-- end
|
||||
|
||||
-- results = results.."|"
|
||||
|
||||
local lcVX, lcVY = charVX + lookVX, charVY + lookVY
|
||||
local dotSide = (objX - charVX) * (lcVY - charVY) - (objY - charVY) * (lcVX - charVX)
|
||||
local left = dotSide > 0.0
|
||||
-- if dotSide > 0.0 then
|
||||
-- results = results.. "LEFT"
|
||||
-- else
|
||||
-- results = results.. "RIGHT"
|
||||
-- end
|
||||
|
||||
return front, left
|
||||
end
|
||||
|
||||
function FHBoopAction:isInRearRange()
|
||||
-- This game is weird man
|
||||
---- I tried to get the angle between the player and the object but its fucking inconsistent because large numbers, AND fucking light switches
|
||||
@@ -133,7 +178,7 @@ function FHBoopAction:start()
|
||||
self:doThing((((primary and secondary) and not self.character:isAiming() and primary ~= secondary) and 0) or 1)
|
||||
else
|
||||
self:doThing((not secondary and 0) or 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
--self.character
|
||||
-- set this here again to undo any moodles and such
|
||||
|
||||
0
FancyHandwork/Contents/mods/FancyHandwork/media/lua/shared/Translate/TH/UI_TH.txt
Normal file → Executable file
0
FancyHandwork/Contents/mods/FancyHandwork/media/lua/shared/Translate/TH/UI_TH.txt
Normal file → Executable file
@@ -26,6 +26,19 @@ FancyHands.special = {
|
||||
["Base.CorpseFemale"] = "holdingbody"
|
||||
}
|
||||
|
||||
-- Use the animations from this mod instead!
|
||||
if getActivatedMods():contains('Skizots Visible Boxes and Garbage2') then
|
||||
FancyHands.special = {}
|
||||
end
|
||||
|
||||
-- We will begin to store compatibility objects here
|
||||
FancyHands.compat = {}
|
||||
-- if getActivatedMods():contains('Amputation2') then -- now included in TOC!
|
||||
-- FancyHands.compat.TOC = require('compat/FH_TOC')
|
||||
-- end
|
||||
if getActivatedMods():contains('BrutalHandwork') then
|
||||
FancyHands.compat.brutal = true
|
||||
end
|
||||
------------------------------------------
|
||||
-- Fancy Handwork Utilities
|
||||
------------------------------------------
|
||||
@@ -34,6 +47,10 @@ function isFHModKeyDown()
|
||||
return isKeyDown(getCore():getKey('FHModifier'))
|
||||
end
|
||||
|
||||
function isFHModBindDown(player)
|
||||
return isFHModKeyDown() or (player and player:isLBPressed())
|
||||
end
|
||||
|
||||
local FHswapItems = function(character)
|
||||
local primary = character:getPrimaryHandItem()
|
||||
local secondary = character:getSecondaryHandItem()
|
||||
@@ -160,6 +177,16 @@ local function fancy(player)
|
||||
return
|
||||
end
|
||||
end
|
||||
if FancyHands.compat.brutal then
|
||||
local equipped = instanceof(primary, "HandWeapon") and primary:getCategories():contains("Unarmed")
|
||||
-- we already established that primary and secondary are the same, so if primary is nil then so is secondary
|
||||
-- or, this is a 2h fist weapon and therefore we should still get ready to punch
|
||||
if (not primary and player:isAiming() and (SandboxVars.BrutalHandwork.EnableUnarmed and (SandboxVars.BrutalHandwork.AlwaysUnarmed or isFHModBindDown(player)))) or equipped then
|
||||
player:clearVariable("LeftHandMask")
|
||||
player:setVariable("RightHandMask", "bhunarmedaim")
|
||||
return
|
||||
end
|
||||
end
|
||||
player:clearVariable("LeftHandMask")
|
||||
player:clearVariable("RightHandMask")
|
||||
return
|
||||
|
||||
@@ -24,13 +24,13 @@ description=[*] [b]NEW:[/b] Wrench Repair Animation!
|
||||
description=[/list]
|
||||
description=
|
||||
description=[h2]Updates[/h2]
|
||||
description=Important information is updated on this page, but full information and release notes are available in the Discussions. Please see the latest:
|
||||
description=Important information is updated on this page, but full information and release notes are available in the Discussions. Please see the latest: [url=https://steamcommunity.com/workshop/filedetails/discussion/2904920097/3762228679801751286/]Fancy Handwork - "It's Over 9,000!" Update[/url]
|
||||
description=
|
||||
description=[h2]IMPORTANT[/h2]
|
||||
description=If you receive an error about missing actions, or world interactions are simply not playing, you may need to restart Project Zomboid. I have noticed that enabling this mod on an already-existing save and starting the game will result in the animations not being loaded until the game is restarted. This is a [b]BASE GAME[/b] issue!
|
||||
description=If you receive an error about missing actions, or world interactions are simply not playing, you may need to restart Project Zomboid. I have noticed that enabling this mod for the first time on an already-existing save and starting the game will result in the new animations not being loaded until the game is restarted. This is a [b]BASE GAME[/b] issue, but should only happen the first time.
|
||||
description=
|
||||
description=If you receive an error following any update, please see: [url=https://theindiestone.com/forums/index.php?/topic/42925-how-to-fix-updated-mods-in-build-41-multiplayer/]How to fix updated mods in Build 41 Multiplayer[/url]
|
||||
description=This mod adds many additional animation and action files, which may change between releases. I try to minimize this, but sometimes it is necessary. Unfortunately, Steam sometimes doesn't like to update these correctly.
|
||||
description=This mod adds many additional animation and action files, which may change between releases. I try to minimize this, but sometimes it is necessary. Unfortunately, Steam sometimes doesn't like to update these correctly resulting in errors.
|
||||
description=
|
||||
description=[h2]Usage[/h2]
|
||||
description=When Attaching or Detaching an item on your Hotbar, you have a chance for the action to automatically be done with your left hand.
|
||||
@@ -42,18 +42,17 @@ description=When you press the Modifier Key and a Hotbar slot, the item slotted
|
||||
description=
|
||||
description=Pressing the Modifier and "E" will swap the items in your hands. (Configurable)
|
||||
description=
|
||||
description=Interacting with the world normally, such as opening and closing doors and curtains,flicking light switches, and more, all now have an Animation!
|
||||
description=Interacting with the world normally, such as opening and closing doors and curtains, flicking light switches, and more, all now have an Animation!
|
||||
description=
|
||||
description=Almost ALL TimedActions now have an Animation! No longer will your character just stand there, waiting for a progress bar to fill up!
|
||||
description=
|
||||
description=[h3]Notes about World Interactions[/h3]
|
||||
description=If you are standing still you will turn and face the object you are interacting with if you are not already doing so. There is a Sandbox setting to control how long of a delay before you character is standing still.
|
||||
description=[b]NOTE:[/b] This is based on your selected Render Framerate. As such, you may need to change this according to your current framerate. A value of 60 is about 1 second at 60 FPS. I will update this at some point.
|
||||
description=If you are standing still you will turn and face the object you are interacting with if you are not already doing so. There is a Sandbox setting to control how long of a delay before you character is standing still, or the forced turn can be disabled or required.
|
||||
description=
|
||||
description=When performing a World Interaction and moving your character will slow down slightly, and stop altogether in the case of opening a Garage Door, for a very brief moment. I have no plans on this being a configurable option, and this is done intentionally. It is a fantastic inclusion for immersion in my opinion, and in tight situations makes planning your movement all the more important. After time, you will hardly notice it.
|
||||
description=[b]NEW 01/19/2023[/b] - The speed reduction has been reduced from 50% to 25%. This should help prevent the player from being trapped, while still being a nice addition to immersion.
|
||||
description=
|
||||
description=[h2]Multiplayer[/h2]
|
||||
description=[b]NEW 01/07/2023 [/b] - New Animation Sync method is now being used!
|
||||
description=Animations should sync across multiplayer with little to no issues!
|
||||
description=
|
||||
description=[h2]Controllers[/h2]
|
||||
@@ -70,6 +69,5 @@ description=[url=https://steamcommunity.com/sharedfiles/filedetails/?id=28097195
|
||||
description=[url=https://steamcommunity.com/sharedfiles/filedetails/?id=2651128766]Body Remodel - FINGERS.[/url] by Akyet
|
||||
description=
|
||||
description=Source: [url=https://github.com/hlfstr/pz-mods]GitHub[/url]
|
||||
description=
|
||||
tags=Build 41;Realistic;Silly/Fun
|
||||
visibility=public
|
||||
|
||||
Reference in New Issue
Block a user