#[ER] not general anymore hks questions
1 messages ยท Page 2 of 1
so the param stuff works but it still doesnt work
this is my code:
ESD triggers 220
i will add a turn off too but first i want to get it work with enabling
Value type of what
Yeah the enableSorcery or enableIncantation need to be turned on
And if you see something like 0x58[4] then it means it's a bit and the offset is 4
did you verify that the flag is true?
i mean it should be
because the params get set
the only problem would be that act() doesnt work
ill check with debug tool
so the flag works fine
its on when it should be
do i need to do smth with the special motion category or the tae?
No this should be enough
Why is GetEventFlag red here
im stupid
it wasnt my mods c0000.hks
it works now
sometimes my brain doesnt woek
Those work becuase every weapon category has its own roar moeveset in its tae (eg. a26 tae of collosal swords contains barbaric roar, warcry movesets in that tae itself). If you want to modify a weapons heavy attacks after an ash of war buff, you either put that moveset in all taes (obviously unfeasible) or put it in tae of ash of war, but the weapons spedial motion category needs to be the AOW too. Please bro, if it wouldnt be too much trouble could you write a hks function (using script exposer functions) for changing a weapons special motion category if it has a particular speffect.
*By "those" I mean barbaric roar and warcry
Yes, obviously.Let me find the screenshots
@visual wadi @rain anchor I know its correct because it works if I set a weapons special motion category to 663
what does this line do?
if env(GetSpEffectID, effect) == TRUE then
if i understood correctly it checks if the player has the effect?
Okay what would be the pointer/offset args for this (all the bracketed parts) act(SetParamValue, PARAM_EquipParamWeapon, spAtkcategory,<offset>,<value type>, <value>, <bitOffset>)
Smithbox can tell you the offset if you turn in the element in the param editor
How can i get if the player has a speffect
Is it being run on the player hks
If yes, there's a env for it from vanilla
env(GetSpEffectID if my memory serves me right
I don't think it works for me
It returns TRUE and FALSE
Did you verify that GetSpEffectID was the right one? Including capitals
yes i looked into the c0000.hks
i have some really weird issues atm
the speffect stuff is weird
i duped all the grease speffect and gave them new ids
now i call them through hks
the problem is that they dont apply
or dont show idk
only some work
this is the code
basically what im doing is i set the speffect after the weapon refresh bc it would autmatically remove itself otherwise
the log returnse the right values
only 175 worked
that are my rows
idk what is wrong
i tried different things but nothing seems to work
also the refresh just doesnt trigger sometimes
the refresh gets called in func update
ignore this:
function ChangeModelId()
Getmodelid()
SetParamValue(PARAM.EquipParamWeapon.EQUIP_MODEL_ID, rightwepid, modelid)
end
now none work
it works only sometimes
the greases
its really confusing
@visual wadi could you maybe take a look at the code?
i would really appreciate it
in my experience you want to use a 'buffer effect' for something that is supposed to keep existing after the conditions are no longer met
for me it seems that when the conditions to trigger a speffect are no longer appropriate to trigger the effect, some effects will be canceled
if you use a blank speffect that chains to the speffect you want then it will not clear it, but there may be a better solution
Use logs to find out what your code is doing to find out why
so you think adding extra effects which trigger the effects will fix it?
i did and nothing unusual
nothing gets cleared
if you use hks to trigger the blank effect to chain to your speffect it will no longer clear your weapon buffs when the conditions are not met
I do not know why, but in hks speffects triggered by hks conditions can be cleared by hks when the conditions are no longer met, I think it is kinda like in animations, how some speffect events will end the speffect they invoke when the event is over, I had to do the same thing to get my weapon buff visuals to work without automatically clearing themselves
still doesnt work
than I am sorry I misunderstood
it did set the new speffect which chains the grease
if the buffs are not applying in the first place that is a different issue
21950194 is one of the ids right?
hks has a limit on the size of values it can use, I think 9999999 is the max value
can you give me an example of an speffect id you are trying to call in hks?
I believe you are a full digit over the limit, try reducing them
ok
that would definitely cause weird inconsistencies in my experience
anything 9999999 and under should be good
Passing eventflags as strings means you shouldnt have the float limit
i passed speffects and flags as strings
But yeah, too high spEffect Ids will break HKS
weird it seems to work now
but what could be the problem with the refresh function not working everytime?
its a bit annoying and something i would want to fix for the release of the mod
it basically checks if the CMSG of the bonfire leave anim is active if it is it sets the var animwasactive to 1
then if the cmsg is false and animwasactive is 1 then it does the refresh
which means it changes the equipped weapon slot to another one and back
@visual wadi is it possible to import modules like dkjson?
or anything i can use to write and read files
the hks guide says its possible with json but if i do require(json) or require(script_dir .. "json.lua") (on a local file) the player keeps dying
tbh no clue how to write dying
also how can you open files in hks
the json stuff works
i only need to open files
but io doesnt seem to work
i think i got it to work
turns out that one local instead of global broke everything
its getting painfull
now my costum hks doest get called anymore
also none of your modules get called
i can send both my c0000 and my code hks if you want
its very much
i would appreciate if you take a look
nvm it loads but i can send you the code that causes it to not load
nvm i got it
after 5 hours of debugging
Sometimes it do be like that
@visual wadi what are the actual pointers to the params rows and fields?
Bc i want to try if i can maybe code an extern programm which can modify those on runtime
so GAME_BASE is 0x7FF78AEB0000 in your modules
is that the base address of the values?
then what is PARAM and EquipParamWeapon
That goes deeper into the Reversing territory than I am familiar with. You are going to want to use something called a AOB for the actual location for the params, and then use offsets from there. I recommend looking through #elden-ring-reverse-engineering.
Again, not my territory anymore. You're asking the wrong person
ok i believed that you may know that bc i thought that hks uses these offsets all the time
@visual wadi how do i use this:
EQUIP_MAGIC_DATA = { -- 0x530
MAGIC_SLOT = function(slot)
return { _CHR_INS_BASE, SIGNED_INT, 0x580, 0x530, 0x10 + ((slot - 1) * 8) }
end,
SELECTED_MAGIC_SLOT_INDEX = { _CHR_INS_BASE, SIGNED_INT, 0x580, 0x530, 0x80 },
},
to get every possible slot
also did you find pointers for the talisman slots?
They are probably in ChrArm, I would look at a CE table if I were you
A for loop to a max of I believe 14
i dont know how i can get those offsets into the hks
what is the max magic slot number
this is tali 1
wrong one
this is the right one
in ChrAsm
Ah yeh, ChrAsm can be a fickle one
TALISMAN_1 = { _CHR_INS_BASE, BIG_SIGNED_INT, 0x580, 0x2B0 + 0x70 + 0x08 + (0x3DC - 0x328) },```
ok
and 2 is TALISMAN_1 = { _CHR_INS_BASE, BIG_SIGNED_INT, 0x580, 0x2B0 + 0x70 + 0x08 + (3E0- 0x328) },
If Talisman 2 is 0x3E0 then yes
ok thanks
and that?
is it somewhere in the params?
it gotta be like 20
That's a constant in the game
ik but idk the number
Then google it
ok
12
thanks for all your help
what happens when you set tali4 if you dont have the last slot?
@visual wadi is this the correct way of getting pointers?
GetPointerValue(CHR_INS_BASE.PLAYER_GAME_DATA.VIGOR)
my issue is that it stops right before the setparams
GetParams
small w instead of W
do you know why setting the righthandweapon pointer doesnt change the weapon?
only the model
and why this retuns a really high number when its -1
i mean big signed int should also work for negatives right?
like its supposed to be a club with no talis
the weapon itself works
but the icon and damage and reqs dont update in the menu
as well as the talis speffects and slots
so the issue i have is that the stuff doesnt get refreshed
No clue
I will find out once i figured out how to refresh all the different things
Yes
Do you want the weapon in the inventory to also be changed into the thing you are changing it into?
Yes
Thats why im changing pointers
Im doing a mod which lets you save builds
And load
It's a a lot more complex thing to change the item in the invetory with pointers
Luckily for you, I wrote it two weeks ago
Great could you share the code with me
But it will require a lot of different puzzle pieces
Ok
I will send it later tonight or tomorrow
But is it able to replace the items talismans magic etc
It's currently only build to support weapon changing
Ok
But theoretically could be made to yes
Yes, but I'm unsure if you have all the knowledge required to do so
Ill see
I was initially making it so it could change other item types too
But it became very complex real fast and it was unnecessary for what I needed it for
I've done a lot with hks the last few weeks my mod is about to get released
This stuff is for another mod
Cool
Wdym by complex like brain destroying complex
Nah nothing like thag
But it would have probably cost me another few hours to figure things out
Ok
What has to be changed for the stuff to work?
Are there pointers for stuff like that
Its more of the same pointers
Wait, I think within the same category wasn't a problem
The issue was category swapping
I should be able to do some easy tweaks to make it work for other cateogies
Okay pretty sure it's going to be quite easy to do, but will be bulky to do so
You can modify StoreTrickWeaponInInv from the Weapons file so it handles a different aspect of GaItemHandles, you will need to call CycleGetInventoryItems(GAME_BASE.GAME_DATA_MAN.PLAYER_GAME_INFO.STORAGE_INVENTORY) at a rate of your chosing. I have it set to every 2 frames inside my update function. You're also going to need to call InventoryManagerInit() ONCE at like, 100 frames after HKS is initialized, this will still be in the loading screen. If you do it outside of the loading screen or more than once, prepare for lag
Thanks
@visual wadi i think i have a problem with my mod how exactly does this work
i tested it on another pc and it didnt load the modules
like no module at all
Where did you place the module? Also I thought I had send you modules before, or am I mixing up things
it works on my pc
but not on another one
its weird
i placed it relative to the c0000.hks
so my path is "weaponcostumizer\allthemodules.hks"
"weaponcostumizer\\allthemodules.hks"
and all the modules are next to the hks inside the folder weaponcostumizer
do you know why that could be happening
Did you install all previous modules on the other pc as well?
Then the issue is with the other pc
Hey Exelot, I was curious, is there a way to read or change the dummy poly a spell uses to fire its bullet from using hks and script exposer?
Pretty sure that's reliant on the animation right? I dont think that's mapped out
Yeah it is a value in the magic event in the .tae
Easiest way would be to have a table with every anim type and what dumy poly it uses
I was hoping it was possible, so I could try and make my universal casting system modular, but right now it requires animation edits to work unless I overwrite weapon model during cast
How would I change the dummy poly used for the bullet though?
I don't actually need to read the dummy poly I suppose, The main thing is I need a way to set it and was hoping to not have to alter weapon model for visuals, in the past I just edited every animation by hand but that is not really modular
I know Chain is working on mapping out exactly this
So it'll likely be possible
But I have no knowledge on the whats and the hows
Thank you, that is really good to know at the least, hopefully this means hks is some how capable of this
Your get is wrong
Im stupid
@visual wadi how do i modify upgraded versions of weapons with setparamvalue?
Bc atm it just breaks the mod
Like i did
local wepid =GetWeaponID(HAND_RIGHT, 0)
SetParamValue(param, wepid, val )
I think its because upgraded version arent actually real param rows
You have to 'clean' the weapons id, because upgraded weapons use an offset in their id instead of the actual item id found in the params
GetWeaponID(HAND_RIGHT, 2)
Making it 0 makes it so it doesnt clean up the last 4 digits
Ik that but what about scaling etc
He's on a more updated version of my code
I mean when i modify the base the +25 will have different values
Well yeah, that's how scaling orks
Scaling is done through the base weapons scaling, attack element correction, and reinforcement param I believe
You dont update the scaling of the upgraded version, you update the scaling on the base version and that will affect scaling between 0 to 25
The problem is that the values should be on the Upgraded version not the base. In my mod you can edit f.e the damage for example to 2000 the +25 version will do like 5000 damage even though the player wanted 2000
In case he wants the +25 to be edited
Bc thats just how my mod is supposed to work
And ahh, do you have id cleaning built in to your newer functions? That is convenient
Well then you have to redesign your feature
Maybe update the calCorrect param instead
Update the base weapon and the reinforced should also reflect the changes I believe, I think you have to update the base unless you want to use custom speffect applied based on your weapons upgrade level
It seems really complicated to do bc it can be changed for multiple weps at the same time
So you would need to create new calccorrect rows for every weapon
Yeah, you just do GetWeaponId(HAND_RIGHT), and it will clean the last 4 digits, the second argument of GetWeaponId allows you to overwrite this but it has a default value of 4, so 0 makes it not clean at all and 2 makes it only clean the upgrade p art
Nice, I had to figure out id cleaning myself when I realized I couldn't update reinforced params myself and also wantedto make proper dynamic vfx for infusions
Does your code have a way to strip the equip and read just infusion or upgrade level too?
I always had a cleaning function shipped with my getWeaponid code
The vlaue it fetches always includes the infusion and upgrade level yes, but strips them away in the fucntion by default. Is that what you mean because I am honestly not sure about the quesiton
So there isnt really a way to edit the damage of an upgraded weapon directly
I mean simply the 3rd and 4th values from the end that denote infusion, and the last 2 values
Through hks
I wrote code for that so I could make vfx update based on infusion
Well then how can i make sure the damage doesnt go above 9999 on upgrade?
I do not know how to explicitly set a damage cap properly if that is your question, other lwise your best bet would be custom reinforce params, or speffects to modify damage of the weapon applies dynamicly through hks based on reinforcement
The issue is that the max damage of a weapon is 9999 and when it goes above i think it gets some weird numbers
Is this a dynamic system?
I can try and check it out later, I am not at my pc right now
Its hks based and you can set dmg to 9999 but how would that behave for upgrades
It would be based largely on what the weapons reinforcement param says to multiply at depending on upgrade level
Idk that part, 9999 is likely a limitation on engine or else where
But the scaling behavior for upgrades is largely handled there and you could just make it so upgraded levels so not scale up at all using reinforce params or dynamically altering them
And then set the value directly in hks with your system
So literally removing upgrade scaling is the only thing i can do
What exactly are you trying to accomplish?
I want to be able to dynamically change upgraded weapons stats
And i know that they dont have param rows
Its complicated
If you want them to be exactly what you want you would need away to read the weapons upgrade level and either set the weapons upgrade scaling to stay base or you would have to do the math for the weapon based on is level and the multiplier in weapon reinforcement param
I can better try and help when I am back at my pc, you basically start at the weapons reinforcement param and then the offsets are the weapons upgrade level
like is that the percentage up from base or from the line before
2.3 x for phys and magic
understood
Once you get the hang it is alot less complicated than it seems
They are also technically independent of each other
So if level 9 is 1.8x or so, you can make level 10 1x and just go back down to base damage instead if you want
baseAtkRate? I do not remember if it actually affects the base at all, but it does multiply the base damage specfically when added to an attack param using isbaseattackadded
so mostly for ash of wars and I think maybe some unique attacks
I had to work alot of this stuff out in my last overhaul mod to make universal casting work, but it has been awhile, also not really relevant but the reinforce param protector still works for armor if you know what to do but you have to rig up the names individually instead of it working automatically
are you just writing pointers and offsets directly? or using Exelot's code? regardless it helps to make sure you leave yourself notes either in the code with --
or just somewhere you prefer to leave yourself notes or information
i tried writing code that automatically divides by the multiplier
it gets the last 4 digits then gets the mult for that
and then divides
but my code is really chaotic so no clue what i did wrong
basically it returns numbers like 1092 - 1293819274091740912049
the last 4 digits of what? the equipment id? or something else?
the weapon id
thats what determines the affinity and upgrade
have fun reading if you want
basically i created a bunch of lists at the top which include every possible mult and every possible end
i scrapped that and just replaced the 0 offset with 2 GetWeaponID(HAND_RIGHT, 0) to GetWeaponID(HAND_RIGHT, 2)
its not ideal but its to complicated with my bad code+
were you able to get it to do what you want using getweaponID? I am not much help when it comes to any serious indexing of tables or arrays, I can make and reference lists but my brain does not like to process things like 'for i = n do' and 'example = table[i]'
Basically yes
But also no
So my code was right but i got confused with the mess i created before so it didnt work
@visual wadi im having really weird issues with my mod and i really dont know what could be the cause. I released my mod yesterday and since then i got like 7 bug reports about stuff i never saw before in my mod i am testing and testing and testing and i just don't have issues with my mod like what could be the cause that my mod just doesnt work for some people
i installed it from the nexus and tried if that messed smth up but literally everything worked
even multiple times
like 20 times in a row
that means i cant even test what causes these issues
Describe the bugs, and were they in seamless
Seems like the hks broke
or rather like the exposer broke
thats the problem im facing
it seems that the hks breaks either through script exposer or through the hks not loading
it worked on mine and a friends pc
maybe its an installation issue
the script exposer isnt allowed to be moved
bc if it moves away from the modengine folder into the mod folder for example it doesnt work anymore
Im not sure but i hear often that they can't switch the weapon and cant drink their flask, regular stuff when the hks breaks at a specific part
But it generally feels like it breaks after the hks tries to do something with the weapons
So mostly inability to twohand weapons ride torrent and drink flask and no ersc
It seems to happen after something new from my mod gets triggered
And the most confusing part is that i set the mod up at my pc my laptop and my friends pc and it worked on all 3 flawless
Sounds like a function in your HKS is crashing
In your update function, log after every function call
It needs to be in the place where the toml expexts it
Like i said everything works for me but not for them
Its really weird
I tested on multiple pcs and everything worked
I tested it literally 30+ times every function and it worked(it took hours)
Its like the mod is cursed
But ill test it with logs
Also this isnt true except im dumb so once i tested putting the exposer into the mod folder and it just didnt load the mod at all
Wdym it isnt true
So it is true but this is also true
I said it wrong i meant it isnt always true
Anyways the logs dont say anything weird
I put them in a lot of places everything normal
But as you can see on the nexus page people are reporting bugs that the hks has problems
And i dont know how i should fix that if i never get any issues
Like it worked on 3 devices for me
And somehow i got 10/80 people saying it doesnt work
@visual wadi does changing pointer cause desync in ersc?
and are dynamic params the only thing that causes desync
dynamic params can cause seamless to not want to connect if the two regulation bins dont match, that's why you set up everything to be with eventflags
but are params the only cause for desync?
Depends on how you define a desync
I have plenty of moment where I want one player's pointers to be modified but not the others
Thats why I have a local player check
so the pointers would apply to all the players?
If there is no local player check in the update or in the function then yes
Which can be undesired
like changing vigor for example would cause my friends vigor to go up
Depends on what pointer is used
If it's chrIns then it can be synced yes
Game Base, probably not
That's where shit can get weird
but does this stuff cause conflicts that lead to desync that causes the game to be unplayable
All depends on what you're writing to
It's not a one awnser fits all question
It's a case by case basis
ok
so stuff like stats can be changed
and stuff that only affects one playes game so stuff the others cant really see
Again, cant generalize it untill the actual method of implimentation and context is carefully reviewed
Any param changes need to be syncronized with flags
But outside of that, everything needs to be reviewed per thing
Any ChrIns pointer stuff is fine to be syncronized and doesnt need special treatment I think
So if you give me a list of all base game pointers and how they are used, I can tell you which ones cannot be synced
ok great and do params work fine by just using flags for params and for pointers just test?
i dont really know how flags are handled in ersc
if you could tell me if flags get synced between players or not, i would just find the other stuff out by myself
but i need to know if flags sync
Flags are alsways synced
ok great
how can i find out in which of all these different places i have to put this in the chrinspointers hks module
its Runes in CE and its in the path Hero/PlayerParam/soul
GameDataMan is a basegame path
So that will only house the local player tuff
Wait
I need to verify my BS first, give me 10
yeah game data man is a basegame path
And it should already be in the base game pointers file I send you
Class index is even already in there
Inside gamebase pointers there isnt something called runes or soul
But in which part do i add it?
So gamedataman offset, 0x08, 0x6C?
For the offset part
Or like this :
{_GAME_BASE, SIGNED_INT, _GAME_DATA_MAN, 0x8, 0x6C }
Probably like that
Assuming it's a signed in, then yes
It probably is unsigned
Prolly
Ok thanks
is there a way to check if the player is the multiplayer host?
because in my mod one script is supposed to only run for the host
is team type Host and character type Host for host?
so @visual wadi lua if GetPointerValue(GAME_BASE.WORLD_CHR_MAN.MODDED_STUFF.TeamType) == 1 then this should work right?
[[[WorldChrMan]+10EF8]+0] just points to the CHR_INS_BASE of the local player
And I am pretty sure that the CHR_INS_BASE table already contains the teamtype
Also Personally I would go and use GAME_BASE.CS_SESSION_MANAGER.SESSION_STATE and then check if it's 3 or lower
Oh okay
Ill just use that
And that also works with seamlesscoop?
Nvm how would it even work without
I forgot that you cant play modded multiplayer without seamless
This works with Seamless yes
It was yui who gave me this data so that I could make propper checks. It was what the is LocalPlayer stuff used to rely on
Does it always sync to be the same as the host or does it follow some other weird rules
Also is it possible to read keyboard inputs in hks?
It syncs both ways
Some flags like NG+ are not synced
But that is a handpicked list
So if i change a flag in my game this flag will change for the others even if im not host
The only key inputs that can be read are the ones that already do something
Ok so ill need to write a dll
Anything i have to worry about when setting flags for ersc?
Like what would happen if i set a flag to on and then almost immeadiatly back to off
Like in the same frame
How would that affect others
They run the same geteventflag Stuff
Can it happen that it just isnt active anymore for them
Then it would be turned on and off on the other end too
But it only turns on at the host
So the host does:
- Rng between flags 0000-0366
- get if 0000 == 1 do smth
- set all flags off
The other players do: - get if 0000 == 1 do smth
- set all flags off
Because it isnt supposed to be rolled for every player
Bc that would result in 4 times the chance in my case
@visual wadi how can i make the player run faster i tried to set the Speed modifier CHR_INS_BASE.CHR_MODULES.BEHAVIOR_MODULE.SPEED_MODIFIER to 2 but it didnt change anything
That would do it, but it needs to be done every frame
I can send you my animation modile
Module
Tomorrow
What about this? How does this work
Thats what im doing atm
I scrapped that whole idea bc everything literally everything broke once in coop
@visual wadi is it maybe possible to get if the player isnt host and then difference 3 different players which joined the lobby
like Host does this
nonhost 1 does this
nonhost 2 does this
nonhost 3 does this
sounds weird but my mod does some crazy shit
You can see all the coop states in the screenshot
so no way to diff the non host players
so for hks all clients are the same?
i mean the pointers
there has to be a way to only apply something when youre player 2 for example
Like the game has to be able to tell the different clients apart
And the pointers that are there are just pointing to the coop state like you said
Do you maybe know if we someone knows how to do that
Would be huge
Mate... 6
Yes thats what im talking about. In my question before i asked how its handeled with multiple clients
This
Ah
There's client number yes
I had it some time ago but wasnt using it anymore. I can probably fetch it
Remind me in 10h or so and I will fetch it
Ok
@visual wadi you told me to remind you about the client slots
Also i would appreciate help with the speed modifier
Bc that doesn't work for me
Good you did
Looks like I did actually place it in GameBasePointers and didnt fully delete it
It's literally the first item
Furthermore here is my animation module
Feel free to cut a bunch of my stuff out
Dont forget to call the main func in update
Didnt see that at all i searched for coop and forgot that it can also be called multiplayer
Anyways what does it output
Like 1 2 3 4
Or 0,1,2,3
And is the host always the first one
Havnt used it in a year, and you're capable enough to look at it yourself
Yes i am capable, the issue is that i have to get all my friends to be online at the same time
Which will be hell
But still thanks for the information
You can just go singleplayer and open your world to seamless and see what the state is
Also know this
If a player leaves and comes back, they will not fill in the same slot as before
It will always go up by 1 when someone joins, and can reach high numbers
oh thats a problem
anyway to fix that
i need specific numbers
i dont know how to do it the other way
do you maybe know a way to track those numbers
like i have 4 scripts which should do
if p1 then do
if p2 then
if p3 then
if ร4 then
making this seamless coop compatible is difficult af
Could you save a players slot and name when they join and if the slot is higher than 4 or whatever the max is set it back down to a slot that is not taken? or would that just cause desync or issues if you try changing the value?
also could you store player names on join to help keep track of which player is which regardless?
like the players name
and how would that work inside the hks
like as which data typ
local modelPart1 = env(TraversePointerChain, pointerTable[1], SIGNED_SHORT, unpack(pointerTable, 3, _end)) - 0x30
local modelPart2 = env(TraversePointerChain, pointerTable[1], SIGNED_SHORT, HandlePointerIncriment(pointerTable, 3, 2)) - 0x30
local modelPart3 = env(TraversePointerChain, pointerTable[1], SIGNED_SHORT, HandlePointerIncriment(pointerTable, 3, 4)) - 0x30
local modelPart4 = env(TraversePointerChain, pointerTable[1], SIGNED_SHORT, HandlePointerIncriment(pointerTable, 3, 6)) - 0x30
Here you can see me fetch a character model by the individual byte
A character name is 32 characters long iirc
Just find the values and then turn the unicode into values, pretty sure lua has methods for it
Yeh you just take the unicode and do string.char(input)
You can probably leave out the -0x30 thing I did
ok ill try it out
what is HandlePointerIncriment
bc that doesnt tell me what that is
Basically makes it so the next object is the last item in the table +4 a offset
i think ill just use 4 different emevd files with each appliying a different speffect
so each player has a different sp effect
@visual wadiand what youre saying is that for the speedup i have to do this every frame?
SetPlayerSpeedModifier(modifier)
Yah
@visual wadi im wondering is it possible to save variables between hks loads, like if i warp everything seems to reset
i need something that stays the whole time active and only deactivates if the game closes
so that it is turned off the next time i load the game
i tried this:
if alreadydone ~= 1 then
alreadydone = 0
end
``` infront of Update but it still set to 0 even though it should stay 1
this happened on hks reload
definitely more Exelots territory but you might be able to use flags for this, but I do not know
though for saving variables you can technically write either to your own module or to another module to save updated variables and than load that module on load to 'remember' the saved variables, but I do not know of a way to differentiate loadscreens in game and loading the game on boot personally so you would need to come up with the logic to have it clear on game load still
I really do not know much about flags or the systems that manage them sorry,
and with hks I am not actually sure it differentiates loading on boot or loading between maps, so I really do not know how to go about that with in game systems, just that saving variables is atleast possible
if it is possible to hook or check for the close game or return to desktop options you may be able to make those manually set your variables to clear on close but I don't know how to do that off hand either
Ill think about what j could do
Yeah you could check close game
But what about alt+f4
Or a random crash
That would break the whole thing
those can cause bugs with saves in general and would break things correct
I am not entirely sure what you could do, may I ask for context?
also regardless, you will likely be better off when Exelot is free/around to help more
could you make a variable that gets saved on close with everything else as X and on load if that variable is X then load saved variables
then set it to Y and if it is Y on load have it default instead of load saved variables
sorry, that would break loading between maps though, I am not sure off hand
Well theres a different way but idk how, my hks launches a python program
And each time it reloads it opens another instance
Which isn't supposed to happen
Only one on game launch
the game reloads the hks on all loading I believe
so if the python program is not set up to close or atleast not open again if running then each load screen would do that
Thats what I'm saying
Its an unlimitedly looping program that only stops once the game process closes
And it breaks once 2 are active
Well i could kill and restart it
But idk how that works
Bc the process is just called python
that was my first suggestion, but I do not know how you are loading or running your python program with hks, unless I am misunderstanding
apparently you can use this line to kill a task if it exists
os.execute("taskkill -im process_name_here.exe")
I do not know if this works but I found suggestions to use code like this to check if something is running:
filedata = io.popen("tasklist /NH /FO CSV /FI \"IMAGENAME eq "..processname.."\"")
output = filedata:read()
filedata:close()
if output ~= "INFO: No tasks are running which match the specified criteria." then
-- Program is running
else
-- Program is not running
end```
oh, my bad, I thought you were having issues on the lua side with calling the python script too much
could you use the second block to only run the python script if it is not already running?
No no issues just that i can't find a way to kill the py
Or to check if its already running
Bc like i said in the task manager its just python.exe
I tried those things already
Did smth wrong probably
pythonw.exe
i think it works now
anyways thanks for your help
cool, glad you got it figured out
Could use a param row value somewhere that's unused as a bool container. But other than that, no
Also, why use HKS to launch a python script, you can launch it through the Modengine bat
@visual wadi how can i make sure that the chr debug spawner doesnt summon the enemy into the ground
also whats the worst thing that can happen when using the spawner to often
Base the position on player coordinates
Every non spawned enemy despawns, including the boss
And graces
Meaning graces cannot be interacted with
And bosses don't show up in a boss room
On loading screen
ok so on death and warp
but one enemy replaces one random enemy slot?
Yes
ok so its pretty rare that a boss actually despawns, im using x3 enemies btw
Depends on the size of the map