#Model Replacement API & SDK
1 messages · Page 3 of 1
@azure elbow would know more than me regarding it I was just bringing it to your attention if it's not causing issues then good I suppose, I just imagine he mentioned it for a reason so I'll let him explain it when he gets the chance ^^
I think if it was a big deal to them and not just an offhand comment, they'd mention it here ^^' It causes a lot of confusion for modders when people try and "middleman" certain things without knowing the context of why it might potentially be a problem.
That being said with this new update not only do models still not disappear when people using a replaced model DC and the corpses still freak out and send me into the sky sometimes (does NOT happen with reskins of the default model), but now we have a new... Issue with offset items that seems to be inconsistent per model... Lol
Warning: We are loudge. https://clips.twitch.tv/ProudOilyPigeonNerfBlueBlaster-nEufnULS6kRKEHWN
There was an issue in the past that basically prevented cosmetics from working at all, so I think they overlaid on the invisible base player model.
Now that that has been cleared up, the issue is a rather technical one, but basically there isn't a good way to overlay those cosmetics with the correct rotations and positions onto arbitrary models.
I'm honestly thinking of just disabling cosmetics on model replacements.
I never had issues with it until this last update personally.
@median rain Any idea why this is being thrown?
Somewhat, I thought I had fixed that but I guess not.
I might have time to take care of that this weekend at the earliest.
v55 bug - trees disappear while using this mod
Spoiler for v55 stuff:
|| trees can be destroyed now by the truck, im unsure why your mod has anything to do with it but i went on a spree to find it out and its this one ||
Thanks for the report. I was actually just looking into that myself, but haven't found the source.
Well disappear - meaning only the mesh renderer/mesh filter, they are still there, colliders still work just that the closer you get to them they just pop out of existence visually lol
uhh Im a bit late, but this is a VRM model converted to FBX inside Unity. looked fine in the preview but I guess this one can't be fixed easily
have you found the source of this issue? i'd love playing with your API but driving the car is kinda impossible if you cant see the trees lmao
v55 isn't even out lmao.
|| you can just mow them done lol ||
okay that's fair lmao
||YEAAH BUT then it explodes after 3 seconds...... it's hilarious though||
I mean this is true but your API shouldn't be affecting trees to begin with XD
Which makes the whole thing funny
That's quite the subjective take for someone who doesn't know how it works. Generally, anything rendering related has the possibility of conflicting with the API, as I had to make many rendering changes to make it work. If zeekers changed how trees were rendered in the new update, it's not a stretch for zeekers to also have put the near tree LODs onto a layer that they didn't use in the past, which I use.
Ahhh that would make sense actually tbh, I wasn't really thinking about it from that perspective
I guess you could probably check if the new LOD stuff could be implemented without it breaking compat with V50
@median rain V56 hit the Main branch today
If you wanna work on pushing that update for MRAPI live
c;
i think they'll start working on the update after the game comes out of the beta
v56 isn't in beta anymore =/
They already pushed the update, also reread my message. It exited beta today.
yeayeah sorry, i'm glad the update is out
Yeah should be good now. I had to change a few things, but didn't do an exhaustive playtest. As always, if anyone encounters any random purple railings, or other objects that you shouldn't be able to see, but can now, please let me know.
@median rain these still get thrown
I'm trying to do some tech support for a guy trying to make his first model replacement. For some reason this error appears in the log whenever you try to put the suit on. Any idea why? The game has no problem loading the mod it just throws an error when the suit is put on.
If I recall that's related to some materials being null.
Probably related to embedded materials in the model. Try remaking the unity project, and if possible, extract the materials from the model, manually assign their textures, and make sure all of the materials are included in the asset bundle.
https://youtu.be/Wnobg8zFFK0
Made a slightly updated tutorial. Goes over additional stuff like implementing Jiggle physics, adding multiple models to a single mod, and implementing voice-activated mouth movements.
ModelReplacementSDK Tutorial - https://github.com/BunyaPineTree/LethalCompany_ModelReplacementAPI/wiki/Using-the-Unity-Workflow
Package URL - https://github.com/BunyaPineTree/LethalCompany_ModelReplacementSDK.git#upm
ModelReplacementAPI.dll - https://github.com/BunyaPineTree/LethalCompany_ModelReplacementAPI/releases
MoreSuits Mod Page - http...
This is really incredible, huge thanks for the work you put in.
<@&1191929644916670575> Would you be so kind as to give me another pin?
This video, please.
Ya silly goof
Do /jeb pin #1187188516644474911 message
Wait
Is jeb not online rn?

Okay okay, jeb is online
oh tysmm
testing the new version in a modpack and not sure if this was mentioned before, version 2.4.7 spams the console with this message. It also prevents morecompany cosmetics from loading and lagspikes when changing suit
anyone know a fix to the shovel looking like this when I use custom player models?
I would love this, even if it was just a config option
Model Replacement API
Why?
It's to make the threads easier to find
Robyn goes around from time to time and renames threads just so it's easier lol
it is strange since the actual mod has no spaces, but I assume it's so you can just type in "model" to find it lol
I don't really think that's an issue, but you forgot the second half
Model Replacement API & SDK
the way discord's thread search works is that it won't pick up on partial terms, only complete ones. so previously if you didn't type in ModelReplacementAPI, it wouldn't show up at all
Btw have you looked into fixing the NRE issues I let you know about before? I see them in the logs almost everytime I play still XD
Not even once.
You're welcome to though. I accept PRs. As of right now I'm a bit too busy to get back into the rabbit hole that is modding.
Hey have we determined if the popping in with the trees has been resolved? They still seem to act weird
dunno but i heard someone mentioning that its happening with another mod too, dunno which one tho
Aw shit
That was solved a while ago.
Wouldn't be surprised if another mod messes it up though. Zeekers put the tree near LOD on a layer that used to be free game for modders.
I figure that turning off morecompany cosmetics was an intentional choice for this mod, as it does so by default whenever i start a game by myself. What i'm not getting is that it seems to get overridden whenever i have to restart a lobby? or whenever enough people join that lobby?
in this recording one of my friends crashed and i had to restart the lobby, and when i did the morecompany cosmetics started working again. when i put on a modelswap suit (soldier from the lethalfortress2 pack) it became really hard to control my movement. i can't really explain why this happened because its was caused by both restarting the lobby and people joining. trying it with either/or of these conditions didn't cause an issue.
this only started being an issue in 2.4.6, version 2.4.5 ran fine with both morecompany cosmetics and modelswaps, and had no issues aside from the trees being invisible (which was fixed in 2.4.7).
(a closeup of what was showing in 3rd person when i switched to the modelswap suit)
still hoping for a fix for this 🙏
this isn't going to get a fix anytime soon. This is related to viewmodels and the only way to fix them would be for the creator to make custom ones which is not possible under the current mod. If you don't want hand models in the way, turn off generate viewmodels by default in the configs
Oh I wasn't talking about the models' hands, I meant the shovel being too far down in the hand on the ones that do work. The ones holding it by the blade of the shovel. I suppose it was confusing showing the broken playermodels when showing off my issue. xD
yeah, that's still caused by the viewmodels. Notice how the shovel is in the same position in space? That would also have to be done individually. It has to do with the thickness of the hands
I created something a model a while back that had that issue. It is likely caused by different geometry within the playermodel intersecting in a way that affects movement (aka they don't like being in the same space)
I'm surprised they have the geometry to do this in the first place
I imagine that's what's happening to me as well, but I'm not sure why it only started after version 2.4.6. When I used 2.4.5 this wasn't a problem
are you sure it isn't related to morecompany changing?
or maybe a specific cosmetics mod
I did my tests with the current version of morecompany and a single modelswap mod
2.4.5's only issue is in the trees disappearing
2.4.7 doesn't show any problems until a really specific chain of events happens, that i don't think I can replicate solo
2.4.7 is set to disable morecompany cosmetics by default I think, but at some point that specific choice gets overridden and forces the cosmetics to load onto all the models
When the cosmetics are loaded and u switch to a modelswap suit, it's almost like it's trying to create a second movement handler, which causes difficulty in moving
would there be a way to have your model's firstperson/view heights scale depending on your model replacement?
That's something that's been asked for a great deal, but unfortunately not something I have any plans of doing.
Reason being that I don't want a cosmetic mod to have any impact on gameplay.
However if someone wanted to make a view height scaling mod, I'd definitely help as needed.
There's some weird stuff going on with the networking of cosmetics that I haven't completely got to the bottom to. Regarding your strange movement, I can only imagine it has to do with collisions between the cosmetics and some collider on the model.
Don't expect a fix any time soon, or at all. Items like shovels get displaced a great deal just due to the fact that the model's arms aren't the same proportion, and so the hands aren't in the same place. Despite that, I am under the impression that the actual shovel's hitbox isn't related to what you see in first person.
Also this is just an aside, but custom viewmodels are very possible, just not expanded on very much. People made custom viewmodels before I made them automatic.
i figured there was some overlap between player colliders and something with cosmetics, and unfortunate that it's a difficult issue to find. i suppose the solution for now is to downgrade, so what version would you suggest switching to?
If you're fine with trees not working, downgrade to 2.4.5
Also could you send me the exact cosmetic mods you were using and wearing at the time?
Collisions is a pretty important thing that should be fixed.
Especially since now that I think about it, none of the tf2 models should even have colliders.
i have way too many modelswaps in the pack where it happened, but the ones that we were using when it happened were:
Soldier (lethalfortress2)
Toothless (JiggleMakers)
Flareon (GhostModeling)
i think the only morecompany cosmetics we used were in Starvexia's MegaCosmeticsPack
could you not make it a toggle like with viewmodels based on head position?
did vaporeon have the same issue? they should be very similar
that could potentially mean changing the player object procedurally for each suit which might be more trouble than its worth
if they were related to back cosmetics, I could see it too, since that model's spine runs horizontally
flareon and vaporeon have the same behavior when cosmetics are enabled where the hat gets attached sideways onto the head. but my friend who used that modelswap reported none of the issues i did
like no movement problems
yeah, I noticed the sideways head. I assume that has to do with bone rotations. Blame nintendo, they are official models
idk nintendo didn't really intend for these quadrupedal models to be applied on a humanoid player object
(also in 2.4.5 version of the api, it simply put the hat floating where the normal player model's head would be)
probably not, I mean I kinda stretched the limits of what was possible to pull that off
I wanted to see how far I could stretch it, and stretch it I did
wait are you the one that made those models
yeah
set back legs to leg bones, set front legs to copy bone rotations to their opposite back legs
added bones not attached to anything for the arms
glad you are enjoying them
well I was on a break cause I got bored of it, I was popping off for a while with models
but google banned my gmail account associated for some reason (probaby because I was only using it for Github) and I forgot the github password
but I was messing with leafeon earlier and I might just make a new github
nope, google said no
I almost remember the password, that is the worst part
but not quite, should have wrote it down or something
honestly if I do do the rest of the Eevee's, the last one I do is going to be sylveon cause I have no idea where I'm going to put the ribbons
my friend and i imagined that the ribbons could be where the arm bones are assigned so it uses those to hold scrap
but i'm not sure how hard that would be
thought about it, would be hard, but would look awful because they'd move when you run and stuff
*wouldn't
there is no way to get around that
yeah
i guess a safer bet is to do the arms like the other two, and assign the ribbons as jiggle bones
yeah, but they are long, so I'd have to figure out how to bend them as well so they look natural
and I'll have to mess with how much jiggle they have so they don't flop everywhere. I'd probalby default to the same jiggle used with the mewtwo tail
true
i'll stay watching what you work on, when your next stuff comes out i'll probably use it too, cus your swaps are exactly what ive been looking for for a long time
just made a new account. Look for leafeon next, still deciding if I'll finish it, but if I do, it'll be next
cool, don't forget your password this time
I just wish I could update the Faputa skin since it isn't correctly assigned to the suit. That's how I found out it was lost in the first place
I mean, you can also just change the config but... yaknow
heya @median rain Bunya, is there a way to quickly rotate the whole model when set up? cause I have it going vertical for some reason
No, but that's usually a sign that something in the unity project is messed up.
Rather, I did that myself in the early days and it didn't do anything.
If I recall, the solution was something like
Take the model in the asset hierarchy, and rename it.
Or maybe it was renaming the asset in the asset viewer. It was stupid like that. You could also just try making a new unity project.
renaming it worked... have no idea why, but I'm not complaining
I really wish I knew why as well.
I think you're the second person it's worked for, so that must mean it's a real solution.
Unity is messed up.
I've got an enemy skin that uses a copy of the player's armature to make it look like the enemy is carrying the player. For the vanilla player, I just hide the ragdoll and then use the player's material on a new model I instantiate. I'd like to do the same for CustomModelAPI models.
Is there a way to get the custom ragdoll for a player and hide/show it?
There's a ref to it in the bodyreplacement class, but it's protected. The custom ragdoll gameobject itself, once spawned in, has a raycasttarget component that I might be able to use, but that seems hacky and inefficient.
Do you think it would be enough to make public the ragdoll gameobject?
Or is there anything else you need?
I reckon so. As long as hiding mesh renderers on that game object would hide the ragdoll, that'd do it.
What toon shaders are compatible with this API? I created an HDRP project and applied the poiyomi toon shader, but it only came out in pink.
HDRP supported shaders, which poiyomi is unfortunately not.
I use lilToon, personally.
does anyone know how to limit the movement of jiggle bones, either via a collider or something of the sorts, i wanna make the tail on a model not able to clip through the hips
should i be messing with the character collider for smaller models at all or is that meant to be left alone?
is there a way to copy the shader that lethal uses or alteast use a similar one for a playermodel?
copy the settings from nomnom's unity lc patcher
for hdrp
umm
could you direct me tword that
Contribute to nomnomab/unity-lc-project-patcher development by creating an account on GitHub.
thank youu
I see, I barely know almost anything about coding so I'll probably see if I could maybe commission somebody to make such a mod.
Btw, how would you make custom viewmodel/first person hands as well? autogenerating viewmodels is neat since it's less work but the autogenerated ones tend to bug out or lag behind the player's view. (Not to mention melee weapons blocking the player's view.)
None of those issues would change for custom viewmodels.
As it turns out, there's some really wacky stuff going on with the arm bones that I haven't figured out how to fix yet.
is it normal that sometimes the asset prefabs are pretty sensitive? as in it just sometimes doesnt register i feel like even though the prefab has a project MR asset and an asset name
figured it out
i have to untick and retick this for the asset prefabs to generate properly
I've heard there's been some updates to the API
Does this mod mess with the physics of dead bodies? if so, it might be messing up the company cruiser
I believe it does, but it doesn't affect the scan node or where you grab it (on 2.4.5 anyway). Some people report that specific models make them float in the air when they hold dead bodies, and it's happened to me, so I wouldn't be surprised if it did something to the cruiser
In our lobby putting a body in the cruiser results in some seriously bad source engine physics occuring
do you have video or log when it does that
No, but
That should depend on the person who made the mod.
The API doesn't add anything like collision to models or ragdolls, but if a mod maker adds physics, it's possible that they forgot to configure their colliders correctly.
any mod to do with changing player models that isnt a retexture doesnt seem to work? doesnt work for my friend either, did nothing but with the player model and nothing worked, been like this since v55/kidnapper fox release
what skins? it might be that the mod doesn't have them assigned to the suits correctly. It could also either be a mod conflict or the profile could have been messed up by thunderstore. That'll happen sometimes and you need to make a new one.
new profile didn't seem to net results, and I mean all of them don't work, maybe my r2modman is broken idk
can you send the profile code?
it could be some conflict or something as well. I bet I can find
01911a9d-5f58-1979-be56-272cba1c2ea1
i would use the hatsune miku bunya example mod
and with the emotes
if it works for you theres something wrong with my r2modman
yeah it is a mod conflict. turned off half your mods and it worked. Now just have to find which one. Btw, do you know which mod is disabling the config?\
now just have to find which one
hiding the config
@wispy dagger the issue is jetpackfallfix
you should also be able to get rid of hookgen cause I think that is the only thing related to the dependency
that mod really isn't needed anyways and there are other better mods that handle it anyways
Can someone make a Forest Keeper suit using the forest keeper model i've been thinking about that for a while
youre a life saver thank you so much
since a while I have a problem with using the Thicc body replacement mod and I wonder if it has to do with this mod being the dependency. Whenever I use that suit my point of view is shifted? I am not sure how to describe it but when I carry anything (flashlight, shovel, two-handed items,...) the items are never in my hands and kinda out of my fov.
Any idea why that is or how to fix that?
Hello, I've been using this guide to create a player model : https://www.youtube.com/watch?v=Wnobg8zFFK0
I've followed everything and created a new testing profile with MoreSuits and ModelReplacementAPI installed but the model doesn't apply ingame, I've only got a texture on the default suit but no modded model.
What could be causing this ? Doesn't work on my regular profile either whereas other modded player models work just fine.
does it show anything on the logs?
Nevermind it was my bad I forgot to match the name of the suit in the code and in the mod folder ! The model replacement works fine now 🙂
If anyone has the forest giant model feel free to send it to me, as I’d like to try this
Could this mod possibly effect interacting with the terminal/entrance doors or not being able to pick up or drop items?
The API, no, unless LC gets an update that changes how that is handled.
But it's always possible for someone using the API to make a mod that affects those things.
Since you're here atm, can you look into fixing the issue of ModelReplacementAPI breaking the visor and post processing?
It can easily be reproduced in lan, the only difference compared to multiplayer is the visor will be missing for the client that joins, in Multiplayer it causes the visor and post processing to vanish for the host
TestAccount tried looking into fixing it so he could push a pr for you but he couldn't figure it out, I even helped beta test some builds for him cus he can't lan test since he's on linux
havent ever noticed the post processing dissapearing but i've seen several times my visor dissapear completely off my screen, and sometimes it reappears when someone else dies (me and my group call it our spidey sense at this point)
Whoa, compat
Yay :3
Sick. Though I don't know whether that's compat, or just the mod working as intended.
I had to add that compat because of the way I was handling the dead bodies.
is mod working for v60?
my friends used it earlier today and it seemed to work the same as before, as far as I could tell
mod works in v60 about the same as in v56
any other issues such as the modelswaps disabling morecompany cosmetics hasn't been fixed yet
okay thank you
(still crossing my fingers for a potential fix for visor and viewmodels)
I'm just wanting a fix for it making the visor and half the post processing effects disappear
ah, so that's what was causing that to happen lol
TestAccount tried forking and fixing it but couldn't figure it out
Yeah maybe you could figure it out and make a fork and push a pr for Bunya to implement when they feel like it
I know Bunya isn't active atm with modding
Interesting
@sonic atlas any idea if the issue also occurs when using a body replacement with no viewmodel?
i.e. if you set "Generate Viewmodels by default" to false?
Not sure you could test in lan, the visor will be gone for the client that joins in lan rather than the host
oh hm
the issue I was thinking of also affected the host, but it didn't hide the visor
ModelReplacementAPI is doing a funny
@median rain is this intentional?
This object is normally in the Default (0) layer
I'm looking into how to detect whether a viewmodel replacement is in use and I was thinking of just checking if the vanilla arms' layer is the expected value, but it looks like I can't rely on it
It's been ages so I can't give you the exact reasons, but yes this is intentional, and it's related to the additional no post processing layer I added.
do you mean you had to shift things around to make room for an extra layer?
Somewhat.
scary
The lack of complaints on that matter tells me that my layer schema is currently without issue.
yeah, if things work as-is it's probably fine, but I am very wary of making any changes like that myself
I recently had to ask another mod not to put some lights on 30/31 because of a compat issue with CullFactory, but that's specific to lights thankfully
I believe the BodyReplacementBase.replacementViewModel parameter is set to null when there is no viewmodel.
This should be true regardless of whether a mod maker adds their own viewmodel, or if it is automatically generated.
I'll have to pipe that information through from my compatibility class, which is a little bit ugly but not a big deal
yeah
glad to have confirmation of that, that's what I suspected
Yep, had to go run through the code for a moment.
So theoretically that config option is what causes the weird stuff with the visor?
@median rain No changelog? ;o
I see you posted the changes on github though nice!!! Excited to finally see the issue with the visor and post processing fixed
what got changed in 2.4.8? i didn't see a changelog update in the thunderstore page
A candidate solution for the visor issue that I am unable to test right now, as it's multiplayer related.
No need to add a changelog seeing as it's not confirmed to work yet.
Shouldn't mess anything up though.
Yeah we'll be testing it later today, will let you know if it's fixed ^^
It can be lan tested btw, it just for some reason disappears for the client in lan that joins rather than the host
So if it's fixed in lan for you it should theoretically be fixed in Multiplayer hopefully 🤞
So the thing about the messed up viewmodel is an issue with the replacement model rather than with this mod?
I try to get it fixed somehow cause it's the most annoying bug currently
Not being able to see shovel, or flashlight being out of hands or two-handed items blocking vision
It's a bit more complex an issue than that.
Fault is definitely shared. There are some item related things that I haven't found the correct way to handle, but regardless, unless the mod maker sets up items in their hands correctly there's nothing that can be done on my end.
And depending on the proportions of the model, two handed items will block vision no matter what.
To those of you who are interested, I can confirm that this will fix the multiplayer visor issue.
Regarding the post processing matter, there's nothing I can do to fix that. Generally mods that modify, change, or remove, the visor hud do so by disabling the hud post-processing element, but from my testing all of those post processing matters are inexplicably linked to the visor hud.
Mods that add third person, or emote mods with a third person perspective, usually remove the visor when changing the viewpoint, so post processing disappearing is going to keep on happening.
If you're in first person, it should be fine though
I'm down to test this on my end and fix it if it's something I'm causing, not sure what we are talking about though, is it a specific effect on some skin mods?
Anyone knows if there's a way to get in contact with the user "FoxGod" from thunderstore? They created the ThiccCompany model replacement mod. On the mod page there's a GitHub link but it's for ModelReplacementAPI 🫠
I've noticed it in tons of places. If you want a good example, go to titan and do an emote, and switch between the first and third person perspectives.
It's related to disabling the visor hud, at Systems/Rendering/PlayerHUDHelmetModel in the scene assets.
They aren't in the modding servers anymore, it looks like. There probably isn't.
Aww okay T.T thank you for the heads up
huh, didn't even know about this before, that seems really weird.
Either way, I've updated it on my end to just turn off the renderer for the helmet instead of disabling the gameobject.
I did notice in my testing though that ModelReplacementAPI seems to disable the helmet anyway when third person is set to true.
in this image, I just turned off my quick patch and Here are titan results (as noted by third person stuff not being triggered)
Then I re-enabled it and
Nuuu
Yeah, some mods that added third person didn't handle the visor consistently, resulting in it never being turned back on or off or etc, so I decided to handle it myself.
Incidentally, how did you turn off the renderer?
I'll go with whatever works and put out an update.
Apparently it does. Just tested with @sonic atlas , and a recurring problem we've been having with dead bodies and the cruiser fixed itself
It seems with model api installed dead bodies gain a sort of physics object to them. It causes problems with both carrying the dead body and when putting it into the cruiser.
Specifically the collider can cause you to start propsurfing when carrying the body, and it causes the cruiser to get sent flying in random directions
this has been a thing for a while
dead bodies with abnormal meshes or jiggle physics objects are more likely to cause propsurfing in my experience
strange
i've had issues where it really doesn't like morecompany cosmetics but to have nothing else and it still messing up? that's something i haven't experienced yet
could be a vanilla bug, sometimes there is desync in vanilla
Ive done extensive testing, and it is not a vanilla bug
Is there a way so I can set the masked with custom models not have morecompany cosmetics?
No, unfortunately there isn't anything that could help you with that right now.
Sounds like you have unsupported characters in your config. Maybe refer to the bepinex documentation, I wouldn't know anything about that.
@median rain i've noticed a bug/an issue and i was wondering if it was ever going to be fixed, for some reasons the hand pivot doesn't work in-game, like you can position the hand pivot in the unity editor but in-game it seems like it doesn't really matter
Unfortunately I don't have a ton of spare time for modding these days, so unless that changes, that bug will likely remain in the near future.
the console spammed me this when i used a custom model
@median rain @sterile kettle 
[13:04:02.9006949] [Error :UnityDebuggerAssistant]
--- Exception Handler ---
Exception Caught: System.NullReferenceException
Assembly: ModelReplacementAPI
Plugin Info
GUID: meow.ModelReplacementAPI
NAME/VER: [email protected]
LOCATION: \plugins\BunyaPineTree-ModelReplacementAPI\ModelReplacementAPI.dll
Message: Object reference not set to an instance of an object
Source: ModelReplacementAPI
--- Begin Frames ---
--FRAME 1:
In Assembly: ModelReplacementAPI
Target Method: BodyReplacementBase.LateUpdate
--- End Frames ---
--- End Exception Handler ---
Do you also have TheGiantSpecimens installed?
I saw MRAPI spam NRE's when paired with it before
Unfortunately Bunya isn't super active and the mod has some known bugs
😦
no 🤔 xu said stufff still broken so im not using it again atm
and yea i just realised the chat above after i sended that lol
Giants got fixed a few days ago
oh rly, sweet 
I've been running both without any problem
Rebirth still has tornado troubles though
Could you screenshot the actual console? Essentially all NRE's happen in LateUpdate, so this isn't very informative.
here i just copied the whole console before the spam buried the start
the spam only visible when i have UnityDebuggerAssistant
just saying it here incase it is important
tho i didnt see any problem when not using UDA in normal use case so far
the spam stopped as soon as i wear other stuff aside from modelreplacement
if there's no stack trace normally, then I would imagine it might have to do with how that mod intercepts exceptions
it could be printing at first chance exceptions or something
UDA is functionally a first chance handler, yes
It only shows frames that occur in the game or plugin code for brevity
is there any way to catch only unhandled exceptions instead? this seems like it might encourage false bug reports
perhaps it could be configurable if it's still useful to catch first chance exceptions in some cases
ah, I guess I was assuming there was some language support for this, I wasn't expecting an injection into the exception constructor, so I can imagine it might not be possible
It caught a try catch in #1276345828671225946's code
Which while usually idk if you're supposed to catch those, was very good
Cuz it let me see that the AI was doing smthn stoopis
I'd like to figure out the method unity uses for writing a caught exception to the log
because that would give me only uncaught exceptions and then we're golden
yeah, just took a stab at trying to find that with a hook on Exception.ToString(), but it doesn't look like that is called unfortunately
hopefully it's not in native code
that was one of the first I tried
I also did exception.stacktrace getter
but that fires again when I call new stacktrace(exception), but it might be worth going back to that one, I dunno
False bug reports are simply a way of life if you're a modder, lmao.
so this one is good to ignore yes ? 
If there isn't any bug you are reporting alongside those console messages, it's probably nothing.
Maybe something MoreCompany cosmetic related. That always throws errors into a try catch
Are you planning to push that update soon with the post processing thing that Nunchuk gave you? Cus if so I would love if you can fix the dead bodies having a physics collider too ^^
As it does cause Dead Bodies to break the cruiser
lol
@median rain is there any way to make jiggle bones on modelreplacementAPI models interact with the map collision? (trying to fix tails clipping thru walls and floors)
Good question. Probably possible, but not through the API as of the moment.
As for how it would be done, you probably already know that you have to manually add colliders to the list of colliders for each jiggle bone.
Well, what you could do is, when your model is initialized in code (in VS), get all of your jiggle bone managers, or whatever that component is called, get all of the map colliders that currently exist with some call like GameObject.FindObjectsOfType<Collider>().Where(collider => collider.gameobject.layer == {whatever the LC map collision layer is});
Then register all of those colliders to your jiggle bone managers.
As for how well that would work, you would have to do it to find out.
You know how glitchy colliders can be in physics.
Physics.ignoreCollision(collider1, collider2, false) maybe?
Hello, I'm trying to get my mouth animations to work correctly but when I speak the mouth instantly opens the mouth to max and then it snaps shut when I stop speaking. If I reverse the angles in the code the mouth animates normally but closes when I speak.
I've tried to move the variables around a bit but I am lost with this and any assistance is appreciated.
I have the code posted here https://discord.com/channels/1168655651455639582/1277692090473644154 but can share it here too if you want.
Here is an example of what is happening
@median rain My whole log was spammed with this
You really need to fix ModelReplacementAPI it's throwing NRE's every frame
@elder hill Have fun c;
I'm not gonna look through it lol
I'm just a lil skeptical whether UDA is catching NRE's it shouldn't be
Please this is really frustrating me.
I remember DiFFoZ mentioned ModelReplacementAPI throws NRE's every frame before
UDA probably catches them and logs them, I think by default MRAPI has a try/catch setup that hides them
it's an issue that needs fixed
If its safely catching them, then no
Were u following the code/setup from naqibam's video?
He might know @long hinge if he's still around
Yes
try reducing the sensitivity?
I did at one point I had it set to 1 but it didn’t help. I can try again tomorrow just to make sure.
No idea if it's safely catching them, if it were it shouldn't blow up the logs like that
UDA is currently a first chance handler so its catching everything it doesn't need to and I can't find any way around that without going into IL/Process land and literally patching unity-player to steal access to the exception logger in there
I found an example of how to do it in the BepinEx/Debug repo but its reported to not work on 2023+ versions of the player which LC uses so, weh
Though, I will point out, in this specific case those appear to be an actual uncaught exception that needs looking at
[17:01:07.1736861] [Info : Console] System.NullReferenceException: Object reference not set to an instance of an object
at ModelReplacement.Monobehaviors.MoreCompanyCosmeticManager.DangerousRenderCosmetics (System.Boolean useAvatarTransforms) [0x00121] in <b78c7b1df4d34c7eae3b64aa29ca3846>:IL_0121
at ModelReplacement.Monobehaviors.MoreCompanyCosmeticManager.SafeRenderCosmetics (System.Boolean useAvatarTransforms) [0x00002] in <b78c7b1df4d34c7eae3b64aa29ca3846>:IL_0002
[17:01:07.1832823] [Error :UnityDebuggerAssistant]
--- Exception Handler ---
You can tell because the console outputs it before UDA gets its hands on it. This means its very likely uncaught and that's a good sign something is going wrong in a mod and UDA is actually right
Yeah, I was wondering why I kept getting random hitches today, then I saw the size of my log when we had to reboot the game once
LOL
you should be able to add ModelReplacementAPI to your blacklist to stop the hitching since its a known issue
exceptionblacklist
Yeah I'll add it if I readd the mod, I'll likely wait though cus MRAPI also has some other issues atm too lol
But I did add SolidLib to it cus I know that throws exceptions quite a bit in UDA
Does setting it to a decimal do anything? Not sure if that would work but it's worth a try
I set the sensitivity to 0.1f and it still goes between closed and open with no in-between no matter how much sound is going through my mic.
should probably ask gooberator
I don't know who that is
They're the one who made the original code
I just asked for permission to share it with others for the tutorial
Ok so how would I contact them as I can't seem to find them in this server also is there any way to have emissions work on my model as I have some parts that are meant to glow but don't when compiled.
Their @ is realcanad1an
As for emissions, never experimented with it, so I'm not sure.
I found this on the GitHub and it looks like you have to use the HDRP shader as I was using the MToon shader before likely why the emission didn't work so I'll try this.
https://github.com/BunyaPineTree/LethalCompany_ModelReplacementAPI/issues/102
May be something you want to add to the description/pinned comment as the fix was to change this line
float x = voice.IsSpeaking && !player.isPlayerDead ? Mathf.Clamp(Map(voice.Amplitude * sensitivity, 0, 1, initialJawOpening, maxJawOpening), maxJawOpening, initialJawOpening) : initialJawOpening;
to
float x = voice.IsSpeaking && !player.isPlayerDead ? Mathf.Clamp(Map(voice.Amplitude * sensitivity, 1, 0, initialJawOpening, maxJawOpening), maxJawOpening, initialJawOpening) : maxJawOpening;
This fixes the mouth being reversed and not animating correctly
interesting
I added a recommendation to use your line if a problem like it arises in my github example mod
at least yours actually loads, I still don't know why mine won't load with the added code
I don't know what shader you're using, or what your intended goal is, but emissions can be achieved simply by adding an emission map.
That will be different depending on the shader you use, but most should support it.
If you want something like glowing eyes, usually in that case you can isolate the eye material, make an emission map with the same size as the eye texture (or literally just copy the eye texture), and use that as your emission map.
I was using MToon but converting it to HDRP got it working.
I don't know the specifics of MToon, but I do know that LilToon works with emission, if that's the look you're going for.
so uhh
i have another issue
i'm trying to update my sackboy suit (and working on another suit after this) but every time i try to build the project, it only gives me these 2 files
is this supposed to happen?
oh
wait
yea it is
mb
no
just the suit in general
to make like
actual changes
like resizing for example
Are you working with an old project folder? If so maybe you could just move the new assetbundle to replace the old one?
what do you mean?
just make an entirely new assetbundle with the same coding?
but yes, i'm using the old project folder
Building the asset bundle should only give you those 2 files if you're not starting from a new project
ah wait you already figure that out sry didn't read further
if you want to update the model just edit the model and rebuild the asset bundle is all
ohh
so i just go through the publishing process again
so uh
the build tab isn't popping up on my screen
this is naqibams tab
this is my tab
better comparison
if this is the cause of me forgetting a step
i'm gonna be so upset
this
got the bottom one figured out
had to put quotations
also got that figured out, had to look at the older tutorial
last issue
when i try wearing the suit, it uses the suits texture instead of the model
fun fact! if you are making only one model, please just change the default,orange suit to your suit name. It lets people config their model to whatever they want instead of it having to be on your suit
can't they just change the suit back?
what the log says when i try equipping it
you have messed up your model import from unit somehow
does that mean i have to redo the coding configuring process?
that means you need to reexport the unity project cause you broke something there
there is nothing wrong on the code or game end
gotcha
is there a way to disable one model from config?
you did make sure to attack your model replacement to a project right?
i think so
btw just to let you know, the upcoming update for MoreCompany will probably break your compatibility for cosmetics (not sure when swipez is gonna release it tho)
The new method you'd want to patch is here: https://github.com/notnotnotswipez/MoreCompany/blob/master/MoreCompany/ChatPatches.cs#L33
Oh don't worry. My cosmetic compat doesn't work to begin with.
😂
Thanks for the headsup. I'll patch the method when it updates, and depending on a coin flip, the compat will remain broken, or become even more broken.
well tbf i havent actually checked if you patch the current chat event at all for the syncing
but ik u have some kind of compatibility for it
I think the main issue would be that cosmetics are changeable mid-game
since from a quick look it doesn't seem like you account for that
just to be sure... is this correct?
i don't know if i have to get rid of the asset prefabs or what
looks good to me
gotcha, another question (doubting it's the last)
do i generate an entirely new project?
honestly something things just up and break due to factors that I'm not sure of. Generating a new project won't necessarily fix it. If you still have problems delete that asset and make a new one with the model you have
alright
i'm just gonna work on my other suit
don't wanna get burnt out from working on this one
i think i know why this suit isn't working as it should
i realized that after i got my other suit in the game, it used the models hands in first person
that means that the api got updated and i can't update my old model unless i redo the unity project entirely (due to it being outdated)
nevermind, i'm just jumping to conclusions :(
That shouldn't be how it works
Just try redoing it, sometimes there is just an error you don't know where and it'll work when redoing it
^^
this always worked for me
and the more you redo the proces the faster you get at it
soon youll know the steps so well youll start being able to actually notice whats going wrong
it took me 3 days to do my first model, and i noticed most of my problems were due to the unity version being incorrect
other than that the rest was just me doing the steps wrong, going again from the start fixed it
legit, first model took me like 7-8 hours to put together, ignoring the process of learning what was necessary. Now I could technically bang one out in less than an hour (normally takes more though due to outside factors such as jiggle physics)
I also had to brute force learn because I'm stuborn and also didn't know about this server at the time
Yeppers, a lot of the time I spent initially wasnt even solving the problem I was having too because the rig looked pretty messed up in-game so my thought was "ah, I better relearn how to paint weights and fix the rig myself!" 2 days of adjusting the rig and testing later and I was losing confidence in it being the rigs problem, as it looked good. Then it was pointed out to me the version of unity I was using was wrong and that fixed it 😭
3 days of adjusting the one project, then after I reimported and started from scratch, finished in 2 hours
Pretty recently I redid that model again from scratch and that took about 40 minutes if not less
It's all about creating an internal framework in your brain that automatically details each step "ok that parts done now do this, then this, then done gg"
Which can only be done by just doing the whole process a bunch of times
in my defense the reason some models have taken me so long is because they have a million bones that need physics. Don't get me started on Faputa...
~50 different bones in different places that need jiggle along with figuring out how to make arms copy rotations. That one I theorized for weeks before finally figuring it out. I tried weight painting the lower arms to the upper ones, but that looked weird. I tried merging lower bones to upper bones as children in some sort of mad scientist experiment, but that wouldn't even run. And it turns out there is just a bone rotation constraint that needs to be applied after setting up modelreplacement in the unity project and left on and that just works?
I swear, I like creating new problems to solve with models though. It leads way to really cool outcomes though
now I just gotta truly figure out why jaw movement isn't working, but I'm mostly out of model making now
are models in general broken now in v64? every model is just sliding around on its own now, even those i have tried and i know worked in v62
Model Replacement API has been a bit broken for a bit now, I wouldn't be too surprised if one of the minor changes in V64 broke it more
Bunya is unfortunately experiencing burn out so
I wouldn't expect an update anytime soon
there is a way to add custom models without this api right?
Don't think so
But maybe
I just prefer using custom suits now, MRAPI is nice but just way too buggy in my experience
"Model ReplacementAPI has been a bit broken for a bit now" what? not true?
It is true
Bodies having weird physics that break the cruiser, the log spam we got last time I used it
not true considering a ton of people still use it, including me with my commissions lmao
the log spam is UDA
like all other log spams you've had
the weird physics is a very small bug that is not game breaking
I like MRAPI, but there's no doubting it is a bit broken and buggy most just live with it cus it's cool to use custom models from time to time
ive never had an issue with it since installing it
and ive made like 8 suits and have 250 hours of playtime with it
the log spam is literally UDA lmao, u got one null ref as far as i can tell that didnt break anything
the frame drop is from UDA continuously spamming that error
What is even the point of UDA?
well my only issue is that every single model no matter how low poly it is comes with atleast a 10fps hit wich i cant imagine being the models anymore sometimes
I added it cus I was told it was useful but it feels like it's not really benefitted anyone yet
not what it's currently doing, it's still not as refined as it needs to be for it to actually do its purpose, which is tell you what mods are related to a specific error (afaik)
Yeah that is from the NRE spam, the thing is usually it's covered up by a try/catch
I remember DiFFoZ reported it a while ago
Yeah ModelReplacementAPI throws NRE's ever frame
never seen one before 😭
It's just not logged in the normal logs usually
oh fr?
Cus it has a try/catch
Which prevents it from logging
oh damn
Yeah atm it just doesn't feel very useful
The only thing that bugs me out is the corpses having a collider, And the masked only spawning with the cosmetics
i mean the fps hit was only an issue when playing with proper groups because the overall hit from having 5 players with custom models is mental, but now its literally become unusable in v64
Yeah something probably changed in V64 that's breaking the mod
scrolled 3 to 4 months and i cant find a message by diffoz
He posted it in one of his threads
Oh he said it was fixed at one point
But apparently from what we experienced, the NRE's every frame came back? Cus UDA was catching them
Idk
UDA isn't SUPPOSED to be catching those, that is your problem
but yeah ill load it up in v64 and see if i can find anything
Yeah fair
UDA right now as Matty put it
Isn't really useful at all and just makes things more confusing
exactly as intended, i see no problems
lol
I bet that has to do with the collider it's adding to player bodies somehow, cus the collider is more wild with model replacers
just tested in game, works fine for me
if i can even find it in my files lol
ill try both
bet
Did you add any other model replacers since?
Could be one of them is adding weird physics
i have been installing and uninstalling alot since then just to test some
kanami works fine
because so many people dont wanna add screenshot onto their modpages im just installing em all and throwing them back out if i dont like em
It's probably one of the recent additions
so its only certain models that are broken?
mine are pretty default so maybe thats why theyve always been fine
i tried miku and kanami and they both worked fine in my dev profile
i feel like some other mod might cause issues with it at this point
since they work for xiao
I remember Bunya mentioning something about some model replacers can be setup improperly and add physics
yea
So they likely added one of those
ill test around a little and come back later
it might be the JigglePhysicsPlugin mod wich one of my MoreCompany cosmetic mods is using
also morecompany is spamming the console like crazy now wth
show show
idk, MoreHead was using this
morecompany has been scuffed anyways, theres like a 50% chance the game startup crashes when the console tries to load something from morecompany
takes me like 2 or 3 tries to start the game usualy 
there
figured it out
no more complaints about the ragdoll
@median rain when you've got time, please put the colliders from the ragdolls into the ragdoll layer, you have a couple on default and one on EnemiesNotRendered and it messes with collisions, this should fix the issue about ragdolls messing with the cruiser weirdly
I can make a github issue if you prefer, spent the last hour messing with it and changed layers on Unity Explorer and that seemed to work
Oh and I was testing with the miku model on multiple LAN clients if that's relevant
player blood not showing? do you mean the blood splatters on the ground when being critical?
oh wait i might be thinking of the wrong thing
i was thinking of that
but the known issues might be talking about the blood which shows up when someone's injured
imma just delete what i said above lol
now im confused what ur talking about, all i can say is with the more blood mod the blood is a bit buggy but works
it's listed in github as one of hte issues so im not sure tbh
oh wait i was thinking of the right thing, kill me


ill just reiterate-ish then, if the problem is the decal layer then the skinned mesh renderers for the ragdolls need to be put on the 9th layer for Rendering Layer Mask
the issue just appeared again but without this jiggle addon mod, just MoreCompany alone causes it suddenly e.e
Oh seriously? Leave it to someone who actually knows what they're doing to find the solution to that one.
Decal layers, too. I have been wondering since the start why I couldn't get the decals to function.

I should be able to throw out an update soon.
Yeah you just need the right rendering layer for decals and the right gameobject layer for cruiser to not freak out
Sick
Looking forward to it I know @cinder oriole is happy about being able to use his suit again after the update is pushed 
good to see ya talkin again
Hello hello! Unsure if it has been brought up before, but when you Emote while only using ANY custom model dependent of the Model Replacement API any custom cosmetics you are wearing will be invisible for you. (You can see other player's and they can see yours just fine).
Was thinking on it possibly be just certain models or a Toomanyemotes issue, but again, only happens when using any Custom Model. Any ideas? Appreciated the help.
I haven't noticed this issue, but then I've been hosting. It might be a client issue
Nah, happens when I'm hosting and anyone that joins will notice they can't see their own cosmetics.
When not using a custom model it's fine. Here for comparison, the cosmetics on the first picture should be visible somehow in the other 2 pictures but they aren't. (Last picture was done using a clean modpack and the issue persists).
Oh yeah I noticed that, I can see other players' cosmetics but not mine on myself
never used cosmetics so didn't notice
Morecompany cosmetics haven't worked for this mod in a really long time, I'm surprised u got them to load at all cus they don't load on me even if I use default model
@median rain there are errors spammed with every model replacement mod that needs this api
it works but its spamming errors
I am aware of this bug, but I don't really have time to fix it these days, and it's also not a huge issue. But thank you for the report.
Related to the broken cosmetic compatability.
also I dont know if this is all models but one of the models I'm trying to fix has the original model in the new one
That's not much to go off of, if you're trying to report a bug.
so will the spamming in console get fixed
it gets spammed every second
and lags the game
Send logs lol
the mod is on GitHub as well, I'm sure PRs are welcome
I've released an update with this fix. Huge thanks for the tip, I never would have found that.
Couldn't get the decals to work, though.
Also did something about the errors in the console, though I won't claim that they are all gone.
I've also implemented this. Thanks again. The weather effects should work in third person now.
console definetly doesnt get spammed anymore in combination with more company
i still feel like the mental performance hit could be improved
my frames in orbit go from 170fps with default skin/model down to 95fps with a custom model
i think i found a new issue
with your api i can just walk through rocks and generally just fall through some other things
Comedy.
Thanks for the player testing. I think I know exactly what causes it, and will release an update tomorrow. It's pretty late at the moment.
For now just use the previous version
❤️
can confirm, this happens to me too legally
(take ur time on the fix legally)
@median rain I'm still getting it spammed
--- Exception Handler ---
Exception Caught: System.NullReferenceException
Assembly: ModelReplacementAPI
Plugin Info
GUID: meow.ModelReplacementAPI
NAME/VER: [email protected]
LOCATION: \plugins\BunyaPineTree-ModelReplacementAPI\ModelReplacementAPI.dll
Message: Object reference not set to an instance of an object
Source: ModelReplacementAPI
--- Begin Frames ---
--FRAME 1:
In Assembly: ModelReplacementAPI
Target Method: MoreCompanyCosmeticManager.DangerousRenderCosmetics
--FRAME 2:
In Assembly: ModelReplacementAPI
Target Method: MoreCompanyCosmeticManager.SafeRenderCosmetics
--- End Frames ---
--- End Exception Handler ---
Glad this is gonna be fixed lol
I just noticed this happening now and I'm glad that it's known haha
New update fixes it
yesss I just saw :D

Can there be an option to just disable MoreCompany cosmetics whenever you use a custom model? Emoting breaks them and they dont even work well with the models themselves
they should be hidden i think tho, but they tend to become buggy sometimes especialy with mimics
i believe they're supposed to be turned off by default if modelapi is installed, though i'm not sure if its a config or what
Its basically this issue
hey can someone tell me what these errors mean? particularly with modelreplacementAPI?
I was hosting
better to get rid of UDA, it's currently not where it needs to be in terms of its functionality
I think I do know what the errors relating to the cosmetics were about though, if you have cosmetics and a model replacer, for yourself in 3rd person like by an emote mod or something you can not see them and I think that's why there's NRE spam
Might be an issue for you to look into fixing if you want Xu
:3
eh, the spam is through an external mod that doesnt currently work as intended
I mean I remember Robyn pointed out in my log I sent before that ModelReplacementAPI did throw the error first
You could likely just implement this
as far as i can tell, the exception is handled
and im not really sure if throwing a random code snippet from 1a3 that involves morecompany will apply to this scenario
It’s still happening for me
send video and logs if u can reproduce ig
I can’t right now but I can send the mod for it
It happened when ever I run the game with it
I don’t know if it’s a mod conflict I have not tried it in vanilla
I agree with Xu Xiaolan, you probably shouldn't be playing with UDA to begin with.
For one thing, UDA is a debugger assistant. There's absolutely no reason to run it unless you're debugging a mod you made.
And I'm fairly certain it's throwing errors on a try/catch block I use to determine whether a player is dead.
The NRE issue that may or may not still exist is MoreCompany related, and so wouldn't even originate from BodyReplacementBase.LateUpdate.
Ok, thanks guys that makes more sense to me now. I misunderstood what UDA was for. I’ll get rid of that and see how it’s lookin
another instance of the weird issue with movement caused by this api
recreated with morecompany, toomanyemotes, and the miku suit
i had morecompany cosmetics on before this happened, modelswap loaded without issues (hands swap was visible). as soon as i do an emote to check the model in 3d, movement problem begins (and morecompany cosmetics are not visible)
no errors were logged in the console, only the logs of toomanyemotes working as usual
don't want to prod u on this, just hoping to make it easy to recreate for debugging
(ignore the audio, i was in a call with some other people watching yt)
I've been noticing an issue where the API is causing some like ruber-bandy movement but never your bug
I seriously think you need to share your mod pack so someone like @elder hill can help you isolate the culprit
0191e49d-11eb-2702-c004-6516a54b4830 this is the code i encountered it in, afaik it should only involve morecompany, model api, toomanyemotes, but might have something else
it's also happened in my larger profile
also it only happens when i actually have morecompany cosmetics on
when i play without wearing any it behaves just fine
You shouldn't be wearing cosmetics when you're gonna wear a model replacer anyways however
the cosmetics from the cosmetic mod you use I bet has issues
Sometimes cosmetic mods include physics
Do you know what cosmetic mod it is?
it's def something in starvexia's cosmeticmegapack
ik there was a tail cosmetic that had physics
i can try it again without that
Yeah it's an issue with the cosmetic mod, it's just when wearing a model replacer it makes you slide around
I bet I know why
when VoidLeak's cosmetics were bugged
and I would spectate someone wearing them
the camera would freak tf out
lol
so the model replacer probably gets shoved around in the same way
i figure there is a conflict with colliders between MC cosmetics and modelswaps
i'm just confused cus it wasn't always that way
just tested again after removing cosmetics with physics
the issue still remains
after removing all cosmetics it works like usual
i just don't know what caused it to start having that issue
Probably whenever cosmetic support broke
cus in some much older versions of the api u could have both cosmetics and modelswaps working at the same time
def that
so im currently looking into a solution to RegisterSuitModelReplacments issue with duplicate suits (having mods with suits that match names) and im trying to think of a possible solution, mainly one that wont break existing model replacement mods with new checks that are incompatible
my initial thought was somehow comparing the mod authors, but im struggling to think of how thatd be a possible check within that function
changing the dictionary generated to a dictionary of lists of strings rather than a dictionary of strings would allow for adding 2 strings per entry, the first being the suit name and the 2nd being the mod author
buuuuut im unsure if getting the mod author is possibile in that function 😅
you could check for both the key and value but its pretty possible for suit mods to have a matching value as well as key, especially if both are just set to the name of the character
it would be better than nothing though if the former isnt an option
The real issue is the fact that we have to use suit name networking to begin with. Unfortunately it's just about the only option from a clientside only mod perspective.
An idea I was considering was to do away with the suit reliance entirely and build an optional serverside mod that would replace suit name networking with FullyQualifiedName networking of the actual suit classes, alongside a UI that would allow you to select model replacements from a menu, but that idea is far too ambitious these days, as I have no time for modding these days.
understandable
you could get the modguid from the plugininfo of a mod
👀
I need a bit of help, i'm making a smaller model and the item positioning offset seems not to work in game as of the moment. Is there some way to manually set where the item pivot is?
nope
theres a vector3 representing the transform but currently it doesnt work
huh, i assumed you'd just need to move the transform that the item gets moved to to that vector3
Not currently working. Something in the viewmodel logic messed it up.
Hello there, i was wondering if anyone else ran into this issue. Where the mask would appear on other players for some reason.
I don't believe this has been reported before, does it happen consistently?
It's only happend twice so far (me and another player). The other player seemed to have fixed it somehow.
It doesn't happen often though I was just curious if it had happened to anyone else as searching for keywords in the server yielded no results of anyone having this.
Ceroba model covered in more company cosmetics
do you have any mods that add additional more company cosmetics? there is a mod that adds a mimic mask as cosmetic
no just base morecompany
Hello hello! How do I get my model to be a seperate suit on the rack rather than the default?
Use the moresuits mod and tweak a bit of the code to assign your model to a new suit
is there a certain string I'm supposed to edit? I dont know what to write
https://youtu.be/g9itEmQ2-6s?si=STU-JXXK3PoWNIAu
If you're ok with referring to a video tutorial, there's a chapter at 18:58 that explains which part of the code to edit and how to set up moresuits
ModelReplacementSDK Tutorial - https://github.com/BunyaPineTree/LethalCompany_ModelReplacementAPI/wiki/Using-the-Unity-Workflow
Package URL - https://github.com/BunyaPineTree/LethalCompany_ModelReplacementSDK.git#upm
ModelReplacementAPI.dll - https://github.com/BunyaPineTree/LethalCompany_ModelReplacementAPI/releases
MoreSuits Mod Page - http...
OKAY SO my model didn't generate a .png file, there's just a .dll, so im not sure if that will fix it on the rack. Can I just put whatever name I want here and it will appear?
(also sorry for pinging again, I am VERY new to all of this!)
also cant seem to get jiggle physics to work at ALL despite following every step
If you want jiggle physics my latest video has a section on implementing it for this api specifically
The png file is not generated. You either make one yourself or use the default suit png/another png that someone else made
OH! Thank you so much I would have NEVER figured that out
after I make the png does it go into the zip after I update it again?
What do you mean?
If you're updating the mod yes the picture needs to be there for the game to refer to it and apply the texture
ok! Im asking because mods with their own suit have the moresuits folder already applied
like this
but mine does not come with a moresuits folder
I guess what Im asking is does it just sort of...make itself after I put the png in?
Oh wait I can probably just make the damn moresuits folder and put it in the update
Yes
But
Not a moresuits folder
You need a BepInEx folder
And inside that a plugins folder
And inside THAT is the moresuits folder
I have that too!
Sick
okay so I assumed this meant the one in my plugins folder where ALL of my mods were, this was not the case. Did I do this correctly? https://gyazo.com/7d492fd18498f6febc39fb49fca7f00c.mp4
You're missing a .txt
lesssuits.txt next to the png of the suit
I think that's what it scalled
WEEPING
Other mods would have em
It's this txt file
just paste it into your moresuits folder
(the contents don't matter only the name)
you don't actually need the lesssuits.txt
they remove the base suits from moresuits from showing up, but don't do much else and that function hardly works in my experience
oh btw, @shadow path I'd try clicking the button that says "remove post processing" it might give you a better look to your model
finally got it working for the suit rack
thank you guys so much you are literally the most helpful community I have ever been in ; v ;
now I just have to figure out why my models feet keep going through the ground and why jiggle physics arent applying
If your feet are going through the ground, you need to configure your model's offset in unity to account for that.
I did! I've lifted it several times but for some reason when its updated it just...stays in the floor
Make sure you deleted the copy of your model in ModelReplacementSDK/AssetsToBuild, or whatever that folder was called, or are doing your work on that copy, if you aren't already.
It sounds like your work might be being overwritten.
Which to be fair is not something I made excessively clear.
OH, ok, so I delete the asset entirely and replace with the new one? Will that also fix the issue of the physics not going through as well?
It's possible. You'll have to find out.
Im really sorry for this ping but
I did everything the exact same as before to get the code in and it's worked fine, I don't know what's causing this
oop wait I think I fixed it, there was a red file for some reason
programming hurts my brain
It's rewarding in the end though
I think the little file with the x next to it is causing the issue
I believe that's supposed to be your asset bundle. Where did the file go when you built it in unity?
supposedly into the folder? Let me try with a different model
im not sure why it would send the asset to a different place when I put it all in another folder
You specified where to save your assetbundle inside Unity before building it. You could check at that location if it's there
Then move the assetbundle to your project folder
this is all that is saving to the folder
I can hop into a stream or something if it helps
im not sure what I did wrong? It's just saving wrong suddenly
Weird. Is Unity even creating the asset bundle?
Uhh turn off the checkmark since you've already created the project folder
Then rebuid
worth a shot!
nope
this is so confusing, it was working fine
....I...just put it in a different folder and now everything is working fine.
😭
thank you guys again for helping my inept ass ; ;
did you figure it out @shadow path
which mod was this for
I'm assuming you were missing something in your build folder
Im not really sure? I put it in another folder and it fixed it for some reason, I have no idea what it was though
sometime with this, unity projects just break I have noticed. Normally what I do is make a new unity project and copy everything from the assets folder into a new one and that fixes it
that is strange indeed
like my Lowpoly Oneshot unity project is doing that rn with me, just haven't gotten around to doing that yet
But now the package is being rejected in thunderstore so i have to figure that out
I just want it to work ; ;
oh and about the model sinking into the ground, that is because the model's position is based upon it's foremost parent bone, the pelvis. If a model is too differently sized from the vanilla model, they tend to do strange things within the game. This is most noticable when using emote mods
you have these right: icon, README.txt , manifest.json, and your .dll all packaged and not nested correct? (other things like your bepin for custom suits aren't technically necessary, these are just the necessary things
Correct! It uploaded but was rejected minutes later
is it NSFW? cause if it is, it needs to be marked as such. someone might have deemed it as such for some reason
I doubt that is the case, just want to make sure
No Im just...kind of stupid
lol
that explains it
yeah, you only need empty folders except the png file
basically so when the mod installs, it knows where to put the file within your mod manager
Ah! So if you put something in there named the same as the mod
it will always register?
yes
it should unless you have messed with some other code somewhere that breaks it
suit integration is actually so easy, all you need to do is change the default suit to the name you need, make a png with that same name and it'll work
here is an example of my decidueye files
there
I have a second skin in there as well, so ignore the first png
I can't remember if the image has to be a specific size, but I don't think it does
I just realized that there really is no good guide for doing this lol
if you are ever curious about how another mod does something related to file nesting or what is included, I'd highly recommend just manually downloading a mod from the thunderstore website and looking at how it is arranged
You made the decidueye? That's my friends fav pokemon he SHOUTED when he saw it
thank you for that
lol np
I should try that out to learn rigs better
you can thank someone from the unofficial lethal company discord for that, they suggested it and I was like "Yo, I forgot about Decidueye. I need to add that"
I would throw a zoroark in if I could make a really quality model with it
ill learn it someday
for now I mess with the wickerbeasts
I had a model that I tried to do a long time ago that was really good of hisuan zoroark, but for some reason it just made the whole screen white when I looked at it
I do currently have one in my project though that I need to finish but uugh, I probably have to pose the hair and then account for physics. I might get that done eventually
HISUAN IS MY FAVCORITE
sorry caps
lol
But yeah the bit thats scaring me away from it is the hair physics
it really isn't that hard. if you want, I can send you some physics or send you a link to the official jiggle physics plugin that this mod has in it. It has some base ones that you can just download and test
oh I know how! It's just...setting it up
really not that bad. take your model, add a jiggle physics modifier and find the bone. Then add the jiggle physic you want. It gets assigned to the bone and all children (unless you exclude them)
most models don't have that many things you actually want to move or if they do, they are children of something else you already want to move with the same physics
honestly though, I could see it coral might be a pain with all it's hair. If there is a root bone though for the hair (other than their head) all you need is that bone, it's ears, and it's tail
even if there are like 10-20 bones, you can just drag the bone over from the heirchy to the jiggle physic itself
trust me, It can't have more physics than that one model I did...
it sounds...complicated. But then again, I thought suit stuff sounded complicated and i did it.
part of the fun is figuring it out and realizing it really isn't that hard and you just burned a few hours of your life
I spent hours on my first jawsync realizing I'm an idiot and put an apostrophe in some text and didn't realize that that breaks code even when in the part that isn't code
sorry if this has been asked a lot, but can i provide my own viewmodel prefab? if so, how
working on adding proper viewmodel support to our MRAPI mod.
i can work with the auto generated one just fine, but would help lots if i could have it use a premade prefab rather than cloning the suit model GO
i would take a look at te MeshHelper class
there's a method to ConvertModelToViewModel that returns the generated view model from a full model i think
i can get the current viewmodel fine though
just was wondering if the mod has a built in support for providing viewmodels, like from unity like the suit model itself
i prob just need to work with the auto generated ones
I am once again here to beg for assistance because it is refusing to make a DLL file ONCE AGAIN and saying this
nvm fixed it had a bunch of uneeded scripts for some reason
Yes, but it is rather complex, and there is no tutorial, and I would literally need to remind myself how it works.
ah i see
If you're down then I'll go and remind myself of it.
ill let you know if i think its needed, at this point i think i have a workflow for the generated one
hmm, something VERY wrong is going, @median rain how do you handle the other parts of the mesh for the viewmodel? like hiding parts other than the arms
i assumed you just 0,0,0 scaled bones but checking with UE i can see they are normal
adding code that swaps out the arm mesh on the viewmodel copy like i do for the main suit makes the shoulders do,, that
like the bones are all stuck in that spot
I look at which vertices have weight painting on arm bones (every bone below the shoulder), and delete vertices from the mesh that aren't weighted to the arms.
so this is really not a surprise.
ahh,,,
Bones that aren't children of the shoulders won't move with the shoulders, so neither will their vertices
so the other meshes having different vertex data does that?
Yep.
First you might want to tell what you're trying to achieve here.
uhm wdym
swap out the mesh on the viewmodel same as the mod dose for the main suit
I don't know what you want to fix. Presumably if you plan on adding your own viewmodel, it will be weightpainted correctly, right?
i want to fix the stretched mesh?
im just using the generated viewmodel
im just trying to think of a easy way to get around this.
If you're trying to add your own custom viewmodel, rather than using a generated one, this isn't the way to achieve that.
the way our mod works is by swaping out the SharedMesh of the respective body regions SMR
im not
i told you that before
^
the viewmodel just needs to match how the suit is configured, people can change that whenever, so the viewmodel needs to update with it. people REALLY want it for our mod
Alright, I think I've got an idea of what you're trying to convey.
So you have a mod with some customization that you can change whenever, but that, as expected, is not conveyed to the viewmodel.
And you want to convey that.
yeah, and i did that fine
but due to what you told me before about how it works to hide the other mesh parts it breaks when you swap in other arm types
due to each arm having different weights
How does the customization work, do you just modify the gameobject, or do you replace your model with an entirely new gameobject?
Ah, right
all the body parts are apart of one FBX, just only include the 5 parts on the suit model
they have the data to slot in though
i assume to fix this ide need my own complex viewmodel, or maybe tweaking the weights could help
Alright, here's my idea.
For one, you don't need to replace the sharedMesh, the viewmodel generation function specifically makes a new mesh, so it doesn't destroy the original one.
What you can do is set the mesh of the viewmodel as you normally do, and then run it through ModelReplacement.Scripts.MeshHelper.ConvertModelToViewModel(GameObject TempReplacementViewModel) again.
And set the viewmodel Gameobject with whatever it returns.
I think that will work.
lemmy give it a shot
If it doesn't, you may need to dissect that function and see if you can't modify it for your purposes.
well this is the current code for both the main suit, and the code i added for the viewmodels so there is not much too it
ignore the magic numbers >~>
ill let ya know how it goes
Yeah, add a replacementViewModel = ModelReplacement.Scripts.MeshHelper.ConvertModelToViewModel(replacementViewModel); to that second one and see how it goes.
Wait this works visually?
yea
i have no clue XD
Is it a one time thing?
nah errors every time i apply settings (thats when ApplyLocalViewmodel gets called)
hold on, lemmy video
the mesh index thing is about the vertices in a mesh i believe
you can only have so many vertices in a mesh depending on the format, but i wouldnt expect that error to pop up
MeshHelper.ConvertModelToViewModel is extremely, extremely low level.
I couldn't even debug that error.
Honestly, seeing as it only happens when you apply settings, I would suppress it for now and see if there are any consequences down the line.
If you want to give it an actual go, you can try and dissect the function itself to see where the issue is, but I would not recommend it.
Ah that's unfortunate
bleh, IL code is not telling me much
the blendshape and color changes are not applying
do you know what format your mesh is in?
its FBX