#DawnLib [V80]

1 messages ยท Page 9 of 1

wind mist
#

Ah I see

oak linden
#

hmm

#

nvm

wind mist
#

I've run into a roadblock here, I run the code below to try and register an item to the shop, but it errors and breaks like the entire game whenever this gets run. The error seems to point at the terminal nodes being null? Even though I tried everything to make sure they weren't

TerminalNode infoTemp = ScriptableObject.CreateInstance<TerminalNode>();
TerminalNode requestTemp = ScriptableObject.CreateInstance<TerminalNode>();
TerminalNode receiptTemp = ScriptableObject.CreateInstance<TerminalNode>();
infoTemp.name = $"info_{uuid}";
infoTemp.displayText = "This is probably an item.";
requestTemp.name = $"request_{uuid}";
requestTemp.displayText = "You are trying to buy an item.";
requestTemp.itemCost = 15;
receiptTemp.name = $"receipt_{uuid}";
receiptTemp.displayText = "You bought an item!";
receiptTemp.itemCost = 15;

DawnPurchaseInfo purchaseNew =  new DawnPurchaseInfo(new SimpleProvider<int>(15), ITerminalPurchasePredicate.AlwaysSuccess());
dawnItem.ShopInfo = new DawnShopItemInfo(purchaseNew, infoTemp, requestTemp, receiptTemp);
shopInfo = dawnItem.ShopInfo;
infoNode = shopInfo.InfoNode;
requestNode = shopInfo.RequestNode;
receiptNode = shopInfo.ReceiptNode;
purchaseInfo = shopInfo.DawnPurchaseInfo;

ItemRegistrationHandler.TryRegisterItemIntoShop(itemObj);
#

Line 778 for Lunar is the very last one in the code I sent where I run TryRegisterItem... btw

meager inlet
#

my guess is that it's a string

wind mist
#

Is it?

oak linden
#

line 91 in itemregistrationhandler is where stuff is errorin

wind mist
#

This be 91

oak linden
#

the one under it :p but yeah

wind mist
#

Idk what selected it, was just showing the area lol

oak linden
#

honestly

#

in the shop info you made

#

oh actually yeah this is obvious

#

its parentinfo

#

cuz you're creating after when i create, the constructor for the parent doesnt run

#

or well it does, but yeah you just gotta do shopInfo.ParentInfo = whatever it is

#

DawnItemInfo of the brush

wind mist
#

Ah ok

#

It work

oak linden
#

nice

#

im glad it works

wind mist
#

My code for disabling stuff also worked out using the predicate ๐Ÿ‘

#

Thanks for the help

oak linden
#

:p nice

oak linden
#

i had to do extra stuff every lobby reload to ensure shop items still workin

white finch
#

For the Terminal instance is destroyed greed

oak linden
#

i specifically only need to refill the buyable items list

#

because that is a not an SO

white finch
#

Story logs for instance

#

Ememy sigurd entries

oak linden
#

TerminalKeywords, TerminalNodes, that whole shebang, dont gotta restore/remake anything for em

oak linden
white finch
#

Ye those persist

oak linden
#

just so i dont forget i do this lol

white finch
#

Lol

meager inlet
sly marsh
#

Oh yeah @oak linden I should let you know, Raphtalia's old YourOwnPersonalBoombox mod reports it won't be saved to the file cus of DawnLib, and it's a shame cus I wanna bring back @rustic turret's Christmas Radio mod

#

Idk if you wanna pester Raph about it or see if there's a way for it to save to the file from your end of things

meager inlet
sly marsh
# meager inlet

Still informing Xu cus iirc Raph said at one point they didn't plan to update it any further, so it's better to ask Xu how they wanna handle it

#

I don't really wanna pester them unless it's necessary

#

lol

oak linden
#

yeah it means they're like probably registering the item exceedingly late, and knowing alice, im not surprised lmao

weary imp
# meager inlet

Its not a DawnLib item, I've mentioned this specific error to Xu tho and my concern about it as 2 vanilla items (StickyNote and Clipboard) also showed this error. This needs to be fixed on Xu's side imo.

rustic turret
#

Hi yeah so, please find a solution, I have an update to make for it perceive

rustic turret
#

Just tested the mod without dawnlib and it works fine

spiral axle
wind mist
#

How do I get the TerminalKeyword object that points to the nodes I want to change though?

hollow viper
oak linden
#

It happens with 2 vanilla items that are scene placed so it doesn't matter for them because the game spawns them regardless of save file everytime

weary imp
oak linden
#

On the outside yeah

#

As an example, raph's enemies, maid and knight, used to get created when the round started, so there wasnt a possible way for anyone to know about them and trying to grab them then would've been too late

#

I'll talk to Raph when they're not busy and see why that's being done

oak linden
#

hotloading interiors is basically done and ready for release

#

just gonna do the other parts of the update

rustic turret
#

@oak linden Can the redwood giant knock you out of the cruiser?

oak linden
#

uhh i dont actually know what the game would prioritise, there's a chance redwood would but i doubt it

oak linden
#

v0.5.0

  • Optimised the save system even more.
  • Interior hotloading is real.
  • Added more options for outside object conditions like ground tag, ship and entrance positions, AI node count, etc.
  • Added NamespacedKey smart matching, so you should be able to do stuff like oxyde without typing in code_rebirth:oxyde, needs more testing but should work.
#

to be clear, the interior hotloading still needs me to add compatibility with dungenplus, i dont believe it works with it (not tested it but idk probably doesnt off the bat)

#

and also only works on Dawn registered interiors (would be insanely difficult to try and do it for other interiors lol)

#

but it's super easy to register it, I'll be making documentation for it tomorrow but the simple explanation is that just like with moons, the DungeonFlow is now in its own AssetBundle, so interiors got split up into two assetbundles, the registration one and the dungeonflow with all its assets

#

tested it with @hollow viper's habitat and worked flawlessly, but there are possibilities i missed some stuff so if anyone uses it and notices anything broken do reach out

#

oh also while i tested this with LLL and some other mods, there's probably gonna be a mod being incompatible somewhere, so report that too

carmine elk
#

Definitely looking forward to testing it out sometime! Will be super nice if it works

#

Hey, idk if you've seen it, but I'm pretty sure people before have had issues with audio reverb triggers in custom interiors for some reason getting their settings applied in the ship. Was something I wanted to try to get around (like having JLL or something spawn them in post-generation) but never did. Do you happen to know if this issue is something DawnLib interiors would still have? Like, I don't know why they would, but I also don't know why LLL ones did. I don't think anyone ever figured out where that issue came from.

oak linden
#

if it's replicated again on a DawnLib interior im more than down to get to the bottom of it, but just off rip this issue was so long ago i dont remember to be honest

#

contentcontainer and modinformation in a bundle called habitatmod.duskmod
habitatdungeondefinition in a bundle called habitatdefinitionassets
habitatdungeonflow in a bundle called habitatassets

build em all in an assetbundles or whatever folder and have them get picked up by the ModInformation's builder and that's it

#

opened unity rq to show how it would look like registering the interior

#

just incase this is how each SO looked like on the inside as well

#

imma go sleep now

cerulean gale
#

If im correct there isnt any dawn interiors atm?

sacred tulip
#

not yet

#

only moons hehe

meager inlet
#

@oak linden depends on how Zeekerss has handled it for the upcoming grass but for my standalone project I made a cool tiny system for drawinstanced meshes that might be cool as a feature in a lethal api. happy to show you for reference

oak linden
#

would love to see it, and yeah honestly depending on how zeekerss did it, people might just be able to use what he did or people are ognna have to rely on dawnlib or an external source

meager inlet
#

i mean considering no mod is currently doing it i think relying on dawnlib is probably fine

oak linden
#

probably, dawnlib has a few other kind of utilities like it around

meager inlet
#

in my project each type of content handles their own spawning so my ScriptableDetail just sends it's spawn info to this instead of actually spawning a prefab, for LC you'd probably wanna hijack the outside object spawn system so stuff that's meant to be a detail gets sent to something like this instead of actually being spawned

oak linden
#

mm that makes sense to me

oak linden
#

next update changes the saving format to be a lot more compact, faster to load and faster to save
but it might be incompatible with already existing saves so keep that in mind

sly marsh
#

I will just simply not update it then

#

Unless we wipe in our next session ig

#

LMAO

oak linden
#

ye, either that or disable saving system until your next run

sly marsh
#

Turns out the current update wiped out all the items I had in my save file from yesterday so I have to restart next play session anyways

#

๐Ÿ˜‚

oak linden
#

lol, whoopsie

sly marsh
oak linden
#

v0.5.1

  • Optimised saving system a lot more, it should be a lot faster.
  • If you have a current ongoing save, disable the saving system so it does not delete every item and unlockable in that save, then re-enable it when you make a new save.
  • Made editor experience cleaner again
oak linden
#

also to be clear, i decided to revert the saving system change and pushed 0.5.2 with it reverted, ill make a migrator first so people dont lose what they have on their save files

charred field
#

Oh that's neat

#

What's a migrator?

oak linden
#

code that migrates the old save file format to the new one

white finch
charred field
charred field
white finch
charred widget
#

after update, black mesa is died

#

Dawn.DungeonRegistrationHandler ?

oak linden
#

huh, ill look into it

#

send full logs though

charred widget
charred widget
#

it broke

#

all

oak linden
#

wha i just tested that, ill check the logs rq...

charred widget
#

0.4.12 is fine

oak linden
#

can you send your modpack, i have no idea how this is happening

charred widget
oak linden
#

uh i need a code to import

charred widget
#

i dont use mod manager

#

i use my manual install bat

#

LCMI

oak linden
#

I'm sorry but I can't really help without being able to reproduce this with a modmanager on my end

charred widget
#

LCMI's code : 019ad6e3-dbe7-8a45-c216-ba884c0b08ab

#

i send you my LCMI

spiral axle
#

what is lcmi

charred widget
#

personal manual mod installer

spiral axle
#

oh

charred widget
#

for korean

woven island
#

oh god

spiral axle
#

good luck then

charred widget
oak linden
#

for the sake of my own online safety i cant i'm sorry ๐Ÿ˜ญ, ill try to reproduce on a pack with wesleys interiors and see

woven island
#

why is the powershell script in that obfuscated

charred widget
spiral axle
#

why not use gale or something

charred widget
#

Because it's for personal use. I never intended to share it here.

#

If you wish, I will share the original code.

oak linden
#

i reproduced the error, ill release a fix soon

charred widget
#

thanks

oak linden
#

Released the update, should fix your issues

charred widget
oak linden
#

nice

wind mist
#

Is this still a thing?

oak linden
#

ill send a screenshot cuz its been slightly changed

wind mist
#

Resurfacing it 2 months later since I'm finally actually there

oak linden
#

I might've forgotten to get a screenshot

#

But the parameters were changed to be a custom serializable class

#

Though you can still go from string to that custom class

#

If you look at something like DuskItemDefinition class, I use a static method to go from string to a list of that custom class to give to SpawnWeightsPreset

wind mist
#

I'm not able to get "SpawnWeightsPreset" in my IDE, is it possible that I need to import a different nuget thing to get Dusk stuff?

#

This is just the one I have now <PackageReference Include="TeamXiaolan.DawnLib" Version="0.5.1" PrivateAssets="all" Publicize="true" />

oak linden
wind mist
#

Same version number?

oak linden
#

ye

#

doesnt really matter just gotta be after 0.5.3 for spawnweightspreset stuff

wind mist
#

I thought there was only 0.5.1

oak linden
#

current latest is 0.5.3

#

i had to do a couple updates from 0.5.1 to fix stuff

#

but now that we're back at status quo i have no idea what i wanna do with dawnlib from here, it's kind of almost complete in terms of registration

#

i could do stuff to try and make it even easier for people but i need feedback from here

wind mist
#

Well thanks!

sly marsh
#

So is the new saving system in place or no?

#

๐Ÿค”

oak linden
#

should be

sly marsh
#

Got ya

wind mist
#

It did not like Dusk

oak linden
#

oh right

#

DuskMod

wind mist
#

Thanks!

#

Will the string work if it's using the Dawn id of a moon (without the mod id)?

#

Is that one of the things it checks for

oak linden
#

gimme an example

wind mist
#

Like "asteroidonethree:14" for asteroid-13 as that's what it's ID is

sly marsh
#

๐Ÿ˜ญ

wind mist
#

asteroid - 1 3
asteroid (no dash ig) one three
asteroidonethree

#

Is my guess

sly marsh
#

Ye it's just funny cus you would think it would do asteroidthirteen lol, but it goes asteroidonethree

oak linden
wind mist
#

Just like the weight of whatever item I'm doing it for

oak linden
oak linden
sly marsh
#

Very fair

oak linden
#

it is preferred though cuz it avoids searching every namespacedkey for the correct one

wind mist
#

Oh it should be with an = ?

oak linden
#

ye, the : is for the magicwesleysmod:asteroidonethree

sly marsh
#

Yeah for DawnLib it's =+ instead of : for weight related stuff

wind mist
#

Ah I see

sly marsh
oak linden
#

hazards were indeed switched

sly marsh
#

Ahh

#

I'm not too sure exactly what changed, I was just looking at the CR Config to see what might have changed lol

oak linden
#

oh, right yeah there's no =+, but they do require magicwesleysmod:trite for example rather than just trite

#

Oxyde by itself wont work

sly marsh
#

@gleaming bramble You and Xu might need to figure this out

#

Lmao

gleaming bramble
#

erm

sly marsh
# gleaming bramble erm

I'm just as confused, idek what changed with DawnLib that caused it to break based on the changelogs

#

LOL

alpine mica
gleaming bramble
#

maybe it's passing an enemy name that has special characters

sly marsh
#

Oh maybe

gleaming bramble
#

wait

#

no yea that might be it

#

because infest rework just uses the enemy name as the key for configs

sly marsh
#

Ah well hopefully it's an easy fix then

gleaming bramble
#

what modded enemies do you have

sly marsh
#

Well if it's failing to register things from DawnLib's end it's prolly something with CodeRebirth or the Shockwave Drone

gleaming bramble
#

ic

#

if i sanitize the enemy name strings it should work again

oak linden
sly marsh
#

Actually maybe The Doctor is doing it?

#

I did just lowkey throw that in this morning but I never got an error

oak linden
#

did maku make infestation rework

gleaming bramble
#

yea

oak linden
#

ye then you gotta sanitise the names

#

bepinex auto sanitises i think but lethal performance errors if you dont

#

could be wrong about the order of that but i know lethal performance doesnt like it

sly marsh
#

It was indeed from The Doctor

#

Why it only started erroring after DawnLib updated is just a funni

oak linden
#

it's infestation rework, not the doctor greed

sly marsh
#

Lmao

oak linden
#

it didnt only start from dawnlib update smh

sly marsh
#

Ye

#

Well on my end it did, but just coincidence

gleaming bramble
sly marsh
#

not your fault at all

gleaming bramble
#

i can push an update in a bit

sly marsh
#

Neat yoiled

thorn abyss
#

What happened?

sly marsh
#

Just was an oversight with Infestation Rework

wind mist
#

So, I got here, but I'm not sure how to actually use the SpawnWeightsPreset with the WeightTableBuilder

SpawnWeightsPreset weights = new();

List<NamespacedConfigWeight> Moons = NamespacedConfigWeight.ConvertManyFromString(ComprehendWeights(itemWeightString[item.Key.ToString()]));

weights.SetupSpawnWeightsPreset(Moons, new List<NamespacedConfigWeight>(), new List<NamespacedConfigWeight>());
#

@oak linden

oak linden
wind mist
#

Set it as a weight?

oak linden
#

weightBuilder.SetGlobalWeight(SpawnWeights) doesn't work for you?

wind mist
#

It does, just didn't know to do that sorry

#

So what does the minimumAINodeSpawnRequirement do on map objects?

oak linden
#

Nodes

wind mist
#

Ok I actually have something to say

oak linden
wind mist
#

In my attempt to modify object curves this happens when I try and land on a moon

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
(wrapper dynamic-method) RoundManager.DMD<RoundManager::SpawnMapObjects>(RoundManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<RoundManager::SpawnMapObjects>?1571642286(RoundManager)
LethalLib.Modules.MapObjects.RoundManager_SpawnMapObjects (On.RoundManager+orig_SpawnMapObjects orig, RoundManager self) (at ./Modules/MapObjects.cs:39)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<RoundManager::SpawnMapObjects>?613511796(RoundManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<RoundManager::SpawnMapObjects>?1182493470(RoundManager)
Dawn.MapObjectRegistrationHandler.UpdateMapObjectSpawnWeights (On.RoundManager+orig_SpawnMapObjects orig, RoundManager self) (at ./src/API/MapObjects/.MapObjectRegistrationHandler.cs:305)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<RoundManager::SpawnMapObjects>?555732596(RoundManager)
RoundManager.GeneratedFloorPostProcessing () (at <83220f1fc337491eba19b3618ec61339>:IL_000F)
RoundManager+<LoadNewLevelWait>d__133.MoveNext () (at <83220f1fc337491eba19b3618ec61339>:IL_030D)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <c39a522eee05469b8171a6cfeb646c59>:IL_0026)

Then the game stays stuck on the seed screen so something I am trying to do goes horribly wrong (like usual)

#

I could send my whole code but I think it may burn the eyes of people with average and above competency

oak linden
#

lethallib? that's an odd error lol

#

did yoou produce this error with bepinex monomod debug patcher installed

wind mist
#

Uhh

#

I don't think so?

oak linden
#

then do dat

wind mist
#

But possibly? How might one know

oak linden
#

its a mod

wind mist
#

Alr just a min

#
[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
RoundManager.SpawnMapObjects () (at <83220f1fc337491eba19b3618ec61339>:IL_009C)
DMD<>?1440997960.Trampoline<RoundManager::SpawnMapObjects>?-1827691848 (RoundManager ) (at <996e265928bf46d48e142fcf13b8bb60>:IL_0025)
LethalLib.Modules.MapObjects.RoundManager_SpawnMapObjects (On.RoundManager+orig_SpawnMapObjects orig, RoundManager self) (at ./Modules/MapObjects.cs:39)
DMD<>?301230270.Hook<RoundManager::SpawnMapObjects>?-1034840384 (RoundManager ) (at <fcc7bf8509e44a20aa2112dd2c174db2>:IL_000F)
DMD<>?-1719284810.Trampoline<RoundManager::SpawnMapObjects>?-1771291302 (RoundManager ) (at <970d7431190649a8b813698dfdf5952c>:IL_0025)
Dawn.MapObjectRegistrationHandler.UpdateMapObjectSpawnWeights (On.RoundManager+orig_SpawnMapObjects orig, RoundManager self) (at ./src/API/MapObjects/.MapObjectRegistrationHandler.cs:305)
DMD<>?1301963028.Hook<RoundManager::SpawnMapObjects>?1209349996 (RoundManager ) (at <d130393d61254c96bf5be647f3a5f15e>:IL_000F)
RoundManager.GeneratedFloorPostProcessing () (at <83220f1fc337491eba19b3618ec61339>:IL_000F)
RoundManager+<LoadNewLevelWait>d__133.MoveNext () (at <83220f1fc337491eba19b3618ec61339>:IL_030D)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <c39a522eee05469b8171a6cfeb646c59>:IL_0026)
#

Is that what you wanted

#

Or something else

oak linden
#

si

sacred tulip
#

-# :3

oak linden
#

i was working on story logs but i can take a quick look

wind mist
#

The eternal quest of Dawnlib to replace every library in existence

sacred tulip
#

when will it replace LE!!

wind mist
#

LE the goat

oak linden
#

okay yeah i wanna see your code lol

#

did you like, delete the curve or smthn?

wind mist
#

Umm, maybe?

oak linden
wind mist
#

Since it is like 1000+ lines long (I didn't mean to but my entire mod is in like one class I'm sorry) and this involves several parts of it

oak linden
#

you should be sorry

#

try what i sent and let me know first

wind mist
#

I know

#

I might fix it one day

#

Ok it worked

#

But nothing I try to change works

#

So I think I'm just messing something up horribly

#

I'll look into it tomorrow but I'll push what I have to my github if you're curious

oak linden
#

to be clear, the smart matching in the current version on thunderstore doesnt work

#

but the zip i sent does have it working

#

so if you think that might be causing your issues then yeah

wind mist
white finch
oak linden
#

maybe when im free next lol

wind mist
#

Yeah I don't expect you to, I'll take a look myself tomorrow

oak linden
#

currently your issue is that your SpawnWeights doesnt seem to have weights defined for whatever levels you're testing at

#

i just made sure that if a level has no weights at all it defaults to a weight of 0 on that level and that fixed your error

wind mist
#

Yeah pretty much just with that update you sent, I can load in just fine and all my other stuff works but my curves I set have no effect

#

MapObject curves

#

Specifically

wind mist
#

(It's like 1000 lines of comments from before the DawnLib update but it's still funny)

oak linden
#

lol

sly marsh
wind mist
#

Hm, the issue is stranger now

#

I got inside curves to work, it was just a stupid thing on my side I forgot to do

#

But outside curves don't work, for any object, even though they're done the same way

#

No errors or anything

sly marsh
meager inlet
# wind mist

sorry for the unsolicited code advice but just a heads up that reversing a lot of these checks and using stuff like break, continue and return can reduce a ton of the nesting involved this this kinda logic. eg. that first if (configureMoons && moonsInitialized && mapObjectsInitialized && !mapObjectCurvesInitialized) could be instead like if (!configureMoons || !moonsInitalized || mapObjectsInitialized || mapObjectCurvesIntialized) return;

sly marsh
oak linden
#

Like I said, I'm not fixing her or reuploading her or anything

oak linden
#

I think I know what it is too

#

If you're able to, test your code on CR's crane

sly marsh
#

Sad, I wanted her for the Christmas Variant lol

wind mist
oak linden
#

sure

wind mist
#

What are tilesets and archetypes?

oak linden
#

tilesets define tiles that spawn

#

archetypes define like a set of tilesets in an area or whatever

wind mist
#

Interesting

#

Will there ever be a LethalContent.Vehicles :3

oak linden
#

but vanilla vehicle isn't in it and no one's really used it yet

wind mist
#

I see

#

Fair enough

#

How would I change cruiser price then?

#

Is it in unlockables?

wind mist
# oak linden If you're able to, test your code on CR's crane

Erm... I installed CR and the first object it goes through is EmergingCactus1 and when I try and get the value of their outside curve it just errors... this did not happen before I had CR:

[Error  :LunarConfig] LunarConfig encountered an issue while configuring code_rebirth:oxyde, please report this!
System.NullReferenceException: Object reference not set to an instance of an object
  at Dusk.MapObjectSpawnMechanics.CurveFunction (Dawn.DawnMoonInfo moonInfo) [0x00026] in ./src/API/Definitions/MapObjects/MapObjectSpawnMechanics.cs:38
  at Dusk.MapObjectSpawnMechanics.Provide (Dawn.DawnMoonInfo info) [0x00000] in ./src/API/Definitions/MapObjects/MapObjectSpawnMechanics.cs:99
  at Dawn.ProviderTable`2[T,TBase].GetFor (TBase info) [0x00016] in ./src/API/Weights/ProviderTable.cs:17
  at LunarConfig.Objects.Config.LunarCentral.InitMoons () [0x00908] in ./Objects/Config/LunarCentral.cs:1948

(This error is repeated for each moon)

oak linden
#

I'll take a looksie

oak linden
oak linden
wind mist
#

No idea if that's before or after roundmanager

oak linden
#

hmm that is odd, it is all being null checked

#

that... might honestly be before roundmanager

#

lmao

#

ill try to mess around with when the moons registry freezes

#

i might move it to a harmony prefix of startofround.start

gleaming bramble
#

the one that gives you the "confirm" screen and that actual buy node

oak linden
#

yea i did forgor to mention that but tis true^

#

ill find them in the code for ya rq

#

TerminalRefs.BuyKeyword.compatibleNouns.Where(x => x.noun.word == "cruiser"); gives you the CompatibleNoun which has the TN and TK

#

thats for the buynode one

#

and then for the confirm node one its:
cruiserBuyNode.TerminalOptions[0].result

wind mist
oak linden
#

lol, lemme run it and check what i messed up by moving the freeze then

wind mist
#

Only one of these that ends up running is InitDungeons

LethalContent.Items.OnFreeze += central.InitItems;
LethalContent.Enemies.OnFreeze += central.InitEnemies;
LethalContent.Dungeons.OnFreeze += central.InitDungeons;
LethalContent.Moons.OnFreeze += central.InitMoons;
LethalContent.MapObjects.OnFreeze += central.InitMapObjects;
oak linden
#

oh i think i know

#

i havent used harmony patches in a while

#

forgot to actgually make it patch

#

ill just test it rq too

#

i might've also fixed your issue with outside mapobjects

wind mist
#

I can't take this anymore ๐Ÿ˜ญ

oak linden
#

loooool

#

it also has story logs but i should realy bump the version

narrow zenith
#

...

wind mist
#

I guess the server does not like that curve

narrow zenith
#

its discrds own spam filter lol

wind mist
#

I'll just take a picture of it

narrow zenith
#

good fix

wind mist
#

Sorry about that

narrow zenith
#

its fine

alpine mica
oak linden
wind mist
#

Emerging Cactus 3 on Assurance

oak linden
#

oh

#

myb gang

#

that surprises me honestly

#

i dont remember doing that

#

it's probably the method of grabbing the curves' key and values that you're using

#

if you use ConfigManager.ParseString(curve); it should give you a cleaner format lol

obsidian marsh
#

let me pull up my code real quick

#

ignoring the prefab stuff as i replace the prefabs for my v55-cruiser ofc

wind mist
#

Well no errors show up but trying to land somewhere still freezes on the seed screen

#

I'm afraid I once again cannot be helpful for another 8 hours

wind mist
oak linden
oak linden
wind mist
#

If I send a code will it give you my dll?

oak linden
wind mist
#

Code and dll

oak linden
#

okie ill take a looksie in a bit

oak linden
#

okay finished implementing story logs, looking at it now

sacred tulip
#

๐Ÿ‘€

oak linden
oak linden
#

also this: editor before and after
will be writing a wiki page on how to achieve the base game look in editor, the credit goes to Scoops for basically all of it though

#

unity also has a neat trick so that this stuff can be automatically unincluded from your builds

oak linden
#

@warm bear figured out the issue you had, next update will fix this stuff not working lol

warm bear
#

peak

oak linden
#

v0.5.4

  • Added Storylog registration.
  • Added DawnStoryLogSpawner component to utils addcomponent menu.
  • Properly implemented smart matching.
  • Fixed an obsolete editor oopsie with interior and moon weights for entity replacements.
  • Fixed interior mapobjects blanks not being replaced.
  • Created StoryLogKeys for vanilla story logs.
  • Moved where most registries freeze to be after a harmony patch of startofround.start prefix for more compat with more mods that add items etc late.
  • Publicised a few internal methods.
  • Updated wiki to adding a new page on how to make the editor look more like base-game thanks to help by Scoops.
  • Fixed a bunch of issues relating to entity replacements not working properly in some edge cases.
sly marsh
oak linden
#

I'll add a null check later but should be good to figure out what mod that is

#

Also I can't test your modpack everytime I uodate, so maybe don't shit talk behind my back greed

sly marsh
# oak linden Also I can't test your modpack everytime I uodate, so maybe don't shit talk behi...

I didn't shit talk lol, I mentioned I hate that DawnLib breaks with every other update it gets but I also explicitly said I don't blame you for it happening cus I know there's a lot of edge case scenarios that can't be covered AlexHeart With such a large API like this it's understandable and fine I just get slightly frustrated cus the game doesn't explicitly tell me what's causing it to break, paco theorized CustomStoryLogs but it still happened with that off so I'll try doing a bit of digging ^^

#

I'm not gonna expect you to test for every single edge case scenario

#

It's a huge API

oak linden
#

I tested with stuff like Wesley's moons and coderebirth, so idk what it is from there

sly marsh
#

Ye

#

It might be smth using a LLL story log

sacred tulip
#

Wanted to joke but

#

Im better than that hehehe

oak linden
#

Sus

thorn abyss
sacred tulip
#

Wrong message muahahaha

sly marsh
#

It is not, whatever do be causing it is failing to log hmmmmm

#

@oak linden Good news, it's an interior mod time to isolate it

#

@quick anvil

#

What interiors do you have?

#

Cus you also had the same issue

quick anvil
#

uhhhh

sly marsh
#

I have a hunch it might be SDM for some reason

#

prolly the enemies

quick anvil
#

a "tiny itty bitty" content of interiors?

#

I don't have SDM

sly marsh
#

okay hmmm

#

Do you share any of these?

#

Wesley's are fine I had them on

#

testing with Generic's and ACF enabled

quick anvil
#

wesley's, ACF (now in DULL bundle), deepcore mines, sanctuary and playzone

sly marsh
#

these are fine

#

Let me test PlayZone

#

pacoito mentioned he was working on fixing smth

#

It might be PlayZone

oak linden
sly marsh
#

PlayZone

#

It's PlayZone

quick anvil
#

I have DULL bundle, ut99, unreal interiors, wesley's, zeranos mineshaft and mansion (I play solo there, so I dw about desyncs on zeranos lol), SCPFoundationDungeon, playzone, bozoros's facility, storage complex, sanctuary and castellum carnis

quick anvil
sly marsh
#

I turned on PlayZone and it reprod

oak linden
#

Lol I'll ask Paco about it later then

quick anvil
#

I'll keep dawnlib downgraded for now :3

sly marsh
#

I would just disable PlayZone for now, pacoito's been working on an update to fix some enemy pathing issues anyways amongst a few other bugs

quick anvil
#

I use it only on trite, bozoros and filitrios anyway so uhhh... maybe I disable it too then

#

-# don't ask why I have it standalone

sly marsh
#

Lone Listener the Kuba and we will let you out

quick anvil
#

no, cuz tbf I have a subtle hateful sentiment to this moon

#

I randomize the moon
it routes me to tr*te
I cry, snot and vomit

#

-# unless playzone triggers there

frozen widget
#

the famous trite moon made by @tawny hull

tawny hull
#

unfortunately i did not make trite

#

closest thing was a mod that makes every other moon that isn't trite trite

floral helm
frozen widget
#

you did tho

tawny hull
#

triteplus

#

not trite

frozen widget
#

nah nah nah

#

you made trite by magic_wesley

tawny hull
#

and even then i kinda got carried by jacob in the process of making it

tawny hull
hollow viper
#

mu stop making twink accounts on thunderstore and upload mods

floral helm
#

Mugic Wesley

tawny hull
hollow viper
#

freaky mu

tawny hull
#

You're the one who said twink accounts

#

what are these accusations i only have the one thunderstore account

hollow viper
tawny hull
#

My brother in christ i was repeating what you said

tawny hull
#

freaky fumo

hollow viper
#

what you have against freaks

tawny hull
#

Absolutely nothing

#

You just called me a freak like the hypocrite you are

hollow viper
#

yes and

tawny hull
#

why did you say twink accounts instead of just alts

#

genuine question

hollow viper
oak linden
#

mu assumign she knows the entire dictionary ๐Ÿ˜”

agile sky
#

Holy hell

tawny hull
#

I've legit never heard the term twink to refer to alts before

#

Smurf sure but never twink

alpine mica
#

Out of interest, are the item tags (conductive, consumable, harmful, heavy_weight, high_value, etc.) used for anything?
Also in the configs, if an item/enemy is configured to use multiple content tags, which one is used if a moon matches more than one of those tags? The highest? First in the list? Both? (e.g. tundra=+10, military=+15 on a moon tagged as tundra and military)

oak linden
#

second question, it takes the average of the tags

#

so 10 + 15 / 2

alpine mica
#

Ah, cool

upper lantern
#

@oak linden
after the newest update this flag upon loading up a save (new save too)

[20:58:25.1260138] [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
CodeRebirth.src.Patches.PlayerControllerBPatch.PlayerControllerB_Jump_performed (On.GameNetcodeStuff.PlayerControllerB+orig_Jump_performed orig, GameNetcodeStuff.PlayerControllerB self, UnityEngine.InputSystem.InputAction+CallbackContext context) (at ./src/Patches/PlayerControllerBPatch.cs:159)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<GameNetcodeStuff.PlayerControllerB::Jump_performed>?806832624(GameNetcodeStuff.PlayerControllerB,UnityEngine.InputSystem.InputAction/CallbackContext)
UnityEngine.InputSystem.Utilities.DelegateHelpers.InvokeCallbacksSafe[TValue] (UnityEngine.InputSystem.Utilities.CallbackArray1[System.Action1[TValue]]& callbacks, TValue argument, System.String callbackName, System.Object context) (at <7d67996a352a4f4fa0df2b7c9570fda6>:IL_001B)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)

[20:58:25.1260138] [Error : Unity Log] NullReferenceException while executing 'performed' callbacks of 'Movement/Jump[/Keyboard/space]'

oak linden
#

newest update shouldnt be out on gale or thunderstore yet

#

but yeah that issue is probably fixed by the one im releasing

upper lantern
oak linden
#

are you sure you got 0.5.7?

upper lantern
#

No I'm on .5.6 it just popped up for download

oak linden
#

0.5.7 is the latest

upper lantern
#

Ah You pushed another never mind then lol. Figured i'd report it since it just popped up for me. I'll check back later after 5.7 drops.

wind mist
#

W- Why? (Oxyde)

wind mist
# oak linden wut

It didn't error for me, but I know what that happened, it's cause I messed up the config files on that profile, anyway here's the new code, same .dll and I tried it with the newest version of DawnLib but I didn't expect that to fix it (and it didn't).
019af638-1670-1c1c-dbbc-05588c4eb633

oak linden
wind mist
#

Idk, that's just what it is

wind mist
oak linden
oak linden
oak linden
# wind mist It does

is there anything else you know for me to try and focus on an exact thing or nah

wind mist
#

What would help?

oak linden
wind mist
#

I'm really just overwriting and/or creating new Inside/Outside infos for map objects

#

And their curve pools

oak linden
oak linden
#

nvm, the error was coming from me disabling wesleys moons

#

bleh this is such an annoying profile to test lol

oak linden
wind mist
#

Map object curves only get touched if you have both moon and map object configs on

oak linden
#

ah ic

wind mist
#

So that's probably why it gets fixed

oak linden
#

okay i have literally no idea what it is

#

i have a really strong suspicioun its smthn you're doing

#

like a patch where you're not letting the game run

wind mist
#

I don't patch anything to do with curves is the issue

#

In fact this is all the patching I do

[HarmonyPatch(typeof(StartOfRound), "SetTimeAndPlanetToSavedSettings")]
[HarmonyPriority(-2000)]
[HarmonyPrefix]
private static void challengePrefix()
{
    try
    {
        foreach (var (moon, setting) in LunarCentral.definedChallengeMoons)
        {
            moon.planetHasTime = setting;
        }
    }
    catch (Exception e)
    {
        MiniLogger.LogError($"An error occured while setting challenge moons, please report this!{e}");
    }
}

[HarmonyPatch(typeof(StartOfRound), "SetTimeAndPlanetToSavedSettings")]
[HarmonyPriority(-2000)]
[HarmonyPostfix]
private static void challengePostfix()
{
    try
    {
        foreach (var (moon, setting) in LunarCentral.definedChallengeMoonTimes)
        {
            moon.planetHasTime = setting;
        }
    }
    catch (Exception e)
    {
        MiniLogger.LogError($"An error occured while setting challenge moons, please report this!{e}");
    }
}
#

And this has been in the mod for quite some time

#

Something I'm doing in this method breaks things, since I commented everything inside of it, built it, and was able to land on a moon

#

I'm gonna push my stuff to github if you want to look at the whole class

#

I mean I could send it here but I feel like github is better

#

What I think is happening at least, something in that method I am doing in a very wrong way, then DawnLib just takes it and makes map objects out of that wrongly done stuff, then it corrupts the landing somehow

oak linden
loud mortar
#

I'm running into an issue where my mod uses LLL to hide/unhide moons, but those changes don't show up in the terminal if I have DawnLib enabled and the moons are from vanilla. Custom moons hide/unhide correctly. Even when I remove my mod and use UnityExplorer to manually toggle IsRouteHidden, the same thing happens.

oak linden
oak linden
#

making story log registration has made me hate customstorylogs

#

cuz tell me why every story log is added from the start internally but with no names until you unlock them

#

StoryLog there's supposed to be a name after this

#

though for some reason cunningham log 4 is already registered

#

v0.5.8

  • Fixed vanilla story logs not being registered because zeekerss never actually made prefabs for them.
  • Added a config to give LLL control over vanilla moon visibility whether they're locked or hidden, defaulted to false.
  • Made it cleaner to add storylogs' text.
oak linden
wind mist
#

Ok, @oak linden, here's what I've found with my testing:

So in that method I have, Lunar does a bunch of it's own processing, and it only interacts with the map objects in two ways:

  • It adds the LunarConfig tag
  • It sets the curve table on the object (it will make a new Inside/OutsideInfo if the object does not have one)

Among Lunar's processing it does these things:

  • Gets the curves from configured moons
  • Gets the curves from moons that aren't configured
  • Compile them into a curve table

Disabling (commenting) the following INDIVIDUALLY does not change the outcome:

  • It adds the LunarConfig tag
  • It sets the curve table on the object
  • It will make a new Inside/OutsideInfo if the object does not have one
  • Gets the curves from configured moons
  • Gets the curves from moons that aren't configured

The issue also does not seem to be only inside or only outside objects, it applies to both

HOWEVER, if I comment BOTH of Lunar's interactions with DawnLib, it fixes the issue, when commenting them individually did not (these ones):

  • It adds the LunarConfig tag
  • It sets the curve table on the object (it will make a new Inside/OutsideInfo if the object does not have one)
#

Here are the actual lines where I do these:
if (!dawnObj.HasTag(DawnLibTags.LunarConfig)) { dawnObj.Internal_AddTag(DawnLibTags.LunarConfig); }

For outside objects:

if (dawnCurveInfo != null)
{
    dawnCurveInfo.SpawnWeights = newTable;
}
else
{
    dawnObj.OutsideInfo = new DawnOutsideMapObjectInfo(newTable, false, 12, Array.Empty<string>(), Vector3.zero, false, 0);
}

For inside objects:

if (dawnCurveInfo != null)
{
    dawnCurveInfo.SpawnWeights = newTable;
}
else
{
    dawnObj.InsideInfo = new DawnInsideMapObjectInfo(newTable, false, false, false, false, false, false);
}
oak linden
#

can you try doing no changes to vanilla content and only stuff like CR hazards?

wind mist
#

I haven't done it yet, but it's not just an issue with CR, having CR just makes it worse, but it still didn't work before

#

I'll test in a lil

oak linden
#

im also gonna guess doing any changes to inside hazards is fine

#

but not for outside hazards

wind mist
#

Nevermind, just tested by disabling CR and it still doesn't want to load a moon

wind mist
#

At first, I was able to change inside objects, outside did not do anything, then you changed something in DawnLib and I updated it, now it refuses to let me touch either as the moon fails to load

oak linden
#

hmm, do you know what update it was that caused it?

wind mist
#

You could probably scroll up here and find when I first brought up this issue

#

I'm gonna try and ignore vanilla objects now

oak linden
#

yeah, dont even give em the lunarconfig tag

wind mist
#

Still that's really weird, that just giving the tag, but not changing the table still causes the issue

#

But not doing either will let the ship land

oak linden
#

im surprised changing the table without the tag would break it though, it shouldnt let you get that far without the tag

wind mist
#

That... is stranger (at least to me):
So ignoring the ones that have a uuid starting with 'lethal_company' will let the ship land, my curves still don't work (on CR objects), but it doesn't prevent landing

oak linden
#

hmm okay i wanna try and solve the issue of your curves not working on CR objects first

#

and then work from there

#

cuz you replacing the curves should just work no matter when you do it

wind mist
#

Hold on let me test something rq

#

So

#

It does not work for metal crates (outside), but it will work for flash turrets (inside)

oak linden
#

hmm okay ill take a look at that, can i see your code for replacing an outside curve like the metal crate?

wind mist
#

So pretty much, outside object curves never work, and if I even dare touch anything to do with a vanilla related object it freezes the game

#

That's the whole outside section

oak linden
#

also to check for if something is vanilla you can do .Key.IsVanilla() lol

#

hmm, when are you replacing the outside objects' curves

wind mist
#
// SET WEIGHTS
if (dawnCurveInfo != null)
{
    dawnCurveInfo.SpawnWeights = newTable;
}
else
{
    dawnObj.OutsideInfo = new DawnOutsideMapObjectInfo(newTable, false, 12, Array.Empty<string>(), Vector3.zero, false, 0);
}
oak linden
#

no like, when are you doing it in terms of the game

wind mist
#

Either when mapObjects freezes or moons freezes, whichever one runs last

oak linden
#

hmm okay

#

the code for outside DawnLib objects is just this

#

it grabs the outsideInfo's spawn weights

#

so editing the SpawnWeights should just be fine

#

i have no idea why it wouldnt work for you sorry

stable hearth
#

@oak linden dawnlib doesn't register the ACF site interior by demonmae

#

installed it and it wouldn't show up on the debug list

#

no name

oak linden
#

Also send a thunderstore link, I'll take a look

stable hearth
#

the thing that gives you the names

#

ive been using it to edit coderebirth spawns

quiet comet
#

If this is a weird niche problem on my end lmk

oak linden
#

It's probably a me problem but I'll let u know

loud mortar
oak linden
#

weird lol

oak linden
#

lmao

#

i see it too

stable hearth
#

guess ill try again

oak linden
#

lol yeah acf does stand for somethin

quiet comet
#

Contaiment ๐Ÿ’€

white finch
#

Lmao

cerulean gale
oak linden
#

ill wait for the next lethal update before i do anything like that, as it allows multiple interiors to be merged and created from what i know

#

but do put it on the github

cerulean gale
#

that sounds crazy

oak linden
#

it was thanks to batby for pushing zeekerss to update dungen so thats nice

dense iron
frozen widget
# oak linden ty

Hey xu, you were right, i did manage to make my custom unlockable item work

#

(shouldn't have replied to a random message but yeh)

oak linden
#

lol its alright

frozen widget
#

Also uh, small issue

#

When the store shows the price for the custom suits i registered on dawnlib

#

The price shows a negative number that's extremely low

#

But when you try and buy it, it shows the normal price

#

Only an issue with the suits, and not the unlockable item

#

Though i don't know whether it's a dawnlib issue or terminal formatter, since i was using terminal formatter when this happened

carmine elk
#

Sounds like an overflow or something. Iโ€™d test the two mods individually

oak linden
#

test individually but it could just be me accidently adding a - in the purchase tab

frozen widget
#

I'll test it out when i can, and i'll report on it

oak linden
#

v0.5.9

  • Added compatibility with LLL clamping.
  • Added interior clamping.
  • Added a null check in the map objects.
  • Fixed a small issue with smart matching not always working.
  • Fixed an issue where a config with no additive or substractive weights would work
wind mist
# oak linden i have no idea why it wouldnt work for you sorry

Ok I was being very stupid and wrote something that made all of that not work properly, so here's the real results:

When completely ignoring any vanilla objects, and trying to modify both inside and outside ones, the game freezes, but if I only try and modify inside ones, it works, and my changes go through (I tested on flash turret specifically).

#

The thing I did wrong was put return where I should have had continue.... yeah I'm not proud of it

#

Ok something actually new, just adding the LunarConfig tag and not changing the curves at all will not cause a freeze

#

So adding LunarConfig tag is no longer enough to freeze the game

#

You have to change curves

#

Is there nothing I can do to give you more insight at what part of loading a level is failing? Would a log help?

oak linden
wind mist
#

It ends up editing every CR map objects because that's just how my mod works, but I'm trying to make the safe spawn in a lot outside specifically. Here's the code for the outside objects part and the dll, they haven't changed aside from fixing my mistake:

#
foreach (var obj in LethalContent.MapObjects)
{
    string uuid = UUIDify(obj.Key.ToString());
    if (uuid.StartsWith("lethal_company")) { continue; }

    try
    {
        DawnMapObjectInfo dawnObj = obj.Value;
        DawnOutsideMapObjectInfo dawnCurveInfo = null;

        if (dawnObj.OutsideInfo != null)
        {
            dawnCurveInfo = dawnObj.OutsideInfo;

            string key = obj.Key.ToString();

            foreach (var moon in notConfiguredOutsideMapObjectMoons)
            {
                AnimationCurve? rarity = dawnCurveInfo.SpawnWeights.GetFor(moon);
                if (rarity != null) { TrySetOutsideCurve(key, (AnimationCurve)rarity, moon.TypedKey); }
            }
        }

        if (!dawnObj.HasTag(DawnLibTags.LunarConfig)) { dawnObj.Internal_AddTag(DawnLibTags.LunarConfig); }

        CurveTableBuilder<DawnMoonInfo> curveBuilder = new();

        if (defaultOutsideMapObjectCurves.TryGetValue(uuid, out Dictionary<NamespacedKey<DawnMoonInfo>, AnimationCurve> moonVars))
        {
            foreach (var moon in moonVars)
            {
                curveBuilder.AddCurve(moon.Key, moon.Value);
                MiniLogger.LogInfo($"{uuid} - {moon.Key.Key} curve set to {CurveToString(moon.Value)}");
            }
        }

        ProviderTable<AnimationCurve?, DawnMoonInfo> newTable = curveBuilder.Build();

        // SET WEIGHTS
        if (dawnCurveInfo != null)
        {
            dawnCurveInfo.SpawnWeights = newTable;
        }
        else
        {
            dawnObj.OutsideInfo = new DawnOutsideMapObjectInfo(newTable, false, 12, Array.Empty<string>(), Vector3.zero, false, 0);
        }
    }
    catch (Exception e)
    {
        MiniLogger.LogError($"LunarConfig encountered an issue while configuring weights for {uuid}, please report this!\n{e}");
    }
}
#

If you need it, here's the safe curve ig, the rest of them are their defaults: 0,30 ; 1,40

oak linden
#

Okay so

#

If you only give the tag

#

It's fine

#

But as soon as you try to modify the outside CR hazard, it breaks?

wind mist
#

Yes, even without the tag

#

No error, no nothing, it just freezes on the seed screen like the game was taking 8 hours to load the moon

oak linden
#

Okay, this should help, are you modifying the cr metal crate in code or config?

#

I just wanna be able to turn on and off the editing to make sure I can test it working and not working

wind mist
#

Do you mean CR's config? I'm not touching that at all

#

I'm trying to do it with Lunar's config

oak linden
#

I do mean with lunars config

wind mist
#

I am doing it there

oak linden
#

And when that value is at its default it's okay?

wind mist
#

I technically haven't tried, but probably not

oak linden
#

Oh, I thought that's what you meant when you said that when you don't edit it it's fine, hmm

wind mist
#

Oh sorry, by that I meant I was just not editing it in the code (commenting the lines)

#

Oops

oak linden
#

Lol, which code specifically do you comment? Cuz you said you're still giving em the tag

wind mist
#

The ones with the red arrow, those are where I actually apply the curves I made, the one with the green is where I add the tag

#

Commenting the ones pointed to in red will fix the issue (but obviously not apply anything I'm trying to do)

meager inlet
#

not to derail but just random observation,

  AnimationCurve? rarity = dawnCurveInfo.SpawnWeights.GetFor(moon);
  if (rarity != null) { TrySetOutsideCurve(key, (AnimationCurve)rarity, moon.TypedKey); }
  if (!dawnObj.HasTag(DawnLibTags.LunarConfig)) { dawnObj.Internal_AddTag(DawnLibTags.LunarConfig); }

i feel like it would be good if dawnlib had TryGet equivalents for these two scenarios

oak linden
meager inlet
#

it's mostly convenience but also to ensure only 1 party (dawnlib) has to do it right

oak linden
#

well, technically lunarconfig is kind of illegally modifying it since that's not how it's usually intended to be done but that might fix this issue lol

wind mist
#

Huh

oak linden
# wind mist Huh

as in the intended way is making the content itself greed, but there's definitely something happening that is causing weirdness, but im looking into it

wind mist
#

If only Lunar made all the content, then no issues!

oak linden
#

true

urban plaza
#

lunar config when the solar config walks in

oak linden
#

too lazy to scroll

wind mist
#
foreach (var obj in LethalContent.MapObjects)
{
    string uuid = UUIDify(obj.Key.ToString());
    if (uuid.StartsWith("lethal_company")) { continue; }

    try
    {
        DawnMapObjectInfo dawnObj = obj.Value;
        DawnOutsideMapObjectInfo dawnCurveInfo = null;

        if (dawnObj.OutsideInfo != null)
        {
            dawnCurveInfo = dawnObj.OutsideInfo;

            string key = obj.Key.ToString();

            foreach (var moon in notConfiguredOutsideMapObjectMoons)
            {
                AnimationCurve? rarity = dawnCurveInfo.SpawnWeights.GetFor(moon);
                if (rarity != null) { TrySetOutsideCurve(key, (AnimationCurve)rarity, moon.TypedKey); }
            }
        }

        if (!dawnObj.HasTag(DawnLibTags.LunarConfig)) { dawnObj.Internal_AddTag(DawnLibTags.LunarConfig); }

        CurveTableBuilder<DawnMoonInfo> curveBuilder = new();

        if (defaultOutsideMapObjectCurves.TryGetValue(uuid, out Dictionary<NamespacedKey<DawnMoonInfo>, AnimationCurve> moonVars))
        {
            foreach (var moon in moonVars)
            {
                curveBuilder.AddCurve(moon.Key, moon.Value);
                MiniLogger.LogInfo($"{uuid} - {moon.Key.Key} curve set to {CurveToString(moon.Value)}");
            }
        }

        ProviderTable<AnimationCurve?, DawnMoonInfo> newTable = curveBuilder.Build();

        // SET WEIGHTS
        if (dawnCurveInfo != null)
        {
            dawnCurveInfo.SpawnWeights = newTable;
        }
        else
        {
            dawnObj.OutsideInfo = new DawnOutsideMapObjectInfo(newTable, false, 12, Array.Empty<string>(), Vector3.zero, false, 0);
        }
    }
    catch (Exception e)
    {
        MiniLogger.LogError($"LunarConfig encountered an issue while configuring weights for {uuid}, please report this!\n{e}");
    }
}
#

Oh

#

THAT code

#

Hold on

#

019b0b42-1138-4253-65e4-3b4b08384d5b

#

I misunderstood greed

oak linden
#

lol

#

im not THAT lazy lmaoo

#

but yeah ty for the modpack code

oak linden
#

@wind mist why is it trying to spawn janitor trash outside greed

wind mist
#

Well the curve should be null or like 0,0 ; 1,0 so it shouldn't, I let it try and spawn them where they shouldn't in the case that would work, cause it would be cool

oak linden
#

you're not wrong in that it should work, but thats where it starts failing so imma try and see why

wind mist
#

I did find that outside objects don't like trying to spawn inside, it doesn't freeze up like this but it does complain about no compatible spawners

#

I tried it with the snowmen before

#

So maybe if an outdoor object tries to spawn inside, it'll just complain about not being able to spawn them. But maybe if an indoor object tries to spawn outside, it'll go crazy and not know what to do. Even if you try and spawn 0 of them.

oak linden
#

yeah im adding a bunch of logging but i have no idea why its failing

#

this is so odd

#

this code runs

#

but this code doesnt

#

@wind mist are you setting DawnOutsideMapObjectInfo.ParentInfo = to something?

wind mist
#

No

#

Why can't this just be a part of the constructor

#

So I don't have to keep remembering this stuff

#

Is that why?

oak linden
#

it is part of a constructor greed

#

there's no real way for it to go backwards lol, but yeah this might be why

#

i dont know why it doesnt error honestly

wind mist
#

Nevermind I was being stupid

#

But that isn't the constructor I use, since I don't make new objects

#

But it would not make sense to put it in the other one

oak linden
#

yep

wind mist
#

Trying it now

oak linden
#

its going through but your animationcurve doesnt seem to be working for experimentation

wind mist
#

Well I fixed not having ParentInfo, now I can land and it doesn't freeze, but there are no CR objects

oak linden
#

looking at unity explorer, the keys are a bunch of 0 weight curves

wind mist
oak linden
#

oh i never edited it from the code you sent, let me check

#

uh well, it says configure content is false

#

also i dont see where im supposed to put the curve

wind mist
#

You do it on the moon's page

#

And configure content doesn't need to be on there to do it

oak linden
#

icic okay

wind mist
#

I did actually mess it up on mine, and maybe yours too so let me try again

oak linden
#

lol yeah

wind mist
#

I think I set it like that to take a picture but didn't put it back

#

Oops

#

Still though not really an issue, most CR objects when I get them will just give curves of 0,0 ; 1,0 anywhere

#

Even where I know they should spawn normally

#

You did it!

#

Because I was only here to make the process harder

#

I'ma try vanilla objects too now since I've been doing the whole time only CR stuff

oak linden
#

yeah give that a try and lemme know

wind mist
#

Well thanks! I would not have figured that out on my own

oak linden
#

im still pissed it didnt error

wind mist
#

It has a tendency not to, the same not setting ParentInfo issue happened when I was working on enemies, and I don't remember that erroring either

#

But we found it out a lot quicker

#

Actually I think that one did error

#

Then why didn't this one?????/

#

Ig it's just weird sometimes

oak linden
#

yeah i have no idea :/

wind mist
#

Inside objects work but they always did, still testing outside ones

#

Mistress got me while in Imperium godmode and I think it broke because of that lol

oak linden
#

lol

#

probably

wind mist
#

Vanilla objects work in the places they should be

oak linden
#

that is good news

wind mist
#

The chaos!

wind mist
#

So here's what happens:
Vanilla and CR objects that are made for Inside or Outside are able to be configured to spawn in those spaces (obviously).
CR objects that are made for Inside and Outside are able to be configured to spawn where they shouldn't, and it'll work (yay!).

However,
Vanilla objects that are made for Inside and Outside are not able to be configured to spawn where they shouldn't (very sad).
Doesn't error, the closest thing is this message that happens when you put something from outside inside (I couldn't find a similar one for inside objects outside tho):
[Info : Unity Log] NO SPAWNERS WERE COMPATIBLE WITH THE SPAWNABLE MAP OBJECT: 'SnowmanTall'

#

Technically things are working as they should, but it would be cool if this were somehow fixed and I could put like landmines outside and snowmen inside :3

oak linden
#

ill try to give you a build, i think i know what it is

#

inside to outside is kind of incompatible in vanilla itself because inside hazards have network objects whilst outside vanilla never do

#

and i didnt know zeekerss actually has a log for that compatiblity thing lol

oak linden
#

try and let me know

wind mist
#

Something went very wrong, so if I try and land on Experimentation, it freezes on the seed screen, BUT- the level actually loaded and spawned in the map objects, like I can freecam out of the ship and see a mine blinking outside, and the laser turrets too and stuff. This error showed up:

#

(That's a mine if it's hard to tell, and we're outside)

oak linden
#

weird, i cant tell which part is erroring, u sure you have bepinex monomod debug patcher installed?

wind mist
#

I do!

#

Also narrowed it down a bit, if I don't try and make the snowman spawn inside, it works!

#

Idk if it's an issue with outside objects in general, or the snowman because the snowman is complicated sometimes

oak linden
#

oh, right, outside objects dont have network objects

#

okay you're gonna need to do some editing to some outside objects on your end to make em compatible to spawn inside

wind mist
#

Is it simple? :3

oak linden
#

yeah it's fairly simple, just give them a NetworkObject on the root of their prefab

wind mist
#

How does one make a NetworkObject, and how do I make sure I don't give it to something that already has it?

oak linden
#

it's a component

#

just AddComponent to add it and GetComponent to check if it already eixsts

#

oh right, giving them a network object by itself wouldnt work

#

uhh

#

you might not be able to get vanilla outside objects to spawn inside

wind mist
#

DawnMapObjectInfo also has a HasNetworkObject property

oak linden
#

which u cant by the time you load into the lobby

#

what you could try to do is get the prefabs on a patch to GameNetworkManager.Start, which happens super early on, and you might not be able to get them that early

#

in there u can give em a network object and use DawnLib.RegisterNetworkPrefab(prefab);, you also gotta make sure you give it a lunarconfig tag if you do this

wind mist
#

I might just cut my losses, can't think of anyone who would actually want like pumpkins spawning inside or anything

oak linden
#

yeah lol

carmine elk
#

Me

wind mist
#

Also am very tired and very later, goodnight friends

#

Thanks a lot for all the help

wind mist
carmine elk
#

/j

oak linden
#

sure, good night, im glad we could figure it out lol

wind mist
#

Only took sitting on it for like 4 days

#

I assume the next DawnLib version will have this stuff too?

#

Whenever that ends up being

obtuse pecan
#

The classic error, imo Xu why not hard code a fix to avoid these errors even if it's harmless? So it prevents users for reporting it every week

alpine mica
#

Can't believe Zeekers didn't add any dawn item info to the sticky note and clipboard

wind mist
#

Is there a way for me to just register any game object I want as a MapObject... For funzies plink

oak linden
oak linden
#

Uh

#

I mean, yeah, you'd have to use the actual DawnLib registration shit though lol

#

DawnLib.DefineMapObject

#

or do it via editor if you can

wind mist
#

When would I do it?

oak linden
#

preferrably your plugin's awake

loud mortar
oak linden
loud mortar
oak linden
loud mortar
meager inlet
oak linden
#

scene spawned so they dont exist in the itemsList

#

i could maybe check NetworkObject.SceneSpawned or whatever the field is

meager inlet
#

it wouldn't break saves if they we're added to the end of the list right

oak linden
#

i think it would, atleast for DawnLib, cuz then i'd be spawning them on load and the game would also be spawning them on load since they spawn from the scene

meager inlet
#

no i mean in vanilla

oak linden
#

oh, honestly unsure, i'd need to re-read the vanilla code to see how zeekerss is avoiding putting them in the save, he might have a check for if the item isn't in the items list before committing it to the save

#

in which case it would cause the same issue i'd have in dawnlib with duplicates

meager inlet
#

if thats the case then you could probably just ask him to do that tbh

#

if it's literally just dragging them into the SO at the end of the list

oak linden
#

i might make a list of things like that honestly, the first little thing that im reminded of similar to this is how furniture colliders are on the wrong layer causing them to fall through them when loading a save

#

i gotta read through the bunch of things i edit in vanilla later and make a list lol

meager inlet
#

purely my experience so who knows but he seems more likely to do stuff if it's small and isolated

#

list might put him off

oak linden
#

fair

#

ill check if adding them to the list doesnt break anything in vanilla and then write smthn about it if it doesnt

charred widget
#

why wesley hates Xiao lan?

oak linden
sly marsh
#

Who said he does?

#

Cus like this is news to me if he does

carmine elk
#

of course he does! it's why he made the "I hate Xu" moon! /j

#

nah idk where this came from

charred field
#

This is true he has a Xu hate shrine in his basement with a Xu doll he pushes metal pins into when he gets mad at blender

#

it was the only way I could get him to stop beating Generic up....

oak linden
#

thats whats been pricking me recently ๐Ÿ˜”

white finch
#

Smh plink

smoky crag
#

The LCMD server lore sure is deep 1000QuotaStare

weary imp
broken ore
#

Looking for maintainers since 1953

hollow viper
broken ore
cloud flower
#

why Xiao lan hates wesley?

white finch
#

The plot thickens

sacred tulip
#

the battle of the century

oak linden
sacred tulip
#

wesley told them

#

nah yeah im also curious

#

shit couldnt be more random xD

spiral axle
#

the slop thickens

loud mortar
wind mist
#

What happens if I do NamespacedConfigWeight.ConvertManyFromString(string) and I give it an empty string, and use that for my moon weights

#

Will it just not spawn based on moons, or will something break?

#

I'm just having issues with dungeons is all... is there anything wrong in here?
lethal_company:experimentation=+40, code_rebirth:oxyde=+40, lethal_company:assurance=+40, lethal_company:vow=+250, lethal_company:gordion=+40, lethal_company:march=+40, lethal_company:adamance=+40, lethal_company:rend=+40, lethal_company:dine=+40, lethal_company:offense=+40, lethal_company:titan=+40, lethal_company:artifice=+235, lethal_company:liquidation=+40, lethal_company:embrion=+40, duckstroidonefour:duckstroidonefour=+40, descentlethalbundle:descent=+40, extortlethalbundle:extort=+40, magicwesleysmod:acidir=+100, magicwesleysmod:alcatras=+300, magicwesleysmod:galetry=+40, magicwesleysmod:asteroidonethree=+150, magicwesleysmod:hyve=+40, magicwesleysmod:atlantica=+40, magicwesleysmod:berunah=+40, magicwesleysmod:calist=+40, magicwesleysmod:core=+40, magicwesleysmod:cosmocos=+150, magicwesleysmod:crowd=+40, magicwesleysmod:cubatres=+40, magicwesleysmod:demetrica=+40, magicwesleysmod:desolation=+60, magicwesleysmod:dreck=+40, magicwesleysmod:empra=+40, magicwesleysmod:end=+40, magicwesleysmod:etern=+60, magicwesleysmod:faith=+40, magicwesleysmod:filitrios=+40, magicwesleysmod:fissionc=+40, magicwesleysmod:gloom=+40, magicwesleysmod:gratar=+40, magicwesleysmod:thalasso=+40, magicwesleysmod:hyx=+150, magicwesleysmod:infernis=+40, magicwesleysmod:junic=+40, magicwesleysmod:lecaro=+40, magicwesleysmod:motra=+300, magicwesleysmod:narcotic=+40, magicwesleysmod:oldred=+40, magicwesleysmod:polarus=+40, magicwesleysmod:release=+40, magicwesleysmod:repress=+40, magicwesleysmod:roart=+40, magicwesleysmod:trite=+40, magicwesleysmod:utril=+179

#

It's looks fine right?

#

Well I'm able to set all the dungeons fine, but when loading on a moon, it gives this error and then freezes:

#

@oak linden Me have more problem again ^

oak linden
wind mist
#

No?

DawnDungeonInfo dawnDungeon = dungeon.Value;

string key = dungeon.Key.ToString();

foreach (var moon in notConfiguredDungeonMoons)
{
    int? rarity = dungeon.Value.Weights.GetFor(moon);
    if (rarity != null && rarity > 0) { dungeonWeightString[key] = dungeonWeightString.GetValueOrDefault(key, "") + moon.Key.ToString() + ":" + rarity + ","; }
}

if (!dawnDungeon.HasTag(DawnLibTags.LunarConfig)) { dawnDungeon.Internal_AddTag(DawnLibTags.LunarConfig); }

WeightTableBuilder<DawnMoonInfo> weightBuilder = new();
SpawnWeightsPreset weights = new();

List<NamespacedConfigWeight> Moons = NamespacedConfigWeight.ConvertManyFromString(ComprehendWeights(dungeonWeightString.GetValueOrDefault(key, "")));

MiniLogger.LogInfo($"{key} : {ComprehendWeights(dungeonWeightString.GetValueOrDefault(key, ""))}");

weightBuilder.SetGlobalWeight(weights);

// SET WEIGHTS
dawnDungeon.Weights = weightBuilder.Build();
oak linden
#

oh, yeah you need to do weights.SetupSpawnWeightsPreset(stuff here);

#

you made the Moons but didnt use it lol

wind mist
#

Damn

oak linden
#

and yeah you can have empty string lists or whatever you want to make it empty

wind mist
#

Yeah I switched all of my things from manually building the weight table to using the preset strings and I guess I just messed up on dungeons one lol

wind mist
#

Is there any way for me to set tags through DawnLib and allow them to keep LLL matching capability?

What I mean is for a few mods like Wesley's Interiors or Vehicle Hangar, depending on the tags of the moon, they will have variants (like metal citadel on moons with 'factory' or 'murica'). A lot of people use Lunar for that and I don't want to lose that capability if I switch.

Right now setting tags through the code I have below doesn't work for influencing those mods:

if (enabledMoonSettings.Contains("Tags"))
{
    HashSet<NamespacedKey> newTags = new HashSet<NamespacedKey>();

    foreach (string tag in RemoveWhitespace(moonEntry.GetValue<string>("Tags")).Split(","))
    {
        string[] splits = tag.Split(":");
        newTags.Add(new NamespacedKey(splits[0], splits[1]));
    }

    dawnMoon._tags = newTags;
}

dawnMoon.Internal_AddTag(DawnLibTags.LunarConfig);
oak linden
#

it depends, it might need JLL compatibility

#

idk how these people are doing variants

#

@sinful dew how do you make variants for your interiors, i.e. what mod is checking the tags to edit the materials and whatnot

oak linden
icy tulip
oak linden
# icy tulip yah

im boutta send you some of the scripts redone a bit for compat

wind mist
#

So it's something the mods will just have to support themselves?

oak linden
#

alternatively maybe @white finch can take the tags from DawnLib and format them in an LLL style (taking the NamespacedKey.Key and replacing _'s with 's)

white finch
wind mist
#

Found a small issue, DawnLib will absolutely fail to let the game open if LLL is not in the profile

#

@oak linden You should probably sort that out...

royal canopy
oak linden
wind mist
#

I just made a new profile, added DawnLib and my dll, then when I opened the game it errored about some LLL compat extension, and then when you click online it just spamed an error

oak linden
#

ill need the specific error

calm maple
#

Here's the specific error:
--> error
that one

wind mist
oak linden
#

hmm

oak linden
slender violet
#

Anything I should know now that I using dawnlib on my modpack?

oak linden
#

v0.5.11

  • Fixed DawnLib items and unlockables not making the purchased sound on buying.
  • Fixed soft dependency issue caused by linq.
oak linden
spiral axle
#

Hey, a quick question: how would I resolve a tag name into an actual tag in Dawnlib?

oak linden
spiral axle
#

mainly for getting moons with a specifig tag

#

yeah

oak linden
#

SelectableLevel.GetDawnInfo().AllTags();, it'll give you a list of NamespacedKey's that's formatted like code_rebirth:plushie, so you can do NamespacedKey.Key to get the plushie part specifically, which is what i'd usually be interest in when looking at tags

#

i told this to jacob as well, the tags are string formatted to be all lowercase, no punctuation and all spaces replaced with _, so you can handle that however you like personally

spiral axle
#

alrighty, so this means i'd have to go through every level checking their tags instead of a centralized solution (list/dictionary) of some kind?

oak linden
#

there is technically a big list, but it's mainly a static dictionary in NamespacedKey itself that i have for smart matching reasons (i.e. if someone types trite in the config, and trite isn't in the game, it stays as smart_matching:trite internally, but if trite does exist it replaces it with magic_wesleysmod:trite)

oak linden
#

oh and last thing, because of the smart matching thing, if you make any dictionaries that use NamespacedKey as the key, you need to make sure you do it after like startofround.start otherwise hashes and stuff get confused (i love c# internals)

#

i can explain how the problem came to be, it's kind of interesting lol

spiral axle
#

so after it resolves (or doesn't) into the smartmatching ones?

oak linden
#

ye

spiral axle
#

i think i see what happened there ๐Ÿ˜…

oak linden
#

reason it happens is because when you put stuff into a dictionary, the key isn't like the thing itself, but the thing's hash

#

which specifically uses the namespace, which starts as smart_matching, and gets switched

spiral axle
#

oh god it's cloned and not a pointer oh that's something different ๐Ÿ’€

oak linden
#

yeah i recreate the configs after the respective registries freeze lol, though i should make an OnAllRegistriesFrozen honestly

quick anvil
spiral axle
#

spotted the trite lover

wind mist
#

Hello, would this request be possible in DawnLib? #1390479837025538048 message

#

Can I just eviscerate an item from existing

#

Or anything

oak linden
#

Stopping an item from loading isn't a thing

#

Well atleast not from lunar's side

#

If you're getting rid of an item from the shop, I gotta do a bunch of shit

urban plaza
#

So with how dawnlib works, i understand you can essentially toggle certain assetbundles through a config. if i were to have 50 items as an example, would it be reasonable to have 1 item per assetbundle, or is that simply insane?

as far as i understand, i can see something like unnecessary memory being used if two items are using the same assets (texture/material/icon/sound)? though i doubt it matters on the small scale im talking about, but i do wish to follow a good practice

oak linden
urban plaza
#

you reckon its alright? cause... i made 60 โค๏ธ

oak linden
#

i usually group up some assets in the same category into one bundlr

oak linden
urban plaza
#

the 10kb x 60 code rebirth

urban plaza
frozen widget
#

hey xu, i'm back with questionning on dawnlib

#

what's the dimension for achievement background image

#

like the bar behind the achievement when completing one

normal ridge
#

do i have to validate references to fix this?

oak linden
normal ridge
#

this happened right after i imported dawnlib

oak linden
#

oh, never seen that error before, you're only supposed to turn off validate references on two of the dlls

normal ridge
#

i can still access the scripts, but idk how many

oak linden
#

the dusk one and the normal one

normal ridge
#

thats what im confused about

oak linden
#

did you also turn it off for hte interfaces dll?

#

try deleting compatibility dll and restarting unity to see if that error pops up again

normal ridge
#

i ended up turning off for all of them

#

gotcha

oak linden
#

oh, yeah you dont want that

#

turn it on for interfaces dll lol

normal ridge
#

oh?

#

i see..

#

i could do that rn

#

hang on

oak linden
#

ye, do delete the compatibility dll, it's meant to auto delete but doesn't the very first time you import (since the editor dll doesnt detect it then sometimes)

normal ridge
#

do i still have to delete it?

oak linden
#

ye

#

the compatibility dll isnt meant to stay

normal ridge
#

thats interesting

normal ridge
oak linden
#

oh did you not import the mod properly into your project?

#

you should have the .preloader dll if you used the zip directly

#

did you just grab it from you plugins folder in the mod manager lol

normal ridge
#

i honestly didn't know you had to do that lmfao

oak linden
#

you're missing a preloader dll, just add it wherever in the dawnlib folders you have, doesnt matter where, but u can grab it from the patchers folder in your mod manager or just downloading the zip manually

normal ridge
#

wait wait wait hang on

oak linden
oak linden
#

noice

spiral axle
#

Hey Xu, does DawnLib convert LLL tags into its own system?

oak linden
#

LLL also had its own set of lethal_level_loader tags that it applied by default, i took those and just applied them under lethal_company

spiral axle
#

okay, good to know ๐Ÿ˜…

#

thanks!

slender violet
#
Stack trace:
System.Nullable`1[T].get_Value () (at <1071a2cb0cb3433aae80a793c277a048>:0)
HUDManager.GetTextureFromImage (System.Nullable`1[T] image) (at <83220f1fc337491eba19b3618ec61339>:0)
HUDManager.FillImageWithSteamProfile (UnityEngine.UI.RawImage image, Steamworks.SteamId steamId, System.Boolean large) (at <83220f1fc337491eba19b3618ec61339>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <1071a2cb0cb3433aae80a793c277a048>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <c39a522eee05469b8171a6cfeb646c59>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <c39a522eee05469b8171a6cfeb646c59>:0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <c39a522eee05469b8171a6cfeb646c59>:0)```` when a player joins the lobby log this error
oak linden
frozen widget
#

hey xu, i can't figure out why my monitor is registered but can't be accessed, when i type in the name it doesn't work and says this

#

all my registered unlockables are there, the rest work, only the newly created Monitor doesn't work

#

i even got it registered with no apparant errors in the logs

frozen widget
#

will, just a lil busy doing some more testing

frozen widget
urban nest
oak linden
white finch
#

๐Ÿ’€

wind mist
#

Would this work to get all keywords? TerminalKeyword[] keywords = TerminalRefs.Instance.terminalNodes.allKeywords;

oak linden
#

i think so

wind mist
#

Well once I have that, how do I find the keyword that, say, you would use to buy x item in the shop?

drifting night
#

unsure what this error is exactly but cant land on any moon Despair wondering if yall had any ideas

#

modpack code: LTYURF

#

there seems to be some errors about mirage..? but ik a lot of people use it so i doubt thats it?

oak linden
#

uh well i cant look indepth rn but the screenshot you sent says weather registry

drifting night
#

i see that and dawn yeah im not really sure which is the important part

oak linden
oak linden