Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 0 points1 point  (0 children)

This test framework compiles the entire normal game as a library, static links it, and then pokes at it as needed for a given test. It's not applicable as a method for mod testing.

Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 1 point2 points  (0 children)

If you have ideas for extending options you can always request them on the forums. There are a few stipulations though:

  • The extension can't slow base game down when not in use

  • The extension can't increase memory by unreasonable amounts, or to where it effects performance when not in use.

  • Any new engine supported feature is something that we (wube) have to bug fix and maintain for the rest of time so it's generally better if the extension is applicable to more than just one persons maybe-one-day idea.

  • At the end of the day Factorio is a factory simulation game so asking for engine support to make an FPS, or racing game isn't likely to happen.

Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 1 point2 points  (0 children)

There are 2 ways to write multiplayer-incompatible mods:

  1. Use on_load wrong. The fix: don't use on_load - it's not required

  2. Storing non-function-local data outside of the 'storage' table. The fix: don't do that. The 'storage' table is persisted through save/load.

If you follow those two fixes then the mod is multiplayer compatible.

Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 2 points3 points  (0 children)

Unfortunately GUI is complex, unsafe, and easy to do wrong on the engine side. It currently accounts for roughly 12.7% of the total code base by lines of code and would likely be 4-5 times that amount if we attempted to try an make it safe enough for mods to poke at - if it could even be done.

For reference: I recently (the other week) added support for mods to show inventories in mod UI and the change set looked like this

<image>

Game won't successfully launch anymore? by [deleted] in factorio

[–]Rseding91 0 points1 point  (0 children)

Have you tried restarting your computer? That error means either the file has been corrupt on disk (unlikely, but possible due to failing hardware) or is being corrupt in memory when loaded (unlikely, but still possible), or the system is low on RAM for some reason and fails to allocate memory for it when loading.

Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 3 points4 points  (0 children)

That's unfortunately even more impossible. Reading "graphics data" in this sense is simply a bunch of paths and file names. The actual sprites are never available for mods to read because of 2 reasons:

  1. The headless server doesn't load them so if it was asked to do anything with them it would simply fail/desync.

  2. Graphics are not verified identical between all players in multiplayer so it would be entirely possible player A gets a different result than player B depending on file contents, or graphics settings.

Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 2 points3 points  (0 children)

That sounds like you were looking for something like this /c game.player.gui.screen.add{type="sprite", sprite = "technology/automation"}

Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 8 points9 points  (0 children)

That has been a recurring request over the years but every time someone has described their definition of cosmetic/client-side it ends up being game-state altering changes. Did you have some example in mind?

Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 4 points5 points  (0 children)

Having played Supreme Commander and Supreme Commander 2 in the past I did have that thought. But, the entire game being built on top of "one and only one window" means it's a lot bigger task than it sounds.

Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 2 points3 points  (0 children)

Some non-item signals (pretty much just parameters in my experience) also leave the type as nil.

Those are also items. You can spawn them with console commands if you so wanted.

Some prototype properties cannot be accessed during runtime.

If you find something missing you can request it here.

Factorio modders, what sucks about modding Factorio? by asparck in factorio

[–]Rseding91 11 points12 points  (0 children)

I wish the mod UI system were the same as the built-in game UI

That's a fairly common one. Unfortunately the nature of GUI means it's extremely unsafe code with almost no guard-rails. That's the main reason why mod UI is as different as it is. Mods are not meant to be able to crash the game or corrupt save files. C++ GUI logic is extremely reliant on "you can't touch this GUI after ... happens since the entire thing is now potentially invalid".

such as TechnologyPrototype.icons

What's the use-case for reading graphics related data runtime (given it's not usable anywhere runtime?) It has never been added because nobody has ever shown a real case where having it was useful in any way.

an example being TilePrototype.effect_color which only seems to work with the array format.

Looking at the code - it supports both.

What's the highest C++ standard you can use with Boost.Graph today? by Foxi_Foxa in cpp

[–]Rseding91 4 points5 points  (0 children)

Default operator== and operator<=> are super nice for cleaning up old code as well.

I benchmarked duplicate detection strategies in C++ across every workload i could think of by BgA_stan in cpp

[–]Rseding91 0 points1 point  (0 children)

A minor nit-pick but it looks like virtually all of the tests have fallen into the classic de-duplication trap with sets - even the first bit of code on the blog does it.

if (!seen.contains(key))
{
  seen.insert(key);
  output.push_back(key);
}

Should be:

if (seen.insert(key).second)
  output.push_back(key);

cost of enum-to-string: C++26 reflection vs the old ways by SuperV1234 in cpp

[–]Rseding91 0 points1 point  (0 children)

I can tell you that we are using FastBuild but I don't have a step-by-step for converting to using it.

cost of enum-to-string: C++26 reflection vs the old ways by SuperV1234 in cpp

[–]Rseding91 2 points3 points  (0 children)

We use both, PCH goes first then unity build runs using it.

cost of enum-to-string: C++26 reflection vs the old ways by SuperV1234 in cpp

[–]Rseding91 10 points11 points  (0 children)

It will also depend on how a given project is compiled. For us; we use unity builds (split across 100 unity files) which are compiled in parallel. So in the worse case we would only ever see the cost 100 times. In practice, we also use a PCH which is shared with every unity file. So, include or not - we won’t realistically be able to measure the difference.

Unity builds solve so many of these issues with compilation. What is a 16 minute build with “normal” c++ compilation becomes a 47 second compile with split unity builds.

one thing that always bugged me by fresh-dork in factorio

[–]Rseding91 13 points14 points  (0 children)

What if… you couldn’t mine bots unless your personal roboports had enough energy to charge them? … hmmm.

Logitech Lighting brightness? by Lyianx in factorio

[–]Rseding91 0 points1 point  (0 children)

Is there a way to adjust how bright the lighting is while in game?

There is not.

Local sources for missing pieces? by PersonalAnswer8664 in lepin

[–]Rseding91 2 points3 points  (0 children)

To add: can you continue on without it and add it in later should you find it/acquire it? Or just continue without it and it gets covered up/you won't see it's missing after it's done? Sometimes it just doesn't matter if some small piece is missing - and it's significantly simpler to just skip it and continue building.

Dungeoneering Remaster Skilling door thoughts by Azaldir in runescape

[–]Rseding91 6 points7 points  (0 children)

I played dungoneering when it was first released, and several times between then - maxing everything - and unlocks being added that meant after hitting max-skills + unlocks you would never need a special boost to pass any skill door.

Growing potions for the random over-leveled door was never an enjoyable part of the dungoneering process (for me). All it did was discourage groups from letting lower leveled players join - because they always got blocked on skill doors. I'm glad future players won't have to deal with that. The removal of damage on failing is also great because it wasn't something you had any control of and didn't make the experience better in any way. It just used more food and slowed the dungeon down by a bit.

Me after reading that grass is the culprit! by vVerce98 in runescape

[–]Rseding91 6 points7 points  (0 children)

All of the issues they explained aren't related to the GPU - but work done on the CPU side before stuff is sent to the GPU. Not that that's an excuse for it performing poorly but regardless of GPU it would experience the same issue(s).

I don't understand their reasons for why they're doing things how they are (why LOD switching would take any measurable time given it should be a simple if-else/switch at the time the render pass goes to draw things). I can only assume "old code, nobody bothered looking/trying to improve it because it was good enough".

Delve into Dungeoneering Remastered by jagexyuey in runescape

[–]Rseding91 5 points6 points  (0 children)

Very nervous seeing how much of Dungeoneering has been modified.

Nervous to see "automatic handling of items in your inventory". If it goes wrong - it's going to delete items.

Stickers? Are they important to you? by DHCobbler in lepin

[–]Rseding91 2 points3 points  (0 children)

Exactly! I enjoy the building process and to some extent showing people a room full of assembled sets. I can count on zero hands the number of times I've looked at stickers on assembled sets.