#DawnLib [V80]
1 messages ยท Page 10 of 1
But how do I get the keyword that points to said node?
I'll check what's going on
is that not next to the RequestNode?
There's no field that DawnLib makes for it
The only keyword DawnLib records is the bestiary
And it's not inside the RequestNode no
You'll have to wait for me to get on my pc to double check
But it'll be a one liner that's fairly simple
@oak linden, say i got into programming, made custom scripts, and want them to be used in a mod i'm registering on Dawnlib, how would i go about it? Do i need to ship the mod with the scripts in specific way or will they just be referenced as just any other mod does (i believe)?
also how should i go about using TryCompleteAchievement in a method
doesnt matter where they are, but they gotta be loaded before the bundle is loaded i believe, so your scripts would all be within your baseunityplugin dll
also this would just be TryCompleteAchievement();
yeah just figured that out, but how do i make it able to complete any said achievement
because i added a private DuskAchievementsDefinition but it won't lemme use it with dat
well if you're triggering it with code, you don't need the AchievementTriggers
ill check rq what the code would be
so it'll be DuskModContent.Achievements.TryTriggerAchievement(AchievementDefinition.TypedKey)
Hmm so if i have that, this means i'll the Achievement Definition referenced in the script right? (As in public AchievementDefinition)
Took time to respond cuz my router just decided to not work at all rn, so i'm on phone
ye, but you can just do something like:
DuskModContent.Achievements.TryTriggerAchievement(NamespacedKey); if you have the NamespacedKey
the NamespacedKey is the thing like lethal_company:experimentation
Like this @oak linden ?
after compiling the script it started loading for 5 whole minutes, and i got this to happened
i'm gonna be honest here, i have no idea how an item script can screw my entire project up
update : i removed the script and restarted the editor and now it's fine, just wondering where exactly should i put the scripts i make
you need to put them into a dll and import that dll into unity
i cant really help with that rn im heading to bed soon
but u could try asking in #dev-general
aight
@oak linden i wanna use dawnlib and getttit from nuget, which one should i use?
or like, which are used for what
<PackageReference Include="TeamXiaolan.DawnLib" Version="0.5.12" Publicize="true" />
<PackageReference Include="TeamXiaolan.DawnLib.DuskMod" Version="0.5.12" Publicize="true" />
<PackageReference Include="TeamXiaolan.DawnLib.SourceGen" Version="0.2.2" PrivateAssets="all" />
just adding these would be fine, second one has editor stuff, first one is the core of the mod, the third one is incase you use the sourcegen
how would one take advantage of the extra config slots you can make using the serialized array on item or any registry scripts from dawnlib?
as in, actually use them, e.g. tie it to volume of a gameobject. I can do this through code, but if i can do it through dawnlib, thatd be neater
or learn how*
you can access em via code if you're using the content handlers to register
i'd like to make a monobehaviour script that allows you to access those configs but i havent done that (unsure how i wanna do it honestly)
oh yeah i see you mentioned that on the wiki. contenthandlers arent contentcontainers right? if not, i guess i havent set them up? but ill check it out when i get up, ive gotten this far so i think id be comfortable working it out
yeah, i believe the readme talks about them more, and the template directly uses them, you can also see em in coderebirth itself
Yeah i was thinking of just looking at coderebirth since you got some in there, that was my first thought before i came to ask lol ๐ฅ alright thank youu
do you think this would work@oak linden?
the idea is just the have an item script that's able to trigger achievements
no that wouldn't work, those are scriptableobjects not components, you cant getcomponent them
yeah, just reference em in editor
this fine?
or is there specific line i should write to reference them
them being public means you can reference them in editor
so yeah it must be fine like that
Wow, I can't believe it, item positions can actually be saved on custom furniture
i was told this routing screen is from dawnlib, for some reason the moon icon seems to be in the incorrect position, is this a known issue?
its going to orbit the moon, not landing :|
i didnt really think about it that way lol, nevermind then
Hi xu
Oh I never thought about having the moon at the end, it's just nice to look at lol
Good bar game
Also I can't do front on my laptop please take front
Parameter name: key
Stack trace:
LethalPerformance.Patcher.Patches.Patch_ConfigDefinition.CheckInvalidConfigCharsOptimized (System.String value, System.String name) (at /_/Patches/Patch_ConfigDefinition.cs:47)
(wrapper dynamic-method) BepInEx.Configuration.ConfigDefinition.DMD<BepInEx.Configuration.ConfigDefinition::CheckInvalidConfigChars>(string,string)
BepInEx.Configuration.ConfigDefinition..ctor (System.String section, System.String key) (at <cebe69d7792f4abca78b685257766c60>:IL_0011)
BepInEx.Configuration.ConfigFile.Bind[T] (System.String section, System.String key, T defaultValue, System.String description) (at <cebe69d7792f4abca78b685257766c60>:IL_0000)
HQRebalance.HQRConfig.AddAllEnemiesToConfig (BepInEx.Configuration.ConfigFile cfg, EnemyType[] allEnemies) (at ./HQRConfig.cs:381)
HQRebalance.Patches.GameNetworkManagerPatches.PostStart (GameNetworkManager __instance) (at ./Patches/GameNetworkManagerPatches.cs:17)
(wrapper dynamic-method) GameNetworkManager.DMD<GameNetworkManager::Start>(GameNetworkManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<GameNetworkManager::Start>?255700170(GameNetworkManager)
LethalLib.Modules.NetworkPrefabs.GameNetworkManager_Start (On.GameNetworkManager+orig_Start orig, GameNetworkManager self) (at ./Modules/NetworkPrefabs.cs:72)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<GameNetworkManager::Start>?-1684915176(GameNetworkManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<GameNetworkManager::Start>?849375456(GameNetworkManager)
Dawn.Internal.MiscFixesPatch.AddNetworkPrefabToNetworkConfig (On.GameNetworkManager+orig_Start orig, GameNetworkManager self) (at ./src/Internal/Patches/MiscFixesPatch.cs:225)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<GameNetworkManager::Start>?2120921244(GameNetworkManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<GameNetworkManager::Start>?889559756(GameNetworkManager)
Dawn.StoryLogRegistrationHandler.CollectAllStoryLogs (On.GameNetworkManager+orig_Start orig, GameNetworkManager self) (at ./src/API/StoryLogs/.StoryLogRegistrationHandler.cs:92)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<GameNetworkManager::Start>?-87792124(GameNetworkManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<GameNetworkManager::Start>?1316059298(GameNetworkManager)
Dawn.EnemyRegistrationHandler.CollectAllEnemyTypes (On.GameNetworkManager+orig_Start orig, GameNetworkManager self) (at ./src/API/Enemies/.EnemyRegistrationHandler.cs:44)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<GameNetworkManager::Start>?-165501816(GameNetworkManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<GameNetworkManager::Start>?-100411638(GameNetworkManager)
[email protected] (On.GameNetworkManager+orig_Start orig, GameNetworkManager self) (at ./Mirage/Hook/MaskedPlayerEnemy.fs:60)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<GameNetworkManager::Start>?-676703056(GameNetworkManager)``` For some reason if I turn off CabIn interior this error doesn't happen.
LunarConfig about enemies doesn't show in the modmanager if I keep Cabin
It's HQR but I prefer hq so its fine
Sounds like u gotta report this to HQR mod
Agreed with Xu, report the bug in the HQR thread
Agreed with Lunxara, report the bug in the HQR thread
Agreed with Sniper, report the bug in the HQR thread
A
with ๐ง, report the bug in the HQR thread
Agreed with new pc (ignore paco), report the bug in the HQR thread
๐ซก
v0.5.14
- Adjusted a rare scenario where a 0 weight enemy would spawn due to vanilla game infestations.
- Fixed UnlockProgressiveObject breaking for some odd reason, not sure why.
- Fixed an issue with not grabbing the correct rotation offset and settings of vanilla outside objects.
v0.5.13
- Backported a fix for ClientNetworkTransform's that used to work but didn't after the
Netcode for GameObjectsupdate. - Added the
WeightedOutcomeScript, which allows you to roll a select/random amounts of weighted events.
@white finch not sure if you have ClientNetworkTransform in itolib but if you do you can just do what i did in dawnlib
almost had to ask zeekerss to update again
๐
might be worth though lemme actually look at the changelog ๐
do you think this relates to the apparatus issue people have had?
Proooobably actually
ah ic
At least I think that's what the NetworkObject fix thing did
this might be why my gals dont spawn correctly sometimes lol
i think so too
I'm wonderin if the Driftwood Giant not being able to pick up clients issue is also a Netcode thing lol
Yeah
Oh also @white finch idk if you have something like it, you probably do, but the WeightedOutcomeScript is pretty cool
Do you know if JLL supports dawn tags?
If it hasn't updated recently then no
I asked Jacob and he said he'll do it later, I'm expecting probably a couple months but honestly no clue
lol fairs
Finally going to fix this hopefully, I'd like to create constant predicates for combinations of moons being locked or invisible. So far I know that this:
ITerminalPurchasePredicate predicate = ITerminalPurchasePredicate.AlwaysSuccess();
Can be used for a moon that's always visible and always buyable... that's as far as I've gotten. How can I make a predicate for a moons that are:
- Always buyable, but hidden
- Never buyable, but visible (idk it's a weird combination that I'd like to account for)
- Never buyable, and hidden
I know this can make something unbuyable but idk how to make it hidden/visible too:
TerminalNode _node = ScriptableObject.CreateInstance<TerminalNode>();
_node.displayText = "Route Locked!";
predicate = ITerminalPurchasePredicate.AlwaysFail(_node);
i sent this to mrov yesterday when i was explaining how dawnlib does it:
TerminalPurchaseResult result = SelectableLevel.GetDawnInfo().DawnPurchaseInfo.PurchasePredicate.CanPurchase();
if (result is TerminalPurchaseResult.HiddenPurchaseResult hiddenResult)
{
if (hiddenResult.IsFailure)
{
// hidden AND locked
}
else
{
// ONLY hidden
}
}
else if (result is TerminalPurchaseResult.FailedPurchaseResult)
{
// ONLY locked
}
else if (result is TerminalPurchaseResult.SuccessPurchaseResult)
{
// NOT hidden and NOT locked
}
I just don't understand how I would change whether result is a HiddenPurchaseResult or not
My issue is, I just can't seem to do anything with an ITerminalPurchasePredicate or edit any properties if it even has any, I can only really use the basic 3 it gives me access to from the class with AlwaysHide, Success, Fail
you can do stuff like this
there's obviously the base alwayshide success and fail, which in of themselves, create the constant terminal predicates
see?
you can also create your own ITerminalPurchasePredicates and make them do whatever
Is there a quick way to find namespace keys for non-vanilla moons/interiors/weathers? I wish to add every mineshaft interior ever to a config
when you load into a lobby and have debug logs turned on in bepinex's config, and just search up registry in your logs, it'll print out all the registered registries
ah neato
So like dis
?
if (isHidden)
{
if (isLocked)
{
predicate = new ConstantTerminalPredicate(new TerminalPurchaseResult.HiddenPurchaseResult().SetFailure(true).SetFailNode(failNode));
}
else
{
predicate = new ConstantTerminalPredicate(new TerminalPurchaseResult.HiddenPurchaseResult().SetFailure(false));
}
}
else
{
if (isLocked)
{
predicate = new ConstantTerminalPredicate(new TerminalPurchaseResult.FailedPurchaseResult(failNode));
}
}
The default for predicate is just to always succeed
yeah that looks right
you could make it easier for modders if you were to create a "PredicateBuilder" accessible with a static method eg on ConstantTerminalPredicate
ConstantTerminalPredicate.Hidden().Failed([Nullable] failNode).Create()
hmm yeah that wouldn't be a bad idea, usually bongo's the one who made the builders but I could give it a try
or actually looking at the context probalby the builder should be for the Result not the Predicate
or one for each if you feel fancy
You know a config is good when it stretches over both of my monitors
Wish the Thunderstore app had wraparound. Alternatively I wish for the power to break into people's homes and force them to use content tags.
gale shows them vertically if it recognises them as lists/ if the mod author ends the description with a specific marker
Oh that's pretty peak
Does BestiaryNode and Keyword in EnemyInfo only populate for vanilla and Dawn enemies?
wdym?
i try to grab the bestiarynode and keyword for all enemies
if i didnt manage to grab anything, they likely didnt have a bestiary or its made really weirdly
Making interior based spawn weights for modded interiors is a bigger pain than I thought 
you doth gotta launch the game to see the names yeah
yee I've downloaded and categorised 54 interiors so far lol
I'm thinking this isn't worth the effort lol 
I know people who don't really mess with configs and probably wouldn't know to get namespaced keys for custom moons/interiors/weathers, so I was trying to do a config that's as "out of the box" as possible for a mod. Sorting through nearly a hundred interiors and managing a dozen or so config entries for each thing is really tedious though. Maybe I should put a threat tutorial on the config page forcing telling people how to use the content tagging stuff for dungeons and moons
i didnt realy read your message properly the first time, but keep in mind you can also use content tags for weights too
Yeah, that'd be ideal, just having canvern in the config field of mineshaft themed scrap instead of two dozen individual interior names
But then I'd have to trust people to add content tags to their stuff, lol (which I don't trust interiors to have especially because afaia, non-Dawn interiors don't have content tags?)
yea non-dawn interiors don't have tags i believe
idk if people can tag their interiors in LLL, can they? @white finch
If they want to yeah 
Now if the value is actually read is another matter lol
lol
"The github page for releases includes the mod's package zip and the Editor.dll, you simply need those two and PathfindingLib.dll to load the mod into the UnityEditor."
So I get those two things but... what do I do with them?
Three things ig
This is from the DawnLib wiki on thunderstore btw
you need to put em in a folder, just make a folder called Dependencies inside of your Assets/Lethal Company/Mods/plugins folder in unity, the path isn't exact since i dont got unity open but it'll be simialar
||You guessed it right! That is the exact path lol||
Well thanks!
So just plop the 2 dlls, the DawnLib zip, and the Monkey Injection zip straigt in the folder?
Don't unzip or anything?
unzip dawnlib into it, monkey injection, and pathfindinglib's dll
Just the dll for monkey?
yeah, that's all you're getting from the rest of them anyway, file structure isn't important, but it's hard to explain that you need like 3 dlls from dawnlib's zip
I just made a unity project, patched it, and added the 3 dlls and unzipped Dawn into it but I get a ton of errors
Unable to resolve reference 'MMHOOK_Unity.Netcode.Runtime'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'LethalQuantities'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'TerminalFormatter'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
too big, lul
Well those are a few, discord just decided to block the other one
spam filter goin crazy on u
Assembly 'Assets/LethalCompany/Mods/plugins/DawnLib/BepInEx/plugins/DawnLib/com.github.teamxiaolan.dawnlib.dll' will not be loaded due to errors:
Unable to resolve reference 'MMHOOK_Assembly-CSharp'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'LethalLevelLoader'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'MMHOOK_BepInEx'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'TestAccount666.GoodItemScan'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'LCBetterSaves'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'LethalConfig'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'LethalLib'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'WeatherRegistry'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'MrovLib'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'MMHOOK_Unity.TextMeshPro'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
There
Yeah this has happened before ;-;
click on a dll and screenshot the inspector for me
i forget what the option is calle
called*
Which one?
doesnt matter
That fixed most but there's still a couple
show a screenshot of the errors
delete the compatibility.dll, it's supposed to auto delete through the editor dll but if you import them at the same time ig it doesnt delete it
the last error is normal, i see it in all my projects anyway
Seems to have worked!
I see DawnLib in Create> menu
Where would you recommend I actually work and put the files I make and such?
you could do similar to how i made coderebirth
inside of mods/plugins
i made a folder with the modname
and in there i made an assetbundles folder where i build the assetbundles of the mod
there's also folders for Enemies, Items, etc
where inside of like, Enemies, there'd be RedwoodTitan, where inside of that there'd be Materials, Textures, Models, Audio, Registry etc
inside of Registry is where I put stuff like the DuskEnemyDefinition
and folders like the RedwoodTitan are what I assign as my assetbundles
As long as I am tolerated I'll continue to ask questions, how does one use this? https://github.com/XuuXiaolan/CR-AssetBundle-Builder
Do I just download the code and put it in Unity too?
it's a unity package
go to the package manager, do add by git url, and type this in https://github.com/XuuXiaolan/CR-AssetBundle-Builder.git
I see
[Package Manager Window] Error adding package: https://github.com/XuuXiaolan/CR-AssetBundle-Builder.
Unable to add package [https://github.com/XuuXiaolan/CR-AssetBundle-Builder]:
Package name 'https://github.com/XuuXiaolan/CR-AssetBundle-Builder' is invalid.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
:(
Hold on I might be stupid
you need the .git at the end
Just following your thing on the wiki, I imagine for these two it'd be far easier to just copy the ones from a vanilla moon and change them rather than make my own?
yeah tbh
Luckily several months of LunarConfig has prepared me for comprehending this
Following the code tutorial now
dotnet new dawnlibmod -M com.github.xuuxiaolan.coderebirth -MM "PATH\TO\MMHOOK\FOLDER" -B "PATH\TO\MODMANAGER\PLUGINS\FOLDER" --name CodeRebirth
Does anyone know where the MMHOOK folder might be?
Or what mmhook is... at all?
Is it like ...\BepInEx\core\Hamunii-AutoHookGenPatcher?
Ok I just assumed it was \plugins\MMHOOK
Yes that lol
@oak linden
I'm not sure if it's a bug, but it is something that's not quite working. I'm trying to set some Unlockable's .UnlockableItem.alreadyUnlocked, I tried it on the bunny suit and it worked, I tried it on the classic painting and it did not. Nothing errored, however, when I create a save, then quit out of it and go back in, the painting appears too. I don't really know if there's anything you can do about this but I ought to let you know.
yeah this is just vanilal lethal territory at that point, you'd need to look at something like furniture lock
though i would just let furniture lock do whatever its doing by itself
Alright :(
if your objective is to have items always unlocked
setting the field is not enough
that field only prevents the game from deleting them during the firing sequence
all things that have that field set are in-scene object in the original "SampleScene"
so you have to manually spawn the unlockable before setting the flag
and at that point it's easier tk just always spawn the unlockable and ignore the field
Why does Dawn replace numbers with the word versions?
Tis just a standard DawnLib follows
For namespaces of the mods
If I may suggest something, when Dawn encounters a repeat uuid, can it try and give it a unique one instead of just discarding the item?
A situation where this happens is in Luigi'sMansionGems, where there's around 15 F gems, and all but one get thrown out by Dawn because they're all registered under luigismansiongems:fgem. In the case of this mod, the creator is not mysteriously disappeard so it should be able to be fixed, however for not such lucky cases, Dawn auto-generating a uuid could be helpful 
I think in the case of repeat UUIDs Dawn should hire a person to go to the mod author's house and hit them with a belt until they fix it
yeah im honestly unsure how to deal with that, should i expect the same person to register multiple items with the same item name and treat that as valid? no idea
The generated UUIDs would have to be completely deterministic so all clients get the same result per session (for communication) and so the master client always gets the same result per save (for storage) and that seems like it would be hard to ensure and brittle to changes in the mod list
It might even be better to mark a UUID as dirty and throw out the existing item, log that you cannot service the mod it came from and refuse to load any more items with that UUID because right now you're filling the slot of luigismansiongems:fgem with just whatever happens to be sent to you first each session and that's brittle so it could change and break things
That is probably deterministic per session but its not per save so I'd suggest discarding that UUID and making the user aware is a good alternative
Generating UUIDs is something I'm not sure is possible to do 100% safely because it would necessarily require that the generation not depend on mod load order and content discovery order, IE it can't be first come first serve with a given UUID. This is because client mods can exist and clients must agree with masters what a given UUID means and a UUID must be depended on to be universally unique to a given content as the name implies. It must also not depend on the environment for the same reasons but also because the environment can change between game launches and the generated UUID must be consistent across saves.
I think Xubert is pretty smart and could come up with a workaround or hack to make generated UUIDs work in most cases but it would be brittle to edge cases and Dawn already gets blamed for a lot of things and I don't think inviting more of that is a good idea
So my conclusion is the smartest outcome when a duplicate UUID is detected is to throw, but Unity suppresses uncaught throws so just tell the user that UUID is dirty/contested and Dawn cannot resolve it and to expect issues. The onus is on authors to correctly use the UUID system Dawn provides
yeah, half the problem is that the item name is what lethal company shows up on the top right when telling you what the item that's being held is called, which isn't really a problem because zeekerss wouldnt expect to create multiple items with the same name or a name that you wouldn't want on the top right, for now, while i think about it, i request @gloomy dirge to update the gems to have unique names
i too like flooding the item pool with ((17 x 6) + 7) items
i mean you already are, unique names or not, no?
they have texture variations
ye?
where it stands rn, there are only 24 items. if i gave them all unique names, it'd end up being 108 items
that doesn't make sense?
it's just changing the names of each of the 24 items to be something unique from all of them
i dont understand then.
wait... i see what youre referring to
i probably shouldve scrolled up...
so my question is, was this encountered with an unreleased ver. of DawnLib? if not, is this from a ticked on/off config setting? if not, is it from a mod conflict? i ask because DawnLib and my gem mod work just fine together on my ends
this does cause a problem with dawnlib and it is a problem with the current release
hmm
id just need to rename the prefab, yea?
so that it starts with a letter and not a number?
no, the item name
you have 24 items that seemingly all have the same name
It's the 1F, 2F, 3F... gems all have the same name
They could be material/mesh variants 
Though gotta do some stuff to get gems to save their variant upon reloading lobby
There's 7 variations for each item, but there's about 15 of these gems so I'd assume not since that doesn't line up
6*
but that aint the important thing
anyways
i'll talk about this either tomorrow or the day after. LIVE rn
Just move the discussion to your twitch chat 
-# /j
Does Dawn do content matching by tag? If so how it work? 
be a little more specific
Like how Weather, Moon, and Dungeon matching works, can you do the same if a moon has a certain tag?
For say scrap
im assuming you're asking that, if a moon has a tag, whether the scrap's spawn weight having that tag works
i.e. if an interior is tagged with beaniemod:reallycoolinterior, and a scrap has like, beaniemod:reallycoolinterior=+100 then yeah, it'd work
Would I just throw that in with the moon configs?
Moon string I mean
As in there's the moon, weather, and dungeon string when constructing the provider table
yeah just put that there
Thanks!
i think that tag is wrong, its meant to say reallystupidinterior
i think you've got neat interiors
maybe moons not so much, but interiors are pretty neat
thanks
anyway wanted to say @meager inlet what's your impl idea with the physics material for footsteps? sorry if you've already explained it and i forgor or missed it but i've been thinking of a basic impl with a component added next to the collider with a transpiler that does trygetcomponent on the hit for that component
something like this (the if statement with the trygetcomponent is my edit of the method):
public void GetCurrentMaterialStandingOn()
{
this.interactRay = new Ray(this.thisPlayerBody.position + Vector3.up, -Vector3.up);
if (Physics.Raycast(this.interactRay, out this.hit, 6f, StartOfRound.Instance.walkableSurfacesMask, QueryTriggerInteraction.Ignore) && !this.hit.collider.CompareTag(StartOfRound.Instance.footstepSurfaces[this.currentFootstepSurfaceIndex].surfaceTag))
{
if (this.hit.collider.TryGetComponent(out DawnSurface dawnSurface))
{
this.currentFootstepSurfaceIndex = dawnSurface.SurfaceIndex; // SurfaceIndex would be set on the awake of this component, i can refine the details later but there'd be a registration process before anything spawns in-game which fills up the footstepsurfaces list, it won't be bad for performance to add more to the list since zeekerss loops from bottom to top of the list, unless someone has their ground set to a weirdass tag that doesn't match ig
return;
}
for (int i = 0; i < StartOfRound.Instance.footstepSurfaces.Length; i++)
{
if (this.hit.collider.CompareTag(StartOfRound.Instance.footstepSurfaces[i].surfaceTag))
{
this.currentFootstepSurfaceIndex = i;
return;
}
}
}
}
this would also technically have support with surface tags from other mods with a fallback to vanilla tags i guess? lol
#dev-general message

damn i knew i remembered it being said somewhere
my b :p
okay i understand batby's impl now i think
i would probably switch some stuff around to using the vanilla footstepsurfaces array with creating more entries there and just referencing an index there (since otherwise you'd probably need to patch a few too many spots to get the game to understand what you're stepping into) but other than that, it's a decent way of doing it too
halcyon and veld (not even released yet) are my only good ones so that tracks
i do plan on fixing the old ones
Hi I have more stupid config questions 
I vaguely remember reading somewhere that the priorities on spawn weight is something like moon name>moon tag>vanilla/custom>all. Is that still the case? Because I've been doing more experiments on Jimothy
If the moon name matches, it only applies that moon's config which is expected, but if the moon doesn't match it applies every content tag?
All 4 of those are considered tags but I am considering separating logic a bit more so vanilla and all aren't included unless there's no content tags maybe
Ah, oki. So this is normal
Is there a list where I can find all the tags that are determined based on things like price, modded, or or other things that aren't content tags? i.e. lethal_company:free, lethal_company:all, etc.
I've been using Lunar Config to peak the tags
I think Lunar can only get content tags
I think stuff like lethal_company:custom DawnLib does on it's own
Nevermind
Ya found it?
Well they get registered under the namespace of the mod, like kenjismod:custom
Which is... interesting?
Well it doesn't show in DawnLib's tags...
But if I put in lethal_company:custom it would still point to this moon?
Does only the key matter? Not the namespace?
For tags I only look at the key
So kenjismod:custom=+20 would work for every modded moon?
Paid and custom should've been lethal_compang though but it doesn't mattee
Technically yeah
Though sometimes it doesn't get all of them? This is Obscura and it's a paid moon
That's how the spawn weights preset I made work, you can make your own if you want it to behave differently though
Uhh, if it's not getting it, then that moon didn't have a cost when DawnLib checked
Weird...
Oh yeah, just remembered. Does Dawn still take the average value of the content tags if more than one matches a moon? Because I noticed earlier in the LogOutput when I was messing with Jimothy's spawn weights that it was adding tags together instead of taking an average.
Just wondering because I want a scrap to appear on cold moons, and there's two tags to denote that, tundra and cold (at least for vanilla moons, I see you reign:glacier and reign:frozen). Some moons have cold but not tundra, and others have tundra but not cold, so I was hoping I could include both with something like lethal_company:tundra=+50,lethal_company:cold=+50, but I don't want to accidentally give it a weight of 100 if a moon has both tundra and cold
It should but if it doesn't lmk and I'll reread the code
Well this is one of my evil experiments on Jimothy, I gave him an additive value for each of March's content tags and the final weight it output was 100 instead of 25
Hmm okie I'll take a looksie soon
if i want to see the moons with their mod name i should check this right?
oh wait yeah i found it
i thought this would only show the moons debug, not all of em
you shouldnt need to tick any of these anyway, just looking up registry and looking for the moons one
the registries are always logged
Okiiie thanks Xu
Is there a way to disable the travel progress bar that this adds to the moon screen?
No
Fry tries to get Leela to fix the ship in Futurama.
got bored, gonna fix some issues and release a visualiser for the spawnsyncedobject and dawnlib spawner stuff
doesn't work quite as well for something animated lol, but good enough
Tomorrow*, forgot to say that
splendid
can this info be in the wiki as well? I was trying to figure out too you meant with "you simply need those two and PathfindingLib.dll to load the mod into the UnityEditor" but I was quite confused
same thing with "UnityPackage found on the same releases page onto your project", I looked though it in multiple releases but I didn't see any .UnityPackage files in the git repo
Packages are in releases
is it this one?
UnityPackages are on 0.5.12 and earlier only, for some reason
Should be fine for scraps, i havent updated beyond that either and use 0.5.12
Just to double check, by having DawnLib (and not disabling the item save thing), that makes SmartItemSaving completely redundant right?
Yes
I believe it is but I'll check, the unity package isn't there rn because I need to update it but I'll do that tonight
alright, thank you!
Nice nice
Just keep in mind, for the host, all items will be in the right position, but for joining clients apparently I forgot to sync that so they might just be on the floor instead of on the cupboard (will be fixed today probs)
v0.5.17
- Added more null checking because of mods deleting AINodes mid round.
- Refined interior registration a bit more internally.
- Set the parent of unlockables on purchasing rather than just on lobby load.
- Removed the overriding of all terminal keywords to be a specific format.
- Updated Editor.dll to have holograms for SpawnSyncedObject and SpawnSyncedDawnLibObject and updated the DawnLibTemplate unity package!
next couple updates should be much bigger
Are you still interested in eventually adding a way to register bestiary entryโs that arenโt connected to scanning enemies?
Not a particularly important thing just mainly want to know if itโs still eventually planned
probably, im not too sure how i'd wanna do it editor wise, but code wise it'd be pretty simple to do from what's already in dawnlib
rn on the chopping list is custom footstep sounds (being done by paco) and a big update to terminal handling in dawnlib (being done by darmuh)
not sure when either are gonna release, but it's looking pretty optimistic for dawnlib stuff
custom footsteps is so peak and underrated!!
Sounds great!
That spawn synced thing seems sick!
๐
specil atack
not sure what that will do
They're broken, you have to disable them for now
oh aighty
Hi, sorry for a stupid question but how can I get the mod exported as .dll? I done all the steps in the wiki as well as well having the assetbundle ready, but I can't seem to figure out where to find or make the .dll file
I remember from 2 years ago that with lethallib I could do it with making a build though an IDE, but I don't think that's possible though this ๐
You gotta use the C# template to make dlls
okay so I do require to make a IDE project, good to know
Yep
Thank you ^^
I plan to do more testing for those item positions, I will find something that does whatever right consistently, I will however update the github issue with any findings at some point
thank you ๐ซก
@urban plaza talked to Matty about it, it's been a while so I forgot the impl tbh, but Matty fixes is needed because of a bug where items "fall twice" for clients when a client joins the lobby, causing said items to fall down cupboards etc
Unsure if it's in DawnLib's scope to fix but potentially
That would explain pretty much everything, i wouldnt know if its dawnlibs scope to fix vanilla bugs (guessing that is vanilla) either, but at least there is a solution out there. I have not played normally in such a long that i had just not used mattys fixes for a long time since the pack i do use is a thrown together testing pack, lol. thanks for everything
There's a bug with DawnLib that prevents Unlockables from despawning properly after eject 
You cannot interact with these
Huh, I'll take a look, I wouldn't imagine there is but I could test it out
Seems to be mostly tied to ShipWindows ๐ค
Not sure why
@oak linden does dawnlib handle reparenting of items to the vanilla cupboard? If so, my guess is that the hierarchy of modded furniture prefabs might matter and must be 1:1 vanilla if i want to achieve the same result with modded furniture?
Specifically on game load, since i notice all items reparent to the ship rather than furniture, except stuff stored in the cupboard, so moving anything just leaves items floating
That might be ScienceBird Tweaks overriding DawnLib tbh, SBT has a setting to only fix parenting for Vanilla Furniture
Can't be sure but I disabled SBT's setting
I dont have sbt on in testing packk but... i forgot they mess with the reparenting, i should check it out later and see if their magic works
Ah lol
I think that was also determined to be out of scope but I'll check the code later
I doubt I parent any items though
I do fix unlockable parent hierarchy though
Stack trace:
Dawn.Internal.SaveDataPatch.OnPlaceableShipObjectAwake (MonoMod.Cil.RuntimeILReferenceBag+FastDelegateInvokers+Action`1[T1] orig, PlaceableShipObject self) (at ./src/Internal/Patches/SaveDataPatch.cs:38)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<PlaceableShipObject::Awake>?-133555424(PlaceableShipObject)
UnityEngine.Transform:set_parent(Transform)
Unity.Netcode.NetworkObject:OnTransformParentChanged()
UnityEngine.Transform:SetParent(Transform, Transform, Boolean)
Unity.Netcode.NetworkObject:TrySetParent(NetworkObject, Boolean)
Unity.Netcode.NetworkObject:TryRemoveParentCachedWorldPositionStays()
Unity.Netcode.NetworkSpawnManager:OnDespawnObject(NetworkObject, Boolean)
Unity.Netcode.NetworkSpawnManager:DespawnObject(NetworkObject, Boolean)
Unity.Netcode.NetworkObject:DMD<Unity.Netcode.NetworkObject::Despawn>(NetworkObject, Boolean)
Unity.Netcode.DefaultSceneManagerHandler:MoveObjectsFromSceneToDontDestroyOnLoad(NetworkManager&, Scene)
Unity.Netcode.NetworkSceneManager:UnloadScene(Scene)
<unloadSceneForAllPlayers>d__279:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)``` Any problems with this error? I have disabled the item and unlockable saving from dawnlib
One of the furniture's in your save is made incorrectly
Not sure which, this part of the code is to fix a vanilla bug with furniture jittering
Maybe Sciencebirdtweaks
mmmm very well... i wonder if i can muster a solution... messing with save data is pewdiepie jumpscare
nah i mean like an actual furniture not something trying to fix the same thing i am
hmm maybe its floppy disk and diversitynofloppy remove it
its the only modded furniture i have
ill add more logging next update to see, it could be that
@oak linden Do I need this or can I just turn off validate references for that dll?
i think you need that mod
yeah, that seems to have resolved that and I see DawnLib stuff in the create menu! Thanks!
If I may, on the wiki setup section where it says "The github page for releases includes the mod's package zip and the Editor.dll, you simply need those two and PathfindingLib.dll to load the mod into the UnityEditor. Alternatively, you could import the UnityPackage found on the same releases page onto your project and get an already done structure setup."
You might want to list that one too and maybe mention turning off validate references for the DLL files that need it off. I also saw you're supposed to delete the compatability.dll or whatever it was called and I guess since I imported them at the same time it didn't delete for me, so it might be a good idea to tell the user to confirm that it's deleted. From one of your earlier comments I figured it out, but it might be a good idea to mention here too.
I know the wiki might be a bit old so perhaps this is already planned, but if not, just some things that might be helpful to mention.
For sure helpful, I'll update it soon
I need to also include adding monkeyinjectionlibrary
that's what I meant by "list that one too"
Also, idk how doable these are, but I was looking at the spawn synced object visualizing thing and noticed two small things. First, it seems to be confusing the blank prefab and the real thing. Like, "TurretContainer" the hologram for the actual prefab is shows my blank reference and my blank reference prefab shows the hologram of the real one. The other thing is that I have something that's got some ProBuilder MeshFilter components on it and those don't show up. I think it's just the regular MeshFilters that do. IDK if that's something that you feel is worth fixing or how difficult it is, but I just wanted to mention it.
hmm, i've never worked with probuilder, can you screenshot something with pro builder on it?
i'd like to see the components
and i can try to fix the first issue, but that's kinda of a silly one lol
here's what it looks like. idk if the mesh can be read easily or not. This is for an "apparatus" for my CabIn interior. I just took the baboon hawk mesh, probuilderized it, and deleted the body lol.
hmm, i think i can read probuildermeshfilter.mesh
i can probably send you a dll for that in like a few minutes if you'd like to replace the editor dll to test
you can, but I'm heading to bed so I'd have to get back to you sometime on the results
sure
CTRL + ALT + S
converts all probuilder meshes to normal ones in the scene / prefab
i would highly reccomend doing this frequently
theres not much reason to have stuff still as pb meshes and i know it comes with some rare issues
Oh wow ok. I probably shouldโve looked to see if there was a simple way to convert them before lol. Well, Xu, if itโs an easy addition it might be nice, but also I can convert the mesh on my end.
Does someone know how you connect your Unity Project to the IDE Template?
I'm at the very last step of the tutorial and it says: Finally, enter the project's folder you made with these commands and type in the final command: dotnet tool install -g tcli and from there you can do builds and stuff.
Does it mean I suppose to insert the Unity project to the BFWMod? I'm not exactly getting it
I don't think we connect our unity projects to our IDE's, atleast it's not been very successful when I've tried with VSC before
What do you normally need to do?
oh wait, I'm blind, I think that is the place ๐
Oh, yeah for placing assetbundle just building em there
lovely, now time to figure out how to make a build and time to test ^^
I'm getting quite a bit of errors while making a build even though I followed the wiki correctly, someone knows what those errors mean?
this is what I got
i assume you never worked with ide before?
yeah so close your vs and open .csproj file
and then used Unity to compile
should open the project
hmm I'm getting those errors
yeah it says that you are missing nuget packages
right click on your csproj in solution explorer
press open in terminal
or smth like that
I guess I should press this right?
this one too yeah
Fumo
okay that's a lot of packages
then press cogwheel
oh actually nvm
Rodrigo launched fireworks ๐
I'm getting the exact same errors
maybe I should update the packages?
let's see if this works
Aw nvm, same errors
As in screenshot the text inside the csproj
o I just tried to build again and I got some new errors
like this?
You see where it says RootNamespace?
Replace that with something else, like your mod name, i.e. CodeRebirth
done it
Try building now
those errors now
Go to the file called ExampleContentHandler and screenshot
hmm Dusk library is red
Hmm
Back to the csproj then
Scroll down and screenshot again
I gotta see the package references
Huh, dusk isn't even there as a package
Go back to this screen
And look for com.github.teamxiaolan.dawn.duskmod or something similar
I don't see it anywhere
I'm very confused, I thought the github template would have it
can I also do it like this?
I added it, I tried building again and now getting this
I do see a warning sign at the package
Huh, what does the warning sign mean, does it say anything?
If not, go back here and screenshot, I'd like to see if anything changed
It might also want you to restart the IDE
I'm trying to figure it out but can't get anything
I'll restart IDE now
o the warning sign is gone!
yay it worked!!
Thank you so much
Nice
So when registering items in LLL there is a field for pluralized item names, like if you buy 2 the terminal says you purchased "2 floodlights" instead of "2 floodlight". I didn't see a way to do this through Dawnlib, but maybe I overlooked it? It's also not really a big deal, but I was just curious.
i could make it a thing, i just gotta see if this is a thing in vanilla though ๐
it would be nice but it just feels off having a whole field just for a pluralised name
I think I tested in vanilla and it was, but idk where it comes from.
aren't the vanilla nodes pre-written?
maybe it adds an s to them and that's it lol
that's one of my guesses
๐ฅน
yeah there's no conversion it's just pre-written in the node's displaytext as the plural name
๐ wow
modpack code and logs please :p
also, is this error reproducible?
i think a vanilla function is erroring here actually
if zeekers would have done name to plural name conversion I imagine it would've been in textpostprocess just adding an s for orders where playerdefinedamount is larger than 1 but my guess is he would rather handwrite them all so that there wasn't situations where s wasn't appropriate (though I don't think there's a vanilla item where s doesnt work ๐)
plural names are pain
yeah every time I go to the moon acheron and try to land it does that and won't land.. not sure if it's the same thing on the other moons
019bb596-5525-1ec3-a77a-067013ac4d0c
where do I uh get the logs from ๐
if you're using a mod manager there should be a button in like settings to copy logs to clipboard
yeah I doubt it could be automated for any modded item name unless you're happy with "2 cactuss"
think this is it
if happy just adding s then yeah I think it's ez patch in Terminal.TextPostProcess
should probably report this in lunar config's thread
it could be the cause
BRUH
I hate this so much
whoops
i meant to post a video to show the footstep stuff with particles working but for some reason it recorded at like 5fps so rerecording rn
ignore the fact that the shovel is broken, imperium is entirely broken in debug versions of lethal and i forgot that
but the shovel was supposed to be used for me to hit the ground and it'd make the hit sfx that each tag usually has
will be released soon after i do a couple more fixes :p
WOW
(this was the only particle effect i had on hand)
Duckstroid but it's a giant Mel
lool
With those footsteps 
Is your Discord fixed now Mel? 
WOW
While creating scrap items with Dawnlib + Dusk, do I still need to add Network Object and Physics Prop scripts to the prefab?
yes
alright thanks
Now I want to look again because I thought I only found one version, but it mightโve been with the plural item, whichโd mean idk where the single came from. I thought I remember seeing something like โyou have purchased [variableamount] shovelsโ but I canโt remember if it was plural or singular. I just donโt remember finding the other version of the text.
WOW
I may be stupid
Trying to register content via code (the proper way this time) by using the tutorial on the DawnLib wiki, but none of the stuff is appearing in game. I have a content container in my main bundle pointing to a secondary bundle with my item's assets and item definition, the CS plugin is compiling without any errors and I get no errors while loading into the game 
send your code
plugin.cs i mean
{
public const string DawnDep = "com.github.teamxiaolan.dawnlib";
public static DuskMod? Mod { get; private set; } = null;
private void Awake()
{
AssetBundle bundle = AssetBundleUtils.LoadBundle(Assembly.GetExecutingAssembly(), "gsmain");
Mod = DuskMod.RegisterMod(this, bundle);
Mod.RegisterContentHandlers();
ExplosiveScrap.PatchLandmines();
Logger.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!");
}
}
do you have ContentHandler class?
I had one at one point but I removed it because I thought it served the same purpose as the content container
I assume I was wrong

content container just for referencing shit iirc
Do I still need it if I use a custom ContentHandler?
yes
yay it works thanks
I have this issue for the past 3 hours and I feel like I'm going insane ๐
I thought it is my fault
imo you don't need to register the mod via code if you don't use configs/want to controll bundle loading or other shit that can be done only with code
I got stuff with custom behaviour so I opted to use the code approach
wait really? But I had to do it to build a .dll
do you have custom scripts?
if not then you dont need dll
nope, I only wanted to make add simple scrap objects into the game
oh wow I didn't know that
how am I suppose to run the mod without the dll?
I done that part and implemented everything from B.2
XOR*
When you build bundles you should get a .duskmod file that you use in place of a .dll
I have done every step needed to do C.7 and also finished that, that's why I'm very confused why I can't get scrap to appear in game
oh, I haven't gotten them at all
did you ever build bundles?
I used this to build the bundles
it was the recommended one in the wiki
all it created were those files
reread b2 end
Do your mod information and content containers have this thing set
and I put those in to the mod itself
if you putted your scrap in same bundle with content container and mod info then you did it wrong
the The paths you provide should point to where your AssetBundles are located so the tool can automatically package them into the correct folders. part or the summary?
you supposed to have 1 .duskmod assetbundle and 1 assetbundle with your scrap
oh
I thought you needed everything in the .duskmod folder to make it work
ao I need to seperate both of them?
content container and mod info in .duskmod
all that related to scrap is other bundle
oh so the .duskmod should only have content container and mod info, got it
yes
.duskmod shouldn't be a folder?
this is all explained in b2
you literally send it yourself
I'm sorry, I missunderstood the b2 part more than I thought
I tried my best to follow it as much as I can
Huh, thought that just made a bundle
yes
Continue 
what you have inside your project doesn't affect how the final zip file will be compiled
zip part only looks for builded bundles
I also didn't had this so I'm adding this now
so it should be like this if I got this right
oh wait nvm content in other folder too

so like this got it
again: doesnt matter how you organize it
oh I thought it mattered because of this
oh gosh alrighty
well I guess that's where my confusion came from
alright thank you, I'm going to attempt to build again
like this is how i organize my shit but it would work same if i had everything in root instead of DamnLib folder
so all it matters is having the asset labels correct
DamnLib
yes
yes
A modern API for Lethal Company content and all sizes of damns
Hmm I'm still not generating a .duskmod after building everything
show your asset labels
and what inside plugins
rebuild bundles
Speaking of configs, is it possible to change how Dawn formats its configs or will I have to write my own DuskContentDefiniton override?
Because I got multiple configurable items but Dawn's automatic configs flattens them into one thing because they're all in one bundle
I built the assetbundle and I built the package again and nothing changed
select all in bundle builder
alrighty
i dont think you can
dang
and even if you will write override i dont remember if its controlled by content def
o nice! it worked this time
thank you for the help!
I will now do some testing ^^
I could seperate them into different bundles but it such a pain in the ass. Please Unity at least let me change the asset labels of multiple files at once
well this is progress, time to learn why I'm getting an error now
an asset bundle can only be loaded once, ever, in any context
I don't know how dawnlib works but if you're asking it to do something for you then surely you have a way to access your bundle after its done?
I don't think you need templatedawnmod.duskmod
I deleted the templatedawnmod.duskmod as well the other templates
ah
now it looks a bit more clear
I'll create a new profile on r2modman to see if it will still apear
hmm same error
what do you mean exactly?
Oh, sorry, somebody butt dialed me right as I was typing that
I thought the error was you were trying to open your asset bundle and so was Dawn
o nope ^^
I'm trying to run a simple scrap mod for the first time using dawnlib, but I'm failing a lot as my modding knowledge is terrible
What bundles do you have listed in the content container
this one
I might be wrong but having your duskmod and your assetbundle sharing the same name could be breaking something
I only use 1 asset bundle for everything
oh possible
I'll change the asset bundle name
okay I done it and looks like the exact same error
There is something for sure that I did wrong
generate the namespaced keys.json file from the content container and see if theres anything that stands out in there
e.g. blank names when generated a few times
ummm does going into assetbundle browser yield anything? i used to have this issue when i first started trying dawnlib but i had forgotten what i did, you may have to retrace your steps and do over the assetbundles again, shouldnt be a big job with only 2
i only add the dawnlib item registry to the assetbundle i desire as well, i used to do everything one by one but i learned it kinda just gathers itself through references
I'll try retracing the steps tomorrow, I spent 6 hours on this today and I'm feeling lightheaded from how much I tried to get this to work today
going to take a break
rest up well
If you get the chance, send your zip in here
[15:29:39.2650682] [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
Dawn.Internal.SaveDataPatch.OnPlaceableShipObjectAwake (MonoMod.Cil.RuntimeILReferenceBag+FastDelegateInvokers+Action`1[T1] orig, PlaceableShipObject self) (at ./src/Internal/Patches/SaveDataPatch.cs:38)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<PlaceableShipObject::Awake>?-1786493268(PlaceableShipObject)
[15:29:39.2650682] [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
Dawn.Internal.SaveDataPatch.OnPlaceableShipObjectAwake (MonoMod.Cil.RuntimeILReferenceBag+FastDelegateInvokers+Action`1[T1] orig, PlaceableShipObject self) (at ./src/Internal/Patches/SaveDataPatch.cs:38)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<PlaceableShipObject::Awake>?-1786493268(PlaceableShipObject)```
I removed diversity, but there's still another error
Didn't work out anyway because some functions like ConvertManyToString aren't accessible, which I can rewrite but I want to avoid that to prevent things breaking with updates. Still, I rewrote those function regardless and then when I tried to create the item definition asset Unity just refused. Not sure why, didn't feel like reading the 20 errors it gave me. So ig I'll just organise my asset bundles 
just publicize
but whatever
idr if you were the one who reported dis but fix
v0.6.0
- Added custom footsteps controlled through the component DawnSurface.
- You need to register a custom DawnFootstepSurface and then use the component DawnSurface to set a collider to be a specific Surface.
- Allows you to also emit particles based on the surface you're setting on incase you'd like to emit sand from the player's footsteps while they're walking on sand.
- You can also use a DawnSurface to do something like, making Quicksand terrain sink you with cement sounds (use the cement DawnSurface with the appropriate quicksand tags on the terrain!).
- Adjusted AnimationCurveConverter.ConvertToString to give atleast 10 keys minimum to avoid tangent-related issues.
- Added more logging to look into invalid furnitures.
- Fixed an issue with tag weights not averaging.
- Publicised some functions in NamespacedConfigWeight.
- Rewrote SpawnWeightsPreset a bit to be cleaner (no breaking changes I hope).
- AnimationCurveConverter returns a constant 0 curve when provided with null or 0 key curve.
here it is
pretty sure you dont want these assetbundles to be the same name,
doesnt matter
it caused me to error out in the past till i changed it but you the boss and i probably did it wrong too
if it has different file type (.textafterdot) then it is not same name
can you screenshot your content container?
oh wait
same files hm
yeah rename second assetbundle
ig it included all files that was inside .duskmod in assetbundle without .duskmod in name
Alright thank you I'll do it tomorrow, currently in bed preparing to sleep
@oak linden If you're available can you come join vc? lol
those are fine, they show up a bit at the beginning though not exactly too sure which instances of me trying to access em its coming from, but its fine
oops
Actually pizza hut is all that
nuh uh
I decided to check the assetbundle maker from Unity if that was the solution to the issue I had earlier instead of using CR Bundle Builder and I noticed I'm getting quite a few errors
this might explain the issue I had yesterday ๐
Peak
I followed those steps and made a different .duskmod name it works now!
Does anyone have a recommended weights list for items inside vanilla lethal company? I want to see how rare some items would be so I can use it for my own scrap
check the weights of other items inside LLL or lunar config/
o good idea, I'll try to find a mod then
also a newbie question but all I have to do to make the items spawn is having correct weights and having this enabled right? Because I noticed the items don't spawn at all (or at least Unity Explorer is not showing them) even with having Vanilla weight number at 100
yes, hwoever i think you might need to tick is scrap inside of item properties as well
Got it ticked there too, though I did realize the value of weight on item properties was 3, so maybe that's why it was not spawning
nvm that was not the reason
I'll check other mods weights to see what they use
I admit i struggled to get the items to spawn in the way id have hoped a few versions ago and ended up using lunar config to see if theyd spawn at all,
but, minor thing, make sure you are resetting/deleting the config thats generated in the mod manager if youre changing the values in the editor rather than in the mod manager config if you arent already
oh, thank you for this info as the config has everything on 0
this explains a lot
woo it spawns now!
oh of course, another bug and now I need to figure out why my character can't pick up the scrap item
I have a feeling modding is just constant debugging hahah
its probably a tick box at the top of physics prop if im remembering correctly, im just going off whats fresh in my mind
passing out rn for bedtime now anyway, gooodluckk
maybe network object if thats not right, i forgot what issues it caused however but compare to a vanilla item prefab and all will be known then...
Can I make suggestion? 
So currently when one thing has weights from multiple places (Like both a tag and a moon) they get averaged. Could a feature be added easily that let's these be handled differently if someone would want that, like instead just adding together all of them or taking the biggest one?
This could be a config in Dawn, or it could also be controlled by something internally that Lunar can touch :3
The two examples I gave were pretty much the only ones I could think of
That anyone would want
moon names already take priority over tags I'm p sure
Is there a way for me to get the spawn weight of a scrap item when a specific interior is selected, similar to LLL's extendedScrap.DungeonMatchingProperties.GetDynamicRarity?
Yeah, you can do smthn like:
Item.GetDawnInfo().Weights.GetFor(RoundManager.Instance.currentLevel.GetDawnInfo());
Like glitch said, if a moon is matched, it doesn't touch weights from tags
The reason the tag weights are averaged though is just because it made more sense incase a moon had like marsh, but not forest, but a moon had both, but you usually wouldn't want to add more weight just because a moon had both, etc
In terms of having a setting to not average the tag weights, uhh
@oak linden @blazing nacelle I found out TestAccount is doing smth wrong with the Shutter Switch, he tried to blame Furniture Lock but I assume smth else lol if I auto unlock it it does this, if I buy it it gets forced in the default position and other config options in Furniture Lock are missing. I'd assume this is a situation of him sharing the same ID as the Light Switch or improperly registering the item XD
He plans to look into it tomorrow but yeah I suspect he did a funny in the conversion to DawnLib lol
When it's bugged inside the lightswitch on auto unlock Furniture Lock doesn't register it at all
lol
v0.6.1
- Fixed rare scenario of some weights not working right if grabbed at the wrong timing (would mostly break dawn interior weights).
More suggestion
(this time just trying to fix my mod lol)
If ConfigManage.ParseCurve() is given an empty string or no keyframes, can it just return a null/empty animation curve?
As when it gets an empty string, it returns an error like this:
[Error :LunarConfig] LunarConfig encountered an issue while configuring lethal_company:titan, please report this!
Dawn.MalformedAnimationCurveConfigException: Exception of type 'Dawn.MalformedAnimationCurveConfigException' was thrown.
at Dawn.Internal.AnimationCurveConverter.ConvertToObject (System.String keyValuePairs) [0x00133] in ./src/Internal/ExtendedTOML/Converters/AnimationCurveConverter.cs:69
at Dawn.Internal.TOMLConverter`1[T].Deserialize (System.String value) [0x00000] in ./src/Internal/ExtendedTOML/Converters/TOMLConverter.cs:23
at Dawn.Internal.ExtendedTOML+<>c__DisplayClass6_0.<WrapConverter>b__0 (System.String s, System.Type type) [0x00000] in ./src/Internal/ExtendedTOML/ExtendedTOML.cs:85
at BepInEx.Configuration.TomlTypeConverter.ConvertToValue (System.String value, System.Type valueType) [0x00024] in <cebe69d7792f4abca78b685257766c60>:0
at BepInEx.Configuration.TomlTypeConverter.ConvertToValue[T] (System.String value) [0x00000] in <cebe69d7792f4abca78b685257766c60>:0
at Dusk.ConfigManager.ParseCurve (System.String keyValuePairs) [0x00000] in ./src/API/Config/ConfigManager.cs:68
at LunarConfig.Objects.Config.LunarCentral.StringToCurve (System.String data) [0x00001] in ./Objects/Config/LunarCentral.cs:235
at LunarConfig.Objects.Config.LunarCentral.InitMoons () [0x00de8] in ./Objects/Config/LunarCentral.cs:2390
I could a sworn that's what it'd be but I'll take a look at that when I wake up later
zzz ziaolan ๐ด
@oak linden TestAccount is running into an issue where the Shutter Switch is being assigned to an ID of -1 which is what suits use and it's leading to this problem. You got any idea what might be going on here and how he can fix it?
Also @pine dirge you should prolly send your log lol
Unlockable Type?
1
I don't think it has to do with the ID. I just tried setting it myself to 34, but the light switch still spawns to the shutter switch with FurnitureLock installed.
I think it's probably this?
[Debug : DawnLib] [Debug-Unlockables] PrefabShutterSwitch(Clone) dusk unlockable starting...
[Warning:DawnLib.DuskMod] Unlockable: Light switch doesn't have a prefab nor does it spawn as one, this means that you cannot replace this unlockable.
[Debug : DawnLib] [Debug-Unlockables] StoneUnlockable(Clone) dusk unlockable starting...
[Debug : DawnLib] [Debug-Unlockables] Unlockable Orange suit has no replacements!
Oh yeah DawnLib is registering it as the Light Switch hmmm
dawnlib seems to break lethalelementstheta, it disables snowfall and blizzard
as paco said, it'll be fixed when he's able to get around to it, i personally don't know the issue very well
this occurs because of an invalid format
Paco ๐
here, reproduce this and send me the error
i added more logging
I am losing it
Updated recently to update
AND NOW THE UH
Item Definition is gone
Editor and everything is updated
Where'd it go
Updated how exactly 
Are we deadass?

Mau
Shooting myself
Also yes I have two dawnlibs
Oops
UPDATED BOTH
And it's just gone
o
Anything in console?
Error Pause 
Also this'll probably cause issues at some point ๐
Lol
Found it
Monkey and SoundAPI are there
Hmmm
you also got pathfindinglib?
Checking
Could also disable Validate References 
don't disable validate for pathfindinglib
enable it for dusk.dll and it'll tell you what it's missing
I recall havin it work without PathfindingLib and some of the other dependencies, but mayhaps I'm wrong and it just came to me in a dream
pathfindinglib and monkey injection should be hard dependency because dusk has a script that uses it
well for pathfindinglib
monkey injection might technically not be needed
but what you had was probably unity loading every script
until it reached smart agent
then it stopped
๐
There be no .dll in there 
Check the patcher folder in your BepInEx profile
Xd
omg...
Also ye wasn't expecting like the weather scripts to load without Registry, but I guess I didn't notice some of the other missing scripts (if there were any), hmm
weather scripts will load fine without registry actually
well, there's only the scriptable object for registering em
i dont use any registry classes
Is...
There an easy way to fix this
use ngo missing script recovery
Ye
$FREE.99
just don't let it automatically try to recover everything, set it to manual and you can manually approve each change
you "buy" it in the unity asset store, add it through the package manager, import it, then it'll pop up in unity somewhere to use
in this screen specifically
I forgot to press Import I think
Itll be found iun tools right
i think so
not probuilder lmao
this will be fixed next update by request of crafty
zeekerss loves adding a duplicate bottle entry to these moons' spawn weights
added this stuff to the wiki too :p
v0.6.2
- Added more logging for incorrect curve config formats.
- Fixed an edge-case of registered pre-unlocked furniture.
- Removed erroring from vanilla items that can't be put into the save file (clipboard etc).
- Fixed a vanilla issue where the same item would be added to a moon spawn list twice.
- Updated wiki slightly too.
- Added crafty and darmuh to credits.
- Next major update is planned to grant a lot of terminal functionality in terms of creating terminal pages, commands, etc.
i was about to post it, but ill update the unity package first then do that :p
update pushed
In theory, would the terminal functionality stuff work if there was a 2nd terminal, following the vanilla one but also separate
presumably if it was following the vanilla one in terms of script
Gyess ill find out when i try
If you mean like cruiser terminal then yeah
ah okay i see... seems like i got a big journey ahead of me
I wonder but can I make a scrap item play a sound if I left click while using Duskmod? Kind of like the hairdryer scrap item
Yeah, you'd probably have to copy the scripts of the item you wanna try to replicate or code it yourself, but the answer is yes
nice so if I copy the hairdryer prefab and item scriptableobject and just replace audio and the model it should work
thanks
[02:39:47.8562119] [Info :LunarConfig] Initializing Enemies
[02:39:47.8672146] [Error : DawnLib] Invalid key,value pair format: ''! More details:
[02:39:47.8672146] [Error : DawnLib] Found '1' parts
[02:39:47.8672146] [Error : DawnLib] FAIL -> Should have only 2 parts!
[02:39:47.8702150] [Error :LunarConfig] LunarConfig encountered an issue while configuring lethal_company:manticoil, please report this!
Dawn.MalformedAnimationCurveConfigException: Exception of type 'Dawn.MalformedAnimationCurveConfigException' was thrown.
at Dawn.Internal.AnimationCurveConverter.ConvertToObject (System.String keyValuePairs) [0x00148] in ./src/Internal/ExtendedTOML/Converters/AnimationCurveConverter.cs:69
at Dawn.Internal.TOMLConverter`1[T].Deserialize (System.String value) [0x00000] in ./src/Internal/ExtendedTOML/Converters/TOMLConverter.cs:23
at Dawn.Internal.ExtendedTOML+<>c__DisplayClass6_0.<WrapConverter>b__0 (System.String s, System.Type type) [0x00000] in ./src/Internal/ExtendedTOML/ExtendedTOML.cs:85
at BepInEx.Configuration.TomlTypeConverter.ConvertToValue (System.String value, System.Type valueType) [0x00024] in <cebe69d7792f4abca78b685257766c60>:IL_0024
at BepInEx.Configuration.TomlTypeConverter.ConvertToValue[T] (System.String value) [0x00000] in <cebe69d7792f4abca78b685257766c60>:IL_0000
at Dusk.ConfigManager.ParseCurve (System.String keyValuePairs) [0x00000] in ./src/API/Config/ConfigManager.cs:68
at LunarConfig.Objects.Config.LunarCentral.StringToCurve (System.String data) [0x00001] in ./Objects/Config/LunarCentral.cs:235
at LunarConfig.Objects.Config.LunarCentral.InitEnemies () [0x0088a] in ./Objects/Config/LunarCentral.cs:1131
[02:39:47.8962205] [Info :LunarConfig] Completed Initializing Enemies
got this when trying to land in multiplayer any idea what it is?
019bc9f4-6c24-f33b-c326-da30c5ba1b75
rolling back to 0.6.1 fixed it
nvm
still broke
cant tell if its dawn or something else
maybe lunar config?
oh
is that what this means
@oak linden question down the line. How do I use dawnlib for registering a moon
Is there a guide?
yes, there is a wiki guide for registering moons
@static iron i had rebirth :(
so do i get this just by having LunarConfig installed?
this likely wouldn't be caused by lunarconfig or dawnlib, but ill take a look anyway, error stems from vanilla code
i forgot this profile is 351 mods, if you're able to consistently reproduce this, install bepinex monomod debug patcher, and then reproduce and send the log
for some reason, there's an empty entry in that curve, not too sure why, but are you able to test it with this build:
it stopped after installing lunarconfig 0.3.2 so i guess that was the cause
if lunarconfig errored before that point then probably
but if not, then you've probably still got the issue
v0.6.3
- Moved Networkers spawning to be much earlier to avoid a few save-related issues I've noticed.
- AnimationCurveConverter ignores empty entries now.
the changelog is small
but this fixes some apparently long standing issues with dawn moons and dawn unlockables not being properly put into teh save file for saving and loading
a line of code deleted, and a component removed from the main dawnlib prefab, both of those things, god knows when they happened, caused me a few hours of suffering
Yeah it happens when a curve gets passed as "", which some things have by default (at least with my old parser, I think the dawn one grabs those as just zero curves)
@oak linden i'm assuming dawnlib is the reason i have a sync spawner visualizer?
yes
i don't often say this but god bless em
@static iron fix your api
like fumo said, ye (though credit of the idea to batby)
im also told theyre slightly inaccurate so im investigating that
yeah cuz the vents from my spawn syncs are way larger than they actually come out to
@oak linden
Sorry for the Ping Xu!
Just a question where can I find the wiki for using Dawnlib to like register my moon
Thunderstore
Thunderstore has a wiki tab
I'm having trouble with a custom predicate for DawnShopItemInfo. Creating and assigning the predicate wasn't an issue, but when it returns TerminalPurchaseResult.Fail(_failNode), it displays the failure node but still deducts the cost of the store item.
can you send modpack code with the files for me to test?
First of all, am I defining this predicate correctly? (it's just an always fail predicate for testing purposes, but it's doing the same thing)
{
DawnShopItemInfo itemInfo = itemInfo;
private TerminalNode _failNode = null;
TerminalPurchaseResult ITerminalPurchasePredicate.CanPurchase()
{
if (_failNode == null)
{
_failNode = ScriptableObject.CreateInstance<TerminalNode>();
_failNode.name = $"{itemInfo.ParentInfo.Item.itemName.Replace(" ", "").SkipWhile(x => !char.IsLetter(x)).ToArray()}TerminalPredicateFail";
_failNode.displayText = $"{itemInfo.ParentInfo.Item.itemName} is not unlocked yet!\n\n";
}
return TerminalPurchaseResult.Fail(_failNode).SetOverrideName($"{itemInfo.ParentInfo.Item.itemName} (Locked)");
}
}```
where are you assigning this predicate?
This one is assigned in a patch to Terminal.BeginUsingTerminal
In the other mod I'm adding predicates to, I assign it when a player types a certain command in the game chat
i believe i see the issue
would you be down to test a build rq to see if it fixes it?
sure
should just be this
I should mention that it was also happening to a purchase predicate I use for moons, but I didn't notice until today because my mod was setting the moon cost to 0
The test build seems to work with both mods
Thanks
@oak linden
Do I have to worry about like
Moon definitions?
Like terminal Ones
wdym terminal ones
if you're making a moon you gotta make a moon definition
I am so confused
I am trying to follow
And its not even loading my moon
well... you didnt give your thing a namespace first of all
second of all, show the rest of the moon definition
honestly unsure if it matters but you also gave the scene no weight
you do need to assign this
base weight is the weight of the scene compared to other scenes, its probably fine leaving it as 0 since its the only scene, but just give it a 1 just incase
caps
Ok
What about here
that stuff should be fine probably
no
yes, the scene bundle is its own assetbundle
Wait
I am confused
For assetbundle directory
Where do I put it to
Just
Where both of the assetbundles registered to
does this go in the definition assetbundle?
Also REMINDER
Like
Should only the definition go into the assetbundle?
Should both files be .duskmod?
Also
How do I prevent duplication of files?
Cuz all round the whole file is 110 MB
I havernt even added deco yet
[Error : Unity Log] InvalidOperationException: This method cannot be used on a streamed scene AssetBundle.
Stack trace:
UnityEngine.AssetBundle.LoadAllAssets (System.Type type) (at <60c13874e0e045b59e9d86f24a2d5c95>:0)
UnityEngine.AssetBundle.LoadAllAssets[T] () (at <60c13874e0e045b59e9d86f24a2d5c95>:0)
Dusk.AutoDuskModHandler.AutoRegisterMods () (at ./src/API/Auto/AutoDuskModHandler.cs:18)
Dusk.DuskPlugin.Awake () (at ./src/DuskPlugin.cs:42)
UnityEngine.GameObject:DMDUnityEngine.GameObject::AddComponent(GameObject, Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset:OnEnable()
This is what I get
@oak linden
content container and moddinfo should be .duskmod, the .duskmod file cannot be the same name as any other assetbundle, definitions/registrys go in assetbundles
You should have 3 assetbundles total
One for the selectablelevel and moon definition
One for the content container and mod information
And one for the scene
Only the content container and mod information bundle ends in .duskmod
And the content container only references the moon definition bundle
OH
Okay so how do I prevent the files from like duplicating textures?
Cause Mod definition references the scene which causes it to try and load the textures the other one is trying to load
Mod definition does not reference the scene directly
DawnLib's editor tools do a trick to make it not, if the scene is in your bundle along with the textures etc, you accidently bundled them together
Okay
Scene is Fluffyland no dusk
Content Container and Mod info is Fluffylandinfo
and Selectable Level and Mod Definition is Fluffylanddefinition
Did I do it right?
it might be easier for you to nuke your assetbundles and create them again rather than trying to narrow down what you messed up in terms of bundling something together by accident
I just did tho
Yeah this is right
The definition one is referencing files from the same as the scene

