How can I unlink these two forks from ModMash Splinter so that I no longer depend on the given library?

Place to get help with not working mods / modding interface.
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 840
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: How can I unlink these two forks from ModMash Splinter so that I no longer depend on the given library?

Post by IsaacOscar »

Keysivi wrote: Fri Dec 27, 2024 1:02 pm There are several mods that make interplanetary logistics and travel easier in different ways:

Here are some examples:
Thanks The Circuit Launchable Rockets one could be useful, I'll have to test it (something like that should probably already be in factorio).
The Teleporters mod (https://mods.factorio.com/mod/Teleporters) is way too cheaty. But something like that might be nice for people who want to play space age and get to other planets quickly. But I'm way to far into my space age game at the moment for that to be necessary.
And none of those mod have anything to do with altering how the rocket's automatically request and launch cargo though!
Keysivi wrote: Fri Dec 27, 2024 1:02 pm What if you try to make a fork of this mod or make your own mod-tweak to make that mod less cheating?
That would be trivial, all I'd need to do is change this line of lua:

Code: Select all

data.raw["utility-constants"]["default"]["space_platform_acceleration_expression"] = "(thrust / (1 + weight / 10000000) - ((1500 * speed * speed + 1500 * abs(speed)) * ((weight / (250 * 0.886)) ^ 0.5 * 0.5) + 10000) * sign(speed)) / weight / 60" -- apparently 0.886 is (pi/4)^0.5, and 250 is the weight of platform tiles?
Which modifies the following vanilla:

Code: Select all

-- drag_coefficient = width * 0.5
-- drag = ((1500 * speed * speed + 1500 * abs(speed)) * drag_coefficient + 10000) * sign(speed)
-- final_thrust = thrust / (1 + weight / 10000000)
-- acceleration = (final_thrust - drag) / weight / 60
space_platform_acceleration_expression = "(thrust / (1 + weight / 10000000) - ((1500 * speed * speed + 1500 * abs(speed)) * (width * 0.5) + 10000) * sign(speed)) / weight / 60",
Unfortunately, I do not understand the above equations, and have no idea what the best value for them is!
Keysivi
Fast Inserter
Fast Inserter
Posts: 108
Joined: Mon Feb 07, 2022 5:29 pm
Contact:

Re: How can I unlink these two forks from ModMash Splinter so that I no longer depend on the given library?

Post by Keysivi »

Unfortunately, I don't quite understand the essence of the whole problem with the mod you mentioned. Both vanilla and the mod use unrealistic acceleration mechanics.

But if we are talking about real airless space, then speed has nothing to do with mass... Mass is only related to acceleration. The greater the mass, the slower the acceleration.

Plus power, or the number of engines. The more of them, the greater the acceleration the platform develops.

It's the same with braking, only with the opposite effect.

****

The maximum speed of the platform is affected only by the speed of the jet stream of the engine itself. The higher the speed of the ejected particles, the greater the speed the space platform can develop.

That's why classic chemical engines are much slower than some ion engines, where the speed of particle ejection theoretically approaches the speed of light.

****

I don't know how interesting all this is to you, but here's what I know - that's what I shared....
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 840
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: How can I unlink these two forks from ModMash Splinter so that I no longer depend on the given library?

Post by IsaacOscar »

Keysivi wrote: Fri Dec 27, 2024 2:13 pm Unfortunately, I don't quite understand the essence of the whole problem with the mod you mentioned. Both vanilla and the mod use unrealistic acceleration mechanics.
I don't know how to make game design decisions like this! Which is why I leave it up to the vanilla game developers, because I know overall they've made a great game, whereas I feel lesr trusting of some random modder....

My problem however with the vanilla logic is simply that it's boring limiting the width, once I've got it wide enough to fit everything, I just increase it vertically and I don't really need to think about it.
Basing it instead on mass would be more reasonable I think, but I should probably play with it and see how it ends up, I'm worried it will be too hard, as more thrusters require more mass to make the fuell...

I'm not concerned about realism, just fun and how understandable the game mechanics are.
Keysivi wrote: Fri Dec 27, 2024 2:13 pm But if we are talking about real airless space, then speed has nothing to do with mass... Mass is only related to acceleration. The greater the mass, the slower the acceleration.
Right, exactly why I was completely surprised when I discovered width affects the speed more than mass.
With both Vanilla and the Mod though, there is a maximum speed, but it's nothing like the real life light speed limit (in Factorio you can obtain the maximum speed, which depends on mass, platform weight, thrusters, and fuel usage, whereas light speed is constant).

Keysivi wrote: Fri Dec 27, 2024 2:13 pm It's the same with braking, only with the opposite effect.
Interestingly the thruster in Factorio can decelerate the platform too.

In Factorio though, the equations seem to suggest that spaces is filled with air (or aether)...

Anyway trying to apply real life physics doesn't make any sense anyway as the planets are way too close together, and space platform tiles magically gain weight when you launch them to a platform, but everything else is weightless in space...
Keysivi
Fast Inserter
Fast Inserter
Posts: 108
Joined: Mon Feb 07, 2022 5:29 pm
Contact:

Re: How can I unlink these two forks from ModMash Splinter so that I no longer depend on the given library?

Post by Keysivi »

I think that the developers tried to pay tribute to the aesthetics of the platforms, so that they would be more visually similar to the popular idea of ​​​​spaceships associated with water transport

I don't see any other reasons to determine the speed qualities of platforms by their width.

*****

The problem with realistic space flight mechanics in games is that it is extremely difficult for a simple gamer.

That's why the effect of the atmosphere is created, since the presence of natural resistance of space allows for easier control.

There are also a lot of nuances, such as maintaining the center of mass and the like, which are rarely taken into account in games.

*******

Unfortunately, I can't provide practical help in this matter. But I can theorize:

1. There are three key factors that really affect the speed qualities of platforms.
a. Total mass of the platform (should be calculated in an elementary way)
b. Total engine power (should be calculated in an elementary way)
c. Jet stream speed (determined by engine type (mods offer different options)).

Only the type of the fastest platform engines affects the maximum/threshold speed. The gradation of threshold speeds can be made based on game conventions (for example: 50 m/s, 100 m/s, 200 m/s or something similar).

Acceleration is determined depending on the total power of the engines and their type:

a. if there is one type, then the acceleration is uniform, up to reaching the maximum speed (for this type)

b. if there are many engine types, then the acceleration drops in steps as threshold speeds are reached. That is, when crossing the speed threshold of slower engines, their power is subtracted from the equation.

Here is an example of an equation:

Input data:
M=coefficient of the total mass of the platform (let's say 1%)
S=speed of the platform at a specific moment in time
S1=speed of the slow engine
S2=speed of the middle engine
S3=speed of the fast engine
P1=total power of the slow engine
P2=total power of the middle engine
P3=total power of the fast engine
A = acceleration of the platform

Calculation of acceleration:
If S<S1 then A=(P1+P2+P3):M
If S<S2 then A=(P2+P3):M
If S<S3 then A=P3:M

In principle, if something like this were to be implemented, it would be the most optimal solution.

But with braking, including lateral, to simplify control - it would make sense to leave "resistance" by mass. With braking engines, you can no longer bother and just make calculations based on the total power of the engines.
Post Reply

Return to “Modding help”