#Contributors to HKS Guide?

1399 messages · Page 2 of 2 (latest)

inner socket
#

common_define.hks

heavy thunder
#

Yeah but those are numbers

#

WHAT TO THEY MEAN JOHN?!

#

Also why the fuck do some if statements with a logic operator make the game crash on startup, but if I just nest two ifs it works fine

#

Like what the hell is going on there

pliant lance
heavy thunder
#

Pretend I know nothing about modding --> "ATTACK_REQUEST_LEFT_LIGHT = 7"

#

How do i figure out what that "7" represent for each weapon / weapon type?

pliant lance
#

That's just the index inside the enum

#

For every weapon it means a left handed light attack

#

This can be one or two handed

#

No wait, there might be a LeftBoth variant

#

So maybe it's just one handed

heavy thunder
#

Ok, but suppose I want to change what "left handed light attack" is for any given weapon

#

Where would I have to go look for it?

copper zodiac
#

There's easier ways of changing both the inputs and the behaviours without modifying these objects what are you trying to achieve

heavy thunder
#

Mainly I'm trying to get full ambidextrous movesets working

copper zodiac
#

how will you sort out 2 aow 2 heavies 2 lights

#

wang already kinda did it

heavy thunder
#

I can use both left and right AoWs

#

Although for some reason the right one isn't the correct one lmao

#

some testing is needed

#

Ok nvm I think the issue is that is you have a shield with a skill equipped into the left hand then the Skill for the right weapon defaults to... Something

#

I think it class-dependent.

#

Is it like storm assault? no clue. I need to figure out if there's a bit shift of some kind

#

Ok most weapon classes default to some kind of "push" skill when one handed with a Skill-haver shield

#

Spears, great separs and reapers default to whatever the one in the clip is

#

Fists do... Something. Daggers do... Nothing

heavy thunder
#

"SWORDARTS_ANIM_ID_BOTH_NORMAL"

#

What is this? Weren't skills stance neutral (as in - it's the same regardless of whether you're two handing or not)?

inner socket
#

you'll need to do some serious dynamic param bullshittery

#

shield aows are different than normal aows, there are weird behavioral issues n stuff

heavy thunder
#

I'm trying to figure it out

inner socket
#

again, I'd just make an aow wheel, I'll post the code later

heavy thunder
#

I don't want a wheel

inner socket
heavy thunder
#

I'll see what I can do

#

So far if I have a shield with a skill in the left hand and I use the right hand skill, the skill defaults to something else (seems to depend on a combination of Shield type and right weapon type - for example if you have elemer's shield on the left and a straight sword on the right, you'll do Ghiza's wheel. If you have the roaring shield as in the clip, you'll do the very same roaring bash skill. Although it seems to be a coincidence)

#

But I can use left hand skills with a right weapon equipped - only the animation defaults to using the right hand. In the example of the roaring shield, the weapon on the right performs the animation

inner socket
#

that's not a coincidence, it's a behavioral issue relating to the idle category of the weapons

#

it's not particularly fun to deal with and trying to fix it is tough

heavy thunder
#

Unless it reads the memory stack or something lmao

inner socket
#

then it must be other miscellaneous hks issues

heavy thunder
#

In the ExecAttack() function i keep seing statements like this

#

r1 = "W_AttackRightLight2"

#

There are a thousand different variations

#

What the hell are those strings

#

env(GetStayAnimCategory) was ist dis

heavy thunder
#

But I'd like to see a debug of some kind

#

Like I want to see what's fired in the code when I press shit in the game

inner socket
#

try printing out the stack using debug functions and shit

#

you can kinda see what i do in my sekiro mod

heavy thunder
inner socket
#

allocated console

heavy thunder
#

By the way how do i figure out what the various Attack_request and swordart_request actually... "Call"?

#

Because they're sent out as return values for the GetAttackRequest and GetSwordArtRequest functions (and I have modified those to achieve what I want). issue is that I only see the return values "checked" in ExecAttack

#

But I have no clue what the hell it means.

#

Like what the hell does this do

#

Is this checking idle categories? I genuinely don't get it

#

My problem is that if you have a weapon in your left hand and you get Swordarts_request_left_normal, it usually does the weapon's (only) left handed attack

#

If you set it to request_right_normal, then you get the proper Weapon art but only when two handed. If you one-hand it, you get the right weapon's skill instead

#

Request_Left and Request_Both seem to work properly only for Shields, and I have no clue how to edit ExecAttack to make them.. Work with everything

copper zodiac
#

it's probably beh stack shit

#

like wang said

inner socket
inner socket
heavy thunder
heavy thunder
#

Where would the strings I'm printing you know... Print?

#

@wide zephyr how do I open the console. Do I have to manually attach a process somewhere? The -dll seems to load fine with modengine, I don't see any issues nor any changes to be fair

inner socket
heavy thunder
#

I am

inner socket
heavy thunder
heavy thunder
inner socket
#

you'd put this anywhere where the control flow should call it

heavy thunder
heavy thunder
inner socket
inner socket
#

i love functions as first class citizens it's so nice

heavy thunder
wide zephyr
#

is the modengine console enabled?

heavy thunder
wide zephyr
#

no enabling it means it won't open a new one

#

if it doesn't open one when it's disabled then idk

heavy thunder
heavy thunder
inner socket
#

nothing

#

the thing is supposed to make it so that hkbFireEvent also prints out what it's supposed to be playing

wide zephyr
#

otherwise it'd just be infinite recursion

inner socket
#

ah, right

#

forgot about that

heavy thunder
inner socket
#

yea, likely

#

you could try using file io to log to a file but that's also rough

#
-- Function to create a detour
function createDetour(originalFunction, newFunction)
    print("Detouring...")
    return function(...)
        local status, err = pcall(newFunction, ...)
        if not status then
            print("Error in detour: " .. err)
        end
        return originalFunction(...)
    end
end

here's what i use for doing shit like this so we go:

hkbFireEvent = createDetour(hkbFireEvent, function(state) ExposePrint(state) end)
heavy thunder
inner socket
#

well you'd create something like:

function logToFile(state)
    local file = -- and log there
end
-- create the detour with logToFile
heavy thunder
#

"create the detour with logToFile" by replaing the function you've put as the second argument in the createDetour call yeah?

#

SetVariable("SwordArtsOneShotCategory", arts_idx)

#

This is found in ExectAttack - what does it do?

inner socket
#

one shot sword arts are the ones that use 40000 through 40020 i think

copper zodiac
#

oh shit sorting out swordarttype is a whole thing

#

you might have to dynamic param this shit

heavy thunder
#

Like I've set it up so that the GetSwordArtsRequestNew() is called either when: holding L1 and pressinr R2 -- OR -- Holding R1 and pressing L2

inner socket
heavy thunder
#

The former should perform the left-hand weapon's skill - the latter the right hand's

copper zodiac
#

do you know what I think is happening

#

lumen's got it working as intended

#

it just reads the wrong swordart type

#

cause it can only have one of those in memory for some reason

heavy thunder
#

And SWORDARTS_REQUEST_LEFT_NORMAL and SWORDARTS_REQUEST_BOTH_NORMAL only work properly with shields. How can i tell the game that SWORDARTS_REQUEST_RIGHT_NORMAL should do the left weapon's skill if c_SwordArtID and C_SwordArtHand are set up (by me) to return the left hand values when holding L1?

copper zodiac
#

lumen did you try testing with 2 weapons instead of a weapon and a shield

heavy thunder
copper zodiac
#

preferably with the same type aow

heavy thunder
copper zodiac
heavy thunder
copper zodiac
#

wang you're a fancy streamer

inner socket
#

you go to some website or something then tell obs to link to it

heavy thunder
#

yeah i had to install obs (I use shadowplay like a homeless person)

inner socket
#

hence the whole dynamic param bullshittery that needs to be done

heavy thunder
heavy thunder
inner socket
#

you'll need something similar to my ambidextrous aow mod I think, to get both shield and sword aow at the same time

#

dynamic params allow for that, vanilla not really

copper zodiac
#

I like that I can say some absolute BS then wang confirms it and I feel really smart for no reason

heavy thunder
#

At the moment I'm trying to figure out how to play left handed skill when holding L1 and right handed skill when holding R1

heavy thunder
#

"act(SetParamValue, PARAM_SwordArtsParam, aow, swordArtsTypeNewOffset, UNSIGNED_SHORT, swordType) " --> is this "dynamic param bullshit"?

inner socket
#

does the aow name change?

heavy thunder
inner socket
#

then the aow will not play

#

check the ambidextrous aow mod for more info, i forgot how I did it but it works somehow

#

you might want to do whatever it is i did when you want to fire off an aow or smth idk

heavy thunder
#

I don't think it would work with weapon and weapon because you used the .csv table to essentially create a list of "safe" left handed skills

inner socket
#

no, it sadly wouldn't

#

in that case id recommend dynamically changing a gem in the right hand to reference the left hand's aow or smth idk

#

you can get the left aow ID by doing something or another

heavy thunder
inner socket
#

the env should return the right data I thiiiink

#

you just gotta do something or another

#

idk

#

maybe if i dredge the willpower up I'll make something today or tomorrow about it

copper zodiac
#

can you just do art_id = without script exposer and defining fields?

heavy thunder
#

The thing that confuses me is... Look at the second screenshot. You see at the end of it, in the final "else" that I fire up the Right Normal Swordart, even if it's checking for Holding L1? If I change that to return SWORDART_REQUEST_LEFT_NORMAL, then by holding L1 and pressing R2-... The left weapon attacks. So I don't think the issue is that it's loading only one Ash, it's that Request_Right_Normal is "hardcoded" to always use the right weapon

heavy thunder
copper zodiac
#

it's not just that you have to dynamically alter the weapon param

#

you're not setting the art ID there like you think you are

heavy thunder
copper zodiac
copper zodiac
#

that if statement is outputting to nothing

#

what is it outputting to

heavy thunder
copper zodiac
#

yeah

#

the arts ID is pulled from memory from the equipparamweapon

#

not from the ether

heavy thunder
# copper zodiac yeah

The function as a whole is called in GetAttackrequest -- both when you Hold L1 and press R2 and when you Hold R1 and press L2 (I duplicated the vanilla code and slightly altered it to sync the new handedness)

copper zodiac
#

I haven't checked wang's ambi mod but doubtless it uses memory editing

heavy thunder
# copper zodiac not from the ether

It's equal to c_SwordArtID, which is a constant which I've edited to return the Right Hand's ash if holding R1 or left hand if holding L1 (the screenshot above)

copper zodiac
#

I don't think you're listening to me

heavy thunder
#

I don't think I understand

copper zodiac
#

I don't see the game setting arts_ID at all in the hks like you do here

copper zodiac
#

but even if it does, you're trying to pass it on to the requests when that isn't where the requests pull from

#

that's why it's not working

heavy thunder
#

This is the vanilla function:

#

function GetSwordArtInfo()
local style = c_Style
local is_both = FALSE

if style >= HAND_LEFT_BOTH then
    is_both = TRUE
end

local art_id = 0
local art_hand = 0

if is_both == TRUE then
    if style == HAND_RIGHT_BOTH then
        art_hand = HAND_RIGHT
    elseif style == HAND_LEFT_BOTH then
        art_hand = HAND_LEFT
    end

    art_id = env(GetSwordArtID, art_hand)
else
    local weaponswordartid = env(GetSwordArtID, HAND_LEFT)

    if IsShieldArts(weaponswordartid) == FALSE and IsArrowStanceArts(weaponswordartid) == FALSE then
        art_hand = HAND_RIGHT
        art_id = env(GetSwordArtID, HAND_RIGHT)
    else
        art_hand = HAND_LEFT
        art_id = weaponswordartid
    end
end

if env(GetSpEffectID, 102150) == TRUE then
    art_id = 0
elseif env(GetSpEffectID, 102151) == TRUE then
    art_id = 0
end

return art_id, art_hand

end

#

it does

#

art_id = env(GetSwordArtID, HAND_RIGHT)

inner socket
heavy thunder
inner socket
#

the game's memory

#

specifically, the param

#

hence the need to dynamically param things

heavy thunder
#

So the only way to change ash is by using an "act" statement?

inner socket
#

yeah, pretty much

#

everything else should kinda fall in place by then I'd think

copper zodiac
#

specifically sth like this

    return act(SetParamValue, PARAM_EquipParamWeapon, weaponId, field, type or SIGNED_INT, value, bitOffset or 0)
end```
#

Exelot's function not mine

heavy thunder
#

Ok but I have no idea what arguments to pass act

#

@inner socket this is what in your mod changes ash -->> act(SetParamValue, PARAM_SwordArtsParam, aow, swordArtsTypeNewOffset, UNSIGNED_SHORT, swordType)

#

How did you figure it had to pass those params

inner socket
#

yea

#

i looked in the paramdex for the type and in smithbox for the offset

heavy thunder
#

I mean, why in that order

#

Why do you pass the original Aow, then an offset, then "Unsigned_Short" then the Type

inner socket
#

because the args for it say to

#

...

#

wait a second

heavy thunder
inner socket
#

did you link newhksinfo.lua to your project?

#

have you put the contents of it into your hks or loadfile()ed the thing?

heavy thunder
inner socket
#

pcall(loadfile()) the file in

#

chances are, exposeprint dont work for you coz it ain't defined for you lmao

heavy thunder
#

imma try

#

The lua and the c000 are both in the same modengine folder (action/script)

#

No window opens

#

I've disabled the debug console in modengine

#

ah fuck the quotation marks

#

Nah doesn't work

#

@inner socket what even is the swordarttypenewoffset and why is it this value

copper zodiac
#

it's the offset in memory

heavy thunder
#

I don't see that value in smithbox

copper zodiac
#

you have to enable it in settings

#

param editor > fields > show field offsets

#

or something

heavy thunder
#

Ok done thanks

copper zodiac
#

you can view the field type in context menu if you enable it as well

#

you will need it

heavy thunder
copper zodiac
#

it changes the value in swords art type

heavy thunder
#

If so, isn't there a way to simply have, for example, Impaling Thrust take the spot in memory of Shield Strike? Like that would seem the most sensible thing

copper zodiac
#

in the swordsarts param

heavy thunder
copper zodiac
#

just the animations mostly yeah

#

you could also do it by modifying the weapon param

#

like you're saying

#

you would have to write some code to detect the equiped weapon though

#

which is trickier than you would think

#

there's an example in the convergence HKS

heavy thunder
#

But it's a bit like -- you have a Partizan equipped and you want to swap to a Claymore. The sensible thing would be to have these two switch place in memory, with the Claymore going into the spot that tells the game it's equipped. If we follow the act method above, it literally replacing the Partizan's data into the Claymore

copper zodiac
#

yes

heavy thunder
#

It doesn't seem memory safe to me. Isn't there a way to acheive a "swap" method rather than a "transmog" one?

#

Like if we give "act" different params it behaves in such a way

copper zodiac
#

sounds like something you could probably do with a dll

copper zodiac
#

but you can acheive what you're saying using the two examples I already gave

#

switching the "equipped weapon" rather than the animations of the equipped sword art

#

kinda

#

but again you'd need to detect the equipped weapon

heavy thunder
#

rather than turning a Claymore into a partizan

copper zodiac
#

maybe? but it'll be more jank not less

inner socket
inner socket
inner socket
heavy thunder
#

why is it like this

heavy thunder
#

Ok basically the SwordArtId is retrieved correctly, but its value has "correct meaning" only if the weapon is in the Fromsoft designated hand, and the request that's fired (like SWORDART_REQUEST_RIGHT_NORMAL) takes precedence. I think. I'll upload a video where I test this

#

Like as you can see, the same Skill ID can fire up different or even random Skills depending on what I'm holding

#

So the only way is to check in the RAM memory where the goddamn "default" skill is stored, and how to edit that value

#

Only I have no fucking clue how to do it

#

But I did manage to make it so the Ash of War name on the left changes even with a weapon in the left hand, and not just a shield

#

Two possible solutions - I need to change what "W_SwordArtsOneShot" and its shield counterpart do. Because the ID for either the right or left weapon is loaded correctly, but when the variable is fired with ExecEventAllBody it just uses the "main" hand's weapon (left hand if you use a shield with a skill, right for any other scenario)

#

The other solution I had in mind is that everything seems to work properly with NoSkill - so my idea would be to apply "No Skill" to the opposite hand's weapon when you're holding a specific modifier

#

Ok no applying Noskill doesn't seem to work because the game still tries to use the "main" hand weapon to fire up the skill

heavy thunder
#

@inner socket I'm trying to "repurpose" your code from your Skill Swap mod but I'm aving trouble understanding how the array you've created functions

#

So you've created an array where all the left handed skills are stored. You have the Param Row as the index, and the Art_ID as the value

#

What I don't get is how do the two act statements swap between the currently equipped weapons' skills, even though you're cycling between an array that has ALL skills (that fit a criteria)

inner socket
#

I basically turn all shield aows into no skill when you aren't gonna use em

heavy thunder
#

Does "act(SetParamValue, PARAM_SwordArtsParam" only affect the Params for the CURRENTLY equipped weapon?

inner socket
#

then i revert em when you need em

#

it's terrible and horrible and awful but gets the job done

heavy thunder
#

Ok that's what I thought

inner socket
#

it should be an O(1) solution but I'm lazy so it's O(n) lol

heavy thunder
#

What can I use to affect only the equipped weapons or change the default Weapon Skill that's stored in memory?

#

Is there a magic "act" statement somewhere?

inner socket
#

look in some of my other mods, I think there's stuff in em for getting your equipped weapon

#

but also that doesn't guarantee your equipped weapon's ash of war is the default

#

after I acquire some carbonated water and more chickens I'll come back to this and make a mod that'll solve the problems or something idk

heavy thunder
#

Chickens? I prefer turkey

heavy thunder
#

and that if you have a shield in the left hand, and your right weapon is one handed, then the ID is still loaded correctly but it does some Idle Category bullshit so it plays a specific animation but I don't know how to solve it

#

I'm not even sure changing the params themselves would solve these two issues. It seems some shit that is conjured in the background when ExecAttack sends his variable to ExecEventAllBody or ExecEventHalfBlend

#

But I have no clue how to see behind the curtains

inner socket
#

dw, the principle behind getting what you want is very similar to my ash of war wheel

#

therefore: all I need to do is adapt the wheel to your purposes and voila it'll be fine

heavy thunder
#

I'd love to take a look at your wheel mod's code, but you deleted it 😭

heavy thunder
#

I can share it if anyone's interested

inner socket
#

a rewrite is coming soon dw

heavy thunder
# heavy thunder this shit is evil

goddammit here I managed to get the left hand aow appear over the right hand one. Then I modified something and i don't know what, I can't get it to work again

fluid marsh
#

Does someone know how to read stats correctly in coop?

#

I have an issue where script exposer seems to pick up either players stats sometimes, which causes weird scaling iisues with what I am doing

inner socket
#

yeah you gotta iterate through player instances and find out which is which

#

it's weird

fluid marsh
#

Thank you for the response, I am unsure as to how I would go about that

inner socket
#

me neither

fluid marsh
#

ah, well thank you anyways, I'll report back if I figure it out

fluid marsh
#

How would some one go about finding offsets and information that isn't accessible in smith box? Like current player stats or build up values? Or host vs not host status?

pliant lance
#

CheatEngine

#

I often look up data in existing cheat tables

#

Here is one for stats

pliant lance
# fluid marsh How would some one go about finding offsets and information that isn't accessibl...
local CS_SESSION_MANAGER = 0x3D7A4D0 -- 1.14
SESSION_OFFLINE = 0
SESSION_CREATION_ATTEMPT = 1
SESSION_CREATION_FAILED = 2
SESSION_HOST = 3
SESSION_JOIN_ATTEMPT = 4
SESSION_JOIN_FAILED = 5
SESSION_CLIENT = 6
SESSION_LEAVING_ATTEMPT = 7
SESSION_LEAVING_FAILED = 8
function GetOnlineSessionState()
    return env(TraversePointerChain, GAME_BASE, SIGNED_INT, CS_SESSION_MANAGER, 0x0C)
end

function IsInOnlineSession()
    if GetOnlineSessionState() == SESSION_OFFLINE then
        act(ClearSpEffect, 9000025)
        return FALSE
    end
    act(AddSpEffect, 9000025)
    return TRUE
end```
Here you can find some outdated code for the host thing
#

Just need to update CsSessionManager to 1.16

fluid marsh
#

Thank you, how would I go about finding or updating to the correct value?

inner socket
#

chain posts the singleton obj offsets per update

#

plenty of useful stuff here, I should add this to the tutorial I think

fluid marsh
#

Thank you, that's really helpful, where does he post this so I can check for future updates?

inner socket
#

tools and resources

fluid marsh
#

Thank you

pliant lance
#

You gotta remove the 14 at the start of the singleton btw

heavy thunder
#

@inner socket Do you have any idea how can I make it so ExecEventAllBody("W_SwordArtsOneShot") uses the left hand weapon rather than the right hand one?

#

Because ExecEventAllBody("W_SwordArtsOneShotShieldLeft") and its both-hands variants already do that but they don't seem to work with weapon skills

#

Like how do you modify what these Variables do in memory. Doesn't seem like something you can do in the hks script

heavy thunder
#

And how do I check when an animation is finished?
I have no clue how env(isAnimEnd, args)
What's the argument supposed to be? When do i use the "IsGeneralAnimEnd" or "IsAttackEnd" variants?

fluid marsh
#

Is it possible to open up different game menus using script exposer? like if I wanted to open the grace menu during the rest emote, or make an item that let you deposit items into storage from anywhere or convert unwanted stuff into souls without a merchant.

inner socket
#

if there's a cheat table for it you can adapt it prolly

fluid marsh
inner socket
#

probably

fluid marsh
#

I can confirm, the table works on the latest patch, and I have found scripts that allow me to open the menus I want at will, but I am having trouble adapting them to work in hks

pliant lance
#

You can't call on functions with HKS though

fluid marsh
#

Sorry, I'm still rather 'new' to hks and trying to figure out whats possible

pliant lance
#

@inner socket have you ever been able to call on existing exe functions with the exposer?

inner socket
#

i was working on that for sekiro before I said "fuck it, whatever"

#

but also look inside, the creature summoning function is calling a spawn character inbuilt

#

it shouldn't be tooooooo bad

#

just get the address of the function and pass the args and call the thing

lapis niche
#

@inner socket hey

#

sorry for pinging you. I wanted to ask if I can store the value of the Row before modifying it and return the original value afterwards

inner socket
#

yeah, you can

lapis niche
#

How?

inner socket
#

for the cpp side of things:

upon dll attach, iterate through all params and memcpy them to an array of bytes or some other structure

expose a function called restore param where it copies the original memory of a param back to the param

#

or, make use of the command design pattern in lua to make all dynamic param edits something you do/undo (bit less reliable in pure lua since hks state constantly changes, best to program it in cpp)

#

let cpp do the heavy lifting, basically, hks is scripting for a reason

lapis niche
#

Gets the player's current animation ID

local MODULE_UNKNOW = 0x18
local ACTIONREQUEST = 0x80

local CURR_ANIME = 0x20
local CURR_ANIME_2 = 0x90

function GetCurrentAnime(animeModule, animeType)
    return env(TraversePointerChain, CHR_INS_BASE, SIGNED_INT, CHR_MODULES, animeModule, animeType)
end

function GetAnime()
    local Anime = GetCurrentAnime(animeModule, animeType)
    ExposePrint("CurrAnime: " .. Anime)
end
#

example:

function GetAnime()
    local Anime = GetCurrentAnime(ACTIONREQUEST, CURR_ANIME_2)
    ExposePrint("CurrAnime: " .. Anime)
end
function GetAnime()
    local Anime = GetCurrentAnime(MODULE_UNKNOW, CURR_ANIME)
    ExposePrint("CurrAnime: " .. Anime)
end
lapis niche
#

Weapon wyth animation IDs inconsistent:
Example: atk 1 = 9000000 atk 2 = 9000008 atk 3 = 9000020 atk 4 = 9000032

  • Throwing Blade

  • Light GreatSwords

  • Heavy Thrusting Sword

  • Curved GreatSword

  • Backhand Blade

  • Great Katana

  • Flail

  • Great Hammer

  • Spear

  • Great Spear

  • Halberd

  • Reaper

  • Whip

  • Fist

  • Hand to Hand

  • Beast Claw

  • Perfume Bottle

  • Lamenting Visage

  • Small Shield

  • Medium Shield

  • Great Shield

  • Thrusting Shield

Weapons with invalid IDs:
Example: 2.1003e+08

  • Rellana (2 Hand)

  • Fire Knight Greatsword

  • GodSlayer Greatsword

  • Curved Sword

  • Shamshir

  • Dancing Blade of Ranah

  • Zamor Curved Sword

  • Axe

  • Forked Harchet

  • Forked Tongue Hatchet

  • Iron Cleaver

  • Celebrant Cleaver

  • Icerind Hatchet

  • Club

  • Stone Club

  • Halberd

  • Banished Knight Halberd

  • Guardian Swordspear

  • Dragon Halberd

  • Loretta Halberd

  • Commander Standard

  • Poleblade of the Bud

  • Katar

  • Pata

  • Clinging Bone

  • Veteran Prosthesis

  • Chiper Pata

  • Thioller Hidden Needle

  • Dane Footwork

fluid marsh
#

Is it possible to read the current camera horizontal (X I think) angle? or to force the player to face the camera automatically without lock on? I am working on something with directional input when holding the magic cycle key and am also curious in forcing the player to face camera when in stances

#

I have figured out directional input while locked on for the most part but wanted to try and get it working reliably outside of lockon based on player and camera direction

inner socket
#

find the right pointer chain and such

#

there's an old dll mod that does it

pliant lance
#

Pretty sure there's some pointers for this in various cheat tables

fluid marsh
#

Thank you, I will look around but I actually came up with a different solution for what I was doing altogether

#

I made spell groupings of 1-3, 4-6, and 7-9 using change spell, interact, and change item keys as modifiers and r1, r2, and l2 to cast respective slots instead of relying on directional stuff

fluid marsh
#

Hey Fwang, I am attempting to make my new spell key mod modular, is it cool/alright if I use/adapt your createdetour and file code?

lapis niche
#

Event_EventHalfBlend360070 = Stealth Collect item
Event_EventHalfBlend60071 = Collect item

fluid marsh
#

Hey Exelot, I have noticed that my stats seems to read wrong when I attempt to read them in the chapel of anticipation after starting a new game, though they seem to read correctly after getting out of the 'tutorial' area, and cheat engine with what seems to be the same pointers and offsets continues to read my stats correctly regardless, is that something I am messing up on my end or is that a known issue? I am using your getstat(stat) function to read them

pliant lance
fluid marsh
#

Thank you for responding, and I know it gets readings from after, and I have an sp effect adding stats, I started a class with 1 mind and have an effect adding 12 mind, but while my stat page says 13 mind, the get stat function is returning 18, are there speffects that can add stats that don't reflect in your stats page?

pliant lance
#

Not that I know of

#

So the moment you are outside the chapel it works as normal?

fluid marsh
#

I will test again when I get home, but yeah it seems to start reading the right stats once I am back in limgrave

fluid marsh
#

So I think I partially figured it out, I was wrong it does not fix itself on loading to limgrave, but it might actually be related to my class changes, I started at level 1 with 1 in all my stats and it seems that leveling up in each stat is what actually fixes it

fluid marsh
#

Could it be a custom class thing? I tried changing stats to mirror wretches on my class and the same issue until I level up

fluid marsh
#

after testing it is not a custom class thing either, I am not sure what could be interacting like this that I have to level up to get proper reading

fluid marsh
#

so restarting the game or dying(dying is more consistent) after entering limgrave does seem to actually fix readings for everything but level, just going to limgrave doesnt do it, leveling up in general will fix your level being read and the stat you leveled

lone goblet
#

hi is three any way to read tae's dynamically through HKS? more like the events inside the TAE

inner socket
#

best bet is to use a massedit and give a speffect corresponding to the tae event's id during the tae event's activation

#

someone managed to get tae dynamically read/written but it's a massive pain and the dude disappeared

lone goblet
faint oriole
real kelp
#

So I'm running into an issue with my current project. I am able to read the last 4 digits of the weapon to determine its infusion and upgrade level thanks to lord exelot( thank you). But when I try to read the AOW and save that data to my csv file. It will just save base weapon data and doesn't apply the infusion when I 'transform' . Also Lord Exelot oddly enough if I used this with convergence it crashes when I try to ride torrent? lol. Thats not a big issue though. The goal is to save a build and be able to reapply it. To use it you will need items that use 7210 - transform, 7220, saves build, 7230 - deletes build, 7240 - debug print out, and the pcall. Any guidance would be greatly appreciated.

real kelp
#

Should I just make my own topic or is it okay to leave this here?

pliant lance
#

Does whatever weapon you are transforming it to also have the infusion of the same ID?

real kelp
#

No the base weapon has no infusions. But I overwrite the weapon ID so all the values from the 'transformed' weapon usually are all there. I have to apply the aow and icon to my base weapon for it all to work together.

#

I adjusted the script to ensure it wrote to the cvs in the raw number. The fire infusion will be there, but the ICON and AOW save as -1 and can't be read. Its like the weapon is in a different location or something. I have cleaned it back to 0000 to get the ICON to be the base one but I can't seem to figure out the AOW part.

real kelp
#

I can't for the life of me to get upgraded/infused weapons AOW to read and write the proper location. I'll probably take a scaling approach after I get custom weapons to read accurately.

lone goblet
#

can this be used to make it so that when you die all the gear that you have equiped gets removed from the player and gets stored in the place that you died so that you can get it back? similar to the lost runes system

real kelp
#

I'm sure it could be adapted to if you introduced flags and use emevd to trigger it on death death.

fluid marsh
#

Did you ever figure out how to write read and write to upgraded/infused weapons? I am pretty sure atleast if you are reading and writing to params dynamically the entry only exists for the base ID and upgrade adds an offset (+1-25), so if you read an upgraded weapon you have to strip that offset to read and write to the base ID instead of the offset that doesn't have an actual entry in the params

real kelp
#

I got it to read and write the aows of upgraded and infused weapons. I used the hks functions and just converted things over. So upgraded weapons were not a problem and transformations into infused weapons worked. But If the chosen "default" weapon is infused it won't write over it. So for those I'll have to make a script to match the reinforcement types. My script got to around 1100 lines lol. I've been playing with it. The icon overlay symbols don't change. I might try to find out where that is controlled. There are some kinks I can still work out for sure. But I started using eldenring-rs to convert it all into a .dll. It will be a slow process lol, but I think in the end it will function better.

fluid marsh
#

@pliant lance Hey, sorry for the ping, but I am not very good with code and have been struggling with concatenations and tables in general, I am trying to set up a way to dynamically reference variables, so that I can set up an accurate keyheldfortime function because it seems like actionduration counts faster for each same instance(or maybe something else?) leading to timing being off if having multiple things bound to the same keyhold at differing times/framecounts, I need to be able to do something like

g_DeltaRunTime is a global variable I have set up to run alongside g_FrameCount but instead calculates and keeps track of deltatime to effectively give me hks/game runtime in seconds


function key(action_arm_key)
    if env(1108, action_arm_key) > 0 then
--key_pressed is so it only records this value on press so it can be subtracted from the current value for accurate held time
        if key_pressed == 0 then
            dT_key = g_DeltaRunTime
            key_pressed = 1
        end
    else
        dT_key = g_DeltaRunTime
        key_pressed = 0
    end
return (g_DeltaRunTime - dT_key)
end

I need key_pressed and dT_key to dynamically reference the correct variables based on the key being pressed so that it can properly track between multiple keypresses or held key combinations and report accurately for each key, I know I can use a metric ton of if then conditionals to call the correct variables but was hoping I could ask for your assistance with concatenations, tables, or strings as a solution before resorting to bruteforcing conditionals

pliant lance
#

Im not quite sure what you're trying to achieve here

fluid marsh
#

accurate duration for key held

#

action duration is not always accurate

#

while good for > 0 it can be problematic when needing specific durations in my experience

fluid marsh
#

I need to dynamically be able to replace key_pressed and dT_key with the appropriate variables I have set up for each key

#

so that it will keep track on a per key basis

#

I was hoping there was a way to set this up using tables or concatenations but I do not understand code well enough to get this working so far, I have a pair of variables set up for each action arm and was hoping something akin to ("dT_" .. action_arm_key) was possible to be able to use the correct variable replacing dT_key

fluid marsh
#

I went ahead and set it up with conditionals instead, I have it accurately reporting time/duration for each key individually in seconds held

pliant lance
#

Have you tested if the game will keep button A marked as on when you press down on button B as well)

fluid marsh
#

yes, my new function is completely accurate from my testing

fluid marsh
#

I still struggle with concatenation and tables for some reason but I do have a working function set up using conditionals, though while it could be set up to function off of the g_FrameCount with relative accuracy(more efficient but will only reflect the frame rate at the time of press as opposed to the actual frame rate if it fluctuates, though likely still accurate enough for most things honestly), I set up another function g_DeltaRunTime, which is basically the same thing but calculates and saves the frame delta time each frame to be a bit more accurate, I can send you my 'REQS' file which has it and some other commonly used code functions, mostly writing/file checking, and your string functions and equipment id functions, I can't remember if I am using your getequipmentslot function in it or if it was the one I had worked on previously, but let me know if you want me to send you the file

fluid marsh
#

I also rigged up forced on press keys, it returns true on press a single time and then can not be true again until the key is released
so similar to how requests function but using actionduration to force the input

fluid marsh
#

I just finished rewriting my key(pressed_timed_released, action_arm_key) function, it can now return on key first press, on key release, and accurate time reading for duration key is held depending on the value placed in pressed_timed_released of the key designated in action_arm_key

fluid marsh
#

would this key function be something other people would want me to post in tools and resources but using g_FrameCount instead of my custom deltatime? since it would still give a relatively accurate reading for duration and make different inputs in hks easier, especially having the on first press do once, and on release do once functionality

fluid marsh
#

Also is it possible to get or change menu text like in the options to read custom text using script exposer in hks? If so I could make my input changing code reflect changes in menu

pliant lance
#

So you want a table, probably at Global scope

When a key press down is detected, check if the key already exists in the table, if it does, you add it via table.insert(TABLE NAME, { Key = action_arm_key, Frames = g_DeltaRunTime })
If the table already contains the key, then you call on it and do Frames = Frames+1 to incriment the hold

If the key is no longer pressed, remove it from thebtable