#[ER] not general anymore hks questions

1 messages ยท Page 2 of 1

rain anchor
#

its 7 i guessed

#

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

visual wadi
#

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

rain anchor
#

so the param side works

#

but the hks doesnt

visual wadi
#

did you verify that the flag is true?

rain anchor
#

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?

visual wadi
#

No this should be enough

visual wadi
rain anchor
#

im stupid

#

it wasnt my mods c0000.hks

#

it works now

#

sometimes my brain doesnt woek

outer latch
#

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

rain anchor
#

what does this line do?

if env(GetSpEffectID, effect) == TRUE then

if i understood correctly it checks if the player has the effect?

visual wadi
#

Ah that stinks

#

But no I wont go making functions on demand for others

outer latch
visual wadi
#

Smithbox can tell you the offset if you turn in the element in the param editor

rain anchor
#

How can i get if the player has a speffect

visual wadi
#

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

rain anchor
#

I don't think it works for me

visual wadi
#

It returns TRUE and FALSE

rain anchor
#

this is my code its inside my weapon refresh:

visual wadi
#

Did you verify that GetSpEffectID was the right one? Including capitals

rain anchor
#

yes i looked into the c0000.hks

rain anchor
#

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

#

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

smoky phoenix
#

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

rain anchor
#

the speffects are -1 duration

#

and why would it get cleared?

visual wadi
#

Use logs to find out what your code is doing to find out why

rain anchor
#

so you think adding extra effects which trigger the effects will fix it?

visual wadi
#

Place logs in places where things are cleared

#

See which place is clearing stuff

rain anchor
#

nothing gets cleared

smoky phoenix
#

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

rain anchor
#

ok

#

ill try

smoky phoenix
#

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

rain anchor
#

still doesnt work

smoky phoenix
#

than I am sorry I misunderstood

rain anchor
#

it did set the new speffect which chains the grease

smoky phoenix
#

if the buffs are not applying in the first place that is a different issue

rain anchor
#

i mean sometimes it is appliying

#

thats the weird part

#

like one in 30 times

smoky phoenix
#

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

rain anchor
#

no

#

its a chained one

smoky phoenix
#

can you give me an example of an speffect id you are trying to call in hks?

rain anchor
#

from 21950195 - 21950207

#

but 21950167 works for SetParamValue

smoky phoenix
#

I believe you are a full digit over the limit, try reducing them

rain anchor
#

ok

smoky phoenix
#

that would definitely cause weird inconsistencies in my experience

#

anything 9999999 and under should be good

visual wadi
#

Passing eventflags as strings means you shouldnt have the float limit

rain anchor
#

i passed speffects and flags as strings

visual wadi
#

But yeah, too high spEffect Ids will break HKS

rain anchor
#

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

rain anchor
#

@visual wadi is it possible to import modules like dkjson?

rain anchor
#

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

rain anchor
#

also how can you open files in hks

#

the json stuff works

#

i only need to open files

#

but io doesnt seem to work

rain anchor
#

i think i got it to work

#

turns out that one local instead of global broke everything

rain anchor
#

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

visual wadi
#

Sometimes it do be like that

rain anchor
#

@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

rain anchor
#

so GAME_BASE is 0x7FF78AEB0000 in your modules

#

is that the base address of the values?

#

then what is PARAM and EquipParamWeapon

rain anchor
#

i found this in CE

#

i guess these are the offsets

visual wadi
rain anchor
#

ok

#

so its difficult to find those values?

visual wadi
#

Again, not my territory anymore. You're asking the wrong person

rain anchor
#

ok i believed that you may know that bc i thought that hks uses these offsets all the time

rain anchor
#

@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?

visual wadi
visual wadi
rain anchor
#

what is the max magic slot number

#

this is tali 1

#

wrong one

#

this is the right one

#

in ChrAsm

visual wadi
#

Ah yeh, ChrAsm can be a fickle one

rain anchor
#

so how can i get it into hks

#

bc those pointers really confuse me

visual wadi
#
TALISMAN_1 = { _CHR_INS_BASE, BIG_SIGNED_INT, 0x580, 0x2B0 + 0x70 + 0x08 + (0x3DC - 0x328) },```
rain anchor
#

ok

#

and 2 is TALISMAN_1 = { _CHR_INS_BASE, BIG_SIGNED_INT, 0x580, 0x2B0 + 0x70 + 0x08 + (3E0- 0x328) },

visual wadi
#

If Talisman 2 is 0x3E0 then yes

rain anchor
#

ok thanks

rain anchor
#

is it somewhere in the params?

#

it gotta be like 20

visual wadi
#

That's a constant in the game

rain anchor
#

ik but idk the number

visual wadi
#

Then google it

rain anchor
#

ok

#

12

#

thanks for all your help

#

what happens when you set tali4 if you dont have the last slot?

rain anchor
#

@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

rain anchor
#

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

rain anchor
#

I will find out once i figured out how to refresh all the different things

visual wadi
rain anchor
#

Yes

#

Thats why im changing pointers

#

Im doing a mod which lets you save builds

#

And load

visual wadi
#

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

rain anchor
#

Great could you share the code with me

visual wadi
#

But it will require a lot of different puzzle pieces

rain anchor
#

Ok

visual wadi
rain anchor
#

But is it able to replace the items talismans magic etc

visual wadi
#

It's currently only build to support weapon changing

rain anchor
#

Ok

visual wadi
#

But theoretically could be made to yes

rain anchor
#

But could i do the other things with the same logic?

#

Like changing your funcs

visual wadi
#

Yes, but I'm unsure if you have all the knowledge required to do so

rain anchor
#

Ill see

visual wadi
#

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

rain anchor
#

I've done a lot with hks the last few weeks my mod is about to get released

#

This stuff is for another mod

visual wadi
#

Cool

rain anchor
#

Wdym by complex like brain destroying complex

visual wadi
#

Nah nothing like thag

#

But it would have probably cost me another few hours to figure things out

rain anchor
#

Ok

#

What has to be changed for the stuff to work?

#

Are there pointers for stuff like that

visual wadi
#

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

visual wadi
#

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

rain anchor
#

Thanks

rain anchor
#

@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

visual wadi
#

Where did you place the module? Also I thought I had send you modules before, or am I mixing up things

rain anchor
#

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

rain anchor
#

do you know why that could be happening

visual wadi
#

Did you install all previous modules on the other pc as well?

rain anchor
#

Yes the whole mod

#

Like its the exact mod that worked for me

visual wadi
#

Then the issue is with the other pc

rain anchor
#

Ok

#

Ill try it on my friends pc

smoky phoenix
#

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?

visual wadi
#

Pretty sure that's reliant on the animation right? I dont think that's mapped out

smoky phoenix
#

Yeah it is a value in the magic event in the .tae

visual wadi
#

Easiest way would be to have a table with every anim type and what dumy poly it uses

smoky phoenix
#

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

visual wadi
#

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

smoky phoenix
#

Thank you, that is really good to know at the least, hopefully this means hks is some how capable of this

rain anchor
#

@visual wadi does this work like that?

#

bc it doesnt

visual wadi
#

Your get is wrong

rain anchor
#

Im stupid

rain anchor
#

@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

smoky phoenix
#

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

visual wadi
#

Making it 0 makes it so it doesnt clean up the last 4 digits

rain anchor
#

Ik that but what about scaling etc

visual wadi
rain anchor
#

I mean when i modify the base the +25 will have different values

visual wadi
#

Well yeah, that's how scaling orks

smoky phoenix
#

Scaling is done through the base weapons scaling, attack element correction, and reinforcement param I believe

visual wadi
#

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

rain anchor
#

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

smoky phoenix
visual wadi
#

Maybe update the calCorrect param instead

smoky phoenix
#

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

rain anchor
#

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

visual wadi
smoky phoenix
#

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?

visual wadi
visual wadi
rain anchor
#

So there isnt really a way to edit the damage of an upgraded weapon directly

smoky phoenix
#

I mean simply the 3rd and 4th values from the end that denote infusion, and the last 2 values

rain anchor
#

Through hks

smoky phoenix
#

I wrote code for that so I could make vfx update based on infusion

rain anchor
smoky phoenix
#

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

rain anchor
#

The issue is that the max damage of a weapon is 9999 and when it goes above i think it gets some weird numbers

smoky phoenix
#

Is this a dynamic system?

rain anchor
#

Yes

#

Its the newest mod in mod announcements if you want to take a look

smoky phoenix
#

I can try and check it out later, I am not at my pc right now

rain anchor
#

Its hks based and you can set dmg to 9999 but how would that behave for upgrades

smoky phoenix
#

It would be based largely on what the weapons reinforcement param says to multiply at depending on upgrade level

rain anchor
#

So like it could go above 9999?

#

Bc then it would break i think

smoky phoenix
#

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

rain anchor
#

So literally removing upgrade scaling is the only thing i can do

smoky phoenix
#

What exactly are you trying to accomplish?

rain anchor
#

I want to be able to dynamically change upgraded weapons stats

#

And i know that they dont have param rows

#

Its complicated

smoky phoenix
#

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

rain anchor
#

Ok

#

But im not entirely sure how to read the param

#

The upgrade param

smoky phoenix
#

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

rain anchor
#

like is that the percentage up from base or from the line before

smoky phoenix
#

Those are multipliers

#

So 3.8x base

rain anchor
#

ok

#

great

smoky phoenix
#

2.3 x for phys and magic

rain anchor
#

understood

smoky phoenix
#

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

rain anchor
#

yes im doing a lot of math atm

#

what does base attack rate do?

smoky phoenix
#

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

rain anchor
#

my head hurts

#

i regret writing my code unreadable

smoky phoenix
#

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

rain anchor
#

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

smoky phoenix
#

the last 4 digits of what? the equipment id? or something else?

rain anchor
#

the weapon id

#

thats what determines the affinity and upgrade

#

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+

smoky phoenix
#

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]'

rain anchor
#

Basically yes

#

But also no

#

So my code was right but i got confused with the mess i created before so it didnt work

rain anchor
#

@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

visual wadi
#

Describe the bugs, and were they in seamless

rain anchor
#

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

rain anchor
rain anchor
#

It seems to happen after something new from my mod gets triggered

rain anchor
#

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

visual wadi
#

In your update function, log after every function call

visual wadi
rain anchor
#

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

rain anchor
visual wadi
#

Wdym it isnt true

rain anchor
#

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

rain anchor
#

@visual wadi does changing pointer cause desync in ersc?

#

and are dynamic params the only thing that causes desync

visual wadi
#

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

rain anchor
#

but are params the only cause for desync?

visual wadi
#

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

rain anchor
#

so the pointers would apply to all the players?

visual wadi
#

If there is no local player check in the update or in the function then yes

#

Which can be undesired

rain anchor
#

like changing vigor for example would cause my friends vigor to go up

visual wadi
#

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

rain anchor
#

but does this stuff cause conflicts that lead to desync that causes the game to be unplayable

visual wadi
#

All depends on what you're writing to

#

It's not a one awnser fits all question

#

It's a case by case basis

rain anchor
#

ok

#

so stuff like stats can be changed

#

and stuff that only affects one playes game so stuff the others cant really see

visual wadi
#

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

rain anchor
#

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

visual wadi
#

Flags are alsways synced

rain anchor
#

ok great

rain anchor
#

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

visual wadi
#

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

rain anchor
#

But in which part do i add it?

visual wadi
#

No but there is Game Data Man and Class Index

#

You can expand it from there

rain anchor
#

So gamedataman offset, 0x08, 0x6C?

#

For the offset part

#

Or like this :
{_GAME_BASE, SIGNED_INT, _GAME_DATA_MAN, 0x8, 0x6C }

#

Probably like that

visual wadi
#

Assuming it's a signed in, then yes

rain anchor
#

It probably is unsigned

visual wadi
#

Prolly

rain anchor
#

Ok thanks

rain anchor
#

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

rain anchor
#

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?

visual wadi
#

[[[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

rain anchor
#

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

visual wadi
#

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

rain anchor
#

Also is it possible to read keyboard inputs in hks?

visual wadi
#

Some flags like NG+ are not synced

#

But that is a handpicked list

rain anchor
#

So if i change a flag in my game this flag will change for the others even if im not host

visual wadi
rain anchor
#

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

visual wadi
#

Then it would be turned on and off on the other end too

rain anchor
#

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

rain anchor
#

@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

visual wadi
#

That would do it, but it needs to be done every frame

#

I can send you my animation modile

#

Module

#

Tomorrow

rain anchor
rain anchor
rain anchor
#

I scrapped that whole idea bc everything literally everything broke once in coop

rain anchor
#

@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

visual wadi
#

You can see all the coop states in the screenshot

rain anchor
#

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

rain anchor
#

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

rain anchor
# visual wadi Mate... 6

Yes thats what im talking about. In my question before i asked how its handeled with multiple clients

visual wadi
#

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

rain anchor
#

Ok

rain anchor
#

@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

visual wadi
#

Looks like I did actually place it in GameBasePointers and didnt fully delete it

#

It's literally the first item

#

Feel free to cut a bunch of my stuff out

#

Dont forget to call the main func in update

rain anchor
rain anchor
#

Like 1 2 3 4

#

Or 0,1,2,3

#

And is the host always the first one

visual wadi
#

Havnt used it in a year, and you're capable enough to look at it yourself

rain anchor
#

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

visual wadi
#

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

rain anchor
#

oh thats a problem

#

anyway to fix that

#

i need specific numbers

#

i dont know how to do it the other way

rain anchor
#

like i have 4 scripts which should do
if p1 then do
if p2 then
if p3 then
if รŸ4 then

visual wadi
#

Not at the moment no

#

Brain is a bit dead

rain anchor
#

making this seamless coop compatible is difficult af

smoky phoenix
#

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?

rain anchor
#

Probably

#

I can try

rain anchor
#

@visual wadi is it even possible to get strings with the exposer?

#

its unicode 32

visual wadi
#

Somewhat

#

I got the model name which is a string

rain anchor
#

like the players name

#

and how would that work inside the hks

#

like as which data typ

visual wadi
#
        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

rain anchor
#

ok ill try it out

rain anchor
#

what is HandlePointerIncriment

rain anchor
visual wadi
#

Basically makes it so the next object is the last item in the table +4 a offset

rain anchor
#

i think ill just use 4 different emevd files with each appliying a different speffect

#

so each player has a different sp effect

rain anchor
#

@visual wadiand what youre saying is that for the speedup i have to do this every frame?

SetPlayerSpeedModifier(modifier)
visual wadi
#

Yah

rain anchor
#

@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

smoky phoenix
#

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

rain anchor
#

No flags dont work sadly

#

Because how am i supposed to reset them only on launch

smoky phoenix
#

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

rain anchor
#

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

smoky phoenix
#

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

rain anchor
#

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

smoky phoenix
#

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

rain anchor
#

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

smoky phoenix
#

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

rain anchor
#

Os.execute

#

Which opes a cmd which opens the python script

smoky phoenix
#

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```
rain anchor
#

Yeah the issue is its a .py

#

Its just python.exe

#

But what if another py is running

smoky phoenix
#

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?

rain anchor
#

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

smoky phoenix
#

cool, glad you got it figured out

visual wadi
#

Also, why use HKS to launch a python script, you can launch it through the Modengine bat

rain anchor
#

You can, didnt know that

#

I use hks for the flags

rain anchor
#

@visual wadi how can i make sure that the chr debug spawner doesnt summon the enemy into the ground

rain anchor
#

also whats the worst thing that can happen when using the spawner to often

visual wadi
visual wadi
#

And graces

#

Meaning graces cannot be interacted with

#

And bosses don't show up in a boss room

rain anchor
#

thats some evil shit

#

does that reset on death?

visual wadi
#

On loading screen

rain anchor
#

ok so on death and warp

visual wadi
#

Like, you could teleport to a gracs

#

No clue if quitting out would work

rain anchor
#

but one enemy replaces one random enemy slot?

visual wadi
#

Yes

rain anchor
#

ok so its pretty rare that a boss actually despawns, im using x3 enemies btw

visual wadi
#

Depends on the size of the map