#Model Replacement API & SDK

1 messages · Page 3 of 1

median rain
#

Issue or not, you should at least be prepared to explain what the issue is if you want it fixed. Otherwise it's just a waste of time for both of us.

sonic atlas
#

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

languid oyster
#

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

median rain
#

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.

languid oyster
#

I never had issues with it until this last update personally.

sonic atlas
median rain
#

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.

pallid nest
#

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

median rain
#

Thanks for the report. I was actually just looking into that myself, but haven't found the source.

pallid nest
#

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

shadow fossil
#

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

stone orchid
pallid nest
stone orchid
stone orchid
sonic atlas
#

Which makes the whole thing funny

median rain
#

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.

sonic atlas
#

I guess you could probably check if the new LOD stuff could be implemented without it breaking compat with V50

sonic atlas
#

@median rain V56 hit the Main branch today

#

If you wanna work on pushing that update for MRAPI live

#

c;

stone orchid
#

i think they'll start working on the update after the game comes out of the beta

modest wadi
#

v56 isn't in beta anymore =/

sonic atlas
stone orchid
#

OOPS DIDN'T KNOW THAT SORRY

stone orchid
median rain
sonic atlas
long hinge
#

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.

median rain
#

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.

long hinge
#

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.

median rain
#

<@&1191929644916670575> Would you be so kind as to give me another pin?

#

This video, please.

elder hill
#

Ya silly goof

#

Do /jeb pin #1187188516644474911 message

#

Wait

#

Is jeb not online rn?

#

Okay okay, jeb is online

grim scarab
#

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

sleek smelt
sleek smelt
sterile kettle
#

Model Replacement API

median rain
#

Why?

sonic atlas
#

Robyn goes around from time to time and renames threads just so it's easier lol

sleek smelt
#

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

median rain
#

I don't really think that's an issue, but you forgot the second half

#

Model Replacement API & SDK

spiral ether
#

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

sonic atlas
# median rain Why?

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

median rain
#

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.

pine lantern
#

Hey have we determined if the popping in with the trees has been resolved? They still seem to act weird

elder hill
#

dunno but i heard someone mentioning that its happening with another mod too, dunno which one tho

pine lantern
#

Aw shit

median rain
#

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.

grim scarab
#

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)

sleek smelt
prime galleon
# sleek smelt 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

sleek smelt
prime galleon
prime galleon
#

I'm surprised they have the geometry to do this in the first place

grim scarab
prime galleon
#

or maybe a specific cosmetics mod

grim scarab
#

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

proper fog
#

would there be a way to have your model's firstperson/view heights scale depending on your model replacement?

median rain
#

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.

median rain
median rain
# sleek smelt still hoping for a fix for this 🙏

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.

median rain
grim scarab
median rain
#

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.

grim scarab
prime galleon
prime galleon
grim scarab
prime galleon
#

if they were related to back cosmetics, I could see it too, since that model's spine runs horizontally

grim scarab
#

like no movement problems

prime galleon
grim scarab
#

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)

prime galleon
#

I wanted to see how far I could stretch it, and stretch it I did

grim scarab
#

wait are you the one that made those models

prime galleon
#

yeah

grim scarab
#

o shit

#

i dont know how the fuck you pulled it off on those two but good stuff

prime galleon
#

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

grim scarab
#

i'm glad you made them

#

do you have plans for any of the other eevee's?

prime galleon
#

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

grim scarab
#

damn that sucks

#

and is there no way to recover your old gmail

prime galleon
#

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

grim scarab
#

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

prime galleon
#

*wouldn't

#

there is no way to get around that

grim scarab
#

yeah

#

i guess a safer bet is to do the arms like the other two, and assign the ribbons as jiggle bones

prime galleon
#

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

grim scarab
#

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

prime galleon
#

just made a new account. Look for leafeon next, still deciding if I'll finish it, but if I do, it'll be next

grim scarab
#

cool, don't forget your password this time

prime galleon
#

I mean, you can also just change the config but... yaknow

prime galleon
#

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

median rain
#

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.

prime galleon
#

renaming it worked... have no idea why, but I'm not complaining

median rain
#

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.

lunar sedge
#

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.

median rain
#

Or is there anything else you need?

lunar sedge
radiant agate
#

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.

median rain
#

I use lilToon, personally.

west harness
#

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

delicate glade
#

should i be messing with the character collider for smaller models at all or is that meant to be left alone?

west harness
#

is there a way to copy the shader that lethal uses or alteast use a similar one for a playermodel?

elder hill
#

for hdrp

west harness
#

could you direct me tword that

elder hill
west harness
#

thank youu

proper fog
median rain
#

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.

elder hill
#

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

elder hill
#

figured it out

#

i have to untick and retick this for the asset prefabs to generate properly

short violet
#

I've heard there's been some updates to the API

median rain
#

You have heard wrong in that case.

#

I am strictly maintaining a no update mod here.

obsidian token
#

Does this mod mess with the physics of dead bodies? if so, it might be messing up the company cruiser

grim scarab
obsidian token
#

In our lobby putting a body in the cruiser results in some seriously bad source engine physics occuring

grim scarab
#

do you have video or log when it does that

obsidian token
median rain
#

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.

wispy dagger
#

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

prime galleon
wispy dagger
#

new profile didn't seem to net results, and I mean all of them don't work, maybe my r2modman is broken idk

prime galleon
#

can you send the profile code?

#

it could be some conflict or something as well. I bet I can find

wispy dagger
#

i would use the hatsune miku bunya example mod

#

and with the emotes

#

if it works for you theres something wrong with my r2modman

prime galleon
#

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

prime galleon
#

@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

mental oar
#

Can someone make a Forest Keeper suit using the forest keeper model i've been thinking about that for a while

wispy dagger
dark dock
#

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?

hollow moon
#

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.

elder hill
#

does it show anything on the logs?

hollow moon
#

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 🙂

mental oar
pine lantern
#

Could this mod possibly effect interacting with the terminal/entrance doors or not being able to pick up or drop items?

median rain
#

But it's always possible for someone using the API to make a mod that affects those things.

sonic atlas
#

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

west harness
#

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)

lunar sedge
#

Whoa, compat

sonic atlas
median rain
lunar sedge
median rain
#

Oh those are dead bodies.

#

Got it, nice to see it working.

dark dock
#

is mod working for v60?

limpid pebble
#

my friends used it earlier today and it seemed to work the same as before, as far as I could tell

grim scarab
#

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

dark dock
#

okay thank you

#

(still crossing my fingers for a potential fix for visor and viewmodels)

sonic atlas
#

I'm just wanting a fix for it making the visor and half the post processing effects disappear

limpid pebble
#

ah, so that's what was causing that to happen lol

sonic atlas
#

TestAccount tried forking and fixing it but couldn't figure it out

limpid pebble
#

I was wondering why I could see so much on Dine

#

it's that pesky plane again

sonic atlas
limpid pebble
#

perhaps

#

it's extremely screwy

sonic atlas
#

I know Bunya isn't active atm with modding

sonic atlas
limpid pebble
#

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

sonic atlas
limpid pebble
#

oh hm

#

the issue I was thinking of also affected the host, but it didn't hide the visor

#

ModelReplacementAPI is doing a funny theinking @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

median rain
#

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.

limpid pebble
#

do you mean you had to shift things around to make room for an extra layer?

median rain
#

Somewhat.

limpid pebble
#

scary

median rain
#

The lack of complaints on that matter tells me that my layer schema is currently without issue.

limpid pebble
#

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

median rain
#

I believe the BodyReplacementBase.replacementViewModel parameter is set to null when there is no viewmodel.

limpid pebble
#

anyway, just wanted to confirm that

#

yeah

median rain
#

This should be true regardless of whether a mod maker adds their own viewmodel, or if it is automatically generated.

limpid pebble
#

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

median rain
#

Yep, had to go run through the code for a moment.

sonic atlas
sonic atlas
#

@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

grim scarab
#

what got changed in 2.4.8? i didn't see a changelog update in the thunderstore page

median rain
#

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.

sonic atlas
sonic atlas
#

So if it's fixed in lan for you it should theoretically be fixed in Multiplayer hopefully 🤞

dark dock
#

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

median rain
#

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.

median rain
#

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

onyx mulch
#

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?

dark dock
#

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 🫠

median rain
#

It's related to disabling the visor hud, at Systems/Rendering/PlayerHUDHelmetModel in the scene assets.

median rain
dark dock
#

Aww okay T.T thank you for the heads up

onyx mulch
#

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

elder hill
#

Nuuu

median rain
#

Incidentally, how did you turn off the renderer?

#

I'll go with whatever works and put out an update.

onyx mulch
median rain
#

Oh that's really simple.

#

Thanks

obsidian token
#

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

grim scarab
#

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

obsidian token
#

Heres the thing, we had no model replacement mods installed

#

Only the api itself

grim scarab
#

that's weird

#

do you have any morecompany cosmetics

obsidian token
#

Nothing else installed

#

Just model api

grim scarab
#

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

prime galleon
#

could be a vanilla bug, sometimes there is desync in vanilla

obsidian token
lyric marsh
#

Is there a way so I can set the masked with custom models not have morecompany cosmetics?

prime galleon
#

do you know how to resolve this error when loading?

#

idk

median rain
median rain
stone orchid
#

@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

median rain
#

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.

gilded orchid
#

the console spammed me this when i used a custom model
@median rain @sterile kettle yoiled
[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 ---

sonic atlas
#

I saw MRAPI spam NRE's when paired with it before

#

Unfortunately Bunya isn't super active and the mod has some known bugs

#

😦

gilded orchid
prime galleon
gilded orchid
#

oh rly, sweet alright

prime galleon
#

I've been running both without any problem

prime galleon
median rain
gilded orchid
#

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

limpid pebble
#

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

sterile kettle
#

UDA is functionally a first chance handler, yes

#

It only shows frames that occur in the game or plugin code for brevity

limpid pebble
#

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

elder hill
#

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

sterile kettle
#

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

limpid pebble
#

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

sterile kettle
#

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

median rain
gilded orchid
#

so this one is good to ignore yes ? normalcat

median rain
#

Maybe something MoreCompany cosmetic related. That always throws errors into a try catch

sonic atlas
#

As it does cause Dead Bodies to break the cruiser

#

lol

west harness
#

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

median rain
#

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.

elder hill
#

Physics.ignoreCollision(collider1, collider2, false) maybe?

lyric fjord
#

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.

sonic atlas
#

You really need to fix ModelReplacementAPI it's throwing NRE's every frame

elder hill
#

Send whole log

#

These alone don't help

sonic atlas
#

It's huge just a fair warning

#

It is uploading soooo slow

#

I hate Discord lol

sonic atlas
elder hill
#

I'm not gonna look through it lol

#

I'm just a lil skeptical whether UDA is catching NRE's it shouldn't be

lyric fjord
sonic atlas
#

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

elder hill
#

If its safely catching them, then no

elder hill
#

He might know @long hinge if he's still around

lyric fjord
#

Yes

prime galleon
lyric fjord
sonic atlas
sterile kettle
#

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

sonic atlas
#

LOL

sterile kettle
#

you should be able to add ModelReplacementAPI to your blacklist to stop the hitching since its a known issue

#

exceptionblacklist

sonic atlas
#

But I did add SolidLib to it cus I know that throws exceptions quite a bit in UDA

long hinge
lyric fjord
prime galleon
#

should probably ask gooberator

lyric fjord
long hinge
#

They're the one who made the original code

#

I just asked for permission to share it with others for the tutorial

lyric fjord
long hinge
#

Their @ is realcanad1an

#

As for emissions, never experimented with it, so I'm not sure.

lyric fjord
# long hinge 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

GitHub

I'm fairly new to unity and all this, I can't figure out how to get a glow texture or map textures on my models. I tried emission for the glow which didn't work, using a normal map for ...

lyric fjord
# long hinge As for emissions, never experimented with it, so I'm not sure.

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

long hinge
#

interesting

#

I added a recommendation to use your line if a problem like it arises in my github example mod

prime galleon
#

at least yours actually loads, I still don't know why mine won't load with the added code

median rain
#

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.

lyric fjord
median rain
#

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.

ember quartz
#

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

ember quartz
#

sooo

#

how do i update suits

median rain
#

How so?

#

Like the actual suit texture?

ember quartz
#

no

#

just the suit in general

#

to make like

#

actual changes

#

like resizing for example

long hinge
ember quartz
#

what do you mean?
just make an entirely new assetbundle with the same coding?

#

but yes, i'm using the old project folder

long hinge
#

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

ember quartz
#

ohh
so i just go through the publishing process again

ember quartz
#

ok

#

good to know

ember quartz
#

so uh

#

the build tab isn't popping up on my screen

#

this is naqibams tab

#

this is my tab

#

better comparison

ember quartz
#

nevermind

#

i feel stupid

#

:(

ember quartz
#

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

ember quartz
#

last issue

#

when i try wearing the suit, it uses the suits texture instead of the model

prime galleon
#

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

ember quartz
#

can't they just change the suit back?

ember quartz
#

what the log says when i try equipping it

prime galleon
#

you have messed up your model import from unit somehow

ember quartz
#

does that mean i have to redo the coding configuring process?

prime galleon
#

that means you need to reexport the unity project cause you broke something there

#

there is nothing wrong on the code or game end

ember quartz
#

gotcha

meager bane
prime galleon
ember quartz
#

i think so

hollow oracle
median rain
hollow oracle
#

😂

median rain
#

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.

hollow oracle
#

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

hollow oracle
#

since from a quick look it doesn't seem like you account for that

ember quartz
prime galleon
#

looks good to me

ember quartz
#

gotcha, another question (doubting it's the last)
do i generate an entirely new project?

prime galleon
#

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

ember quartz
#

alright

#

i'm just gonna work on my other suit

#

don't wanna get burnt out from working on this one

ember quartz
#

wait a minute

#

idea

ember quartz
#

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)

ember quartz
#

nevermind, i'm just jumping to conclusions :(

prime galleon
#

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

delicate glade
#

^^

#

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

prime galleon
#

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

delicate glade
#

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

prime galleon
#

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

long briar
#

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

sonic atlas
#

Bunya is unfortunately experiencing burn out so

#

I wouldn't expect an update anytime soon

long briar
#

there is a way to add custom models without this api right?

sonic atlas
#

Don't think so

#

But maybe

#

I just prefer using custom suits now, MRAPI is nice but just way too buggy in my experience

elder hill
#

"Model ReplacementAPI has been a bit broken for a bit now" what? not true?

sonic atlas
#

Bodies having weird physics that break the cruiser, the log spam we got last time I used it

elder hill
#

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

sonic atlas
#

No the log spam was MRAPI as Robyn pointed out

#

UDA added on after

elder hill
#

the weird physics is a very small bug that is not game breaking

sonic atlas
#

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

delicate glade
#

ive never had an issue with it since installing it

#

and ive made like 8 suits and have 250 hours of playtime with it

elder hill
#

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

sonic atlas
#

What is even the point of UDA?

long briar
#

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

sonic atlas
#

I added it cus I was told it was useful but it feels like it's not really benefitted anyone yet

elder hill
sonic atlas
#

I remember DiFFoZ reported it a while ago

sonic atlas
#

Yeah ModelReplacementAPI throws NRE's ever frame

delicate glade
#

never seen one before 😭

sonic atlas
#

It's just not logged in the normal logs usually

delicate glade
#

oh fr?

sonic atlas
#

Which prevents it from logging

delicate glade
#

oh damn

sonic atlas
#

DiFFoZ found it when profiling my pack lol

#

Debug tools find that stuff

sonic atlas
lyric marsh
#

The only thing that bugs me out is the corpses having a collider, And the masked only spawning with the cosmetics

long briar
#

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

sonic atlas
elder hill
#

scrolled 3 to 4 months and i cant find a message by diffoz

sonic atlas
#

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

elder hill
#

UDA isn't SUPPOSED to be catching those, that is your problem

elder hill
sonic atlas
#

UDA right now as Matty put it

long briar
sonic atlas
#

Isn't really useful at all and just makes things more confusing

elder hill
sonic atlas
sonic atlas
elder hill
elder hill
#

i tried the miku model, ill try others

#

which one did u try

sonic atlas
#

lol

elder hill
#

if i can even find it in my files lol

elder hill
#

ill try both

long briar
#

i just played with this one last sunday

#

so i know it worked

elder hill
#

bet

sonic atlas
#

Could be one of them is adding weird physics

long briar
#

i have been installing and uninstalling alot since then just to test some

elder hill
#

kanami works fine

long briar
#

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

sonic atlas
#

It's probably one of the recent additions

delicate glade
#

so its only certain models that are broken?

#

mine are pretty default so maybe thats why theyve always been fine

elder hill
#

i tried miku and kanami and they both worked fine in my dev profile

long briar
#

i feel like some other mod might cause issues with it at this point

#

since they work for xiao

sonic atlas
delicate glade
#

yea

sonic atlas
#

So they likely added one of those

long briar
#

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

long briar
#

its just spamming this

#

but insanely fast

#

so yea disabling this fixed the models

elder hill
#

whats that even for?

#

i was able to add jiggle physics to my models without that mod

long briar
#

idk, MoreHead was using this

elder hill
#

maybe its more of a morecompany thing

#

im not sure

long briar
#

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 agony

elder hill
#

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

long briar
#

player blood not showing? do you mean the blood splatters on the ground when being critical?

elder hill
#

oh wait i might be thinking of the wrong thing

elder hill
#

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

long briar
#

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

elder hill
#

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

long briar
elder hill
#

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

long briar
median rain
#

Decal layers, too. I have been wondering since the start why I couldn't get the decals to function.

elder hill
median rain
#

I should be able to throw out an update soon.

elder hill
#

Yeah you just need the right rendering layer for decals and the right gameobject layer for cruiser to not freak out

#

Sick

sonic atlas
cinder oriole
#

good to see ya talkin again

wicked pivot
#

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.

prime galleon
#

I haven't noticed this issue, but then I've been hosting. It might be a client issue

wicked pivot
#

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).

delicate glade
#

Oh yeah I noticed that, I can see other players' cosmetics but not mine on myself

prime galleon
#

never used cosmetics so didn't notice

grim scarab
meager bane
#

@median rain there are errors spammed with every model replacement mod that needs this api

#

it works but its spamming errors

median rain
median rain
meager bane
#

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

median rain
#

That's not much to go off of, if you're trying to report a bug.

meager bane
#

it gets spammed every second

#

and lags the game

elder hill
#

Send logs lol

limpid pebble
#

the mod is on GitHub as well, I'm sure PRs are welcome

median rain
#

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.

median rain
# onyx mulch

I've also implemented this. Thanks again. The weather effects should work in third person now.

long briar
#

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

long briar
#

i think i found a new issue

#

with your api i can just walk through rocks and generally just fall through some other things

median rain
#

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

fading patio
#

(take ur time on the fix legally)

meager bane
#

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

sonic atlas
limber oxide
#

I just noticed this happening now and I'm glad that it's known haha

limber oxide
#

yesss I just saw :D

lyric marsh
lyric marsh
#

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

long briar
#

they should be hidden i think tho, but they tend to become buggy sometimes especialy with mimics

grim scarab
pine lantern
#

hey can someone tell me what these errors mean? particularly with modelreplacementAPI?

#

I was hosting

elder hill
sonic atlas
#

Might be an issue for you to look into fixing if you want Xu

#

:3

elder hill
#

eh, the spam is through an external mod that doesnt currently work as intended

sonic atlas
sonic atlas
elder hill
#

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

meager bane
elder hill
meager bane
#

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

median rain
#

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.

pine lantern
grim scarab
#

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)

sonic atlas
#

I seriously think you need to share your mod pack so someone like @elder hill can help you isolate the culprit

grim scarab
#

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

sonic atlas
#

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?

grim scarab
#

it's def something in starvexia's cosmeticmegapack

#

ik there was a tail cosmetic that had physics

#

i can try it again without that

sonic atlas
#

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

grim scarab
#

i figure there is a conflict with colliders between MC cosmetics and modelswaps

#

i'm just confused cus it wasn't always that way

sonic atlas
#

cosmetics shouldn't have colliders

#

If they do the cosmetic mod isn't setup properly

grim scarab
#

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

sonic atlas
#

Probably whenever cosmetic support broke

grim scarab
#

cus in some much older versions of the api u could have both cosmetics and modelswaps working at the same time

#

def that

delicate glade
#

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

median rain
#

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.

delicate glade
#

understandable

elder hill
delicate glade
#

👀

wanton snow
#

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?

delicate glade
#

theres a vector3 representing the transform but currently it doesnt work

elder hill
#

huh, i assumed you'd just need to move the transform that the item gets moved to to that vector3

median rain
wide glade
#

Hello there, i was wondering if anyone else ran into this issue. Where the mask would appear on other players for some reason.

median rain
long briar
#

is that even a custom model

#

i cant make out anything on this image

wide glade
#

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.

wide glade
long briar
#

do you have any mods that add additional more company cosmetics? there is a mod that adds a mimic mask as cosmetic

wide glade
#

no just base morecompany

shadow path
#

Hello hello! How do I get my model to be a seperate suit on the rack rather than the default?

long hinge
shadow path
shadow path
#

oooh

#

thank you so much!!!!

shadow path
#

(also sorry for pinging again, I am VERY new to all of this!)

shadow path
#

also cant seem to get jiggle physics to work at ALL despite following every step

long hinge
long hinge
shadow path
shadow path
long hinge
#

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

shadow path
#

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?

shadow path
#

Oh wait I can probably just make the damn moresuits folder and put it in the update

elder hill
#

But

#

Not a moresuits folder

#

You need a BepInEx folder

#

And inside that a plugins folder

#

And inside THAT is the moresuits folder

shadow path
elder hill
#

Sick

shadow path
elder hill
#

You're missing a .txt

#

lesssuits.txt next to the png of the suit

#

I think that's what it scalled

shadow path
#

WEEPING

elder hill
#

Other mods would have em

shadow path
#

they dont seem to

#

GONNA DO IT ANYWAY

long hinge
#

just paste it into your moresuits folder

#

(the contents don't matter only the name)

prime galleon
#

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

shadow path
#

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 ;

shadow path
#

now I just have to figure out why my models feet keep going through the ground and why jiggle physics arent applying

median rain
#

If your feet are going through the ground, you need to configure your model's offset in unity to account for that.

shadow path
median rain
#

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.

shadow path
median rain
#

It's possible. You'll have to find out.

shadow path
#

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

shadow path
#

okay nvm the suit only looks like the png

#

uuuuhghhhh

long hinge
#

??

#

What does your code look like currently

shadow path
#

sec

#

gonna try to reimport

shadow path
long hinge
shadow path
#

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

long hinge
#

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

shadow path
#

I can hop into a stream or something if it helps

#

im not sure what I did wrong? It's just saving wrong suddenly

long hinge
#

Weird. Is Unity even creating the asset bundle?

shadow path
#

I dont think it is for some reason

#

here is presave

long hinge
#

Uhh turn off the checkmark since you've already created the project folder

#

Then rebuid

shadow path
#

still the same v_v

long hinge
#

hmm

#

What if you restart Unity

shadow path
#

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.

#

😭

shadow path
#

thank you guys again for helping my inept ass ; ;

prime galleon
#

did you figure it out @shadow path

shadow path
#

I...dont really know

#

I tried to update it, and now this is happening

prime galleon
#

I'm assuming you were missing something in your build folder

shadow path
prime galleon
# shadow path

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

prime galleon
shadow path
#

But now the package is being rejected in thunderstore so i have to figure that out

#

I just want it to work ; ;

prime galleon
#

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

prime galleon
# shadow path I just want it to work ; ;

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

shadow path
prime galleon
#

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

prime galleon
#

lol

prime galleon
#

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

shadow path
#

Ah! So if you put something in there named the same as the mod

#

it will always register?

prime galleon
#

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

shadow path
#

You made the decidueye? That's my friends fav pokemon he SHOUTED when he saw it

#

thank you for that

prime galleon
#

lol np

shadow path
#

I should try that out to learn rigs better

prime galleon
#

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"

shadow path
#

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

prime galleon
#

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

shadow path
#

HISUAN IS MY FAVCORITE

#

sorry caps

#

lol

#

But yeah the bit thats scaring me away from it is the hair physics

prime galleon
#

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

shadow path
#

oh I know how! It's just...setting it up

prime galleon
#

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

prime galleon
#

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

shadow path
#

it sounds...complicated. But then again, I thought suit stuff sounded complicated and i did it.

prime galleon
#

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

little sandal
#

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

elder hill
#

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

little sandal
#

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

shadow path
#

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

median rain
little sandal
#

ah i see

median rain
#

If you're down then I'll go and remind myself of it.

little sandal
#

ill let you know if i think its needed, at this point i think i have a workflow for the generated one

little sandal
#

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

median rain
#

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.

little sandal
#

ahh,,,

median rain
#

Bones that aren't children of the shoulders won't move with the shoulders, so neither will their vertices

little sandal
#

so the other meshes having different vertex data does that?

median rain
#

Yep.

little sandal
#

crap

#

is there any way to fix this?

median rain
#

First you might want to tell what you're trying to achieve here.

little sandal
#

uhm wdym

#

swap out the mesh on the viewmodel same as the mod dose for the main suit

median rain
#

I don't know what you want to fix. Presumably if you plan on adding your own viewmodel, it will be weightpainted correctly, right?

little sandal
#

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.

median rain
#

If you're trying to add your own custom viewmodel, rather than using a generated one, this isn't the way to achieve that.

little sandal
#

the way our mod works is by swaping out the SharedMesh of the respective body regions SMR

little sandal
#

i told you that before

little sandal
#

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

median rain
#

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.

little sandal
#

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

median rain
#

How does the customization work, do you just modify the gameobject, or do you replace your model with an entirely new gameobject?

little sandal
#

no the mesh gets swapped out

#

SharedMesh

median rain
#

Ah, right

little sandal
#

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

median rain
#

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.

little sandal
#

lemmy give it a shot

median rain
#

If it doesn't, you may need to dissect that function and see if you can't modify it for your purposes.

little sandal
#

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

median rain
#

Yeah, add a replacementViewModel = ModelReplacement.Scripts.MeshHelper.ConvertModelToViewModel(replacementViewModel); to that second one and see how it goes.

little sandal
#

hmm, that works fine visually but gives a phatt error

#

this ring any bells?

median rain
#

Wait this works visually?

little sandal
#

yea

median rain
#

That's hilarious.

#

I don't even know what this error is, how is it working?

little sandal
#

i have no clue XD

median rain
#

Is it a one time thing?

little sandal
#

nah errors every time i apply settings (thats when ApplyLocalViewmodel gets called)

#

hold on, lemmy video

elder hill
#

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

median rain
#

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.

little sandal
#

yea i would not get far

#

oh, nah its breaking everything lol

median rain
#

Ah that's unfortunate

elder hill
#

bleh, IL code is not telling me much

little sandal
#

the blendshape and color changes are not applying

elder hill
#

do you know what format your mesh is in?

little sandal
#

its FBX

elder hill
#

i mean uhhh the index format

#

of the mesh

#

something like 16 bit, 32 bit

#

etc

little sandal
#

oh

#

uhm, nah not a clue