#Weather Registry / Weather Tweaks / mrov

1 messages Β· Page 8 of 1

drowsy willow
#

now for the second one

#

so everything works when you create a new save?

drowsy willow
#

huh

leaden flume
#

ig it bugs existing saves

drowsy willow
#

weiiird

#

i mean

#

i have no idea what LLL does with the save mod

#

i'm assuming it's that tbh

#

actually let me join an old save

#

HEHEHE

leaden flume
#

unhanded rpc exceptions my beloved <3

drowsy willow
#

alright

#

i have no idea whatsoever what happened to your save/modpack

#

but umm

#

yeah

leaden flume
#

the only thing i did was give myself a quadrillion bucks

drowsy willow
#

making a new save works ig

leaden flume
#

visited cosmocos

#

and thats it lol

#

it was a test save anyway

drowsy willow
#

interesting

leaden flume
#

so nothing was lost LOL

drowsy willow
#

alrighty

#

well, thanks for the quick testing

leaden flume
#

yw :]

drowsy willow
#

if y'all ever get any more problems - ping me and i'll get it sorted πŸ˜‡

#

i've pushed an update to WeatherRegistry, please check it out and let me know if it fixes your issue πŸ₯Ί

rancid gull
#

(Orion)

eclipse not eclipsing?

#

happened with march earlier

drowsy willow
#

what's your modpack code?

rancid gull
#

01900391-91d0-5ffe-c104-70b9e8e21f1a

drowsy willow
#

hmmmmmmm

#

and that's vanilla

#

yummy

unique turret
tall tangle
#

Is it just me or do the weather weights in the config not go through?

drowsy willow
#

Have you check your logs if they're being applied?

tall tangle
#

I’ll do some testing and see

hybrid crescent
#

mrov, is there a way to blacklist specific weathers for a planet?

obsidian schooner
drowsy willow
#

and weathertweaks uses its settings πŸ˜‡

hybrid crescent
drowsy willow
#

you need to start the lobby once

#

and all the configs will generate

hybrid crescent
#

Like, landing on a moon?

drowsy willow
#

just starting a game, so selecting save and spawning in the ship

#

when you spawn in they will already be generated

#

and then you can change them

#

like so

hybrid crescent
#

Alright, thanks a lot

tall tangle
#

I’ve tested with another profile and the weights seem to be working now

drowsy willow
#

yippee πŸ˜‡

mystic oxide
#

Is there no setting to disable the combined and progressive weathers anymore?

drowsy willow
#

hmm

#

have you checked after creating a lobby?

#

because that's when the configs are called

mystic oxide
#

tho they are not working at all

#

I have all of them disabled and still see combined and progressive weathers on the terminal

drowsy willow
#

oh

#

umm

#

I might've done an oopsie again

#

so the disabled combined weathers shouldn't show up

#

but progressing ones' check is missing

#

😭😭😭

#

sorry for that

hybrid crescent
#

Is there a way to randomize the seed for the first day?

dreamy garden
#

i wanted to know that too

#

the first day is always the same

hybrid crescent
#

Yep

dreamy garden
#

not a big problem

hybrid crescent
#

March is always Foggy for example

dreamy garden
#

if the first day everything was clear i wouldn't mind

#

but i like going assurance

#

and assurance is foggy 😦

cerulean burrow
#

@drowsy willow okay so i found a weird issue. if i use betaweather tweaks and weatherregistry in my profile, if i try to land on a moon it just is stuck with ship in motion. but simply getting rid of beta and the weather registry and get normal weather tweaks the game is fine

#

nothing in the bepin console

#

i could send log

dreamy garden
#

is there a seed that everything is clear first day?

mystic oxide
#

I'm pretty sure it is different depending on how many moons you have

#

Because I never changed the seed and got different weathers every time I changed the amount of moons I had

dreamy garden
#

vanilla moons only

cerulean burrow
#

happens to both vanilla and custom

hybrid crescent
unique wraith
#

Sending a log is always the best course of action πŸ™‚

drowsy willow
drowsy willow
drowsy willow
cerulean burrow
cerulean burrow
#

here you go!

cerulean burrow
#

i still could not find the issue

#

just know it only happens with betaweathertweaks plus weather reg

bright viper
#

Alright so I have a small suggestion for the mod.
Would it be possible to add a config entry to hide changing and combined weathers from the terminal?
Like let's say you get a "None > Stormy" weather on a moon but when routing to that moon the terminal and map would only show "None"
I believe this would add a fun element of surprise (and also reduce clutter)

drowsy willow
#

Hey, sure, I could add something like that πŸ˜…

slow maple
#

not using tweaks but i'm using registry and it's been eclipse THREE times in a row on both of the free moons

drowsy willow
#

πŸ₯Ί

#

registry has all the weathers with equal weight

#

so it's possible

drowsy willow
#

WeatherRegistry 0.1.1

  • fixed an issue with LethalLib weathers not being registered correctly on modded moons
  • fixed an issue with WeatherRegistry weathers being destroyed on joining lobbies
  • (hopefully) fixed a Dictionary issue with modded weathers on clients
  • renamed events: setupFinished -> SetupFinished, weatherChanged -> WeatherChanged
  • added DisableAllWeathers event
  • added WeatherController for changing weathers
  • changed some logs
  • changed possibleWeathers table to be sorted using enum values
  • changed WeatherRegistry to forcefully remove all "None" weather entries from randomWeathers
drowsy willow
#

what's your modpack code? I'll try to check it out

#

BetaWeatherTweaksBeta 0.20.4

  • fixed an issue with special weathers not being disabled (thanks: @mystic oxide , @hybrid crescent , @ancient depot )
#

and with that i think i've fixed all weather-related things that popped up this week

#

the grind is real πŸ˜…

drowsy willow
#

@plucky holly it crashed after starting to orbit?

plucky holly
#

no, it just broke the lever

#

as in we couldnt pull it

drowsy willow
#

in orbit or on planet?

plucky holly
#

in orbit

drowsy willow
#

alright

#

what's your modpack code?

plucky holly
#

01901c4b-6afb-bc3c-0f12-c3aee7afce2e

drowsy willow
#

i'm gonna quickly check

plucky holly
#

i pray its not a player count issue like that bug i had with only 5+ players in the lobby

drowsy willow
#

99% isn't πŸ˜…

#

it's something in weather selection

plucky holly
#

might be unrelated to wt also cause my first log doesnt have any traces of it i think

drowsy willow
#

but i need to see what's happening with debug logs on

plucky holly
drowsy willow
#

well

plucky holly
#

for this

drowsy willow
#

the weathers aren't selected and nothing further can progress

#

so yes

#

πŸ₯Ί

plucky holly
#

aha ic

drowsy willow
plucky holly
#

im gonna play for a bit cause i dont wanna bug my group with testing stuff rn so i'll get you the logs after the sesh πŸ₯Ί

drowsy willow
#

thanks πŸ₯ΊπŸ™

slow maple
#

anyway thanks for the update mrov :]

drowsy willow
#

i thought i fixed that already lol

drowsy willow
#

oh it's dividing by 0

#

fuckkkk

#

can math errors go away from me πŸ₯Ί

#

i'm uploading the fix rn

abstract pivot
#

gotta clamp all divisions lol

drowsy willow
abstract pivot
#

:<

bleak quarry
drowsy willow
#

😧

drowsy willow
drowsy willow
#

i've got a brilliant idea

#

it would be so fun to make it work

gray kayak
#

this is scary

azure dirge
prisma vault
#

I have a question about weather registry, is there be a thing like meteo multipliers? In the readme it says how it has code from it but i dont see anywhere to actually implement that into the game, or in weathertweaks

#

So where do I look for this setting or is it jus not there yet (or at all)?

prisma vault
#

no I jus really liked meteomultipliers but want it on meteor shower weather and thought I heard somewhere a while back in the Code Rebirth taht this weather API thing would be able to do someth like meteomultipliers but to everything

#

hopefully I worded that correctly-

abstract pivot
#

Next update should have what u need in the meteor shower mod's configs

#

It'll be a few more days though

#

Meteor shower doesn't currently use weather api is all

prisma vault
#

yipppeeee

#

so will it be specific to the weather creator's own mods?

#

for the custom weathers at least?

abstract pivot
#

When registering the weather I get the option to input the values so yes

prisma vault
#

Oki tyty

#

For vanilla weathers should I keep using meteomultiplier then?

abstract pivot
#

Afaik stuff like weights is unfortunately not on my end so you'll have to go to weather apis config for that I think

abstract pivot
#

But dunno

prisma vault
prisma vault
#

Thx for the info!

drowsy willow
bright viper
#

btw mrov are you ever planning on making true combined weathers?
As in 2 weathers are chosen completely randomly and then combined into one instead of being predetermined combinations in the config?

drowsy willow
#

i'm not planning this right now tho

bright viper
#

Hell it could even be 2 of the same weather combined
two rainy weathers would make heavy rain (twice as many mud puddles)
two foggy weathers would make dense fog (basically your old superfoggy)
two stormy weathers would make... don't have a proper name but you get my point (double thunder strike rate)

Don't know how that would work for eclipse or flood but it sounds cool

bright viper
drowsy willow
#

πŸ€”

#

well

#

on game start i would just need to generate all possible combinations

#

and it would be on par with my current solution

#

so i don't think that's unreachable

bright viper
#

πŸ€” and I suppose the config would update accordingly?

#

so you could pick and chose?

drowsy willow
#

yeee

#

it's generated dynamically already

bright viper
#

btw how are combined weathers treated in relation to other weathers?
Are they just completely seperate and treated as their own weathers in the pool or are they chance based?
As in if the moon would be stormy then it has a chance to instead become a stormy + rainy for example

drowsy willow
#

it's completely separate

bright viper
#

πŸ€” does that mean you could also introduce weights to them?

drowsy willow
#

it uses "base weather" 's weight (dialed down)

bright viper
#

flooded is first but eclipsed is harder

#

so if I change the weight for one in the weather registry which would the combined weather use?

manic cobalt
#

I wanna pitch Zeekerss on the benefits of moving to SO’s rather than enums

manic cobalt
#

ScriptableObject

bright viper
#

ah

drowsy willow
#

the "base weather" is the first in the array of weathers to apply

bright viper
#

so in this case it would be flooded

drowsy willow
#

so in this case it would be stormy

#

yeah

drowsy willow
drowsy willow
bright viper
#

πŸ€” wouldn't it make sense to always put the hardest weather first though?
I know it doesn't matter with base settings since all weathers are equal but if someone wanted to customize it then it creates an issue of... surprise eclipses

drowsy willow
#

i get what you mean

manic cobalt
drowsy willow
#

i was moving this system a few times already and i'm still not happy with how it works rn

#

i'll change it so that the "base" one would be the "hardest" so to speak

drowsy willow
manic cobalt
#

If it was like Levels, Items & Enemies we’d be so back

drowsy willow
#

also welcome back, Batby πŸ‘‹

manic cobalt
#

not fully back but tyty

#

Just mobilin

drowsy willow
#

i'm really interested what the future updates bring

#

cause i assume those changes are not in v55 (or next one after)

#

because zeekers would need to change quite a few things in the game to make it work

manic cobalt
#

ehhh

#

yes snd no

drowsy willow
#

i mean

bright viper
#

btw if I am reading this correctly switching to SO weathers would allow for weather events and variants with less memory consumption no?
(I have little to no idea how big the change would be)

drowsy willow
#

it's not difficult, but time consuming

drowsy willow
#

and everything weather-related is indexed by it

#

which is painful at best

#

changing the weathers to be ScriptableObjects would mean that everything weather-related could be in one array

#

(just like what i'm trying to do with WeatherRegistry)

bright viper
#

so what you're saying is... you could easily add infinite weathers without having to overwrite the enum completely?

drowsy willow
#

that would be one of the benefits, yeah

manic cobalt
#

You could so the bare minimum by having inpsector based drag and drop references to the vanilla ones in the timeofday class and then compare against them instead of the current enum checks

drowsy willow
#

because instead of my current shenanigans you would just add an object to array

#

and it's done

manic cobalt
#

Which would be fairly easy to initially swap in

mystic oxide
#

I have disabled combined/progressive weathers and I still see them

drowsy willow
#

ohhhhh

#

πŸ₯Ί

#

can you send me your log?

mystic oxide
drowsy willow
#

oh

#

huh

#

why

#

is that happening

drowsy willow
#

hmmm

#

i've disabled all of them on my end and they're not popping up

wind bough
#

tell me when fixed

drowsy willow
#

if anything more happens, let me know

#

basically the weather generation ran twice

#

and the mod that picked the weathers didn't display them

#

oopsie

wind bough
#

k

mystic oxide
#

Could it be because this part is missing for every combined/progressive config entry in the config file?

#

That's probably why they don't show up in LethalConfig either

drowsy willow
#

oh wait what

#

gale doesn't show up the + things in the name

#

also it could be that

#

because of how this works (sorry) those configs are read after starting the round

#

could you check if the descriptions pop up after starting the lobby?

mystic oxide
drowsy willow
#

that's really πŸ€”

wind bough
#

yeah it seems fine now good work πŸ‘

drowsy willow
#

configs are a mess

drowsy willow
#

I've got a cool idea and it would be great to make it happen

slow maple
#

SPILL THE BEANS ANDREY

drowsy willow
#

i need to make a config handler 🫠

#

actually i could do that in a better way

#

but it's gonna be a fucking nightmare

drowsy willow
#

this is impossible lol

wind bough
#

You got this πŸ‘

abstract pivot
#

LOL

drowsy willow
#

OH I FORGOT CHANGELOG FOR THAT

#

this was so rushed, sorry

#

I've changed the code to use WeatherRegistry as dependency

ocean vessel
#

(it's fine- anytime I don't see a changelog i just assume I gotta move the config out and compare old with new x3)

drowsy willow
#

it's already inside WeatherRegistry

#

But I need to add the config options

#

πŸ˜…

#

so: yes

#

no worries, it's not yet announced anywhere πŸ˜…

drowsy willow
#

this looks sooooo nice

#

IT DOESN'T WORK hehe

abstract pivot
#

Lol

shut cobalt
#

oh wait nvm i read that completely wrong 🀣

drowsy willow
#

I've done bad things in my code

#

it's not related to that πŸ˜…

ancient depot
drowsy willow
#

i've made some questionable design choices

#

stupid configs at it again

#

this is the best worst thing i've done

drowsy willow
#

WeatherRegistry 0.1.4

  • added ScrapAmountMultiplier, ScrapValueMultiplier config options
  • added LevelWeights and WeatherWeights config options (they don't do anything yet)
  • (hopefully finally) fixed an error with WeatherRegistry not disabling registered weathers' effects when leaving lobby
gray kayak
drowsy willow
gray kayak
#

testing for myself now

drowsy willow
#

i've got the tornado to spawn after reloading lobby

gray kayak
#

it works

trail lark
#

So no more need for MeteoMultiplier?

drowsy willow
drowsy willow
trail lark
#

Very nice.

gray kayak
#

hurray

drowsy willow
#

every registered weather has its own multiplier sliders

gray kayak
#

what does WeatherTweaks add that WeatherRegistry doesn't

#

is it just combined stuff?

drowsy willow
#

AND the weather-> weather weights being nicer

#

which will be merged into Registry at some point

drowsy willow
gray kayak
#

haven't heard that one before

drowsy willow
#

because having 3 possible weather weights at the same time will cause some funny issues

#

my idea for their priorities would be to use:

  1. level-specific weight (i.e. Vow@200)
  2. weather>weather weights (i.e. Stormy@200)
  3. default weights (i.e. 100)
gray kayak
#

Are you planning to just make WeatherRegistry the new WeatherTweaks

#

so everything is more centralized

drowsy willow
#

that's a very interesting thing actually

#

because if you take into account my original plan (that's weight-based weather selection and weather sync) it's already there

#

i just need to ~~force ~~convince all weather-related stuff that other mods do to use my solution

#

and it's gonna be sooo epic

#

cause weather is the most disorganized thing this game has (except THE TERMINAL)

drowsy willow
#

so having a centralized solution would be amazing

#

of course i probably miss some features that would be useful to modders

#

feel free to let me know

drowsy willow
#

I need to fix my nuget auto-upload 😭

#

and then it's gonna be epic

drowsy willow
#

another MROV oopsie

#

level filtering in Registry doesn't work

#

will fix that ASAP

#

sorry for the inconvenience

azure dirge
bleak quarry
#

mrov throwing once again

vocal dune
#

i was thinking that would be cool, if by default weathers could be "unknow" but buying like sort of a Weather antenna or something in the shop for 300 or less, and with it the weathers will show in the terminal ^^

#

actually don't know if there is one already in thunderstore

drowsy willow
#

I won't make that, but if someone wants to make that happen I'll gladly help

vocal dune
#

i would be glad to learn scripting and modding for that πŸ₯²

#

i think imma drop that into #1188298686560739389

shadow bough
#
WeatherRegistry.ImprovedWeatherEffect must be instantiated using the ScriptableObject.CreateInstance method instead of new ImprovedWeatherEffect.

UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.ScriptableObject:.ctor ()
WeatherRegistry.ImprovedWeatherEffect:.ctor (UnityEngine.GameObject,UnityEngine.GameObject)
WeatherRegistry.Patches.TerminalStartPatch:Postfix (Terminal)
DMD<Start>?570627916:_Terminal::Start (Terminal)
DMD<>?570627916:Trampoline<Terminal::Start>?-110933648 (Terminal)
LethalLib.Modules.Enemies:Terminal_Start (On.Terminal/orig_Start,Terminal)
DMD<>?570627916:Hook<Terminal::Start>?1449442308 (Terminal)
WeatherRegistry.Weather must be instantiated using the ScriptableObject.CreateInstance method instead of new Weather.

UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.ScriptableObject:.ctor ()
WeatherRegistry.Weather:.ctor (string,WeatherRegistry.ImprovedWeatherEffect)
WeatherRegistry.Patches.TerminalStartPatch:Postfix (Terminal)
DMD<Start>?570627916:_Terminal::Start (Terminal)
DMD<>?570627916:Trampoline<Terminal::Start>?-110933648 (Terminal)
LethalLib.Modules.Enemies:Terminal_Start (On.Terminal/orig_Start,Terminal)
DMD<>?570627916:Hook<Terminal::Start>?1449442308 (Terminal)
#
WeatherRegistry.Weather must be instantiated using the ScriptableObject.CreateInstance method instead of new Weather.

WeatherRegistry.Weather:.ctor (string,WeatherRegistry.ImprovedWeatherEffect)
System.Reflection.RuntimeConstructorInfo:InternalInvoke (object,object[],bool)
System.Reflection.RuntimeConstructorInfo:DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.Reflection.RuntimeConstructorInfo:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.Reflection.ConstructorInfo:Invoke (object[])
Newtonsoft.Json.Utilities.LateBoundReflectionDelegateFactory/<>c__DisplayClass3_0:<CreateParameterizedConstructor>b__0 (object[])
...
Newtonsoft.Json.JsonConvert:DeserializeObject<System.Collections.Generic.Dictionary`2<string, WeatherTweaks.Definitions.WeatherType>> (string)
WeatherTweaks.NetworkedConfig:WeatherDataReceived (string)

concern

drowsy willow
#

is that a bad thing? πŸ₯Ί

#

OH WEATHERTWEAKS

#

mmmm

#

I'll check that later

ancient depot
drowsy willow
#

oh i didn't

ancient depot
#

From what it looks like WeatherTweaks ends up erroring way later

drowsy willow
idle light
#

Hi mrov

#

I typed complete gibberish and my phone somehow knew that’s what I typed

drowsy willow
#

πŸ˜…

abstract pivot
drowsy willow
#

oooooooh

#

my github action failing because i cannot set minver to work

#

fucking thing

abstract pivot
#

lol

drowsy willow
#

i spent a few hours on that already

#

it's pointless

unique turret
#

anyway what was the issue?

dense nymph
#

is this the right place for Weather Registry? Because I think your update just fixed an issue I was hunting down, that involved Selene's Choice and Central Config, and your mod was on the suspect list, now it seems to be fixed.

abstract pivot
#

CC likes to mess with stuff it shouldn't so that issue might just be hidden for now

dense nymph
#

As far as I can tell it was just completely breaking down Selene's Choice, but I can't find any errors related, and like I said I think it got fixed? I was still trying to trouble shoot the issue without errors when it stopped after an update, so I might just let it rest.

drowsy willow
#

😳

#

ummm

#

I don't knoooow

#

will check that first thing tomorrow

drowsy willow
#

I've literally copied LL's action

#

and MinVer always resolves to 0.0.0

unique turret
#

so it works?

drowsy willow
#

despite the tag being set on like a commit before

unique turret
#

hmm

drowsy willow
unique turret
#

where's the code?

drowsy willow
#

I'm gonna get owned so bad πŸ˜”

#

check the previous action runs as well

#

everything runs okay

#

and MinVer resolves to 0.0.0

#

πŸ˜“

#

is there a way for it to use the .csproj assembly version?

unique turret
#

bruh, your tags don't start with v even though it's configured in your csproj that it should start with v

#

that's why it fails to read the version

#

or is this it?

drowsy willow
#

OH is it really that 😭

unique turret
#

yes lol

#

It's this <MinVerTagPrefix>v</MinVerTagPrefix>

drowsy willow
#

I will check that ASAP as possible

unique turret
#

haha

drowsy willow
#

another MROV oopsie

unique turret
#

🀭

drowsy willow
vocal dune
#

idk why ,but i putted every setting on weather in uncertain, but the weather still show up in the cam

#

:c

drowsy willow
#

oh, that's interesting

#

if I understand you correctly - you've enabled every uncertain weather type or did you enable always unknown mode?

#

because uncertain weather only has a small % chance of happening, it's not gonna be always and everywhere πŸ˜…

vocal dune
#

hol on

drowsy willow
#

but yeah, the uncertain stuff is not guaranteed to happen

vocal dune
#

seems like i did a fuckie wuckie

drowsy willow
#

no you didn't

#

it's modmanager issue

#

but you can try regenerating the config

vocal dune
drowsy willow
#

something else errors but that's my fault as well lol

unique turret
#

haha yeah no problem πŸ˜„

drowsy willow
#

Weather Tweaks / Registry

leaden flume
#

does scrap values work now

ancient depot
leaden flume
#

i can get rid of meteo's now

drowsy willow
drowsy willow
drowsy willow
#

oh no i forgot that this was a thing

#

fucking weathertweaks still messing my stuff up 😭

ancient depot
drowsy willow
#

i'm trying to debug why weather weights aren't correctly applied on first day

abstract pivot
drowsy willow
#

and that's because levels have random weathers when lobby starts

#

and i forgot i've made a separate logic for that in weathertweaks

#

fun

ancient depot
#

Yeah you added the logic to BetaTweaks for the combined and progressing ones

ancient depot
#

Ah

drowsy willow
#

first day weathers being always the same

#

forgive me, but i'm gonna do a gamer move here

abstract pivot
drowsy willow
abstract pivot
drowsy willow
#

🀭

wicked latch
#

@drowsy willow Quick question.

#

Building won't publish the uhh.

#

API, right?

#

I'm seeing tcli in proj thus wondering.

drowsy willow
#

i'm trying to get it to work still

#

so no

wicked latch
#

Oki.

drowsy willow
#

what are you doing? 😳

wicked latch
#

Just coming back to repositories after mental break.

drowsy willow
#

lol

#

you might want to wait a bit, cause, umm

#

i'm having FUN locally

wicked latch
#

It's okay.

drowsy willow
#

i was meaning to ask

#

how did your exams go?

wicked latch
#

They went fine.

#

still need to know one but it went great.

#

Got maximum grade on the language project though so I'm happy.

drowsy willow
#

yippee!

#

that's great to hear! πŸ˜‡

abstract pivot
wicked latch
#

Considering that it was meant as a pair project, I think I did a good job on it.

#

You can make WeatherRegistryEvent to WeatherRegistryEvent<object> and pass null as param, no?

#

At least, it seems to be the same thing.

drowsy willow
#

i don't know honestly

#

it's copied straight from LLL

wicked latch
#

You can still override "Invoke" to just not pass anything to the listeners still.

#

Besides that, it seems functional that way.

drowsy willow
#

alrighty

wicked latch
#

Nice try catch on a log.

#

Oh, your weight system is ... curious.

#

You're just praying that they have enough memory for the list? Lol.

drowsy willow
#

πŸ₯Ί

#

IF i were to change it to something that's not born in the bowels of hell, how would i do that? πŸ˜…

drowsy willow
#

it's so much cursed shit

wicked latch
#

You can use what I use for the hunter samples API.

#

It's a simple Dictionary<T, double>

#

Where double is the weight.

#
internal class WeightingGroup<T> : Dictionary<T, double> where T : class
{
    public T GetItem()
    {
        double totalWeight = 0f;
        foreach (double item in Values)
        {
            double absWeight = Math.Abs(item);
            totalWeight += absWeight;
        }
        if (totalWeight <= 0f)
            return null;
            
        double roll = new Random().NextDouble();
        double total = 0;

        foreach (KeyValuePair<T, double> pair in this.OrderByDescending(v => v.Value)) 
        {
            total += pair.Value / totalWeight;
            if (roll <= total)
                return pair.Key;
        }
        return Keys.FirstOrDefault();
    }
}
drowsy willow
#

oooh, i see how you do it

#

so you're picking a rolled value and going through the dictionary one-by-one until the rolled value is 0

#

that's waaaay better than my stuff

#

🀭

#

i'll change my stuff to this

wicked latch
drowsy willow
#

you're gonna have so much fun seeing this shit

#

i'm sorry for the crimes i've commited

#

those are the changes from today

wicked latch
#

ConfigHandler's Value seems to be abstract.

drowsy willow
#

yeaah

#

it's because i'm defining its type in the extensions: LevelListConfigHandler and others

wicked latch
#

Ye ye

drowsy willow
#

so that i can have a single abstraction for all types of shenanigans i'm doing

#

it's reaaaally bad

wicked latch
#

But you put virtual instead.

#

As in you need it for something on the base class.

drowsy willow
#

should it not be virual?

#

OOOOH i see what you mean

#

but i would need to have the whole class abstract for that, no?

wicked latch
#

You will have to put the handler as abstract ,yes.

drowsy willow
wicked latch
#

Unless you're using the base class somewhere?

#

And remove the default(T)

drowsy willow
#

oh

#

i don't actually know if it's gonna work πŸ˜…

wicked latch
#

I mean

#

You're overriding the get anyways.

#

So the initializer doesn't really do anything.

drowsy willow
#

i'm trying to recall why i put it there

#

but i don't remeber lol

wicked latch
#

Double array cast on ConvertStringToArray ?

drowsy willow
#

😳

#

OH NO

wicked latch
#

levels not used in ConvertStringToLevels

drowsy willow
#

right, redid that today

wicked latch
#

There's some repeated stuff here but that's fine.

drowsy willow
#

that's what i wanted to tackle next

#

to just call a method with repeated stuff in there, simplified

#

because i have the same code (with very small differences) like 4 times there 😭

wicked latch
#

What is ConsoleTable used for?

#

For logging, it seems?

drowsy willow
#

i'm putting stuff into tables to print them nicely

#

ye

wicked latch
#

Huh okay.

#

Ah, thus "Console"

drowsy willow
wicked latch
#

Okay.

drowsy willow
#

like this:

wicked latch
#

You can probably put in your lib tbh.

drowsy willow
#

i could, yeah

#

i'm gonna try to not do a mrovlib dependency for as long as i can

wicked latch
#

Why not?

drowsy willow
#

huh

#

that's a great question actually

wicked latch
#

It's just a library.

#

Supposedly it shouldn't break on updates.

drowsy willow
#

i'm not keen on that, but don't know why exactly

wicked latch
#

It just helps with modularity really.

drowsy willow
#

importing it into unity means more packages need to go there?

wicked latch
#

Separates stuff from A to B, yada yada.

drowsy willow
#

and i think it's that

drowsy willow
#

i know

wicked latch
#

Ah, you're making it Unity friendly.

drowsy willow
#

i'm trying

wicked latch
#

It should be just another .dll though.

drowsy willow
#

well

#

the thing is

#

in unity you have to import all soft-dependencies that a .dll has

#

i'm gonna think about it though

wicked latch
#

Oki oki.

drowsy willow
#

because i'm already doing lethallib

#

and i'm planning to have support for LLL tags in the near future

#

which bring all those dependencies in

wicked latch
#

Umm

#

What is...

#

Settings?

#

I see the color one being used.

drowsy willow
#

lol

#

i forgot about it πŸ˜†

wicked latch
#

The SelectWeathers I have no idea what you're doing with it.

drowsy willow
#

this is my funny setting that i disable in weathertweaks

#

so the Registry doesn't try to sync anything and pick the weathers

#

and it's handled by something else

#

that was the idea, at least

wicked latch
#

Hm ok ok

#

So it's like a modder setting more like?

drowsy willow
#

yeah

#

there's surely a better way to organize all of those classes/properties

#

but this is what i have now

wicked latch
#

You can put sets in the public properties to change the private fields.

#

Like StringToWeather for _weathersDictionary

drowsy willow
#

ohh

#

alrighty

wicked latch
#

Unless you're using them someplace else I am not seeing.

#

But I'm only seeing them used in the properties thus suggesting it.

drowsy willow
#

the thing i wanted to have here is a "cache": it only actually creates the dictionary when it's not present

#

so the expensive operations aren't performed always

wicked latch
#

Ye ye.

drowsy willow
#

and i'm doing that in the getter itself

#
    internal static Dictionary<string, Weather> _weathersDictionary = null;
    public static Dictionary<string, Weather> StringToWeather
    {
      get
      {
        if (_weathersDictionary != null)
        {
          return _weathersDictionary;
        }

        Dictionary<string, Weather> Weathers = [];

        WeatherManager
          .Weathers.ToList()
          .ForEach(weather =>
          {
            Weathers.TryAdd(weather.name.ToLower(), weather);
            Weathers.TryAdd(weather.Name.ToLower(), weather);
            Weathers.TryAdd(((int)weather.VanillaWeatherType).ToString(), weather);
          });

        _weathersDictionary = Weathers;

        // return the result of this setter
        return Weathers;
      }
    }
wicked latch
#

Ye, I know.

#

But for like resetting it.

drowsy willow
#

OOOOOOOH right

#

yeah!

#

that makes more sense lol

wicked latch
#

Because the get will always return the cached result.

#

So the set just change the cached result to what you want, in this case null.

drowsy willow
#

that makes so much more sense, yeah

#

changed that πŸ‘

wicked latch
#

In the uhhh.

#

GetPlanetPossibleWeathers

#

How is the possibleWeathers list ever empty or null?

#

(Also double cast to List)

drowsy willow
#

oh shit

#

let me find that in weathertweaks

#

cause that's yoinked 1:1

wicked latch
#

Oh, I didn't even see the comment above, lol.

#

But yeah, you can probably remove the if.

#

As it won't ever reach there.

drowsy willow
#

it seems like i've changed the code order somewhere

wicked latch
#

Wait a second.

#

It has triple cast.

drowsy willow
#

yeah 😭

wicked latch
drowsy willow
#

after .Where is has to go to the list (becuase c#)

#

and after .Select the same

#

so the first one is not needed, but the rest are?

#

i think

wicked latch
drowsy willow
#

it's not screaming, but the results won't be correct

#

wait a moment

wicked latch
#

How so?

#

The things are waiting for IEnumerable, not List

drowsy willow
#

wait

#

what did i do that got me this issue first time

wicked latch
#

Am I gonna find a quadruple cast somewhere here?

drowsy willow
#

i hope no

wicked latch
#

Oh.

#

oh no.

drowsy willow
#

please no

wicked latch
#

You just want to murder RAM, don't you?

drowsy willow
#

what happened 😭

wicked latch
#

GetPlanetWeightedList

drowsy willow
#

that's the weight shit you pointed before

#

OH my new stuff is badbad

#

isn't it

wicked latch
#

Like

#

There's some merit in it.

#

But the problem is that you end putting in a list with repeated entries.

#

So if I decided to put a weight of, I don't know...

drowsy willow
#

it's gonna put 1000 ints there

wicked latch
#

Yeah, it will put 1000 * sizeof(int)

drowsy willow
#

.<

ancient depot
wicked latch
#

Meaning...

#

If I know C# memory...

drowsy willow
#

memory nom nom nom

wicked latch
#

Either 4k bytes or 8k bytes.

drowsy willow
#

4mb for this shit?

wicked latch
#

It's the first, I checked.

drowsy willow
#

ouch

wicked latch
#

For 1k weight, yeah.

ancient depot
#

Mrov has some optimizations to do

drowsy willow
#

hmmm

#

that's not great

#

it's not the worst

#

but could be soooo much better

wicked latch
#

Christ.

drowsy willow
#

oh πŸ˜…

#

ye

wicked latch
#

VanillaWeatherTypes is still in NewWeathers

#

At least I remember seeing these when I last checked.

#

A cast before a find?

#

Why do you need to cast?

#

There's also quota things not used.

drowsy willow
#

oh my lord

wicked latch
#

Then weights from previousDay that are not used either.

#

Or well, previousDayWeatherWeather

drowsy willow
#

hoarders episode incoming

wicked latch
#

WeatherController is essentialy a static class.

#

Same for the manager.

drowsy willow
#

OH it's not marked as static πŸ’€

#

so much shit copied from weathertweaks without second thought

#

it's genuinely disturbing

wicked latch
#

I like how you save the network manager but then you don't use it.

#

You just keep on passing through GetComponents, lol.

drowsy willow
#

copied from LLL 😭

#

which is copied from LL

wicked latch
#

So yeah, either don't use the cached result (because I only see one usage) or use the cached result and remove the param from the method

drowsy willow
#

i see what you mean

wicked latch
#

FixedString4096Bytes is to pass string through RPCs?

drowsy willow
#

i've used the 1024Bytes one

#

and it got too big at one point

#

so i'm using the biggest

wicked latch
#

Why not use encoding?

drowsy willow
#

πŸ‘€

wicked latch
#

Like turn to bytes then turn to string after?

drowsy willow
#

ummm

wicked latch
#

Or, well, anything you want to turn back to after the network message.

drowsy willow
#

you can see my lack of knowledge 😭

wicked latch
#

I mean, it works for now.

#

But as soon it gets more weathers, it will probably die at some point.

drowsy willow
#

this whole thing is me trying not to use LethalNetworkAPI (like for weathertweaks)

#

which goes well

#

🀭

drowsy willow
wicked latch
#

Well, 4096 bytes is 4096 characters.

drowsy willow
#

because it's setting that:

{"41 Experimentation":3,"220 Assurance":4,"56 Vow":4,"71 Gordion":-1,"61 March":9,"20 Adamance":6,"85 Rend":2,"7 Dine":7,"21 Offense":9,"8 Titan":6,"68 Artifice":1,"44 Liquidation":7,"5 Embrion":6}
#

which could probably be squeezed even more

wicked latch
#

Probably.

drowsy willow
#

or - like you said - just don't use strings πŸ˜…

wicked latch
#

You would just need to be careful when converting stuff around.

drowsy willow
#

how would i do that?

#

oh wait, i can use INetworkSerializable types

#

but that still requires a serializer on my end

#

i'm gonna try doing that in the near future

wicked latch
#

Nice == false

drowsy willow
#

i'm getting roasted here

wicked latch
#

Also delete code instead of commenting it.

#

It will be too much clutter at some point if you keep doing it.

drowsy willow
#

I KNOW 😭

#

the hoarder brain never has enough

#

I FIXED THE GITHUB ACTIONS NOT WORKING πŸ˜‡

#

funsies

#

i'll try to tackle the weight list today as well

wicked latch
#

Bundles?

drowsy willow
#

it didn't find them (cause i don't have bundles), so it gave up

wicked latch
#

So you're creating a blank prefab?

drowsy willow
wicked latch
#

Oki

drowsy willow
#

i think i got it working

#

i did not

#

i did

lofty silo
#

extremely stupid question, but I'm setting up WR to match the original meteo values here
+10% (dustclouds, foggy, rainy), +30% (stormy), +40% (flooded), +50% (eclipse)
Would that just be 10, 10, 10, 30, 40, 50 in WR's values? Or am I tripping

worldly sleet
#

why would dustclouds give extra scrap value

lofty silo
#

we just dont know

#

allergen hazard

ancient depot
# gray kayak

@drowsy willow please make these the default values, and for Windy do 1.2 and Meteor Shower 1.6 ^^

abstract pivot
#

No

drowsy willow
#

I'm not planning to - that's why the configs are there πŸ₯²

drowsy willow
rapid thistle
#

I am getting tons of fatal errors after updating and I'm unsure how to parse them D:

drowsy willow
#

I forgot to remove those logs from my disastrous testing session, don't worry about them

#

I'll push an update today to get rid of those

rapid thistle
#

okiedokie ❀️ thank youuuu for your wonderful work :3

wicked latch
#

Imagine using fatal logging.

abstract pivot
wicked latch
#

_
_

abstract pivot
#

that imagination is quite large

wicked latch
#

Nothing is quite large, yes.

drowsy willow
#

oh my god

#

i just forgor 😭

drowsy willow
#

the damage is done already 🀭

quiet agate
#

What does Weather Weight actually do?

#

I understand default and level but this one I can't think of what it'd do

drowsy willow
#

weather>weather weights changes the weight of the weather when the defined weather was there on the previous day

#

so if you want Foggy to have a big chance to happen after Eclipsed, you would type Eclipsed@500 into the Foggy config

#

I will write a proper readme someday 😭

drowsy willow
ancient depot
#

Unknown weather and weathers with ? at the end no longer appear as that on the monitor

#

It just always shows the correct weather

#

lol

drowsy willow
#

huh

#

i know why

#

again: forgor πŸ’€

#

will fix tomorrow

ancient depot
#

Yeah just wanted to let you know

ancient depot
drowsy willow
ancient depot
#

Yeah cus too many planets start off with insane weathers without WeatherTweaks XD

#

and I imagine that's a feature that Registry should include

drowsy willow
#

definitely not as a default, but there's gonna be something 🀭

ancient depot
#

:3

lofty silo
drowsy willow
#

WeatherRegistry v0.1.8

  • optimized the weight-picking algorithm (thanks, whitespike)
  • changed some logs
#

finally got github actions to work

ancient depot
#

Hoorah for optimization though

#

c;

drowsy willow
#

the first day? not yet πŸ˜…

#

i've just fixed my automated workflow to push the updates 🀭

ancient depot
#

Noice

drowsy willow
#

which means that now i don't have to manually push new releases and i have one set of readme and changelogs instead of 2 πŸ˜†

ancient depot
#

Good

#

XD

manic cobalt
#

πŸ˜›

drowsy willow
#

i will tinker with it πŸ˜‡

drowsy willow
#

oh i hate that upload system

#

it would be easier if i made a node script for it

#

so i can do some cursed stuff

#

there is still no bepinex on CF 😭

drowsy willow
#

forcing people to use yaml should be punishable

drowsy willow
#

let's see

#

so close 😭

drowsy willow
#

interesting

#

it shows that something went through, but nothing is shown on CF end

drowsy willow
#

i think i can claim success

#

i wasted 4 hours on that, barely worth it

manic cobalt
#

thats sick as hell tho

loud heart
#

wait-

Is the newest update able to make weather appear in moons it doesn't appear?

drowsy willow
#

vanilla moons?

loud heart
#

yea

#

or modded

drowsy willow
#

no

#

you can't add a vanilla weather to any moon, but you can prevent it from being there

loud heart
#

ah k

#

now I remember lol

drowsy willow
#

because of how vanilla weathers work, you have to set up weather variables on the SelectableLevel itself and it affects the weathers (like Flooded wave height, Eclipsed spawning amount of monsters etc.)

loud heart
#

just got confused by the config structure

drowsy willow
#

so i would have to have something to allow that

#

and i'm not planning to

#

no worries πŸ˜…

loud heart
#

nice

drowsy willow
#

forgot to do that:

WeatherRegistry 0.1.9

  • added config options to disable logging startup logs & weather selection logs
drowsy willow
#

I got roasted so brutally I've changed the code that was there since the beginning 🀭

#

thanks again πŸ˜‡

wind bough
#

πŸ‘

drowsy willow
#

WeatherRegistry v0.1.10

  • fixed an issue with randomWeathers having multiple entries of the same modded weather (thanks, @abstract pivot )
abstract pivot
#

yw

drowsy willow
#

don't come to school tomorrow

obsidian schooner
#

:[

drowsy willow
#

WeatherTweaksBeta 0.20.6

  • (hopefully) fixed an issue with ChangeMidDay allocating absurd amounts of memory every TimeOfDay update (thanks, diffoz)
  • moved even more things into WeatherRegistry
drowsy willow
#

my mods should work without any changes needed on v55

#

literally nothing changed lol

wicked latch
#

Nice.

#

I might need to light up a candle or two.

wicked latch
#

So apparently mine didn't immediately catch on fire.

#

As the patches seemed all fine.

#

Um, I'm sorry?

#

Why is the player controller tracking what the vehicle does?

drowsy willow
#

that's all - hardcoded Mask change and 4 new fields

#

😭

#

let me try to decompile for the 3rd time

wicked latch
#

Also good luck on || driving the car to a decent degree ever.||

drowsy willow
#

i will always prefer the wheelbarrow 🫑

wicked latch
#

Lol

#

Just to give you an idea:
||Back is always stopping the car||

drowsy willow
#

oh no

bright viper
#

checking weather registry configs rn and...
What are these defaults?
Mrov why are you evil?!!

drowsy willow
#

🀭

#

i've done some tweaks, if i may

bright viper
#

also what is cloudy weather exactly?
And why does it also have less loot value 😭

drowsy willow
#

it's clear weather

#

but cloudy

bright viper
#

sounds pretty

#

BUT WHY LESS LOOT VALUE 😭

drowsy willow
#

🀭 i was testing my own api's settings πŸ˜…

#

and (it looks like) the defaults & configs are working πŸ˜‡

bright viper
#

yeah honestly I was really surprised everything works

drowsy willow
#

it's literally unlike me πŸ˜‚

bright viper
#

||the terminal cruiser incident||

stiff hatch
#

Does anyone know the default chances of weather?

drowsy willow
#

By default the vanilla weathers have weight of 100

stiff hatch
drowsy willow
#

look at the default weather-weather weights in the config - they are used before the default one

stiff hatch
#

Oh ok that update added the actual defaults. I had to generate a new config to see that. Thanks. So they are all 100 but their weights based on the previous weather is what’s different?

drowsy willow
#

yeah

#

I'm gonna copy how it works from the readme:

Weight-based weather selection system

Contrary to the vanilla algorithm, this mod uses a weight-based system for selecting weathers. You can set the weights based on 3 criteria:

  1. Level weight: the weight of the weather based on specific level
  2. Weather-to-weather weight: the weight of the weather based on the previous weather
  3. Default weight: the base weight of the weather

During the weather selection process, the algorithm will try to apply the weights in the order listed above.

stiff hatch
#

So if I don't touch the config, the weather is the same as vanilla? Your description says "contrary to vanilla" so I'd assume it's different.

drowsy willow
#

the weight system itself is different than vanilla

#

the defaults are not equal to vanilla ones

stiff hatch
#

Ok. So my question was what are the vanilla chances of weather?

drowsy willow
#

🀷

#

vanilla rolls a number of moons to apply weather to, then picks a random one from the SelectableLevel array

rapid thistle
#

does the weather tweaks beta play alright with brutal company minus?

drowsy willow
#

that's a great question

prisma vault
#

Whay is the differmece

#

Between default weights

#

And the qeather weights

#

In the config?

prisma vault
#

Oop-

#

My bad

drowsy willow
#

No worries πŸ˜…

prisma vault
#

So if I want all of the weights to be default, i would have to basically delete all the weather-to-weather weights?

#

So they all use the default one?

drowsy willow
#

Yes

#

Exactly

#

If it's the only weight that can be used, it's gonna be used

rapid thistle
drowsy willow
#

i have an idea

rapid thistle
#

@drowsy willow I was wondering, how does the beta interact with MeteoMultiplier? I'm trying to figure out if it's functioning the same way with Brutal Company Minus' weather multipliers

#

this is fantastic by the way, especially in conjunction with the terminal formatter

#

really cool stuff

drowsy willow
#

weathertweaks beta?

rapid thistle
#

yep

drowsy willow
#

it doesn't

rapid thistle
#

ok, makes sense

drowsy willow
#

i've cut that part out when moving to Registry, and haven't implemented it back yet

#

cause - naturally - i'd like to only use the registry system moving forward

#

i've commented out all code touching meteomultiplier

#

so nothing is in the final product

drowsy willow
#

i'm replacing both the ScrapAmountMultiplier and ScrapValueMultiplier

#

so if my patch runs last, it's only gonna use my values

rapid thistle
#

right, ok. hmmm

drowsy willow
#

HUH actually

#

it's always gonna use both?

#

no, it's always gonna use mine, i've checked

#

because i'm applying the values much later than BC

rapid thistle
#

ok cool. that's good

#

I'll play around with some different values and settings and see what feels right

#

and again, really cool stuff, I am loving the unpredictability

wicked latch
drowsy willow
#

🀭

#

i love your panicked emotes

wicked latch
#

Wait til I show you '1' + 1

drowsy willow
#

good 'ol javascript

abstract pivot
drowsy willow
shadow bough
#

banana

drowsy willow
#

i remember that

#
document.write('ba'+(+'a')+'a');
drowsy willow
#

i tried

#

do i need to match the namespace for it to be accessible?

wicked latch
#

Ye.

#

How are you doing it though?

drowsy willow
#

oh

#

i've copy-pasted it into the lib

#

so it sits in a ConsoleTables namespace

#

inside MrovLib assembly

#

and - what's funny - i can access it in my code

#

there's no errors, everything is fine

#

and it doesn't work πŸ˜”

wicked latch
#

Is the assembly loaded?

drowsy willow
#

yees

#

i'm using harddependency

wicked latch
#

And it's not confusing with other namespace.

drowsy willow
#

no, i've removed it from the "local" code so to speak

wicked latch
#

And nowhere else you would have the same field in the same namespace.

drowsy willow
#

that's what the reference is pointing to

#

unless

#

waaaaaaait

#

it was terminalformatter

#

delightful

#

sorry to take your time πŸ˜…

wicked latch
#

It's fine.

drowsy willow
#

the rubber duck experience ℒ️

wicked latch
#

I like always wasting time on coding anyways.

wicked latch
#

Not so much on strings though.

abstract pivot
#

Lmao

pallid sandal
#

What exactly does this function do? Speed ​​up time inside the moon based on game progression?

#

I'm using BetaWeatherTweaks 0.20.6

drowsy willow
#

its lowering the chance of clear weather based on the # of completed quotas

tall tangle
#

Im not suggesting it but how complex would it be to make weathertoweather weights different for each moon?

drowsy willow
#

so you'd have even more specifically defined weights?

#

I like the idea, but it's not something I'm gonna implement

drowsy willow
#

although I might add an event for easily adding your own weights to the mix

#

so an external mod could do that without hassle

tall tangle
#

differing weather patterns for each moons would be nice but I figured that weather to weather 11 times would be alottt

drowsy willow
#

yeah πŸ˜…

drowsy willow
wicked latch
drowsy willow
#

i've played with the weight handler

#

and now it's a little bit overkill

abstract pivot
drowsy willow
#

i am not overweight

abstract pivot
#

Thank you, thank you, here every Monday from 9 to 5

abstract pivot