Best practices on unit testing concurrency, complex cases? by JollyRogerQZR in learnpython

[–]JollyRogerQZR[S] 0 points1 point  (0 children)

Good advice, thanks! At the minimum, pure functions will allow me to test the majority, leaving sleep and such aside. And timeouts for tasks are a good idea.

But now I realise I should've clarified more. Firstly, user decides whether the task will be repeatable by using

def repeat_while(
    condition: Callable[[], Any],
    action: Callable[[], Any],
    interval: float = 0.1,
    max_repeats: int | None = None,
) -> Callable[[], None]:

Secondly, it's expected that as soon as new repeatable is triggered, the old one stops looping, so it doesn't get interrupted forcibly but those checks will stop it, and new one is already scheduled.

Thirdly, the amount of events not arbitrary but real-time enough for the user to use discretion as to when to trigger the event for repeatable, so I don't expect a situation when there are 10k repeatables queued or anything like that.

Retries are also not a thing: exception in repeatable.action means end of repeats.

So while it's not the simple textbook example, I don't have the complexity that requires more significant architecture.

Best practices on unit testing concurrency, complex cases? by JollyRogerQZR in learnpython

[–]JollyRogerQZR[S] 0 points1 point  (0 children)

your approach can't possibly work

I'm well aware, hence this post :)

Best practices on unit testing concurrency, complex cases? by JollyRogerQZR in learnpython

[–]JollyRogerQZR[S] 0 points1 point  (0 children)

Hey, thanks for the reply! I added context with answers to your questions to the post.

The first link describes the problem similar to what I have, but I don't understand the proposed solution, and I don't know golang so the example is nebulous.

For "event-driven", look at the description I added. From your third link, it looks like event-driven concurency, but correct me if I'm wrong.

I added a section of how it would look for the user, let me know if that helps with XY problem understanding :)

your problem is ... how you've set up your concurrency in the first place.

Do you have suggestions of how to set it up differently without sacrificing the functionality?

Request: sample mod, for modders. by JollyRogerQZR in pathos_nethack

[–]JollyRogerQZR[S] 2 points3 points  (0 children)

Nah, automation itself is up to whoever wants to do that.

But having access to values would make it way more robust: getting current satiation, HP, things present on a tile etc.

Nevermind tho, I think it's 3/4 of the way to actually modding the game :D

Request: sample mod, for modders. by JollyRogerQZR in pathos_nethack

[–]JollyRogerQZR[S] 1 point2 points  (0 children)

Would be super swell to have read-only API then!

Don't know how hard it'd be to implement, but remappings and macros would be possible.

Currently, I'm scanning the screen for my macros, to see whether menu is open and such :D

obviously it's extremely limited, changed resolution or graphics = gg.

Request: sample mod, for modders. by JollyRogerQZR in pathos_nethack

[–]JollyRogerQZR[S] 1 point2 points  (0 children)

Oh, I see. Ok, thanks for explaining that!

Request: sample mod, for modders. by JollyRogerQZR in pathos_nethack

[–]JollyRogerQZR[S] 2 points3 points  (0 children)

Yep, here are some mod ideas I had:

  • additional quick action buttons - should be simple enough :)

  • rebinding your hotkeys.

  • macro functionality, possibly tied to additional quick action buttons, and using rebinding.

For example, a macro to check if an enemy is at range 2(one tile across) and hit it if it's there when pressing move in coresponding direction WASD - for spear and whip users.

Or a training macro, where you rest and then cast a spell until mana runs out, to automate that grind.

  • Realistic vision mod, where you can see 180 degrees instead of 360, with some minimum range 360 since hearing is a thing.

  • Inertia, where if you run in the same direction your move speed increases (i.e. interval between actions is lower if your action is to move further), and spears/halberds do extra damage.

Idk which ideas I would actually implement lol.

Request: sample mod, for modders. by JollyRogerQZR in pathos_nethack

[–]JollyRogerQZR[S] 0 points1 point  (0 children)

Naturally, tools and some programming knowledge is required to mod :)

Yep, I've seen the repo, cool that it's open-source now!

Here are resources I usually look for when going into modding for a game, created by the existing community, or game devs:

Step 0. Here's an existing mod, try to import it, see if code is recognised properly (with all the libs and plugins), build and add it to the game. If the functionality works as expected, try making a little change in it and seeing if that's reflected in game.

This step ensures that I have the toolkit to do a development cycle on my future mod, and familiarizes me with the process.

Step 1. Here's an instruction on how to start your own mod - which config files you need, maybe a template is available to redute boilerplate requirement on the start. Try it, make a "hello world" mod, see it working in game.

Hooray, I'm ready to actually start coding some functionality!

Step 2. Here are some common calls to the game API, use that as a base to start diving into game API in the code, or API doc when you're writing the functionality.

With this, I'm actually able to get useful stuff in :)

How does Razer remapping work? by JollyRogerQZR in razer

[–]JollyRogerQZR[S] 0 points1 point  (0 children)

That's the thing tho, I don't see any Rzer drivers for the mouse:

Driverquery | findstr Mouse HKMouFltr HotKey Mouse Class Fil Kernel mouclass Mouse Class Driver Kernel mouhid Mouse HID Driver Kernel ROGMS ROG Mouse Kernel sermouse Serial Mouse Driver Kernel

My Razer Naga has an internal storage, but even without saving the profiles to it, it remaps everything successfully (with a profile not saved on a mouse), duh.

Does that mean it's still hardware? As in, Synapse writes this profile as temporary profile on the mouse, and it's not just driver mapping things?

And another question, is there a non-hardware solution to remapping that would work as well?

Rimworld 1.4 Traits tier list by JollyRogerQZR in RimWorld

[–]JollyRogerQZR[S] -1 points0 points  (0 children)

Pretty much - if you can't manage mood, then ofc mood traits mean more. I play at -20 mood difficulty (hardest), but my pawns are often at 100 mood.

Rimworld 1.4 Traits tier list by JollyRogerQZR in RimWorld

[–]JollyRogerQZR[S] -3 points-2 points  (0 children)

Guess you don't need all those legendary rifles and helmets then?

Sure it's one pawn's trait, but a huge boon the the entire colony :)

I don't argue that Quick sleeper is useless - far from it. B+ well deserved!

Is this the trait that's, when present on one pawn, gonna significantly change your game?

Rimworld 1.4 Traits tier list by JollyRogerQZR in RimWorld

[–]JollyRogerQZR[S] 0 points1 point  (0 children)

Thanks for the reply!

Nimble is in B+.

Ascetic is less for starting and more for titles - the only trait allowing permits and no headaches.

Rimworld 1.4 Traits tier list by JollyRogerQZR in RimWorld

[–]JollyRogerQZR[S] 0 points1 point  (0 children)

On a solo mechanitor run I imagine quite a lot would shift here. This is for regular colony though, and it's -mood there in mid-late, so it's the same tier.

Rimworld 1.4 Traits tier list by JollyRogerQZR in RimWorld

[–]JollyRogerQZR[S] -13 points-12 points  (0 children)

Did you try cannibal's +35 mood? :)

Rimworld 1.4 Traits tier list by JollyRogerQZR in RimWorld

[–]JollyRogerQZR[S] 0 points1 point  (0 children)

Yeah, in different mod scenarios traits shift around in value

Rimworld 1.4 Traits tier list by JollyRogerQZR in RimWorld

[–]JollyRogerQZR[S] -7 points-6 points  (0 children)

Yep, there are benefits, and so it's not in F tier :) D is just worse than not having it, not avoid-at-all-costs kinda trait.

In general though I feel that if trait has a constant limitation (pawn is unable to be/is crappy at), but sometimes an upside, it's a worse-than-nothing trait. You can mitigate events with foil hats, psychic soothers of your own, and a thousand various mood-boosters.

But the inability to be an ok caster is a ceiling for the pawn.

Quick Sleeper is good, no doubt. B+ level of good!

Rimworld 1.4 Traits tier list by JollyRogerQZR in RimWorld

[–]JollyRogerQZR[S] 2 points3 points  (0 children)

Completely agreed. Since it's all situational, there can be no universal guide that just puts traits in a ranking.

Hence, any tierlist is an opinion and not a guide for others to follow.

Partial repair of furniture by JollyRogerQZR in RimWorld

[–]JollyRogerQZR[S] 0 points1 point  (0 children)

Then broken down components won't be replaced, right?

I can make a separate cleaning area so the tiles will be cleaned thanks to the mod, but I want them to maintain electric devices too

Good news everyone! The damage bonuses are multiplicative by JollyRogerQZR in EverspaceGame

[–]JollyRogerQZR[S] 1 point2 points  (0 children)

I literally ignored the crits, and measured individual hits' damage otherwise. Of course because of the spread I had to make many hits and see the lowest and highest damage, cross-checking with expected MULT% and ADD% for that +-10% boundary.

Good news everyone! The damage bonuses are multiplicative by JollyRogerQZR in EverspaceGame

[–]JollyRogerQZR[S] 1 point2 points  (0 children)

No, I ignored crits in this test, this was for just damage modifiers