HammerAddons
HammerAddons copied to clipboard
"Value - Position" keyvalue for `comp_kv_setter`
Add a keyvalue to comp_kv_setter
that has the origin
type, so the position is transformed when the entity is in an instance.
(This is needed for the final PEE update)
Seems useful, though I should try and figure out a better system, so there's not an option for every FGD value type...
Well it only needs to include separate KVs for things that are transformed by instances, so targetnames, positions, and angles, anything else can just be set as a string value
Hmm, this actually broke things, VBSP/Hammer will set this keyvalue when you move the entity around/collapse it, meaning the regular string is never used. Guess we need a mode choices field instead.
Maybe you could make it where the other fields always take priority if set?
I could, but then you couldn't set it explicitly to an empty string if you needed that.
Ah yeah
I'm making a func_instance
for some meat hooks hanging by phys_hinge
s in a map and I'm having trouble getting the axes to replicate properly.
I'm pretty sure comp_kv_setter
is the way I'll be able to fix this issue but I've yet to figure out how I'm supposed to configure it to fix hingeaxis
on a per-instance basis.
Any suggestions? Just throwing this out there; I've tried every combination I can think of. Also the comp_kv_setter
is within the func_instance
, just thought I should maybe make that clearer.
If the phys_hinge
's keyvalue isn't being changed when the instance is collapsed, the comp_kv_setter
isn't going to be transformed either. Which game are you doing this in? It might be the case that Valve didn't implement instance functionality for the position keyvalue type. In that case, you'll need to move the KV setter outside of the instance and do it yourself manually.
I think the current release build doesn't work right in older games but I fixed it in dev
The type needs to be origin
for it to get transformed I'm pretty sure, but the current release has it as like vector
or something
If the
phys_hinge
's keyvalue isn't being changed when the instance is collapsed, thecomp_kv_setter
isn't going to be transformed either. Which game are you doing this in? It might be the case that Valve didn't implement instance functionality for the position keyvalue type. In that case, you'll need to move the KV setter outside of the instance and do it yourself manually.
It's Source SDK 2013 Multiplayer.
I think the current release build doesn't work right in older games but I fixed it in dev
The type needs to be
origin
for it to get transformed I'm pretty sure, but the current release has it as likevector
or something
I ought to switch builds then, my thanks
Having issues compiling the dev branch, though—can't build postcompiler.exe
. Stuck on this error:
Error: Invalid hiddenimport 'srctools._pyinstaller.hook-srctools'. Hidden imports should be importable module names – not file paths. i.e. use --hiddenimport=foo.bar instead of --hiddenimport=.../site-packages/foo/bar.py
~~Everything else seems to work fine. Tried on both Python 3.12 and 3.11. Should I be using an earlier version?~~
~~I still didn't figure that out locally, but I saw your comment here and decided to fork the repo and use the CI workflow instead, which appears to be working. Thanks for the help!~~
Looks like the CI workflow has the same issue when building:
Yeah that's a bug with the latest version of PyInstaller, try version 6.1.0
? But the change here is just in the FGD for comp_kv_setter
, you don't need the different compiler build.
Yeah that's a bug with the latest version of PyInstaller, try version
6.1.0
? But the change here is just in the FGD forcomp_kv_setter
, you don't need the different compiler build.
Yep, that was it. ~~Will give comp_kv_setter
a shot soon.~~ Seems like it works. Thank you!