Added New Mods and Profiles Folders

This is a complete rebuild of the modpack, with all new mods and updates for 1.5.3 of Anomaly.
This commit is contained in:
2025-01-14 05:07:53 -05:00
parent 85c665b107
commit 376b4b9689
21217 changed files with 546254 additions and 0 deletions
@@ -0,0 +1,4 @@
[item_anm_ledge_grabbing]
hands_position = 0, 0.00, -0.1
hands_position_16x9 = 0, 0.00, -0.1
anm_climb = climbing_in
@@ -0,0 +1,131 @@
<!--
Ledge Grabbing
Generated with AnomalyModCreator
-->
<?xml version="1.0" encoding="windows-1251"?>
<!--
MCM
-->
<string_table>
<string id="ui_mcm_ledge_grabbing_title">
<text>Ledge Grabbing</text>
</string>
<string id="ui_mcm_menu_demonized_ledge_grabbing">
<text>Ledge Grabbing</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_enable">
<text>Enable</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_alternativeClimbDetection">
<text>Alternative Climb Detection</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_alternativeClimbDetection_desc">
<text>Alternative method will raycast to ledges closer to players crosshair. Standard method will raycast from fixed height</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_playerWidthCheck">
<text>Player Bounds Check</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_playerWidthCheck_desc">
<text>If enabled, will perform additional raycast to see if player fits on the ledge. Might limit possible ledges to climb</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_unstuckCheck">
<text>Stuck Check</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_unstuckCheck_desc">
<text>If enabled, will try to unstuck the player if ledge grabbing failed to perform correctly</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_hardcoreMode">
<text>Hardcore Mode</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_hardcoreMode_desc">
<text>When enabled, adds additional restrictions for climbing: \n 1. No climbing when player's weight is more than 90kg \n 2. No climbing when player's health is less than 60% \n 3. Increases stamina usage</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_BHSMode">
<text>BHS Integration</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_BHSMode_desc">
<text>When enabled, if you use Body Health System and one of player's arms is broken, it won't be possible to climb</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_throttleCheck">
<text>Ledge Climbing Check Delay</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_throttleCheck_desc">
<text>Time between checks in ms. Increase to improve performance at the cost of accuracy</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_climbTriggerDistance">
<text>Trigger Distance</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_climbTriggerDistance_desc">
<text>Max distance to initiate ledge grabbing</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_raySteps">
<text>Ledge Grabbing Accuracy</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_raySteps_desc">
<text>Bigger number - better detection and position for grabbing at the cost of slight performance hit</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_jumpTriggerTime">
<text>Time to Hold Key To Trigger</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_jumpTriggerTime_desc">
<text>If you hold for more than this time, the ledge grabbing will be activated</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_soundVolume">
<text>Sound Volume</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_gruntVolume">
<text>Grunts Volume</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_gruntProbability">
<text>Grunts Probability</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_staminaDrain">
<text>Stamina Drain</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_inputMethod">
<text>Input Method</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_keybind">
<text>Keybind</text>
</string>
<string id="ui_mcm_lst_demonized_ledge_grabbing_inputMethod_jumpHold">
<text>Hold Key</text>
</string>
<string id="ui_mcm_lst_demonized_ledge_grabbing_inputMethod_buttonPress">
<text>Button Press</text>
</string>
<string id="ui_mcm_lst_demonized_ledge_grabbing_inputMethod_both">
<text>Both</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_animationRandomization">
<text>Animation Randomization</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_animationRandomization_desc">
<text>Randomizes camera movement</text>
</string>
</string_table>
@@ -0,0 +1,132 @@
<!--
Ledge Grabbing
Generated with AnomalyModCreator
-->
<?xml version="1.0" encoding="windows-1251"?>
<!--
MCM
-->
<string_table>
<string id="ui_mcm_ledge_grabbing_title">
<text>Ledge Grabbing</text>
</string>
<string id="ui_mcm_menu_demonized_ledge_grabbing">
<text>Ledge Grabbing</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_enable">
<text>Âêëþ÷èòü</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_alternativeClimbDetection">
<text>Àëüòåðíàòèâíûé ìåòîä îáíàðóæåíèÿ</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_alternativeClimbDetection_desc">
<text>Ïðè àëüòåðíàòèâíîì ìåòîäå ëó÷ áóäåò ïàäàòü íà óñòóïû, ðàñïîëîæåííûå áëèæå ê ïðèöåëó èãðîêà. Ïðè ñòàíäàðòíîì ìåòîäå ëó÷ áóäåò ïàäàòü ñ ôèêñèðîâàííîé âûñîòû</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_playerWidthCheck">
<text>Ïðîâåðêà ãðàíèö èãðîêà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_playerWidthCheck_desc">
<text>Åñëè ýòà îïöèÿ âêëþ÷åíà, òî âûïîëíèòñÿ äîïîëíèòåëüíûé ðýéêàñò, ÷òîáû ïðîâåðèòü, ïîìåñòèòñÿ ëè èãðîê íà óñòóïå. Ýòî ìîæåò îãðàíè÷èòü âîçìîæíûå óñòóïû äëÿ ïîäúåìà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_unstuckCheck">
<text>Ïðîâåðêà çàñòðåâàíèÿ èãðîêà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_unstuckCheck_desc">
<text>Åñëè âêëþ÷åíî, òî ñêðèïò ïîïûòàåòñÿ ïåðåäâèíóòü èãðîêà, åñëè çàõâàò óñòóïà íå áûë âûïîëíåí ïðàâèëüíî</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_hardcoreMode">
<text>Õàðäêîðíûé ðåæèì</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_hardcoreMode_desc">
<text>Ïðè âêëþ÷åíèè äîáàâëÿåò äîïîëíèòåëüíûå îãðàíè÷åíèÿ: \n 1. Çàïðåùåíî ïîäíèìàòüñÿ, åñëè âåñ èãðîêà ïðåâûøàåò 90 êã.\n 2. Çàïðåùåíî ïîäíèìàòüñÿ, åñëè çäîðîâüå èãðîêà ìåíåå 60% \n 3. Óâåëè÷èâàåò ðàñõîä âûíîñëèâîñòè</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_BHSMode">
<text>BHS èíòåãðàöèÿ</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_BHSMode_desc">
<text>Åñëè âêëþ÷èòü ýòó ôóíêöèþ, òî ïðè èñïîëüçîâàíèè Body Health System è ïåðåëîìå îäíîé èç ðóê èãðîêà, ïîäúåì áóäåò íåâîçìîæåí</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_throttleCheck">
<text>Çàäåðæêà ïðîâåðêè óñòóïîâ</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_throttleCheck_desc">
<text>Âðåìÿ ìåæäó ïðîâåðêàìè â ìñ. Óâåëè÷üòå äëÿ ïîâûøåíèÿ ïðîèçâîäèòåëüíîñòè çà ñ÷åò ñíèæåíèÿ òî÷íîñòè</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_climbTriggerDistance">
<text>Ðàññòîÿíèå ñðàáàòûâàíèÿ</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_climbTriggerDistance_desc">
<text>Ìàêñèìàëüíîå ðàññòîÿíèå äëÿ èíèöèèðîâàíèÿ çàõâàòà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_raySteps">
<text>Òî÷íîñòü çàõâàòà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_raySteps_desc">
<text>Áîëüøåå ÷èñëî - ëó÷øåå îáíàðóæåíèå è ïîçèöèÿ äëÿ çàõâàòà ñ íåáîëüøèì øòðàôîì ê ïðîèçâîäèòåëüíîñòè</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_jumpTriggerTime">
<text>Âðåìÿ óäåðæàíèÿ êëàâèøè äëÿ ñðàáàòûâàíèÿ</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_jumpTriggerTime_desc">
<text>Åñëè óäåðæèâàòü êëàâèøó äîëüøå óêàçàííîãî âðåìåíè, áóäåò àêòèâèðîâàí çàõâàò óñòóïà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_soundVolume">
<text>Ãðîìêîñòü çâóêîâ ðàçãðóçêè</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_gruntVolume">
<text>Ãðîìêîñòü çâóêîâ ïåðñîíàæà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_gruntProbability">
<text>Âåðîÿòíîñòü çâóêîâ ïåðñîíàæà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_staminaDrain">
<text>Ðàñõîä ñòàìèíû</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_inputMethod">
<text>Ìåòîä ââîäà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_keybind">
<text>Êëàâèøà</text>
</string>
<string id="ui_mcm_lst_demonized_ledge_grabbing_inputMethod_jumpHold">
<text>Óäåðæàíèå êëàâèøè</text>
</string>
<string id="ui_mcm_lst_demonized_ledge_grabbing_inputMethod_buttonPress">
<text>Íàæàòèå êíîïêè</text>
</string>
<string id="ui_mcm_lst_demonized_ledge_grabbing_inputMethod_both">
<text>Îáà ìåòîäà</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_animationRandomization">
<text>Ðàíäîìèçàöèÿ àíèìàöèè</text>
</string>
<string id="ui_mcm_demonized_ledge_grabbing_animationRandomization_desc">
<text>Ðàíäîìèçèðóåò äâèæåíèå êàìåðû</text>
</string>
</string_table>
@@ -0,0 +1,386 @@
local enable_debug = false
local print_tip = function(s, ...)
local f = print_tip or printf
if enable_debug then
return f("Geometry Ray: " .. s, ...)
end
end
local function throttle(func, tg_throttle)
local tg = 0
if not tg_throttle or tg_throttle == 0 then
return function(...)
local t = time_global()
if t ~= tg then
tg = t
return func(...)
end
end
else
return function(...)
local t = time_global()
if t < tg then return end
tg = t + tg_throttle
return func(...)
end
end
end
-- Check for material (engine edit required)
function lshift(x, by)
return x * 2 ^ by
end
function test(x, mask)
return bit_and(x, mask) == mask
end
local flags_test = {
["flBreakable"] = lshift(1, 0),
["flBounceable"] = lshift(1, 2),
["flSkidmark"] = lshift(1, 3),
["flBloodmark"] = lshift(1, 4),
["flClimable"] = lshift(1, 5),
["flPassable"] = lshift(1, 7),
["flDynamic"] = lshift(1, 8),
["flLiquid"] = lshift(1, 9),
["flSuppressShadows"] = lshift(1, 10),
["flSuppressWallmarks"] = lshift(1, 11),
["flActorObstacle"] = lshift(1, 12),
["flNoRicoshet"] = lshift(1, 13),
["flInjurious"] = lshift(1, 28),
["flShootable"] = lshift(1, 29),
["flTransparent"] = lshift(1, 30),
["flSlowDown"] = lshift(1, 31),
}
--[[
// material exports
.def_readonly( "material_name" , &script_rq_result::pMaterialName )
.def_readonly( "material_flags" , &script_rq_result::pMaterialFlags )
.def_readonly( "material_phfriction" , &script_rq_result::fPHFriction )
.def_readonly( "material_phdamping" , &script_rq_result::fPHDamping )
.def_readonly( "material_phspring" , &script_rq_result::fPHSpring )
.def_readonly( "material_phbounce_start_velocity" , &script_rq_result::fPHBounceStartVelocity )
.def_readonly( "material_phbouncing" , &script_rq_result::fPHBouncing )
.def_readonly( "material_flotation_factor" , &script_rq_result::fFlotationFactor )
.def_readonly( "material_shoot_factor" , &script_rq_result::fShootFactor )
.def_readonly( "material_shoot_factor_mp" , &script_rq_result::fShootFactorMP )
.def_readonly( "material_bounce_damage_factor" , &script_rq_result::fBounceDamageFactor )
.def_readonly( "material_injurious_speed" , &script_rq_result::fInjuriousSpeed )
.def_readonly( "material_vis_transparency_factor" , &script_rq_result::fVisTransparencyFactor )
.def_readonly( "material_snd_occlusion_factor" , &script_rq_result::fSndOcclusionFactor )
.def_readonly( "material_density_factor" , &script_rq_result::fDensityFactor )
]]
-- Geometry Ray class by Thial, edited by demonized
class "geometry_ray"
--[[
(At least one range parameter should be specified)
ray_range:
Defines the total range of the ray. If you want to attach the ray to
a fast moving object it is good to extend the ray so that you can reduce
the polling rate by using the get function.
contact_range:
Defines the distance at which the result will report being in contact.
You can skip it or set it to a value lower than the ray_range to
still be able to get the intersection position from the result while
marking the ray as not being in contact yet
distance_offset:
Defines how much the intersection position is offset.
You can use both positive and negative values or you can leave it blank.
flags (bit map = values can be added together for combined effect):
0 : None
1 : Objects
2 : Statics
4 : Shapes
8 : Obstacles
]]--
function geometry_ray:__init(args)
local args = args or {}
if args.ray_range == nil and args.contact_range == nil then
return nil
end
self.ray_range = args.ray_range or args.contact_range
self.contact_range = args.contact_range or args.ray_range
self.distance_offset = args.distance_offset ~= nil and args.distance_offset or 0
self.ray = ray_pick()
self.ray:set_flags(args.flags or 2)
self.ray:set_range(self.ray_range)
self.visualize = args.visualize
self.visualize_end_pos_only = args.visualize_end_pos_only
if args.ignore_object then
self.ray:set_ignore_object(args.ignore_object)
end
end
--[[
position:
position from which the ray will start
direction:
direction in which the ray will be fired
]]--
function geometry_ray:get(position, direction)
if position == nil or direction == nil then
return nil
end
local position = vector():set(position)
local direction = vector():set(direction)
self.ray:set_position(position)
self.ray:set_direction(direction)
local res = self.ray:query()
local distance = res and self.ray:get_distance() or self.ray_range
local result = {}
if self.visualize then
local init_pos = vector():set(position)
local end_pos = vector():mad(init_pos, direction, distance)
VisualizeRay(init_pos, end_pos, nil, nil, nil, self.visualize_end_pos_only)
end
result.in_contact = distance <= self.contact_range
result.position = position:add(direction:mul(distance + self.distance_offset))
result.distance = distance
result.raw_distance = self.ray:get_distance()
result.success = res
result.object = self.ray:get_object()
result.element = self.ray:get_element()
result.result = self.ray:get_result()
-- Cast to Lua table
-- if result.result then
-- local r = {}
-- r.material_name = result.result.material_name
-- r.material_flags = result.result.material_flags
-- r.material_phfriction = result.result.material_phfriction
-- r.material_phdamping = result.result.material_phdamping
-- r.material_phspring = result.result.material_phspring
-- r.material_phbounce_start_velocity = result.result.material_phbounce_start_velocity
-- r.material_phbouncing = result.result.material_phbouncing
-- r.material_flotation_factor = result.result.material_flotation_factor
-- r.material_shoot_factor = result.result.material_shoot_factor
-- r.material_shoot_factor_mp = result.result.material_shoot_factor_mp
-- r.material_bounce_damage_factor = result.result.material_bounce_damage_factor
-- r.material_injurious_speed = result.result.material_injurious_speed
-- r.material_vis_transparency_factor = result.result.material_vis_transparency_factor
-- r.material_snd_occlusion_factor = result.result.material_snd_occlusion_factor
-- r.material_density_factor = result.result.material_density_factor
-- result.result = r
-- end
return result
end
-- Engine edit required for testing materials
-- If not possible to get material - return nil
function geometry_ray:isMaterialFlag(flag)
local result = self.ray:get_result()
if not result then
return
end
if not result.material_flags then
return
end
if not flags_test[flag] then
return
end
return test(result.material_flags, flags_test[flag])
end
function geometry_ray:getMaterialFlags()
local result = self.ray:get_result()
if not result then
return
end
if not result.material_flags then
return
end
local res = {}
for k, v in pairs(flags_test) do
res[k] = test(result.material_flags, v)
end
return res
end
-- Utils
-- Check if values are similar to a precision
function similar(float1, float2, epsilon)
return math.abs(float1 - float2) <= (epsilon or 0.0001)
end
function vec_similar(vec1, vec2, epsilon)
return similar(vec1.x, vec2.x, epsilon) and similar(vec1.y, vec2.y, epsilon) and similar(vec1.z, vec2.z, epsilon)
end
-- Linear inter/extrapolation
function lerp(a, b, f)
if a and b and f then
return a + f * (b - a)
else
return a or b or 0
end
end
-- Visualize ray from one point to other with particles playing at setted step
class "VisualizeRay"
local lineId = 70000
function VisualizeRay:__init(init_pos, end_pos, particle_step, visualize_time, force_stop, draw_end_only, color)
self.init_pos = init_pos
self.end_pos = end_pos
self.visualize_time = visualize_time or 3000
self.particle_step = particle_step or 0.02
self.force_stop = force_stop
self.force_stop_default = force_stop
self.time = 0
self.draw_end_only = draw_end_only
self.color = color or fcolor():set(0,1,0,1)
self.start = function()
lineId = lineId + 1
local id = lineId
local line = debug_render.add_object(id, DBG_ScriptObject.line):cast_dbg_line()
line.point_a = init_pos
line.point_b = end_pos
line.visible = true
line.color = self.color
CreateTimeEvent("geometry_ray_stop", id, self.visualize_time / 1000, function()
debug_render.remove_object(id)
lineId = lineId - 1
return true
end)
end
self.start()
self.reset_time = function()
self.time = 0
end
self.reset = function()
self.time = 0
self.force_stop = self.force_stop_default
self.start()
end
self.stop = function()
self.time = self.visualize_time + 1
self.force_stop = true
end
end
local EPS = 0.0000100
local function fsimilar(value, to, eps)
return math.abs(value - to) < eps
end
local function generate_orthonormal_basis_normalized(d)
local dir = vector():set(d):normalize()
local up = vector():set(0,0,0)
local right = vector():set(0,0,0)
local fInvLength
if (fsimilar(dir.y, 1.0, EPS)) then
up:set(0, 0, 1)
fInvLength = 1 / math.sqrt(dir.x * dir.x + dir.y * dir.y)
right.x = -dir.y * fInvLength
right.y = dir.x * fInvLength
right.z = 0
up.x = -dir.z * right.y
up.y = dir.z * right.x
up.z = dir.x * right.y - dir.y * right.x
else
up:set(0, 1, 0)
fInvLength = 1 / math.sqrt(dir.x * dir.x + dir.z * dir.z)
right.x = dir.z * fInvLength
right.y = 0
right.z = -dir.x * fInvLength
up.x = dir.y * right.z
up.y = dir.z * right.x - dir.x * right.z
up.z = -dir.y * right.x
end
return dir, up, right
end
-- Get surface normals by Aoldri, edited by demonized
function get_surface_normal(pos, dir, ray_props, visualize_props, initial_ray)
local function get_geometry_ray()
return geometry_ray({
ray_range = ray_props and ray_props.ray_range or 1000,
visualize = ray_props and ray_props.visualize,
flags = ray_props and ray_props.flags or (1+2),
ignore_object = db.actor,
})
end
-- Get player's camera position and direction in world space
local pos0 = pos and vector():set(pos) or device().cam_pos
local angle1 = dir and vector():set(dir) or device().cam_dir
-- Generate two positions orthogonal to camera direction and each other
local angle1, pos01, pos02 = generate_orthonormal_basis_normalized(angle1)
pos01 = pos01:mul(0.01)
pos02 = pos02:mul(0.01)
pos01 = pos01:add(pos0)
pos02 = pos02:add(pos0)
-- Get positions of intersections of rays around pos0
local pos1
local res
if initial_ray then
pos1 = initial_ray.position
res = initial_ray
else
local ray = get_geometry_ray()
res = ray:get(pos0, angle1)
pos1 = res.position
end
local ray = get_geometry_ray()
local pos2 = ray:get(pos01, angle1).position
local ray = get_geometry_ray()
local pos3 = ray:get(pos02, angle1).position
if not res.success then
-- print_tip("cant get normal by pos %s, dir %s", pos0, angle1)
return
end
-- VisualizeRay(pos0, pos1, nil, 300)
-- VisualizeRay(pos01, pos2, nil, 300)
-- VisualizeRay(pos02, pos3, nil, 300)
-- Get vectors from intersection points from pos1
local vec2 = vec_sub(pos1, pos2)
local vec3 = vec_sub(pos1, pos3)
-- Find normal vector of surface by taking cross product of intersection vectors
local cross = (vector_cross(vec2, vec3)):normalize()
-- If the direction and normal vectors heading in similar direction - invert normal
local deg = angle1:dotproduct(cross)
if deg > 0 then
cross:invert()
end
cross.x = clamp(cross.x, -1, 1)
cross.y = clamp(cross.y, -1, 1)
cross.z = clamp(cross.z, -1, 1)
if visualize_props then
local time = visualize_props.visualize_time or 300
local color = visualize_props.color or fcolor():set(0,1,0,1)
VisualizeRay(pos1, vector():set(pos1):add(cross), nil, time, nil, nil, color)
end
return cross
end
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,99 @@
-- Exported from blender
-- curves contain camera transform during animation time
-- each time as a key corresponds to different bezier curve segments
-- the points for each time are bezier curve control points
data = {
animationFrameLength = 86,
originalFps = 60,
calculatedTime = 1.4333333333333333,
-- Below is the data to modify manually
-- Modifier to camera rotations
rotationModifier = 0.5,
-- Frame starting from prebaked animation will be used fully
animInFrame = 26,
-- Frame from which prebaked animation will blend out to procedural animation
animOutFrame = 50,
-- Speed of animation
animationSpeed = 0.8,
-- Speed of hands animation, affected by overall animationSpeed
hudMotionSpeed = 0.78,
-- Frame to play grunt sound
gruntSoundFrame = 26,
-- Generated curves, touch with care
curves = {
locationX = {
[0.0] = { vector():set(0.0, 0.0, 0), vector():set(2.0, 0.0, 0), vector():set(4.0, 0.0, 0), vector():set(6.0, 0.0, 0), },
[0.1] = { vector():set(6.0, 0.0, 0), vector():set(9.666666984558105, 0.0, 0), vector():set(13.333333015441895, 0.011126836761832237, 0), vector():set(17.0, 0.011126836761832237, 0), },
[0.2833333333333333] = { vector():set(17.0, 0.011126836761832237, 0), vector():set(18.66666603088379, 0.011126836761832237, 0), vector():set(20.33333396911621, -0.01212255284190178, 0), vector():set(22.0, -0.01212255284190178, 0), },
[0.36666666666666664] = { vector():set(22.0, -0.01212255284190178, 0), vector():set(26.0, -0.01212255284190178, 0), vector():set(30.0, -0.01212255284190178, 0), vector():set(34.0, -0.01212255284190178, 0), },
[0.5666666666666667] = { vector():set(34.0, -0.01212255284190178, 0), vector():set(36.66666793823242, -0.01212255284190178, 0), vector():set(39.33333206176758, -0.01212255284190178, 0), vector():set(42.0, -0.01212255284190178, 0), },
[0.7] = { vector():set(42.0, -0.01212255284190178, 0), vector():set(50.66666793823242, -0.01212255284190178, 0), vector():set(59.33333206176758, -0.012122555635869503, 0), vector():set(68.0, -0.012122555635869503, 0), },
[1.1333333333333333] = { vector():set(68.0, -0.012122555635869503, 0), vector():set(71.66666412353516, -0.012122555635869503, 0), vector():set(75.33333587646484, -0.012122555635869503, 0), vector():set(79.0, -0.012122555635869503, 0), },
[1.3166666666666667] = { vector():set(79.0, -0.012122555635869503, 0), vector():set(86, -0.012122555635869503, 0), vector():set(86, -0.012122555635869503, 0), vector():set(86, -0.012122555635869503, 0), },
[1.4333333333333333] = { vector():set(86, -0.012122555635869503, 0), vector():set(86, -0.012122555635869503, 0), vector():set(86, -0.012122555635869503, 0), vector():set(86, -0.012122555635869503, 0), },
},
locationZ = {
[0.0] = { vector():set(0.0, 0.0, 0), vector():set(2.0, 0.0, 0), vector():set(4.0, 0.033661890774965286, 0), vector():set(6.0, 0.033661890774965286, 0), },
[0.1] = { vector():set(6.0, 0.033661890774965286, 0), vector():set(9.666666984558105, 0.033661890774965286, 0), vector():set(13.333333015441895, 0.02143045887351036, 0), vector():set(17.0, 0.02143045887351036, 0), },
[0.2833333333333333] = { vector():set(17.0, 0.02143045887351036, 0), vector():set(18.66666603088379, 0.02143045887351036, 0), vector():set(20.333871841430664, 0.00649232417345047, 0), vector():set(22.0, 0.05037614330649376, 0), },
[0.36666666666666664] = { vector():set(22.0, 0.05037614330649376, 0), vector():set(23.040868759155273, 0.07779137790203094, 0), vector():set(30.0, 0.06819208711385727, 0), vector():set(34.0, 0.08440159261226654, 0), },
[0.5666666666666667] = { vector():set(34.0, 0.08440159261226654, 0), vector():set(36.66666793823242, 0.09520792961120605, 0), vector():set(39.33333206176758, 0.12281441688537598, 0), vector():set(42.0, 0.14733117818832397, 0), },
[0.7] = { vector():set(42.0, 0.14733117818832397, 0), vector():set(45.66666793823242, 0.18104171752929688, 0), vector():set(49.33333206176758, 0.2089107483625412, 0), vector():set(53.0, 0.2089107483625412, 0), },
[0.8833333333333333] = { vector():set(53.0, 0.2089107483625412, 0), vector():set(58.0, 0.2089107483625412, 0), vector():set(63.0, 0.14733117818832397, 0), vector():set(68.0, 0.14733117818832397, 0), },
[1.1333333333333333] = { vector():set(68.0, 0.14733117818832397, 0), vector():set(71.66666412353516, 0.14733117818832397, 0), vector():set(75.33343505859375, 0.12055190652608871, 0), vector():set(79.0, 0.14733117818832397, 0), },
[1.3166666666666667] = { vector():set(79.0, 0.14733117818832397, 0), vector():set(86, 0.14733117818832397, 0), vector():set(86, 0.14733117818832397, 0), vector():set(86, 0.14733117818832397, 0), },
[1.4333333333333333] = { vector():set(86, 0.14733117818832397, 0), vector():set(86, 0.14733117818832397, 0), vector():set(86, 0.14733117818832397, 0), vector():set(86, 0.14733117818832397, 0), },
},
locationY = {
[0.0] = { vector():set(0.0, 0.0, 0), vector():set(2.0, 0.0, 0), vector():set(4.0, 0.0369611494243145, 0), vector():set(6.0, 0.08185408264398575, 0), },
[0.1] = { vector():set(6.0, 0.08185408264398575, 0), vector():set(9.666666984558105, 0.16415779292583466, 0), vector():set(13.333333015441895, 0.2731211185455322, 0), vector():set(17.0, 0.3421160876750946, 0), },
[0.2833333333333333] = { vector():set(17.0, 0.3421160876750946, 0), vector():set(18.66666603088379, 0.37347742915153503, 0), vector():set(20.33333396911621, 0.39658087491989136, 0), vector():set(22.0, 0.39658087491989136, 0), },
[0.36666666666666664] = { vector():set(22.0, 0.39658087491989136, 0), vector():set(26.0, 0.39658087491989136, 0), vector():set(30.0, 0.39658087491989136, 0), vector():set(34.0, 0.39658087491989136, 0), },
[0.5666666666666667] = { vector():set(34.0, 0.39658087491989136, 0), vector():set(36.66666793823242, 0.39658087491989136, 0), vector():set(39.33333206176758, 0.39722296595573425, 0), vector():set(42.0, 0.41794008016586304, 0), },
[0.7] = { vector():set(42.0, 0.41794008016586304, 0), vector():set(50.66666793823242, 0.4852706789970398, 0), vector():set(59.33333206176758, 0.7646434307098389, 0), vector():set(68.0, 0.7646434307098389, 0), },
[1.1333333333333333] = { vector():set(68.0, 0.7646434307098389, 0), vector():set(71.66666412353516, 0.7646434307098389, 0), vector():set(75.33333587646484, 0.7646434307098389, 0), vector():set(79.0, 0.7646434307098389, 0), },
[1.3166666666666667] = { vector():set(79.0, 0.7646434307098389, 0), vector():set(86, 0.7646434307098389, 0), vector():set(86, 0.7646434307098389, 0), vector():set(86, 0.7646434307098389, 0), },
[1.4333333333333333] = { vector():set(86, 0.7646434307098389, 0), vector():set(86, 0.7646434307098389, 0), vector():set(86, 0.7646434307098389, 0), vector():set(86, 0.7646434307098389, 0), },
},
rotation_eulerY = {
[0.0] = { vector():set(0.0, 0.0, 0), vector():set(2.0, 0.0, 0), vector():set(4.0, 0.208690, 0), vector():set(6.0, 0.208690, 0), },
[0.1] = { vector():set(6.0, 0.208690, 0), vector():set(9.666666984558105, 0.208690, 0), vector():set(13.333333015441895, 0.0, 0), vector():set(17.0, 0.0, 0), },
[0.2833333333333333] = { vector():set(17.0, 0.0, 0), vector():set(18.66666603088379, 0.0, 0), vector():set(20.33333396911621, 0.0, 0), vector():set(22.0, 0.0, 0), },
[0.36666666666666664] = { vector():set(22.0, 0.0, 0), vector():set(26.0, 0.0, 0), vector():set(30.0, 0.0061980304308235645, 0), vector():set(34.0, 0.0061980304308235645, 0), },
[0.5666666666666667] = { vector():set(34.0, 0.0061980304308235645, 0), vector():set(36.66666793823242, 0.0061980304308235645, 0), vector():set(39.33333206176758, 0.006198030896484852, 0), vector():set(42.0, -0.0004711227957159281, 0), },
[0.7] = { vector():set(42.0, -0.0004711227957159281, 0), vector():set(45.66666793823242, -0.009641208685934544, 0), vector():set(49.33333206176758, -0.19307519495487213, 0), vector():set(53.0, -0.19307519495487213, 0), },
[0.8833333333333333] = { vector():set(53.0, -0.19307519495487213, 0), vector():set(56.66666793823242, -0.19307519495487213, 0), vector():set(60.33333206176758, 0.029261700809001923, 0), vector():set(64.0, 0.029261700809001923, 0), },
[1.0666666666666667] = { vector():set(64.0, 0.029261700809001923, 0), vector():set(69.0, 0.029261700809001923, 0), vector():set(74.0, 0.0, 0), vector():set(79.0, 0.0, 0), },
[1.3166666666666667] = { vector():set(79.0, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), },
[1.4333333333333333] = { vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), },
},
rotation_eulerZ = {
[0.0] = { vector():set(0.0, 0.0, 0), vector():set(2.0, 0.0, 0), vector():set(4.0, 0.0, 0), vector():set(6.0, 0.0, 0), },
[0.1] = { vector():set(6.0, 0.0, 0), vector():set(9.666666984558105, 0.0, 0), vector():set(13.333333015441895, 0.0, 0), vector():set(17.0, 0.0, 0), },
[0.2833333333333333] = { vector():set(17.0, 0.0, 0), vector():set(18.66666603088379, 0.0, 0), vector():set(20.33333396911621, 0.056137047708034515, 0), vector():set(22.0, 0.056137047708034515, 0), },
[0.36666666666666664] = { vector():set(22.0, 0.056137047708034515, 0), vector():set(26.0, 0.056137047708034515, 0), vector():set(30.0, -0.09331143647432327, 0), vector():set(34.0, -0.09331143647432327, 0), },
[0.5666666666666667] = { vector():set(34.0, -0.09331143647432327, 0), vector():set(36.66666793823242, -0.09331143647432327, 0), vector():set(39.33333206176758, -0.04646921902894974, 0), vector():set(42.0, -0.03820802643895149, 0), },
[0.7] = { vector():set(42.0, -0.03820802643895149, 0), vector():set(54.33333206176758, 0.0, 0), vector():set(66.66666412353516, 0.0, 0), vector():set(79.0, 0.0, 0), },
[1.3166666666666667] = { vector():set(79.0, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), },
[1.4333333333333333] = { vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), },
},
rotation_eulerX = {
[0.0] = { vector():set(0.0, 0.0, 0), vector():set(2.0, 0.0, 0), vector():set(4.0, 0.0, 0), vector():set(6.0, 0.0, 0), },
[0.1] = { vector():set(6.0, 0.0, 0), vector():set(9.666666984558105, 0.0, 0), vector():set(13.333333015441895, 0.0, 0), vector():set(17.0, 0.0, 0), },
[0.2833333333333333] = { vector():set(17.0, 0.0, 0), vector():set(18.66666603088379, 0.0, 0), vector():set(20.33333396911621, -0.04160397872328758, 0), vector():set(22.0, -0.04160397872328758, 0), },
[0.36666666666666664] = { vector():set(22.0, -0.04160397872328758, 0), vector():set(26.0, -0.04160397872328758, 0), vector():set(30.0, -0.04113997519016266, 0), vector():set(34.0, -0.04113997519016266, 0), },
[0.5666666666666667] = { vector():set(34.0, -0.04113997519016266, 0), vector():set(36.66666793823242, -0.04113997519016266, 0), vector():set(39.33333206176758, -0.04117615893483162, 0), vector():set(42.0, -0.04117615893483162, 0), },
[0.7] = { vector():set(42.0, -0.04117615893483162, 0), vector():set(54.33333206176758, -0.04117615893483162, 0), vector():set(66.66666412353516, 0.0, 0), vector():set(79.0, 0.0, 0), },
[1.3166666666666667] = { vector():set(79.0, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), },
[1.4333333333333333] = { vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), vector():set(86, 0.0, 0), },
},
}
}
@@ -0,0 +1,99 @@
# Python script for export anim data in blender
# Paste in Blender scripting window
# exported camera_root
import bpy
context = bpy.context
obj = context.object
action = context.object.animation_data.action
print(context)
print(obj)
print(action)
indexToAxis = {
0: 'X',
1: 'Z',
2: 'Y',
3: 'Y',
4: 'Z',
5: 'X'
}
length = context.scene.frame_end
fps = context.scene.render.fps
animTime = length / fps
curves = {}
j = 0
for fcurve in action.fcurves:
i = 0
time = 0
curve = {}
p1 = None
p2 = None
p3 = None
p4 = None
for kfp in fcurve.keyframe_points:
# Get control point
p1 = [kfp.co[0], kfp.co[1]]
# Get right handle
p2 = [kfp.handle_right[0], kfp.handle_right[1]]
# Get next control point left handle
nextIndex = i + 1
nextKfp = None
if nextIndex < len(fcurve.keyframe_points):
nextKfp = fcurve.keyframe_points[nextIndex]
p3 = [nextKfp.handle_left[0], nextKfp.handle_left[1]]
# Get next control point
p4 = [nextKfp.co[0], nextKfp.co[1]]
else:
p1 = [kfp.co[0], kfp.co[1]]
p2 = [length, kfp.co[1]]
p3 = [length, kfp.co[1]]
p4 = [length, kfp.co[1]]
curve[p1[0] / fps] = [p1, p2, p3, p4]
i = i + 1
curve[animTime] = [p4, p4, p4, p4]
curves[fcurve.data_path + indexToAxis[j]] = curve
j = j + 1
formattedCurves = ""
for curve in curves:
s = f"{curve} = {{"
for time in curves[curve]:
data = curves[curve][time]
s += "\n\t\t[%s] = %s" % (time, f"{{ vector():set({data[0][0]}, {data[0][1]}, 0), vector():set({data[1][0]}, {data[1][1]}, 0), vector():set({data[2][0]}, {data[2][1]}, 0), vector():set({data[3][0]}, {data[3][1]}, 0), }},")
formattedCurves += s + "\n\t},\n\t"
print(f"""
data = {{
animationFrameLength = {length},
originalFps = {fps},
calculatedTime = {animTime},
-- Below is the data to modify manually
-- Modifier to camera rotations
rotationModifier = 1,
-- Frame starting from prebaked animation will be used fully
animInFrame = 26,
-- Frame from which prebaked animation will blend out to procedural animation
animOutFrame = 50,
-- Speed of animation
animationSpeed = 1,
-- Speed of hands animation, affected by overall animationSpeed
hudMotionSpeed = 1,
-- Frame to play grunt sound
gruntSoundFrame = 26,
-- Generated curves, touch with care
curves = {{
{formattedCurves}
}}
}}
""")
@@ -0,0 +1,65 @@
-- Ledge Grabbing
-- Generated with AnomalyModCreator
op = { id= "demonized_ledge_grabbing", sh=true ,gr={
{ id= "title", type= "slide", link= "ui_options_slider_player", text="ui_mcm_ledge_grabbing_title", size= {512,50}, spacing= 20 },
{id = "enable", type = "check", val = 1, def = true},
{id = "alternativeClimbDetection", type = "check", val = 1, def = true},
{id = "playerWidthCheck", type = "check", val = 1, def = true},
{id = "unstuckCheck", type = "check", val = 1, def = true},
{id = "hardcoreMode", type = "check", val = 1, def = false},
{id = "BHSMode", type = "check", val = 1, def = true},
{id = "staminaDrain", type = "track", val = 2, min = 0.7, max = 1.5, step = 0.05, def = 1},
{id = "climbTriggerDistance", type = "track", val = 2, min = 0.6, max = 2, step = 0.05, def = 1.3},
{id = "raySteps", type = "track", val = 2, min = 5, max = 30, step = 1, def = 15},
{id = "throttleCheck", type = "track", val = 2, min = 0, max = 200, step = 10, def = 0},
{id = "divider", type = "line"},
{
id = "inputMethod",
type = "list",
val = 0,
def="jumpHold",
content = {
{"jumpHold", "demonized_ledge_grabbing_inputMethod_jumpHold"},
{"buttonPress", "demonized_ledge_grabbing_inputMethod_buttonPress"},
{"both", "demonized_ledge_grabbing_inputMethod_both"},
},
},
{id = "jumpTriggerTime", type = "track", val = 2, min = 0, max = 250, step = 5, def = 70},
{ id = "keybind", type = "key_bind", val = 2,
def = DIK_keys.DIK_SPACE
},
{ id = "modifier", type = ui_mcm.kb_mod_radio , val = 2, hint = "mcm_kb_mode",
def = 0,
content = {
{0, "mcm_kb_mode_press"},
{1, "mcm_kb_mode_dtap"},
}
},
{ id = "second_key", type = ui_mcm.kb_mod_radio , val = 2, hint = "mcm_kb_modifier",
def = 0,
content = {
{0,"mcm_kb_mod_none"} ,
{1,"mcm_kb_mod_shift"} ,
{2,"mcm_kb_mod_ctrl"},
{3,"mcm_kb_mod_alt"}
}
},
{id = "divider", type = "line"},
{id = "animationRandomization", type = "track", val = 2, min = 0, max = 2, step = 0.1, def = 1},
{id = "soundVolume", type = "track", val = 2, min = 0, max = 1, step = 0.05, def = 1},
{id = "gruntVolume", type = "track", val = 2, min = 0, max = 1, step = 0.05, def = 1},
{id = "gruntProbability", type = "track", val = 2, min = 0, max = 1, step = 0.05, def = 0.5},
}
}
function on_mcm_load()
return op
end
@@ -0,0 +1,315 @@
-- Library for picking random values between two numbers in various ways
-- Contains easing functions based on https://github.com/bbor/stingray-easing-functions/blob/master/engine/easing.c
-- Rewritten in Lua by demonized
-- Usage
--[[
local random_funcs = demonized_randomizing_functions
local a = random_funcs.get_random_value(10, 30, 2)
local b = random_funcs.get_random_value(30, 52.69, random_funcs.QuadraticEaseInOut)
--]]
local sin = math.sin
local cos = math.cos
local sqrt = math.sqrt
local random = math.random
local M_PI = math.pi
local M_PI_2 = M_PI / 2
-- Pick a random float between min_cond and max_cond
-- If magnitude is number and > 1, then random values will be closer to min_cond
-- If magnitude is number and < 1, then random values will be closer to max_cond
-- If magnitude is easing function, then random value will be picked according to function graph
-- For more info on easing function, google easing or cubic-bezier functions or look here: https://github.com/bbor/stingray-easing-functions
function get_random_value(min_cond, max_cond, magnitude)
local min_cond = min_cond or 0
local max_cond = max_cond or 1
local magnitude = magnitude or 1
local rand = 1
if type(magnitude) == "function" then
rand = magnitude(random())
else
rand = random() ^ magnitude
end
if min_cond > max_cond then
max_cond, min_cond = min_cond, max_cond
end
local a = max_cond - min_cond
local b = a * rand
local c = min_cond + b
return c
end
-- Easing functions, you can use them for third argument in get_random_value or directlyin your script
-- Modeled after the line y = x
function LinearInterpolation(p)
return p
end
-- Modeled after the parabola y = x^2
function QuadraticEaseIn(p)
return p * p
end
-- Modeled after the parabola y = -x^2 + 2x
function QuadraticEaseOut(p)
return -(p * (p - 2))
end
-- Modeled after the piecewise quadratic
-- y = (1/2)((2x)^2) [0, 0.5)
-- y = -(1/2)((2x-1)*(2x-3) - 1) [0.5, 1]
function QuadraticEaseInOut(p)
if(p < 0.5) then
return 2 * p * p
else
return (-2 * p * p) + (4 * p) - 1
end
end
-- Modeled after the cubic y = x^3
function CubicEaseIn(p)
return p * p * p
end
-- Modeled after the cubic y = (x - 1)^3 + 1
function CubicEaseOut(p)
local f = (p - 1)
return f * f * f + 1
end
-- Modeled after the piecewise cubic
-- y = (1/2)((2x)^3) [0, 0.5)
-- y = (1/2)((2x-2)^3 + 2) [0.5, 1]
function CubicEaseInOut(p)
if(p < 0.5) then
return 4 * p * p * p
else
local f = ((2 * p) - 2)
return 0.5 * f * f * f + 1
end
end
-- Modeled after the quartic x^4
function QuarticEaseIn(p)
return p * p * p * p
end
-- Modeled after the quartic y = 1 - (x - 1)^4
function QuarticEaseOut(p)
local f = (p - 1)
return f * f * f * (1 - p) + 1
end
-- Modeled after the piecewise quartic
-- y = (1/2)((2x)^4) [0, 0.5)
-- y = -(1/2)((2x-2)^4 - 2) [0.5, 1]
function QuarticEaseInOut(p)
if(p < 0.5) then
return 8 * p * p * p * p
else
local f = (p - 1)
return -8 * f * f * f * f + 1
end
end
-- Modeled after the quintic y = x^5
function QuinticEaseIn(p)
return p * p * p * p * p
end
-- Modeled after the quintic y = (x - 1)^5 + 1
function QuinticEaseOut(p)
local f = (p - 1)
return f * f * f * f * f + 1
end
-- Modeled after the piecewise quintic
-- y = (1/2)((2x)^5) [0, 0.5)
-- y = (1/2)((2x-2)^5 + 2) [0.5, 1]
function QuinticEaseInOut(p)
if(p < 0.5) then
return 16 * p * p * p * p * p
else
local f = ((2 * p) - 2)
return 0.5 * f * f * f * f * f + 1
end
end
-- Modeled after quarter-cycle of sine wave
function SineEaseIn(p)
return sin((p - 1) * M_PI_2) + 1
end
-- Modeled after quarter-cycle of sine wave (different phase)
function SineEaseOut(p)
return sin(p * M_PI_2)
end
-- Modeled after half sine wave
function SineEaseInOut(p)
return 0.5 * (1 - cos(p * M_PI))
end
-- Modeled after shifted quadrant IV of unit circle
function CircularEaseIn(p)
return 1 - sqrt(1 - (p * p))
end
-- Modeled after shifted quadrant II of unit circle
function CircularEaseOut(p)
return sqrt((2 - p) * p)
end
-- CircularEaseOut with adjustable power
function CircularEaseOutPowered(p, power)
local power = power or 0.5
return ((2 - p) * p) ^ power
end
-- Modeled after the piecewise circular function
-- y = (1/2)(1 - sqrt(1 - 4x^2)) [0, 0.5)
-- y = (1/2)(sqrt(-(2x - 3)*(2x - 1)) + 1) [0.5, 1]
function CircularEaseInOut(p)
if(p < 0.5) then
return 0.5 * (1 - sqrt(1 - 4 * (p * p)))
else
return 0.5 * (sqrt(-((2 * p) - 3) * ((2 * p) - 1)) + 1)
end
end
-- Modeled after the exponential function y = 2^(10(x - 1))
function ExponentialEaseIn(p)
return (p == 0.0) and p or 2 ^ (10 * (p - 1))
end
-- Modeled after the exponential function y = -2^(-10x) + 1
function ExponentialEaseOut(p)
return (p == 1.0) and p or 1 - 2 ^ (-10 * p)
end
-- Modeled after the piecewise exponential
-- y = (1/2)2^(10(2x - 1)) [0,0.5)
-- y = -(1/2)*2^(-10(2x - 1))) + 1 [0.5,1]
function ExponentialEaseInOut(p)
if(p == 0.0 or p == 1.0) then
return p
end
if(p < 0.5) then
return 0.5 * 2^( (20 * p) - 10)
else
return -0.5 * 2^( (-20 * p) + 10) + 1
end
end
-- Modeled after the damped sine wave y = sin(13pi/2*x)*pow(2, 10 * (x - 1))
function ElasticEaseIn(p)
return sin(13 * M_PI_2 * p) * 2^( 10 * (p - 1))
end
-- Modeled after the damped sine wave y = sin(-13pi/2*(x + 1))*pow(2, -10x) + 1
function ElasticEaseOut(p)
return sin(-13 * M_PI_2 * (p + 1)) * 2^( -10 * p) + 1
end
-- Modeled after the piecewise exponentially-damped sine wave:
-- y = (1/2)*sin(13pi/2*(2*x))*pow(2, 10 * ((2*x) - 1)) [0,0.5)
-- y = (1/2)*(sin(-13pi/2*((2x-1)+1))*pow(2,-10(2*x-1)) + 2) [0.5, 1]
function ElasticEaseInOut(p)
if(p < 0.5) then
return 0.5 * sin(13 * M_PI_2 * (2 * p)) * 2^(10 * ((2 * p) - 1))
else
return 0.5 * (sin(-13 * M_PI_2 * ((2 * p - 1) + 1)) * 2^(-10 * (2 * p - 1)) + 2)
end
end
-- Modeled after the overshooting cubic y = x^3-x*sin(x*pi)
function BackEaseIn(p)
return p * p * p - p * sin(p * M_PI)
end
-- Modeled after overshooting cubic y = 1-((1-x)^3-(1-x)*sin((1-x)*pi))
function BackEaseOut(p)
local f = (1 - p)
return 1 - (f * f * f - f * sin(f * M_PI))
end
function BackEaseOutQuadratic(p)
local f = (1 - p)
return 1 - (f * f - f * sin(f * M_PI))
end
-- Modeled after the piecewise overshooting cubic function:
-- y = (1/2)*((2x)^3-(2x)*sin(2*x*pi)) [0, 0.5)
-- y = (1/2)*(1-((1-x)^3-(1-x)*sin((1-x)*pi))+1) [0.5, 1]
function BackEaseInOut(p)
if(p < 0.5) then
local f = 2 * p
return 0.5 * (f * f * f - f * sin(f * M_PI))
else
local f = (1 - (2*p - 1))
return 0.5 * (1 - (f * f * f - f * sin(f * M_PI))) + 0.5
end
end
function BounceEaseIn(p)
return 1 - BounceEaseOut(1 - p)
end
function BounceEaseOut(p)
if(p < 4/11.0) then
return (121 * p * p)/16.0
elseif(p < 8/11.0) then
return (363/40.0 * p * p) - (99/10.0 * p) + 17/5.0
elseif(p < 9/10.0) then
return (4356/361.0 * p * p) - (35442/1805.0 * p) + 16061/1805.0
else
return (54/5.0 * p * p) - (513/25.0 * p) + 268/25.0
end
end
function BounceEaseInOut(p)
if(p < 0.5) then
return 0.5 * BounceEaseIn(p*2)
else
return 0.5 * BounceEaseOut(p * 2 - 1) + 0.5
end
end
+28
View File
@@ -0,0 +1,28 @@
[General]
gameName=stalkeranomaly
modid=0
version=1.0.0.0
newestVersion=
category="-1,"
nexusFileStatus=1
installationFile=Ledge_Grabbing.11.zip
repository=Nexus
ignoredVersion=
comments=
notes=
nexusDescription=
url=
hasCustomURL=true
lastNexusQuery=
lastNexusUpdate=
nexusLastModified=2024-12-04T01:46:06Z
nexusCategory=0
converted=false
validated=false
color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
tracked=0
[installedFiles]
1\modid=0
1\fileid=0
size=1