Search found 40 matches

by quale
Thu Nov 11, 2021 2:27 am
Forum: Pending
Topic: [1.1.42] Lamp color is wrong when the sum of red+green circuit wires overflows
Replies: 13
Views: 976

Re: [1.1.42] Lamp color is wrong when the sum of red+green circuit wires overflows

We made some changes, can anybody confirm if it is fixed in the latest 1.1 release? I gave 1.1.46 a go on my Mac. It seems to use the full, pre-overflow result now. A cursory glance at the machine code suggests the same: addl followed by jg, without split-brain handling of the two result parts. It’...
by quale
Fri Oct 22, 2021 12:11 am
Forum: Modding help
Topic: How do associated characters work?
Replies: 8
Views: 351

Re: How do associated characters work?

That sentence is a bit dense. It’s easier to interpret when split like this: Characters associated with this player will be logged off when this player disconnects. (an action that will occur under a specific condition) Characters associated with this player are not controlled by any player. (an inv...
by quale
Tue Oct 19, 2021 2:00 pm
Forum: Ideas and Requests For Mods
Topic: [MOD REQUEST] Nuclear fuel Bonus change
Replies: 2
Views: 166

Re: [MOD REQUEST] Nuclear fuel Bonus change

You need to change the fuel’s fuel_top_speed_multiplier. Nuclear fuel normally has 1.15. This changes it to 2 (518.4 km/h, incidentally very close to the 1990 TGV record of 515.3 km/h).
by quale
Mon Oct 18, 2021 2:30 pm
Forum: Gameplay Help
Topic: How many ticks does it takes for an item to move through a belt ?
Replies: 15
Views: 843

Re: How many ticks does it takes for an item to move through a belt ?

Also when there is no place for the items to go, the whole line stops while in fact all those items should get squashed more and more and finally be thrown out of a belt and onto a ground. How could we be so blind here? This will create so many new challenges for a players since they will have to h...
by quale
Sun Oct 17, 2021 11:53 pm
Forum: Gameplay Help
Topic: How many ticks does it takes for an item to move through a belt ?
Replies: 15
Views: 843

Re: How many ticks does it takes for an item to move through a belt ?

mmmPI wrote:
Sun Oct 17, 2021 3:24 pm
And for a car or tank ? Is it player's speed ? vehicule speed ? or item speed ?
Player’s speed. Items get special treatment. That’s all. I don’t know the details of that behavior, however.
by quale
Sun Oct 17, 2021 2:22 pm
Forum: Gameplay Help
Topic: How many ticks does it takes for an item to move through a belt ?
Replies: 15
Views: 843

Re: How many ticks does it takes for an item to move through a belt ?

mmmPI wrote:
Sun Oct 17, 2021 11:43 am
This could be used to calculate the rotation speed of a player when he afk on a 4 loop belt !
If only. Visual belt speed (CAV), item speed (CLV) and player speed (neither; always much faster than the belt and approaching an inner item’s AV on the very inside) are all distinct in corners.
by quale
Sat Oct 09, 2021 10:28 pm
Forum: Logistic Train Network
Topic: Fun with bidirecional tracks
Replies: 1
Views: 214

Re: Fun with bidirecional tracks

This works even better when you add more train stops with the same name in the vicinity.
by quale
Thu Oct 07, 2021 6:27 pm
Forum: Combinator Creations
Topic: GPS in Factorio
Replies: 3
Views: 487

Re: GPS in Factorio

Thanks. I really like how seemingly simple it became myself. I’ll explain it now. Most of the combinators are to drive the display. Beyond the antenna, you only need one arithmetic combinator (northernmost) and one constant combinator (third from the south). The red wire inconspicuously connected to...
by quale
Wed Oct 06, 2021 8:51 pm
Forum: Combinator Creations
Topic: GPS in Factorio
Replies: 3
Views: 487

GPS in Factorio

This is basically useless because you can just get your coordinates. I just thought it would be fun. It uses the Chinese remainder theorem on blueprints snapped to various grids to find your location. Factorio GPS.png 0eNrtXWtvG8mx/SuCgHyKtOnqdxt7L5Dn5rXJvpKsc2EYsjS2iaVIgaTW1wj83+8MbZHU1BSnazQ9UuH6y...
by quale
Sun Oct 03, 2021 11:08 am
Forum: Gameplay Help
Topic: How do I determine the total resources visible?
Replies: 4
Views: 402

Re: How do I determine the total resources visible?

I realized shortly after posting, but I figured it would have that effect. Glad it worked out. :)
by quale
Fri Oct 01, 2021 4:38 pm
Forum: Gameplay Help
Topic: How do I determine the total resources visible?
Replies: 4
Views: 402

Re: How do I determine the total resources visible?

Just kind of poking around in the API, I came up with this: local function viewable_area(player, zoom) local p = player.position local r = player.display_resolution zoom = (zoom or 1) * 64 return {left_top = {x = p.x - r.width / zoom, y = p.y - r.height / zoom}, right_bottom = {x = p.x + r.width / z...
by quale
Wed Sep 29, 2021 7:36 pm
Forum: Gameplay Help
Topic: Nuclear plant brownouts after working fine for weeks
Replies: 20
Views: 1034

Re: Nuclear plant brownouts after working fine for weeks

Inserting one fuel cell helps regulated reactors, so you can shut them off fairly soon if they aren’t needed for the moment. Inserting in all reactors at the same time ensures you’ll get the neighbor bonus all the way through. It’s especially helpful in regulated reactors (with the challenge of buff...
by quale
Wed Sep 29, 2021 1:17 am
Forum: Gameplay Help
Topic: Making fluid wagons work on a curved rail
Replies: 15
Views: 760

Re: Making fluid wagons work on a curved rail

So you can't win. I suppose you could try and fudge things by jiggering exactly where the curves and straight alignments are, but I think it'd get real messy real quick. It isn’t entirely unreasonable. For mrvn’s 180° turn, you can add two extra diagonals (4 curves and 4 diagonals in total). That’s...
by quale
Tue Sep 28, 2021 7:59 pm
Forum: Gameplay Help
Topic: Making fluid wagons work on a curved rail
Replies: 15
Views: 760

Re: Making fluid wagons work on a curved rail

Not that rail circles are all that circular in Factorio. There are straight diagonal pieces in there. A curved piece cannot mathematically have constant curvature and have the endpoints that it has. It’s easy to see with the naked eye. Nevertheless, the length does appear to be irrational. It also i...
by quale
Thu Sep 16, 2021 7:18 pm
Forum: Not a bug
Topic: Lamps don't consider white/grey/black a color
Replies: 3
Views: 259

Re: Lamps don't consider white/grey/black a color

I took this opportunity to learn to mod. It doesn’t make physical sense, but it works. It also adds even more shades to be used with that bug. :lol: I should add that the game already recognizes white. It just doesn’t do much because it had the lowest priority, and if no color is specified you get w...
by quale
Thu Sep 16, 2021 6:00 pm
Forum: Pending
Topic: [1.1.42] Lamp color is wrong when the sum of red+green circuit wires overflows
Replies: 13
Views: 976

Re: [1.1.39] Lamp color is wrong when the sum of red+green circuit wires overflows

It uses a JLE instruction, which jumps when ZF=1 or SF≠OF. Like all instructions named after inequalities, it uses a flag based on the carry bit. That’s very useful after a comparison (which is just a subtraction that doesn’t store its result). The optimization opportunity exists in the limited set ...
by quale
Wed Sep 15, 2021 7:20 am
Forum: Pending
Topic: [1.1.42] Lamp color is wrong when the sum of red+green circuit wires overflows
Replies: 13
Views: 976

Re: [1.1.39] Lamp color is wrong when the sum of red+green circuit wires overflows

I dug into the assembly because this was killing me. It was indeed as I suspected, in addition to being an unspeakable mess I’ll spare you. Distilled down to the bare minimum that should help you understand the bugged coloring: color_channels = { {"red", {1, 0, 0, 1}}, {"green", ...
by quale
Tue Sep 14, 2021 4:13 pm
Forum: Pending
Topic: [1.1.42] Lamp color is wrong when the sum of red+green circuit wires overflows
Replies: 13
Views: 976

Re: [1.1.39] Lamp color is wrong when the sum of red+green circuit wires overflows

That doesn’t matter. A compiler can do what it wants, and can have legitimate reasons to optimize. Examples include using wider types to store values, and eliminating conditions that are redundant under these assumptions. I can observe the latter on x86-64 in practice. It very much resembles this bu...
by quale
Tue Sep 14, 2021 1:01 pm
Forum: Pending
Topic: [1.1.42] Lamp color is wrong when the sum of red+green circuit wires overflows
Replies: 13
Views: 976

Re: [1.1.39] Lamp color is wrong when the sum of red+green circuit wires overflows

Then I smell undefined behavior. People forget that C and C++ don’t allow signed overflow among other things. It will often behave like the underlying hardware, until it comes to bite you. Maybe the Mac compiler took advantage in this case. A compiler flag like -fwrapv should stop that, if not a sou...
by quale
Tue Sep 14, 2021 11:47 am
Forum: Pending
Topic: [1.1.42] Lamp color is wrong when the sum of red+green circuit wires overflows
Replies: 13
Views: 976

[1.1.42] Lamp color is wrong when the sum of red+green circuit wires overflows

Lamp 2-wire overflow.png 0eNrtV12OmzAYvMrKr4UVNmRJOENvUK0ih3xJLBkbGTvbKOIAvUXP1pP0MygERcDCqk9R8xDliz3DeMZ/XMlOOiiNUJZkVyJyrSqS/biSShwVl/4/eymBZERYKEhAFC98VRVcylDyoiR1QITaw0+S0Tr4FGhgH34IAz0YmwE7GgD1CIzr94CAssIKaFU3xWWrXLEDg4LuerXkJiy5Aomkpa4Qo5V/nBcQpa+rgFxIFjJGX1e1F/RAxToqnueucJJbbQao6J1oiCbuaLzTl...

Go to advanced search