#Contributors to HKS Guide?
1399 messages · Page 2 of 2 (latest)
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
They are enum objects
Yeah but I want to know what they reference
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?
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
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?
There's easier ways of changing both the inputs and the behaviours without modifying these objects what are you trying to achieve
Mainly I'm trying to get full ambidextrous movesets working
I've turned L1 and R1 into modifer buttons
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.
Can someone tell me what skill is the one the spear randomly does one handed?
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
here's a sample
"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)?
it doesn't quite work
you'll need to do some serious dynamic param bullshittery
shield aows are different than normal aows, there are weird behavioral issues n stuff
I'm trying to figure it out
again, I'd just make an aow wheel, I'll post the code later
I don't want a wheel
*everything besides shield aows have behavioral issues
Yeah because fromsoft spaghetti coded the entire system
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
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
yeah that sounds about right
I mean, I've had the same exact skill play when having equipped a greatsword on the right and elemer's shield on the left. So the presence of roaring shield in my equipped arms shouldn't have anything to do with it
Unless it reads the memory stack or something lmao
then it must be other miscellaneous hks issues
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
messing around in ExecAttack does things
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
try printing out the stack using debug functions and shit
you can kinda see what i do in my sekiro mod
Yeah I see a whole bunch of Debug lines already but where to these print?
allocated console
how do I get that
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
hook hkbFireEvent and get it to print out the thihngs
script exposer
I'm mentally challenged, how do I do that?
I'm trying to use the ExposePrint function but... Where is the console supposed to appear lmao
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
you gotta load the dll and exposeprint
I am
try something like:
hkbFireEvent = function(state)
ExposePrint(state)
hkbFireEvent(state)
end
Is the console supposed to appear ingame? do I have to manually open it somehow?
What would this do and where would I even put it. Update?
you'd put this anywhere where the control flow should call it
it should open a new window
Then I guess it's not loading? I assume I could do it with modengine
Yeah but is "function(state)" supposed to be a random function for the sake of the example, or one I'm supposed to create? Also why treat hkbFireEvent as a variable where you assign it a value (a function in this case). Isn't it already a function?
what game ver are you on? do you have dlc? is the game legit?
i love functions as first class citizens it's so nice
of course... you can see the steam path
is the modengine console enabled?
I mean i've enabled it but all I see is checking and searching
no enabling it means it won't open a new one
if it doesn't open one when it's disabled then idk
I have the game fully patched. Could that be it?
Assume the console doesn't work for me and I remvoe Exposeprint -- what should this code give me exactly?
nothing
the thing is supposed to make it so that hkbFireEvent also prints out what it's supposed to be playing
won't you need to do
local old = hkbFireEvent
hkbFireEvent = function(state)
ExposePrint(state)
old(state)
end
otherwise it'd just be infinite recursion
Ok I get it. So if I can't see the console then it's moot?
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)
and then I use file IO with its return value..?
well you'd create something like:
function logToFile(state)
local file = -- and log there
end
-- create the detour with logToFile
"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?
yeah
hkbvar detailing what kind of one shot sword art it is
one shot sword arts are the ones that use 40000 through 40020 i think
oh shit sorting out swordarttype is a whole thing
you might have to dynamic param this shit
Ok I'm trying to figure out why SWORDARTS_REQUEST_RIGHT_NORMAL always does the right weapon's skill (unless you have a shield in your left hand) EVEN IF I set it up so that it should get the left weapon's artID when holding down L1
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
all that sword art bullshit business made me give up on ambidextrous powerstance aows
The former should perform the left-hand weapon's skill - the latter the right hand's
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
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?
lumen did you try testing with 2 weapons instead of a weapon and a shield
But it works with the shield
preferably with the same type aow
Yeah. I'll post a vid soon to show that's going on
this is vanilla behaviour, shield swordarts override the right hand anyway
how the FUCK do i add controller input display like those fancy twitch streamers
wang you're a fancy streamer
you go to some website or something then tell obs to link to it
yeah i had to install obs (I use shadowplay like a homeless person)
yup
hence the whole dynamic param bullshittery that needs to be done
So far I haven't edited any param outside of testing, and this is the result. Just contorting c000.hks
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
I like that I can say some absolute BS then wang confirms it and I feel really smart for no reason
But I already have both shield and weapon ash at the same time, issue is the weapon ash defaults to an idle category
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
LMAO
"act(SetParamValue, PARAM_SwordArtsParam, aow, swordArtsTypeNewOffset, UNSIGNED_SHORT, swordType) " --> is this "dynamic param bullshit"?
does the aow name change?
yes
nah
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
Yeah but there you press a button and you switch between shield and weapon
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
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
I already tried to implement that but I guess it doesn't work
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
can you just do art_id = without script exposer and defining fields?
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
Script Exposer I added as a test but I can't get the console to work.
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
But if you two hand the left handed weapon, then Right_Normal still uses the Ash normally with the left weapon. So I guess SWORDART_REQUEST_RIGHT_NORMAL is checking for "style" somehow, but I'm not sure where
WHy?
You mean "if env(ActionDuration, ACTION_ARM_L1) > 0 then"?
yeah
the arts ID is pulled from memory from the equipparamweapon
not from the ether
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)
I haven't checked wang's ambi mod but doubtless it uses memory editing
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)
I don't think you're listening to me
I don't think I understand
I don't see the game setting arts_ID at all in the hks like you do here
it does, yea
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
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)
it doesn't pull from art_id specifically I think, art_id tells the hks what to think about certain properties of the ash, but doesn't change it directly
Oh really... Then what does? It's not in the c000.hks?
the game's memory
specifically, the param
hence the need to dynamically param things
So the only way to change ash is by using an "act" statement?
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
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
I mean, why in that order
Why do you pass the original Aow, then an offset, then "Unsigned_Short" then the Type
go on...
did you link newhksinfo.lua to your project?
have you put the contents of it into your hks or loadfile()ed the thing?
nouse... pcall?
pcall(loadfile()) the file in
chances are, exposeprint dont work for you coz it ain't defined for you lmao
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
it's the offset in memory
I don't see that value in smithbox
you have to enable it in settings
param editor > fields > show field offsets
or something
Ok done thanks
you can view the field type in context menu if you enable it as well
you will need it
What exactly does this change? Does this take the existing Ash of War and switches to the new one in the param? Meaning that, for example, Shield Strike becomes Impaling Thrust?
it changes the value in swords art type
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
in the swordsarts param
Yeah, and in doing so it changes the skill. I presume
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
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
yes
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
sounds like something you could probably do with a dll
it's always going to be memory editing if done through hks
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
Couldn't this be done by hijacking the hand change functions?
rather than turning a Claymore into a partizan
maybe? but it'll be more jank not less
path is relative to game exe
then you'd be loading "Game/NewHksInfo.lua" not "Game/yourmod/action/script/NewHksInfo.lua"
copying rows to other rows in the params should be fine
Yeah I fixed it
why is it like this
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
this shit is evil
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
@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)
I basically turn all shield aows into no skill when you aren't gonna use em
Does "act(SetParamValue, PARAM_SwordArtsParam" only affect the Params for the CURRENTLY equipped weapon?
then i revert em when you need em
it's terrible and horrible and awful but gets the job done
no, it affects the param rows
Ok that's what I thought
it should be an O(1) solution but I'm lazy so it's O(n) lol
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?
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
Chickens? I prefer turkey
I mean I've made it so the skill is being correctly selected depending on the modifier held. The issues are two: that I can't get the left handed weapon to play its skill when one handed (it "gifts" its animation to the right-handed one, which then plays it correctly)
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
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
I'd love to take a look at your wheel mod's code, but you deleted it 😭
Also you use a csv table to read what the param rows are, I took the time to add a lookup table in the .hks file itself
I can share it if anyone's interested
it was awful and I am ashamed it exists
a rewrite is coming soon dw
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
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
yeah you gotta iterate through player instances and find out which is which
it's weird
Thank you for the response, I am unsure as to how I would go about that
me neither
ah, well thank you anyways, I'll report back if I figure it out
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?
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
Thank you, how would I go about finding or updating to the correct value?
chain posts the singleton obj offsets per update
i think this is it?
plenty of useful stuff here, I should add this to the tutorial I think
Thank you, that's really helpful, where does he post this so I can check for future updates?
tools and resources
Thank you
You gotta remove the 14 at the start of the singleton btw
@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
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?
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.
if there's a cheat table for it you can adapt it prolly
ty, do you know if this table works on latest patch? https://github.com/The-Grand-Archives/Elden-Ring-CT-TGA/releases/tag/v1.16.1
probably
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
You can't call on functions with HKS though
Sorry, I'm still rather 'new' to hks and trying to figure out whats possible
@inner socket have you ever been able to call on existing exe functions with the exposer?
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
@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
yeah, you can
How?
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
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
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
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
Pretty sure there's some pointers for this in various cheat tables
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
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?
Event_EventHalfBlend360070 = Stealth Collect item
Event_EventHalfBlend60071 = Collect item
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
My GetStat function reads the stats after corrections from spEffects, not the base stats of a character. So maybe it's because you have spEffects on your character that modify what your stats are
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?
I will test again when I get home, but yeah it seems to start reading the right stats once I am back in limgrave
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
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
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
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
hi is three any way to read tae's dynamically through HKS? more like the events inside the TAE
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
sorry for the late reply. how exactly could i do that? and do you still have your discord server?
That had so much interesting potential
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.
Should I just make my own topic or is it okay to leave this here?
Does whatever weapon you are transforming it to also have the infusion of the same ID?
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.
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.
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
I'm sure it could be adapted to if you introduced flags and use emevd to trigger it on death death.
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
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.
@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
Im not quite sure what you're trying to achieve here
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
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
I went ahead and set it up with conditionals instead, I have it accurately reporting time/duration for each key individually in seconds held
Have you tested if the game will keep button A marked as on when you press down on button B as well)
yes, my new function is completely accurate from my testing
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
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
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
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
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
Nope
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