#Model Replacement API & SDK
1 messages · Page 4 of 1
do you know how many vertices are in your mesh?
also yea seems that the error is making the code break and its not running the other things for blendshapes/materials
kk
May need to restart the game, I don't know when pdb's are loaded in
uh its like 50 different meshes so not really
thats fine! i do it all the time lol
well, if they're above 65k, then you need to change the index format to 32bit
but where u change it? i have no idea
Seeing as the base model is fine, there's no way just the arms would be above the cap.
All I do is delete vertices.
hmm true
okay gonna try that thing.
will that make errors read more clearly?
never used a .pdb before
i've used it for LL and stuff before, though mods kinda just embed it in nowadays i think
blegh, still cringe not very helpful error lol
or well
that has a little more info ig
it just relies less on IL code to point to actual code, if im right hten its just what i screenshotted
Well Xu Xiaolan is probably right anyways
if i suppress the error will the code keep running?
the stuff that is not working is not working as the code breaks due to the error
due to my order of operations
I wonder if something gets messed up when you set the sharedmesh.
i mean u can try catch in your own code, but that wont help with the actual thing you're trying to get working
^
uh
is this in your body replacement class?
i dont mean a catch though
yes the BodyReplacementBase class
the one that was autogenerated a looong time ago. just built a lot onto it
Maybe try this
replacementViewModel = LoadViewModelreplacement();
viewModelAvatar.AssignViewModelReplacement(controller.gameObject, replacementViewModel);
SetAvatarRenderers(true);
viewState.ReportBodyReplacementAddition(this);
cosmeticManager.ReportBodyReplacementAddition(this);```
This should just refresh your viewmodel entirely.
the things i would check for:
if sharedmesh is null after instantiating it.
if the vertex count/submesh count is 0 which means it wasnt properly initalised
man im confused lol
uhm,, hold on so ConvertModelToViewModel pulls from the current suit state so to speak right?
That doesn't pull from anything. It takes whatever gameobject you put in and returns a gameobject with only arms.
My suggestion is to replace ConvertModelToViewModel with that code block entirely.
So just generating a new viewmodel entirely.
the one u give it as an argument
no i mean when you first put a suit on
Whatever mesh(s) is in the skinnedMeshRenderers of the gameobject you give it
does it get all SMR child objects?
ahh okay that checks out
i was like "wait if my model is made of 5 SMR's how does it know what one to pick that has the arms"
okay so i feel the error may be my fault due to a misunderstanding?
i was just doing this
that doesn't seem right at all with my understanding now
ide need to feed it the arm mesh i want to swap to
Yeah it looks like your system is a bit more complex than I originally thought.
i mean feel free to check out the github
its not 100% up to date, but gets the point across
and you're sure that the mesh you're trying to use is instantiated?
its just a mesh thats all
lemmy explain
each "FemmployeePart" is a Scripted Object that holds some data, the part name, the list of materials in order and the mesh the part uses, these parts are stored in the asset bundle and when a suit is put on it grabs all the parts and puts them into a list, this list is used for getting what mesh is needed via a dictionary that uses strings as the key
meshes are never instantiated, i just change out the SharedMesh of the body region
maybe i misunderstand what you mean, dunno
It saying that the index buffer is null is the strangest thing to me.
yea
Maybe it has to be instantiated in game, physically?
skinnedMeshRenderer.sharedMesh = Object.Instantiate<Mesh>(skinnedMeshRenderer.sharedMesh);
Mesh sharedMesh = skinnedMeshRenderer.sharedMesh;
if (sharedMesh == null)
{
Debug.LogError("Shared mesh is null after instantiation.");
continue;
}
// make sure the mesh has vertices and submeshes
if (sharedMesh.vertexCount == 0 || sharedMesh.subMeshCount == 0)
{
Debug.LogError("Mesh is not properly initialized (vertex count or submesh count is zero).");
continue;
}
// make sure the index buffer is valid
GraphicsBuffer indexBuffer = sharedMesh.GetIndexBuffer();
if (indexBuffer == null)
{
Debug.LogError("Index buffer is null for the shared mesh.");
continue;
}
i would maybe add this logging at your for loop bunya
Since the index buffer is on the graphics card, not the CPU, and the game isn't going to send an object that doesn't need to be rendered yet.
what is LoadViewModelreplacement?
ah, just asking as it says its not a thing
it should already be publicized?
hold on lemmy check
i did mess with the .cspj so may have removed it by mistake
Well, I would consider doing this, but this method is shockingly reliable. I have never seen a model it couldn't convert, or received a complaint about a bad viewmodel. I think this is very much so a specific case thing.
Oh my bad if it's not public. You will need to publicize the dll.
oh yeah definitely, i still think it could be a problem due to the argument not being instantiated or smthn like that
I think there's some Next update behind logic going on in unity, that has prevented the mesh from actually being instantiated at this point.
So because it hasn't been rendered yet, it doesn't have an index buffer.
i dont remember how to do the thing with the AssemblyPublicizer
i suck with .cspj files
im not sure if i'd call that close but wel done
well when i cant even edit these files properly its close
like i hate the formatting, it makes no sense to me
yeah, idk still gets mad at me with this
tried putting it in a few areas after i include the api
well its gotta find the dll somehow
^
true
i assumed it would get it as a reference or something dunno
ookay its happy now
this is what you want right?
@median rain tried to @ you in that msg but discord is annoying lol
ik its prob just gonna do the same thing, but figured its worth a shot
oh um
well no more error, but uhhhh
thats new
makes that copy when i press apply
yea lol
but yea, error gone with that new code, just a more,, visual error XD
other than the duped arms its working 99% correctly
Don't forget the Destroy
Glad to see it's working better this way.
There are still some bugs that may or may not have slipped through the cracks, since this is definitely not my original intentions.
So don't forget to be on the lookout
yeaa i know lol
you have gotten after me before XD. ive been doing some very non typical things with this API lol
but hey, it aint fun if we aint pushing boundary's
From my perspective, it's way cooler when people do non-typical things.
mhm, i feel the same
Though it also shows the many flaws that the API has.
This api is awesome bunya
yea, one of the top shelf LC mods imo
its a mod that lets peeps be what they want, that cant be passed up
👍
Nice, glad it's working.
no clue why it works, just does
Yeah it's time like these where I wish I had a bit more forethought in my design. For instance I could have thrown all that in a RefreshViewModel() function if I wanted to.
To be fair, the API probably won't get any more major updates, other than fixing updates as they come, so there probably won't be any risk of back compatability breaking down the line, but still.
yeah,, kinda one of those make your bed and lie in it type things
glad you still plan on keeping it updated though
Well, it would be kind of ridiculous for it to just stop working at this point in time.
ahhh, people can be happy now lol
im,, very glad that did not turn into a whole thing.
this mod has had too many of those lol
ty lots @elder hill and @median rain
HELLO ITS ME BACK AT IT AGAIN AT THE KRUSTY KRAB
To update a texture do I just need to go in and remake the ModelAPI?
wel its not a texture it's a rig that is behaving WAY too freely
I just need to stiffen the physics a little
@median rain
(SORRY)
or anyone else that knows
If you're changing anything in Unity you need to rebuild yes, you don't have to make an entirely new project, just rebuild
If it's just model things, you don't need to change anything in code, you just rebuild your project in unity to get a new assetbundle, and then rebuild your VS project to get a new dll.
how much is known about the 2 handed item bug?
this one
in first person the 2 handed item is not visible due to being out of view, so it just looks like your holding nothing
not a bug. it is based upon the positioning of the item within unity
so if it is in the same position as the players in the unity project, it'll be the same in the game
default player's hand*
i dont understand
wdym by same position as the players in the unity project
like the item offset?
yeah
oh das fine
@median rain you have any insight?
Item positioning is a pretty big bug at the moment.
yea, i read about it a bit in the thread from before
Something got messed up with the positioning when I added viewmodels, no clue what.
From experience I can say that it doesn't affect things like weapons, but sometimes the big gear will completely obscure your vision.
or just be offscreen
yea, about what we've seen
okay, well i wish you luck with finding a fix!
GUESS WHAT Im here again with questions.
What is causing my model to not show up after updating it? All that gets equipped is the suit png now
Is it not importing into the game? Does your console log show any red text when it loads up the mod when you're starting the game or when you put on the suit?
it doesnt! I just rebuilt it entirely and Im going to see if that fixes it
yeah, at that point, you might just need to remake it. you broke something somewhere and with more information we might be able to figure it out, but it probably would just be easier to redo it
tried rebuilding it in unity, or have you messed with the project files in visual studio in some way? (other than changing the default suit for the model?
I had to make an entirely different mod in unity, it fixed it but I have no idea what broke
yeah, welcome to the club happens sometimes. I just keep a copy of the old one in unity so I know what I did and can recreate it easily after it happens
damn alright. Good to know Im not alone in the struggle at least!
btw, @shadow path were you unhappy with the shemp suit or something? it seemed pretty good
the tail physics were driving me up the wall!
the new one I uploaded is the same model but with a better rigged tail and ears, and post processing turned off
ah. that' explains things. btw, the config for that is weird, it shows at replacing the default, orange suit while still replacing the suit you want it to
I'm assuming you hard-coded suit replacement but left in the old code
Ah. Yeah that would do it.
if you ever need any help (and I'm available) I can help you hammer out some problems in a vc sometime
sure!
just @ me or something, idk
I just need to figure out why her feet are clipping into the floor when ive pulled the model up to match 😭
dunno why theyre falling through
I DID IT, ITS DONE. TAIL HAS COLLISION AND ISNT FALLING THROUGH THE FLOOR, HER FEET ARE OIN THE GROUND, JIGGLES ARE DOING WHAT I WANT THEM TO
IT IS DONE
🙏
sick
So this might be a bit ambitious but I've been considering expanding my player models mod a bit by adding an in-game menu where you can enable/disable certain meshes on each suit or switch outfits for that suit according to your liking... How uh.. easy do we think that may be? I'm more than confident I can make the menu as I've made many before but the coding functionality behind making it work for lethal I'm unsure on
Essentially each suit on the rack is tied to a character, that character has different models representing their outfits which is controlled through a menu is the endgoal
@little sandal might be able to help you there
um, im not very good at explaining things
the way the Femmployee mod works is the suit is split into 5 regions, head, chest, arms, waist and legs in that order ID wise.
I use a single FBX that has all the 3d meshes on it, but I only have the 5 default meshes on the suit in unity. when you change a suit region it sets the SharedMesh of the respective suit region's SkinnedMeshRenderer to the mesh that was selected.
the hard part is storing that data in a networkable way. I use 5 NetworkVars that store a string, this string stores the name of the mesh that is currently equipped. so when a suit needs to sync to everyone they have the values for that suit to set it properly
I also use more complext network structs that can store things like blendshape values along with the mesh ID and blendshape ID, this allows for in game sliders
i hope that makes some amount of sense lol
you can also look over the github if that would help you understand better, i still really need to go and add comments though so bear that in mind
https://github.com/glados1235/FemmployeeMod
if ya want more info feel free to ask in our thread! https://canary.discord.com/channels/1168655651455639582/1286906558361505893
o, also @delicate glade sorry took a min to get back, was in a war thunder match lol
No worries! I'm at work right now so I'm not in a rush haha I'll take a look through this when I get home!
Much appreciated ❤️
ye!
hope it helps
okay so this did help me start thinking of how to do this but honestly im still a little lost as to how id handle it, immediate question though is how is this structured in your project? thats the biggest thing im lost on as for how to start
i just have a basic model replacement project with just the models and the api, would i need to set up the asset ripper for this or is that not necessary?
just trying to visualize in my head how this would work
Once I had the basic mod generated and set up I started to build upon it
The Femmployee class is the one that was Auto generated for the suit from the start, I just renamed it
It's the class that the API puts on to the suit when you're wearing it
You can set up a patched environment in unity alongside the model replacement API and you can put your dll file into the project to use script references on game objects
You do have to be careful not to change any namespaces that were generated from the project before, you also can't reference the Auto generated suit script directly within a script you plan on using on a game object in unity
If you do either of these things Unity will refuse to properly load the mod assembly and you won't be able to use any of your script references on game objects
Our mod has a network object that is created and destroyed alongside the suit when someone puts it on and it's linked to their suit.
This object is what stores that individuals suit data
so like how for model replacment mods theres a "ModelReplacementAPI.dll" im also creating my own dll that serves the purposes i wish, that being these additional functions?
that sounds like a solid place to start if im understanding right
I just took the auto-generated project that the API in unity created and I just built upon it
Yeah
oh okay cool
As if you were making a Unity project or just a mod
my experience with unity coding FAR outshines my modding experience (only this one mod) so i both understand well and dont understand at all 😅
Everyone starts somewhere.
Then once you have your compiled mod you can put that into unity and use properly formatted scripts that will act as references in game, sort of like how Unity normally works except they're not really scripts being added to the game object just references that Unity can interpret
Just be aware when you start putting assembly dlls into Unity it tends to get very crash happy
So compulsive saving is your best friend
Funnily enough, Avali has done exactly what you want to do already. You would probably gain a lot just from dissecting their github project until you understand how it works.
At least that's how I start when I want to achieve things.
that would probably be good as i am very lost
Like I said you can also always ask if you're curious about specifics! Including General modding things like setting the project up in unity
My code is a mess as far as I'm concerned but it's a mess that I for the most part understand
Got to get around to adding those comments,,,
okay so for the ingame ui how would i uh... like do any of that? i can set up a canvas with some ui, sliders, buttons, values, etc but how would i somehow connect that to this .csproj?
You need to make the UI into a prefab and then put that prefab into a folder that has the asset bundle your mod uses
Look up how to set a folders asset bundle in unity
It's like a little drop down in the very bottom of the inspector when you're selecting a folder
oh okay got it
Then when you click build project on the API project asset it will pack that UI prefab into the asset bundle
You'll need to make some sort of control script for it, then like I said put your compiled mod dll somewhere within your Unity project
If all goes well you should see a little expansion arrow on your dll file icon within the asset Explorer, if you expand this you'll see your UI control script
You can then put that script ref on to the prefab just like normal unity, just make sure you're editing the prefab itself, not just editing the existing scene prefab instance
Look into the lethal company input utils API, it will allow you to easily integrate controls into the game, say for opening a menu
speaking of which i added the .dll for that but it doesnt seem to like the using statement
Did you add it as a reference in the csproj
I don't know if they know what that means
i indeed do not! :)
Man I don't know what it's called
In your .csproj file, you need to add a "package reference" to the mods nuget source
Right click on the topmost thing in your Visual Studio Explorer
You can then add a reference with GUI
Oh if you're using vs then u can just add references normally
oh cool
You could just look up "how to add dll package reference Visual Studio"
If you're not able to figure it out
I'm in bed so my usual technique of doing it myself to then explain it is not possible lol
If you haven't already start out by following the model replacement apis Wiki for Unity project workflow
It's on the GitHub page
think i got it
hm
You should just be able to download the mod from thunderstore manually then put the dll into your mod folder then add it as a reference
If you can wait till tomorrow I can walk you through a lot of this stuff over VC or something
I've just been trying to sleep for the past like 4 hours now lol
But yeah, send a message in our mods thread tomorrow and find time just got to remind me
That should be right
sounds good
It's preferable to use package references instead of dll referenfes
To me it looks like the UI for downloading plugins
What's the difference
Hmm is it? I'm not familiar with vs so I assumed it was the package reference ui
It helps a lot more when someone tries to fork/clone your repo to work on it
Okay I asked about that and I was told it's not a thing
As you're not allowed to include other mod dlls etc in your github because
Not a thing?
I specifically asked if there was a way to have a reference to an online package similar to nuget
It's just using nuget
And I was told no
nvm it cant install it 💀
It might not exist for modelreplacemntapi itself maybe
I could add a check into my csproj that if dll not present download from GitHub repo
That's what I was told
Was a couple days ago
@median rain do you know if modelreplacementapi has a nuget?
Just manually add it into your csproj tbh
Just look for the file that ends in .csproj
Open that
Or just wait
ye im in csproj rn
Here I'll get my mods csproj ss sec
Nope. This has been asked before, but there's no reason to make a nuget for a project that won't have any considerable changes down the line.
The stuff that people actually implement in their mods is set in stone.
So regardless of how old someone's modelreplacementapi.dll is, it should still work
Ah ic, it would only serve to remove the need for downloading the dll and just having it as part of the default csproj anyway
Originally I wanted the SDK to do the downloading, but it seemed needlessly complicated, so I just decided not to.
Icic fair enuff
I know lethal lib has a nuget package
That's at least nice
I have a reference to it in my file
Honestly github action stuff is pretty magical, I need to set that up at some point, would upload to nuget, thunderstore, github releases etc with the creation of a tag
Oh by the way xu, I essentially merged the fork of your friend
Yeah most api's would have one like LL, LLL
Oh nice, as long as u keep nullable enabled 
I fixed it it's way better now
Sick
Keep wat?
It's one of the properties that they got rid of cuz they prefer kotlin's nullable to C#'s, it'll be near the top of your csproj, I can check if u still have it rq
But it helps a lot with null checking stuff
Rip you don't, oh well its fine, might be a hassle to set it up this far in anyway
Why would it be a hassle
I just add it back right?
There's not really any big differences in my project since I changed that file to make it more clean
The only things that I had to fix and adapt was references
Oh and adding in the latest Lang line
Because you need to setup nullable on a lot of files you've written, it's not just a property you asd
Add*
Oh then I don't think I ever had that set up
I get like 50 warnings for a bunch of things saying they should be marked as nullable or whatever but they don't affect anything
Or maybe I used to get them and that was from that?
Don't know haven't been paying attention
Lol yeah it's just warnings to help you write better code to show whether something CAN or CANT be null
Yeah I know
It was something I was going to get around to
Famous last words though
Mhm
It's very nice but took me a few hours to set it up for coderebirth, mostly because I set it up late and had like 100 different scrips to add it too
Probably
If you dont know how to set it up then its just:
If one of your field types CAN be null sometimes, you'd add a ? To the type, I.e.
private PlayerControllerB? player;
If it CANT be null then:
private PlayerControllerB player = null!; (and then you'd set the value in Unity or Start)
Yeah I did that for a few
It's terms to help your IDE figure out while you're coding whether what you're writing has a null vulnerability
Nice
Like I said it was something I was going to get around to
Like if I'm writing a function involving playercontrollerb, it'll want me to null check first erc
Good luck 
Yea
when you've got time
Anyways I really need to keep trying to sleep, having my phone in my hand is leading me into Doom scrolling on shorts lol
Lol yeah gogo
@median rain think you could push to github? the last push looks like it was 7 months ago and I'm trying to track something down that might be caused by ModelReplacementAPI
wait sorry I might be dumb
I was looking at a file history, although I'm still not sure if it's totally up to date
I'm looking at this patch here
I suspect it may be causing items to not be at their intended position for the first frame they are held by the player after switching from an item, but confirming that is a bit tricky
seems like there's a good possibility that this BodyReplacementBase.LateUpdate() is running after your patch to GrabbableObject.LateUpdate(), so the body replacement doesn't know the held item is held until a frame late
Yeah that's very likely.
I think I moved the held item logic into BodyReplacementBase.LateUpdate() to try and mitigate the ghosting that items were doing.
a tradeoff between items always being a frame behind in position, and items being a frame behind in position when you pick them up.
If this causes a real compat issue, I can look into solving. I forget the verbage, but there is a way to sequence one particular LateUpdate() to go after another LateUpdate()
so many hours of messing around just to find out that my waifus are at fault 
Lol
it was causing one with CullFactory, where CullFactory couldn't tell where items were properly when swapping between slots, but I worked around it so it's not urgent
so today i also went onto a model replacement journey with this video and im at the point now where im supposed to open the csproject file but i cannot open it 
k fixed it
works well but performance is not too good
is there anything that can be done about the poor positioning of items that are actualy being held by both hands? i positioned this socket properly and small items like flashlight or hairdryer etc are pretty well placed but things like Shovel or jetpack or large Axle are kinda poorly placed still
it is based on how close it is to the vanilla crewmate model, so if you were to move the model so it is similarly placed, it should be better positioned in first person if that is what you are asking
that's if you are using generated viewmodels, if you aren
't, it shouldn't be a problem
try reducing the polygon count if the model is too big
was hoping i wouldnt have to go through that but will see
those MMD models always go for visuals over performance since they were never meant for games
i have some character from Wuthering Waves and Tower of Fantasy wich i wanna do this upcoming week, im just gonna monitor how their performance is since those models have much less polys
maybe ill go through the effort of optimizing my karin some other time
you could reduce the polygons in blender, shouldn't be that hard honestly
yeah mmd files are for animating, they are normally more heavy
its not but im lazy for these kind of things e.e
I mean...
- import into blender
- decimate
- export?
the thing that confuses me is that in UE the extra poly's dont do anything literally since its GPU load and both, LC and the ue game i have been modding for a while now are cpu bound entirely
its a bit weird to me that those 2 engines behave so differently
Lc is not cpu bound. I know this because the function that generates viewmodels operates entirely on the gpu copy of the mesh.
My GPU always sits only at 60% usage so idk
It's just weird to me that my model loses me around 35fps in solo play when my GPU usage doesn't change at all
Otherwise I would have jumped to the conclusion that I have to reduce some polygons as well right away
Any chance the "generate viewmodels" config option can be made a clientside thing?
If it isnt already
it is
all of this mod is clientside, you can use them in public lobbies without bothering anyone else
anyone know how I make metallic bits stay shiny when importing?
If in understanding right that'd be up to the materials, check the properties of the materials within your unity project for that model
Yeh! Casper told me I was using the wrong pipeline.
If they aren't already extracted you can extract them from the model by going to the material tabs with the imported model selected
Downside is I have to reimport everything, but at least now it works
Gotcha, glad ya got it working 👍
Usually this means unity made a mistake when packing your materials into your assetbundle.
SOmething went wrong in the model export process, and the materials weren't included, so now LC can't find them.
I don't think a fix was ever found for this, just another irritating bug on unity's end.
throws unity
I did fix it by just saving the file and opening a different project
super weird
Would have to be something related to your model.
Yeah I'd inspect the rig in blender
rrr
ok thank
well I attached everything
HOWEVER BLENDER IS TAKING 700 YEARS TO EXPORT
okay nevermind it just crashes blender instantly on export
I love this
I
:C
I quit
Was the model 1 piece or was it split into multiple pieces?
If it was multiple pieces with different armatures then you probably have to dig through the bones and parent some
I had to do this on my Lyra model because the hat was completely separate and already in unity in the preview everything was moving except the hat wich was not moving with the character
Oh god.
When I had this issue I didn't even know what I was looking for because I never encountered this issue befor either
took me like an hour to to figure it out
Hi, I'm at the coding step. I'm not seeing the option for "build," and am wondering how to enable that?
what are you coding in
cus if you're doing it in something like vscode, it doesn't have an option to build
if you're using something like visual studio 2022, the build option should show up when you right click the .csproj file
I did manage to figure that out, for some reason VS didn't include some of the packages. Though there are a few other issues I am having, but gonna try to problem solve on my own first so I have more of a feel for the Model Replacement stuff
Anyone know how to fix JigglePhysics compile errors?
It's preventing me from building my project
You created the TarProtogen mod? I love herrrr
I did! She's my proto oc. ^^ Im glad you like her!!!
Did you have any issues with JigglePhysics? I'm getting compiler errors and can't figure out why, because all I did was add https://github.com/naelstrof/UnityJigglePhysics.git#upm to my package manager
I do not! The modelreplacemntAPI comes with a built in jiggle rig where you can select parts of the skeleton you wish to move- if it's ears and tails you're working with, you can usually start at the parent bone and build it from there.
If you are really struggling, @long hinge made an excellent video on what to do and how to add special things to your model! https://youtu.be/Wnobg8zFFK0
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...
aaaa I see, I bet they were contradicting each other, removing the package fixed the compile errors
...weird!
Is it normal for the model to be in a narruto run pose when in play mode?
yep! That means it's ready
Very pog 😄
you can preview the player model on top of it and itll be doing the same thing
Pog. I was trying to figure out how to set up colliders for the jiggle bones but couldn't figure it out to prevent the tail from clipping through the body but I might just crank up the friction value so it just can't move that much
angle elasticity helps too
I hate watching a tutorial, they do one thing, I do that thing but my thing looks or reacts different to their thing.
Like, I'm watching this tutorial. He opens Example.csproj with visual studios which mine would be Fenchi.csproj
Theirs looks like the first picture, mine is the second. Is this expecting you to know how to use visual? I'm so confused.
I don't have a build button either, I don't know what i'm missing
I think I found my problem, when I was installing visual studios 22, I didn't select one of the workload thingies it requires. Going back to that video above, he selects that. Hope this fixes my woes
It did :sigh:
say, are there an examples on mouth flapping? i've been considering making a model myself, and it'd be awesome to know if anybody has figured that out yet! thanks :)
lmao "Mouth flapping" (I know what you're talking about, just a funny sentence)
Hey @shadow path ❤️ I have 1 last quesiton. I have everything setup, and the model appears in-game. But when I equip it, I start getting thrown around the ship, have you encountered this?
I re-built the avatar and it's not doing it anymore X_X Sussy
The video above actually shows how to add mouth movements #1187188516644474911 message
oh for real?? awesome tysm! <3
37 minutes in 🙂
btw, if your jaw on your mouth seems to snap open, there is some alternate code that will fix that
i didnt bother coding in the jaw movements in mine, did 1 attempt, kept getting errors and just called it a night lol
I can help you with that if you want
okay, another question: has anyone done anything with eye movement at all?
not that im aware of,
most i've seen is just wiggles and mouth moving from voice activation
a shame, but i imagine the implementation would be difficult anyway. after all, how do you determine what the player is looking at? :P
That would be insanely model dependent.
I know that some MMD models have "eye bones", and some go even further with a controller bone that will point in the direction of what you're looking at.
So the final implementation of your eye controller is going to rely entirely on how your model has it configured, if at all.
If you can achieve that, I bet you can write a script that lets you look at scrap, or other players, etc...
Probably with ray casts to find a target.
I don't care about eye looking, I just want my models to be able to blink, even if I make my own animation for arbitrary blinking which is simple as heck
usually models do a blendshape for blinking
and i did it for my model replacements
just putting it to 100 and back to 0
Oh, it can be done for LC?
Is it just creating a animation controller with a looping animation in the animator?
i mean i just wrote a script to change the blendshape value
oh 😢
I figured putting an animation controller in the animator would break the game's walking animations and stuff but ig it doesn't hurt to try
Yoooo you can make the models blink! Just created a simple looping animation for smooth blinking and it just, works
i do believe ive seen a model blink ingame aswell
well, doing the above with an animation clip, I did
ye but outside of that ive seen it befor
I can probably make the eyes move around too. Not really looking at actual things but at least not staring blankly straight to give it more life
i wanted to look into it too for my karin model too at some point
so my character feet are reversed how do i fix that
my feet are inverted how do i fix that
i'm still very confused about the player model. the wiki says the model should be in a t-pose with palms facing downwards, like the default player model...
issue is that every single player model i've seen is in a slight a-pose with the palms horizontal... so what is the rig based on if not the actual player model & rig?
the model i'm creating is essentially a retopped player model, and it lines up nearly perfectly with the original model. i was under the impression that the closer to the player model, the more accurate.. but i suppose not?
even the example model provided in the package uses the a-pose and horizontal palms.. i'm so confused @^@
Which part of the model do you mean? When. It is pulled into the project or when you look at it after setting it up? Before setup, it is arranged however it was from what it was exported from. That position shouldn't matter though. What matters is after setup which is based upon the pose it is in after setting up a humanoid rig for the model. Those bone positions are what the setup is based on
Btw, this is also an answer for @spare oyster
i fixed that my new problem is in modding-general trying to add two models
The example model is palm down. Whatever pose it's in doesn't matter, since the mapping is generated off of the skeletal rest pose, which is palms down.
I had to modify the base player model a fair bit to get it to work, but the reason for that discrepancy is because most models are palm down by default. People wouldn't rotate their hands, and then their fingers would get destroyed.
it makes more sense to align the player model I packaged with the SDK to the models people will actually use.
that makes sense! sort of unfortunate if your model is based on the default one, extra work to get it looking right.. 😔 thank you both for the replies, i appreciate it a ton! <3
Trying to figure out the Jiggle Rig Builder. I have it set up nicely in Unity, but when it's in-game, how it acts is totally different. Any real way to get it to act the same between the editor and in-game than constantly exporting, trying, rinse repeat?
I'm having an issue where my models aren't having their textures appear in game. I see them in Blender and Unity, but porting them in-game isn't working
If you hadn't noticed, movement in the game is incredibly choppy. If you are just as choppy when you're testing, it's the same.
That is fair. And it's hard to mimic the movement and stuff in unity
offtopic about the jiggle bones, when wanting to build the dll, these errors are preventing me from building and idk how to patch it, any ideas on how to fix the compatibility errors?
Is your VC project in your unity project?
my VC project?
I set up the avatar in unity, then build it into a folder thats on my desktop
Is it possible I don't have the right .net thing installed? I had to rollback my computer after breaking a thing when trying to fix phasmophobia (I disabled a bunch of services and couldn't login haha) so it's possible I don't have the .net package anymore
I was always wondering but never looked into it, how are you replacing the players body? I'm curious to see if there's an easy way to fix the slightly small delay at high speeds with the models body catching up to you, with how it's being done it feels like it's being lerped at Update or smthn lol
Slightly? with LGU speed boost, it's pretty bad. Even with taking off/landing I can see the back culling of the hands
It's been a while I didnt remember how bad it was lol
It's worth it though being able to have kitty hand paws haha
If it's on your desktop then that's probably not the issue. I haven't seen those errors before, so there's not a ton I can do to help, unfortunately.
Can't recall if we still have ghosting on the main model, but as an extremely simple overview, the player model is made invisible, and the replacement model is a prefab that has its position set to the player model's hips on LateUpdate.
I know why we have ghosting on the replacement viewmodel, it's because unity is stupid and doesn't expose an AfterIKApplied event on the animator, so when I get the arm positions and rotations for the viewmodel, those are before IK is applied to the player hands.
Hence, a frame behind.
Yeah, for some reason they decided to run IK after LateUpdate.
amazing
is it possible to use some sort of client network transform on the replacement models to get interpolation?
thats like the only way i can think of to stop this frame behind shenanigans.
either that or just parenting, which i must ask why that didnt work/wasnt tried?
lol
Parenting caused all kind of shenanigans and so I decided to stop using it, I suppose I could try it out for the viewmodel and see how that works out.
It's preventing me from updating my mods so I guess it's time to dig through ancient scrolls of help threads
Back to trying other methods, installing other .NET frameworks and they're just not appearing as possible ones. What am I meant to use?? 😭
I fresh installed VS2022 and still getting these, could my M.R SDK be outputting brokie files??
The files are pretty simple, I don't think they've ever broke before, but it's possible.
Honestly I would think that's a nuget issue, seeing as nuget oversees the downloading of dependencies.
But I don't know enough about VS or Nuget to help you out.
Have you considered just making a new VS project, or restarting?
I was actually going to try that now. This entire time all fingers were pointing to VS lol but now its time to point fingers at unity
I'm on the verge of fresh windows installing because even a fresh install of unity 2022.3.9f1 is spewing compiler errors, what the hell happened to my computer?! I'm like, actually irrationally mad right now haha
hey @median rain
does the OffsetBuilder/RotationOffset system on suits take up a little fps?
hunting down performance issues right now and just having the suit on drops it by about 15 ~ 25 fps.
and the suit class does nothing in update nor has things called per frame
OffsetBuilder/RotationOffset exist purely to store information from the SDK.
If you're looking for performance issues, those are probably in LateUpdate.
I do a fair bit of stuff that could be cached.
my mod doesnt use LateUpdate
Things like GetComponentsInChild, etc...
yeah but like i said none of that is being called on my mod
nothing is happening when the suit is on unless you press apply settings
thats why i thought to ask here, thought maybe there might be a small loss with the API suits
Regardless of what your mod is doing, the API has to do stuff in behind to make it all work, and it could certainly be optimized better.
Do you have any physics?
no
Ah then that's not it.
yeh, thats what im saying
Well if you're asking whether I have any plans to fix it, not at the moment.
I've never experienced anything like that myself, so I can't say what the expectations are. I think it's pretty system specific.
kk
I'm trying to help someone make their mod, they seem to get this
"[Error:Unity Log] ArgumentNullException: stream
Parameter name: ManagedStream object must be non-null"
error when the game tries to load the mod.
Any idea what may be the cause of this?
They either don't have an assetbundle, or their assetbundle isn't an embedded asset, or maybe it broke in some other way I forgot.
@shadow path did you intend to mark your TarTheProtogen as NSFW?
Also, your novabeast is way too tall x3 Masks sit on it's neck and nameplates are hidden in its head
She's huge on purpose, these are all ocs of mine! Also no, I didn't. Not sure why that happened!
Would you like me to remove the NSFW tag for yeah? 🩷
I uh...the tag isnt there for me?
Im not sure how to remove it
or how it got there

The tag isn't obvious directly on the mod page but searching for your mod doesn't show unless I enable NSFW. I'll get it cleared ♥️
Don't worry about it ♥️ I'll get the tag removed
Had robyn remove it, make sure to leave it unflagged in the manifest next time its updated
im so confused, I never put anything nsfw on it
uuhh
what i do with this
i have 5 models exported from another game, the first 4 models had no issues at all and the 5th now does show this
fixed it
very simple if i would know anything about unity wich i dont
something weird happened with LC v65 regarding this api, involving the weird movement issues I encountered before, but only on my larger modpack. I can't replicate it with a profile with only MC/MRAPI/TME. before this update, MC cosmetics didn't load on any model, including the default employee model. now, MC will load on the employee's model, but still be invisible on modelswaps. additionally, when modelswaps do emotes with cosmetics on, it causes the weird movement from before. There aren't any errors being shown in unity log, so i don't know where to go with this. i'll get a recording of it to show what i mean
i should clarify that movement with the modelswap is perfectly fine until an emote is used, then it starts acting up
this also doesn't happen if you aren't wearing MC cosmetics
it seems to specifically be caused by cosmetics that are large and on the head, so i wonder if it's something to do with colliders
I have 1 error and idk how to fix it myself owo
I had this issue when putting a collider on my character (I was trying to add it for the wiggle joints) haha it would fling me everywhere. I wonder if those cosmetics have colliders on them and it doesn't really mess with your character till you do those emotes since those colliders would move around with the object
it probably is that the cosmetics are set up with colliders when they shouldn't
i tested with and without the computer head, while keeping the hat, and no problems
it probably is that some of the hats aren't configured right but the issues only arise when wearing a model replacement
so i don't get what the api is doing to cause it
Even if they aren't visible due to jank, the API does move the cosmetics to where they would be on the replacement model.
Definitely a combination of bad cosmetic colliders + different position on replacement model + emotes
But honestly I'm not sure what I can do for you here. It's not like I can disable the cosmetic's colliders.
yea since it's only a few of them i'll try to remove them from my package
i'm still not sure why it started working on showing the cosmetics for default model again though, cus it used to hide them on that as well
I don't even wonder what's going on with morecompany cosmetics anymore. If they start working again, great, if they stop working again, it's not like they worked to begin with.
I feel like someone should make a replacement for Mc and separate cosmetics and the other features
It's so annoying how the entire mod becomes bad just because of these stupid cosmetics
i love the cosmetics
i just wished they worked with any of the other cosmetic type mods
honestly? Morecompany has several intrustive features such as the insistance of A CUSTOM MAIN MENU
I mean, if you are running with a code, you can mess with the configs to effectively turn them off though
Calling a small thing like that intrusive is just silly
idk, think it should be configurable and find it quite annoying. Not the version number, the main screen and loading screen
also with the layer it loads in on, it can go in front of other mods that change the screen which is annoying
well if that was the case nobody would have it enabled 😂
so i can see why swipez doesnt want a toggle for it (plus u can use the NoMoreCompanyLogo mod anyway)
kinda the point. and having to use a mod that is a solution to a problem that shouldn't exist is wild
well its only a problem if you care about it
like I personally don't care about it being different but some people do
in fact i find it useful to know that i loaded up modded
meh
Might be a question with no immediate answer, but anyone know why whenever I have this mod active it shows another pair of arms of the original player model?
i saw Xu say something about this here, i think
this might be it
either that or
you have viewmodels turned on in the debug settings
and its generating extra arms
i think
You sure it's this mod? I remember having this issue with the pinata SCP mod
Never this one though
only occurs when I turn this mod on, I mean doesn't mean its not meshing well with another mod though
I don't have the pinata mod
ah so its a morecompany issue messing with model replacement
Idk
I said I would guess it's that, idk what you have in your mod pack
It could be an interaction with anything
thats fair
sad cause it used to work with my mod pack, guess something and it just aren't getting along anymore
wasn't sure if it was a known issue with a known fix already but guess not
oh well
thanks anyways
Well for all we know right
It could be a bug now cus of the changes in v66
Which would mean the API needs updated
I guess checking anything you added recently and doing some trial and error is the best bet rn
Can you get me some examples?
Haven't checked into lethal in a while, but this is the first time I've heard of such a bug.
I can show you it tomorrow, night time for me currently
Hey was just curious as to if someone might have had an issue with their models getting progressively wider every time it's loaded? Seems to be multiplicative as it's not really noticeable at the start but very quickly gets wider than the ship
Admittedly asking not for a mod I'm making but to see if I could fix a mod I found, specifically https://thunderstore.io/c/lethal-company/p/thecreature/Signalis_Model_Replacement/
I'd help but silvy with the somehow broken unity is still trying to figure out this nonesense. I fixed all my other red text problems but stumped on this one lol
I've updated all of the unity packages, installed visualscripting which fixed this error, but then created the 2 above errors lol
What the hell, I decided the edit those 2 cs files and remove those 2 lines and everything compiled properly
The extra arms is a thing with the mirror decor but they are not visible otherwise for me atleast
Yeah, thats a mirrordecor problem. I noticed it too but others don't see it on you so 🤷🏻♂️
Now I'm getting this when making the model, aaaaaa it creates everything needed for the project but the actual model aaaa
haha
@median rain not sure if u saw my ping the other day but just so you know, ModelReplacementAPI needs re-building with the latest MoreCompany dll
I'll see if I can't take care of that this weekend. This week is particularly busy.
in solo play when i was trying out new stuff i havent seen any issues with custom models or so
rip
looks kinda funny but i have absolutely no idea what im supposed to do about this
Wiggly
Reminds me of squidward
well turns out it just has something to do with the way the character is rigged
the upper arm is like made out of 2 bones instead of 1
Life Is ... Lethal
good old new player experience
Almost gave up when I checked everything (as I thought) and model was just flying around detatched from player completely. And then I checked Unity Editor version... (it was 6000 something)
fixed my squidwards arms
You've got to love twist bones. I've had my fair share messed up due to those as well.
also love the goofy default icon, the amount of people uploading their mods with it
gorgeous every time

been messing around with materials since im new to unity in general and my previous 2 mods just used the default materials completly without changes
Particularly with anime models like this, I would recommend using a toon shader like lilToon.
HDRP does not do them justice.
ill look into it next time
ive spend so many hours on these models now
î added some emissive to the eyes 
i hope someone whos gonna use my mod is gonna freak out inside the facility someday
i realy wanna figure out lod's to see how far i can push performance without realy sacrificing quality when just chillin and goofin around in orbit but some things i just dont get like, Distance what? 0 meters? cm? feet? potatoes? do i have to figure this on my own where i dont even know how i could do that without bothering a friend every 5 to 10 minutes
That's just unity arbitrary units. You would have to test it to find out.
I asked naelstrof about that a while back, and I believe it just lowers the physics refresh rate depending on distance, so it's not a LOD in the typical sense, being lower detail models, just slower physics.
Which may or may not be worth the effort.
Rebuilt with the latest MoreCompany. Let me know if whatever needed to be changed still needs to be changed.
got this error while adjusting the avatar definition of a model, along with a ton of missing bone logs. Does this mean my model isn't rigged correctly? i assume that's the case considering it looked terrible ingame. how would i go about fixing it?
i've also started getting "ArgumentException: Can't save persistent object as a Prefab asset" and i'm not sure what that means
Are you on the right version of unity?
We don't usually get real errors in the SDK, other than there also being missing bones in the avatar that ideally shouldn't be missing.
yknow i realized that as i was going to sleep last night
i don't think i have the same unity version the game uses
i'll try it again today with the right version and see how it goes
my editor was on 2021.3.18f1
no wonder
I'm not sure what would be the best way to fix this—something on Mirror's end, something on MRAPI's end?
Without the fix versus with the fix.
yo some of the models and model-suit-packs ive downloaded arent loading as custom models. anyone know why that might be?
i wanna say my custom models no longer work with the latest version? testing it a bit more rn
nah must be a skill issue since it didnt work even with downgraded version
This won't be fixed. Mirror is fundamentally incompatable with TooManyEmotes, which is what we have chosen to support.
Fundamentally incompatible? It seemed to work alright with the culling mask changes.
Does this work with the previous version of the API? Or is it just in general. I've noticed that some custom models just dont' work.
I can't recall the reason, it's been too long, but if you think you can fix it then feel free to submit a PR.
Honestly, it's more likely I could just update Mirror's culling mask instead and you wouldn't have to deal with any changes on your end. I'll ask around, thanks for the help
i believe the reason was mirror was using a horrible layer for where it assumed cosmetics should be put on
and that caused a whole bad standard iirc?
Yeah, I recall that as well.
I don't think mirror decor is still updated, so changing its culling mask likely isn't possible without some really funky patches.
I think I had one working for a time, but it probably hasn't bveen maintained.
not me wasting 2 hours because i forgot to add more suits as a mod 
how would i set up LOD's? do i have to Setup the model with ModelReplacementAPI just like the normal models?
and how would that work when i build the project or set them up in the cs project
actualy nevermind i think i figured stuff out
@median rain do you recall if you left a way for people to define where the item holder can be on the view model? (im assuming the view model item holder transform is where the item position's position that you're holding gets set to), its just that i need to add a bit of an offset to the holder for the model im usin
do you mean this kind of socket there? with the example walkie attached to it
left me hanging fr 😔
is there something similar for the player's camera? or nah
not that i know
this 1 guy that made most of the genshin character models has custom camera positions for small characters but i think i read somewhere he got some custom code for that
time to give lethalboykisser's a code a look lol
oh ill look into that code too
im fine with writing code for the stuff
tacocat12's mod?
KinkyDeathMagic i think
alright ty
i wish i could adjust the position of items further too
2 handed items are horrible
my models hold their shotguns like im aiming down the sight
covers like half the screen
rip
Yeah, but I don't think it works at the moment.
also this code doesn't reset the camera to the right position when you switch off the suit
oh realy? xD ive only tested very few of them but threw them out again because they have insanely bad performance so ive never properly used them
i just tested to see if the camera worked
and it did shrink to the right position
but switching to any other suit after those didn't reset it to the default position
also is there a way to adjust where the jetpack and beltbag positions on a model are? it looks like they're attached to the player object itself instead of the model, which makes it look a little weird on models that don't exactly match the proportions
correction: it resets correctly when you switch to the orange suit, but not any others from what i've seen
Any idea what's happening here? Is the model just stretching to the center of the map?
Unparented bones default to 0 0 0
Coo
Isn't that something that should already throw errors in unity and was talked about in the tutorial? 
Or not errors but warnings
Oh well
At least he's the first to ask about that specific problem
So if anyone else goes in the comments they can see the answer
I was expecting something with the rig too but I didn't know unparanted bones stretch the model across the entire map lol
I mean, you should expect a model's bones to be attached to each other, right?
It's certainly not the first time it's happened, though.
does the root position offset work? i'm trying to adjust the height of a model, but changing this and building the project again doesn't seem to affect it ingame
what the hell?
height of the model? Wouldn't you use the root scale for that or are you just trying to move the model up in position?
Modify the copy of your model at modelreplacementsdk/assetstobuild, or delete it entirely.
I think some people had this problem if they built their assetbundle on the wrong version of unity
nailed it on the head, he was on unity 6 lol
this worked, thanks a lot
also didn't you mention before that the item transform values didn't work atm?
or am i misremembering
Yeah. Root offset is fine, though.
gotcha
yea the item offset doesnt seem to work, been reworking my strinova bundle and just now got to actualy testing that
why do the physics become crazy when i add the Physics LOD to it
also i cant get any better performance out of this model and idk why at this point because i decimated the mesh a bit now but it just did not change at all
it actualy has like 10k less triangles than any of the strinova models ive been doing lately but has noticably worse performance
actualy its not noticably worse after testing some more but it is worse still despite the lowered amount of triangles
do i even need Physics LOD if i have distance culling from the LOD group component? 
Is anyone else experiencing these types of bugs when using a model? Without a model everything is held correctly but when I have a model equipped it's all weird.
Ah. It's somewhat managable except when using XL Scrap as it forces us under the ground and we die
thats.... interesting lol
I talked to naelstrof about the physics lods a while back, and I think it was kind of just strapped on at the end. I wouldn't necessarily expect it to have a great performance improvement.
Also if you're talking about the base game LOD group, with the base game player models, it doesn't do anything to affect the performance of replacement models.

Yeah, it is unfortunate, but if you have tons of physics on a model, like I see you do with that one, there's little that can be done to improve performance. (physics is far and above tri count)
For one, unity jiggle physics is already incredibly performant software. It exceeds dynamic bones in just about every way.
I guess just leave a warning on the model?
i mean, i can think of another thing to improve performance a tiny bit but thats like, effort i dont realy wanna get into
mh ill figure something out someday
i wonder why that is, i wanna look into it later on why two handed items are being weird even though everything should just be based on offset from hand position
rn in my model i have an offset placed that works for all 2 handed items afaik but looks really weird for one handed items, so i might just make a script that changes the offset depending on whether player is holding 1 handed or two handed with the model
That would be great!
is there any reason that jiggle physics colliders don't seem to work?
Did you put the collider reference in the jiggle rig component?
I think so? it works in the Unity simulation
nevermind, I figured it out
nevermind again, when I load them now, it just does this sort of thing
and no, no colliders should be intersecting
yeah, it seems like when you put anything in the colliders field, the jiggle rig in question just freaks out
it also doesn't seems to relate to the jiggle rig interacting with the collider
got this error when trying to load my modelswap on a pack with a lot of mods, not entirely sure what it means but this part specifically was only present in my large modpack. It caused a script for camera modifications to break down and not adjust after the suit gets put on the first time
and this error gets spammed while the suit is on in every profile i try it with, not just the big pack. I imagine i messed up something in the model to cause it
You should probably ask whoever made the mod that broke.
like the camera script? cus it's included in my model
nevermind, found the fix for both problems
the first error was caused by redundant code and the second was caused by a typo on a blendshape
is there a way to access what suit the player is currently wearing?
i have a script relying on gameObject.GetComponent<ModelReplacement.(model)>(), and it doesn't work on non-modelswaps, so i'm trying to convert it to read the current suit
Check the documentation on the wiki. There's a MRAPI static method you can use for this, provided that you have the playercontrollerB
Also, make sure to do proper null checks. Since it can return null.
thanks about that. I've narrowed down the problem to [HarmonyPatch(typeof(ModelReplacementAPI), "RemovePlayerModelReplacement")]. this line causes the error:
Failed to patch static void ModelReplacement.ModelReplacementAPI::RemovePlayerModelReplacement(GameNetcodeStuff.PlayerControllerB player): System.ArgumentNullException: Invalid argument for call NULL
on startup. It's not exclusive to my suit and happens to other modelswaps that use that harmony patch. I'm not sure if it's something I can fix, because removing that line stops the error from showing but doesn't allow my code for removing modelswaps to run. I also tried keeping that line while removing all the code from my remove method, and it still caused the problem. [HarmonyPatch(typeof(ModelReplacementAPI), "SetPlayerModelReplacement")] doesn't have this issue
ignore the error on MRMODEL, i have it right already
oh this patch
i've seen this one before
you remember your bodyreplacementbase class? just put this code in it
and then after base.OnDestroy(); write the code that's in the patch
and remove the log about the player.currentSuidID, i imagine that's what's erroring right now
i just added the mls logger so i could see if it was actually running, but i get it
lifesaver 🙏 thanks so much
I want to create a model from scratch for me and my friends. Does anyone have any tips or is there a loose set of directions for someone starting from the ground up? Ive seen these directions (https://github.com/BunyaPineTree/LethalCompany_ModelReplacementAPI/wiki/Using-the-Unity-Workflow) but I do not have a "rigged 3D model with human shaped armature, preferably as FBX."
You need a rigged 3d model with a humanoid shaped Armature to make a model replacement
he wants to create it
Exactly, thanks. I have the model I just dont know where to start on rigging it
then look up a character rigging tutorial
im messing with a bunch of items to test offsets and im seeing a lot of weird stuff lol
this bug with belt bags
this bug with jetpacks
idk about belt bag but the jetpack one wouldnt be a view model bug as far as i can tell
looking at the code i've been trying to solve it for well past an hour
and i dont get why it's not working
i'd imagine it's a collider problem
my models don't have the issue with the actual holding but don't play well with the jetpack in specific scenarios
like crouching i think?
so when u hold the jetpack with your model, it actually shows the full jetpack?
and not just the buttons
it shows the handles and i think the belt, i don't fully remember
i could check real quick
the belt is what i've been trying to solve
cuz its handled differently
would be appreciated
this is the code for the belt of the jetpack too
your shockwave model replacement is standalone on ts right
it's part of coderebirth but there's a standalone version i deprecated yeah
you havent modified it since it was deprecated right
nope
bet 
your model does this on my end with viewmodels on. mine does it too but not as extreme of a degree. with viewmodels active, the belt does not appear on either mine or your models, and dropping the jetpack either prevents the backpack from rendering or forces it through the floor. belt bag is unaffected once dropped, but didn't render when in offhand. once i switched back to orange suit and picked up the jetpack, it reset to normal when dropped. jetpack belt was visible on base model
not entirely sure how the viewmodels are generated but the beltbag and jetpack controls might be due to how the arms are rigged
the holding of the controls/beltbag itself will be because of the item hold offset (which, probably due to my model size?, needs to be a different value for 2 handed and 1 handed items, which i havent yet implemented)
but yeah the part about the jetpack's belt just didnt seem to be near the model itself for whatever reason
the position of it is taken from the jetpack's code's lateupdate, so i modified the player's spine that it takes from and it still didnt like that for whatever reason
are you doing item hold offset from your project code?
yeah, i changed it to be smthn different so that it looks good with 2 handed items (not on the release you're using i think)
i couldnt actively change it ingame, so i did it in the script, but i think it didnt move
oh wait misread
havent tried that actually, but it is from the field so it would change ye
i was gonna suggest maybe using something like gameObject.transform.Find("ScavengerModel").Find("metarig").Find("spine").Find("spine.001").localPosition, where gameObject = player.gameObject. since this is what i used for the camera code on my models, but i'm not sure if it would help you
i'm also not sure which bone specifically jetpack uses to attach to
it would be spine.001 yeah, looking at the player script and the jetpack script
and i do this just in a shorter fashion and the replacing does work, just not seeing much of any effect
even if you set it to a super high value it doesn't change?
im guessing it does change, it's just very weirdly offset for some odd reason
offset/forced in a specific location
which is unusual since the offsets from my experience are very sensitive
i wonder if you moving spine.001 around is moving the rest of the body's upper half, which makes it seem like it isn't moving?
so maybe setting spine.002 to move the opposite of what 001 does will make it more apparent?
Has anyone figured out how to implement something like blinking on an model? Just curious! :)
If the blendshape keys or animation exist, then all you have to do is override update and occasionally, on a timer, change the values of the blendshape or play the blinking animation
Thank you! ^^
Thanks a ton for the work, I'll get this uploaded today.
Will we finally be able to use Model Replacers with cosmetics? :3
this doesn't look like a patch for that. fixes some unwanted overrides where cosmetics showed for local players when not using a model, and forcing cosmetics to show when they are disabled in morecompany config
i was considering looking over code for both to see if i could experiment with compat between the two eventually, but i haven't got around to it yet
Cosmetics seemed to work fine during my testing 🤔
I tested with the thicc model and the only issue I noticed was the cosmetics not being completely aligned with the player whilst they were moving
It varies depending on which model you test with
The thicc model should be mostly fine since its rig is similar to default scavenger
But some other models have cosmetics spawn in weird positions
E.g. lethalfortress2, the demoman suit causes head cosmetics to spawn upside down
That'd just be the suit creator positioning the bones weirdly i'd guess
probably, but it happens on both models that are nothing like the employee, and models that are really close to the employee, so i don't think it's just weird rigging
i dont know if you can even move anything on the models besides the socket for 1-handed items
Some modded 2-handed scraps are definetely offset when using a different model
Any idea why this happens? They're definitely referring to this code segment.
don't know if this would help, but on my project i was able to replace config = ((BaseUnityPlugin)this).Config; with config = base.Config;. to my knowledge that shouldn't have any affect on this code though. is it possible they forgot something relating to syntax in C#?
Is this an actual problem? Awake() functions are naturally unused code, as nothing references them. They are accessed by reflection by bepinex.
Is there a good cel shading pack for unity to use for models?
Mostly for like anime characters

I use LilToon
Apparently the mod builds and loads into the game fine with no errors, but it just loads the moresuits texture. So is the code just not running?
May have been some confusion since the pic I sent is just an example and not the actual code where a lot of the code is grey
Oh, there's a couple causes that can result in models not loading, the awake function not running probably isn't one of them.
What they can do is look in the console when the mods are being first loaded in, and see if a message is posted that states that their model was registered.
If it is, they should be sure that the suit name is correct, and if so, be extra sure that there are no errors in the console.
If there is a message in the console regarding the model change when they put on the suit, and no error, they will have to investigate with something like unityexplorer, sonce then it's a model specific problem
anyone know a way to make it so that after selecting a suit, it will switch to another suit? specifically the default suit
Well the mod certainly wasn't being registered lol. Apparently they just placed their mod folder in the wrong place
I think the whole greyed text thing is they panicked when they saw that the private void awake() was slightly darker given it wasn't being referenced by anything on their visual studio, which was confusing for me since my visual studio showed it as equally bright even if it wasn't being referenced
If its private it'd be greyed out if public it won't be iirc
Yeah that just doesn't show on my visual studio lol
How do you add audio clips to the model so it plays them when you do something like emote ingame?
You can add this to your body replacement class.
{
if (emoteId == 1)
{
var clip = // your audio clip
controller.movementAudio.PlayOneShot(clip, 0.8f);
}
if (emoteId == 2)
{
var clip = // your audio clip
controller.movementAudio.PlayOneShot(clip, 0.8f);
}
}
I can't remember which emoteID is which, though.
Do I have to add the audio through unity or can I just have it in my project file and add it through c#?
I think you need to add ur audioclip through assetbundle
When adding the audio clips to the model itself do I do it by adding Audio Source component for each one on the model? I haven't worked with audio in unity very much so I apologize if its a stupid question
nah you can play multiple clips on one audio source
i'm guessing you drag multiple onto the AudioClip tab?
the way PlayOneShot works is it plays a specified clip on the referenced audio source, your script just needs to know which audio clip to play
where it says "clip" is the clip its referencing each time, youd specify each clip at the top of the script
then add the references in the inspector
Is it normal that players logging out leave behind their model floating?
yes
it's some issue with OnDestroy() where it doesn't remove the model when they leave
the function works fine when switching suits though
That's a bug that morecompany added. They disable the script when players log out, which prevents OnDestroy from being called.
it took me way too long to realize adding audio is done with this
chat i might be immensely stupid
You might be
Would there be anyway to get the models out of the compiled DLL after its made? i made a thing like 4 months ago and wana recover it to use in unity again because i dont have the origional unity project anymore...
also i think it would be cool if you could add a config option to force change the default orange suit to any suit you want by puttint the suits name in config, so any server you join client side it will be that suit (some mods dont have that option)
The generated view models tend to offset items in odd ways, so that could be weird for physics?
or if anyone can do it for me and add a skin
you can watch naqibam's tutorial in the pins
@alpine vortex
Awesome
i can't figure out how to rotate my model and apparently this was already answered here?
i can't find it tho
nvm i just kept trying it over and over and eventually it stopped being rotated!
yeah, unity is werid sometimes
@long hinge sorry to bother but whenever I equip my model, It appears very far outside of the ship/moon and I do not know why any info to fix would help thanks!
Can I double check you're using the correct Unity version of 2022.3.9f1 ?
was using wrong version but now I have switched but when I attempted to add the package into it, nothing happens
Are you trying to add the modelreplacementsdk via the github url?
yes
it comes up with this error in console: Failed to find entry-points:
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'ModelReplacementAPIEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.Exception: Failed to resolve assembly 'ModelReplacementAPIEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in directories: E:\Unity\Unity 2022.3.9f1\Editor\Data\MonoBleedingEdge\lib\mono\unityjit-win32
E:\unity projects\My project (10)\Library\PackageCache\[email protected]
E:\Unity\Unity 2022.3.9f1\Editor\Data\Managed
E:\unity projects\My project (10)\Library\PackageCache\[email protected]\Unity.Burst.CodeGen
E:\unity projects\My project (10)\Library\PackageCache\[email protected]\Editor\VisualScripting.Core\Dependencies\DotNetZip
Try restarting your computer. I've had trouble adding the package sometimes
ok
managed to fix everything thank you so much for the support!!!
neat
is anyone else having a problem where modelreplaced suits get stuck in doorways?
wait, I bet it's the step mod I have
i tried to mod models into lethal but every time i try it out the models are just invisible
someone might know what i did wrong?
Can I check you're using the correct Unity version of 2022.3.9f1 ?
i did not use that version
im gonna try it out with 2022.3.9f1
the model is still invisible when i use unity 2022.3.9f1
What did you do after downloading that unity version?
i made a new HDRP project and followed the steps in the video
i tried reinstalling unity and it seems to work now
ty for the help