#H3lp Yours3lf - OpenMW Helper Interfaces

1 messages · Page 1 of 1 (latest)

dire bolt
#

s3lf is a replacement for OpenMW’s built-in self module. It contains all the same contents but saves some footguns in the API and makes certain calls more precise on your behalf, alongside being easier to introspect. This mod should be installed purely as a dependency of others, as it adds nothing on its own except an interface which other scripts may make use of. For scripters, refer to the documentation to learn about how to use s3lf.

Many function calls be greatly simplified and performance improved by using this library. Over time, I would like to add more features to this script so as to fill in more gaps in OpenMW's API, for whatever reason they may exist.

Please give it a try and let me know if you have any feature requests or issues. 💜

https://www.nexusmods.com/morrowind/mods/56417
https://modding-openmw.gitlab.io/s3ctors-s3cret-st4sh/h3lp_yours3lf/

vast siren
#

I'm curious about the optimizations you mention

dire bolt
#

A lot of functions in the api return userdata type values and reallocate memory each time you call them. It's a bit slower than it could be, and if you're not careful it triggers gc more often as a result. In a torture test with 15 million iterations you get results about like this:

> luap
Lua mode ON, use exit() to return, help() for more info
Context: Player
Lua[Player] duration = os.time() for times = 1, 15000000 do val = self.type.stats.dynamic.health(self).base end print(os.time() - duration)
20
Lua[Player] duration = os.time() for times = 1, 15000000 do val = I.s3lf.health.base end print(os.time() - duration)
4
Lua[Player] health = self.type.stats.dynamic.health(self) duration = os.time() for times = 1, 15000000 do val = health.base end print(os.time() - duration)
4
#

Just like I've done here, you can usually store these values in some outer scope and it'll be fine, but you have to know when and how to do that, and that you should in the first place. The s3lf interface manages that bit for you and makes it simpler to work with in the first place. I'd like to do more precise tests with it but I can't quite do that in the console.

#

Or. Uh. Actually.

#
Lua[Player] duration = core.getRealTime() for times = 1, 15000000 do val = I.s3lf.health.base end print(core.getRealTime() - duration)
3.8601089709991
Lua[Player] health = self.type.stats.dynamic.health(self) duration = core.getRealTime() for times = 1, 15000000 do val = health.base end print(core.getRealTime() - duration)
3.5034015229976
Lua[Player] duration = core.getRealTime() for times = 1, 15000000 do val = self.type.stats.dynamic.health(self).base end print(core.getRealTime() - duration)
20.206530588999

There's about a half-second margin of error in all three test cases.

#

Since the interface itself manages and caches them I believe the benefits should scale multiplicatively the more things are using it.

vast siren
#

Thx! I was indeed wondering whether affecting stats(self) to a variable could optimize the code or not. I did it once just in case, and to simplify the code

dire bolt
#

Yeah, max ran into an issue with this when using health specifically last summer. There are more details in the gitlab thread if you would like an explanation from elsid

#

A similar thing happens with vectors too but you can't really get around those by the nature of what you're usually doing with vectors, and that they're immutable

inner flame
#

Hi the documentation link on the nexus page brings up 404

#

I'm trying to figure out how to transfer fall damage to an actor when you land on them,could this be helpful for that?

dire bolt
#

Oh, shit, thanks, I changed the URL back a while ago and forgot to update it

#

If you're doing anything with health this can be useful but it won't necessarily help with the specific case of detecting fall damage

#

Look in the docs, in the types module, under Actor, you want the isOnGround function. Put that in an in frame engine handler and you should be able to get started with that.

inner flame
#

Hi ive been getting absolutely spammed with these warnings in my debug menu: [01:08:56.263 E] Not supported section 'gameObject' in L@0x463[scripts/s3/lf.lua]
[01:08:56.264 E] Not supported section 'From' in L@0x463[scripts/s3/lf.lua]
[01:08:56.546 E] Not supported section 'gameObject' in L@0x464[scripts/s3/lf.lua]
[01:08:56.546 E] Not supported section 'From' in L@0x464[scripts/s3/lf.lua] any idea what thats about? it fills up the list everywhere i go

#

it started happening around when i started testing CHIM2090 but it seems persists after i remove it, im just a bit stumped

#

chim2090 is awesome btw

dire bolt
#

I've seen some strange errors being emitted from it.

#

Neither should be putting anything in storage at all.

#

For once I am actually quite confused on the matter.

#

After I finish the next update to s3maphore I'll take a look at both, though.

inner flame
#

no worries, thanks

dire bolt
inner flame
#

sure, heres my last, just starting a new game. theres a lot going on there pre-startup that i didnt see before, some wierd shit going on with my game rn..

dire bolt
#

H3lp Yours3lf - OpenMW Helper Interfaces

inner flame
#

im getting really good results from this update so far. none of the issues i had before. thanks!!

dire bolt
#

Hey since you have this installed already, you wanna try the new CHIM build? 👁️

inner flame
#

yeea lets goo!

dire bolt
#

I think you need all three plugins activated, but I'm trying to work on trimming down/removing the other two

inner flame
#

ok cool, thanks! ive been looking forward to you working more on this. its such a good change to the feel gameplay

dire bolt
#

I've translated some Dark Souls 1 mechanics into this build whole-hog

#

it's much more complete I think, but I'm not reallllyyy confident in all the inner formulae for stuff

#

the shield skill progression is definitely too damn high lol. I gotta fix that before I post this

#

But maybe not idk

inner flame
#

sounds interesting

dire bolt
#

In particular I worry I may have balanced it too hard towards the parry game

#

but my character isn't built for big heavy stuff so I suck with them

inner flame
#

oh wow parrying, nice. im currently using shields up, will that be a problem?

dire bolt
#

I would recommend using this in place of shields up

inner flame
#

nice, gotcha

inner flame
#

cant attack anyone at all

dire bolt
#

[23:43:19.413 E] Can't start L@0x8696[scripts/s3/chim2090/core.lua]; Lua error: [string "scripts/s3/chim2090/core.lua"]:37: attempt to index field 'S3ProtectedTable' (a nil value)
[23:43:19.413 E] Can't start L@0x8696[scripts/s3/chim2090/dynamicmanager.lua]; Lua error: [string "scripts/s3/chim2090/dynamicmanager.lua"]:24: attempt to index field 'S3ProtectedTable' (a nil value)
[23:43:19.414 E] Can't start L@0x8696[scripts/s3/chim2090/mechanics/poise.lua]; Lua error: [string "scripts/s3/chim2090/mechanics/poise.lua"]:43: attempt to index local 'ProtectedTable' (a nil value)

These make me think you might not have H3 installed properly..?

#

the animation warnings unfortunately are normal... but those ^ aren't

#

it should go before CHIM does

inner flame
#

ok let me see

dire bolt
#

but yea the block anims I have currently SPAM your logs hard.

#

Don't really have anything else to work with I don't think 🙁

inner flame
#

adjusting the load order didnt help. is there something im supposed to do other than the usual installation process?

dire bolt
#

No, not really. This is what my openmw.cfg looks like for it:

data=h3lp_yours3lf
content=h3lp_yours3lf.omwscripts

data=chim_2090
content=CHIM2090.omwscripts
content=CHIM2090_DisableVanillaRegen.omwaddon
content=Better Blocking.omwaddon
#

You might still have an old version running around in there somehow?

inner flame
#

hmm i dont think so.. i have OpenMW_luhelper.esp, could that be conflicting? im not sure what it does

dire bolt
#

shouldn't, no

#

but I used to bundle some of the h3 files directly in CHIM and now I don't

#

so if you replaced the files then the old one might still be there

#

scripts/s3/protectedTable.lua and scripts/s3/lf.lua

inner flame
#

ok yeah i forgot to clear it out first

dire bolt
#

that not supported section one is really weird. Idunno how that could ever have happened

#

I looked up where exactly the engine throws that and I'm like 99% sure I never did that

#

but idr

inner flame
#

yeah thats working now datchim

dire bolt
#

lmk how it treats you. I played the DS1 bits pretty straight, it seems to feel alright though

#

There are a couple hidden stats that need UI and it might get mad about creatures.

inner flame
#

dude, this is amazing

#

it took me a minute for my brain to adjust to ds1 in morrowind but then it clicked and it just absolute chim

dire bolt
#

yeah it allows you to overcome some fights you arguably shouldn't

#

it can play against you though. If you tweak the poise damage formulae too hard it becomes overwhelming quick

inner flame
#

hmm i have no frames though.. like 12 max in wilderness

#

ah their back now ..

#

ok that was wierd haha i just needed to kill something i guess. all good now. ill have a play with it and see how it goes. very optimistic about this 😄

dire bolt
#

If anything this one should be cheaper than the old builds because so much of it is concentrated in that onHit now

#

that dynamicManager does seem to hit pretty hard tho.

inner flame
#

it doesnt have a dodge roll does it? i notice you have a setting for overloaded animation speed, that sounds like fatrolling

dire bolt
inner flame
#

yeah nice thats what i was thinkin

dire bolt
#

The anim speed settings apply when your poise is broken or you parry someone

inner flame
#

ah ok i see

dire bolt
#

you really really don't wanna be playin that knockdown anim at 50% speed

#

even against single target the double damage from poise break will probably kick your shit in

#

not so bad if you're lighter on your feet tho

#

I tried to make it rewarding for heavier playstyles though. I usually roll light armor though so I probably balanced most stuff in favor of that unintentionally todd

#

literally bigger (not necessarily heavier) shields do more damage on a parry etc

inner flame
#

yeah im currently playing a light sword and board fighter so thats cool. im very happy about slowchus new grip change mod aswell, it seems like that will work really nicely with this

dire bolt
#

totally had nothing to do with why I suggested they make it work for any weapon, yes todd

#

I think this + GRIP + Roll will be really neat

inner flame
#

yeeeah im defintely gotta try roll now

dire bolt
#

Max has that target locking mod too

#

I have one also but it's sorta buried in a bunch of starwind shti

inner flame
#

oh yeah nuts.

#

gotta try starwind somre day

dire bolt
#

Have you played fable before?

#

One thing I was using it as a test bed for was implementing fable style attacks

inner flame
#

yeah i played a tone of the first one

#

it was mainly about block and attack timing right? i have a strong memory of casting a lightning bolt with my left hand while downing a bottle of wine with my right. that was an amazingly versatile game

dire bolt
#

the main thing I was messing with is that, in 2 and 3 they don't really have like, stances

#

you have x/y/b and each button corresponds to melee/ranged/magic

#

I came up with the idea after I made my own version of quickcasting for SW and thought it felt a lot like fable

#

both concepts work pretty much the exact same way

inner flame
#

thats killer

dire bolt
#

wasn't too bad. I gotta strip a bunch of stuff outta that big starwind monster and make them standalone soon

inner flame
#

this game is evolving exponentially now. just the last few months have been wild to observe

dire bolt
#

I'd say I'm about 80% toward achieving the original CHIM dream now

#

the OG mod did a couple neat tricks with movement speed I've not quite gotten in yet

#

I think all that it actually did was slow you down when attacking, and running in water

#

there were a couple other minor features solthas has implemented in her mods too

inner flame
#

like charged attacks and that?

dire bolt
#

crouch jumping, specifically

inner flame
#

yeah thats a big one for movement

#

a tenchu style grapple hook would be pretty nice too

dire bolt
#

There was a mod for that a while back

#

apparently it's since broken tho

hot nimbus
#

Both links to the gitlab on nexus are broken

dire bolt
#

Welp.

#

I'd update them, but I'm about to switch all the GitLab links anyway. Sorry 😅

#

I can get you the link if you need!

hot nimbus
dire bolt
#

Fuck GitLab.