local newvalue = (oldvalue * 7) % 4294967296
will instantly give you a new pseudo random value. the 7 and 4294967296 are mutually prime the radix (7) must be greater than 1 and less than the modulus (4294967296) the returned number is an integer between 0 and the modulus-1. That is the quick and ...
Search found 21 matches
- Sun Aug 04, 2019 8:15 pm
- Forum: Modding help
- Topic: [0.17] A real math.random is searched
- Replies: 14
- Views: 4033
- Mon Jun 24, 2019 8:14 pm
- Forum: Technical Help
- Topic: last update 0.17.51 and 0.17.52 not working
- Replies: 1
- Views: 1148
Re: last update 0.17.51 and 0.17.52 not working
I am also getting an error trying to download from the website. The download mysteriously fails after 10-20MB and is not resumable. I have slow internet 60KB's (600Kbps) so it may be a timeout issue, but it should be resumable.
- Mon Mar 04, 2019 2:15 am
- Forum: Duplicates
- Topic: [0.17.4] Unable to preconnect water line to refinery
- Replies: 0
- Views: 663
[0.17.4] Unable to preconnect water line to refinery
Get error message unable to connect different fluids, or something like that. Which prevents connecting the water line to a refinery that is set to basic refining. or to set basic refining on a refinery that has water connected.
To repeat. Set up a refinery. Connect oil to the always oil side. Set ...
To repeat. Set up a refinery. Connect oil to the always oil side. Set ...
- Tue Oct 30, 2018 8:13 pm
- Forum: Combinator Creations
- Topic: Digital Display, Yay!
- Replies: 120
- Views: 167518
Re: Digital Display, Yay!
Here is my 5 x7 segment display, expandable https://factorioprints.com/view/-LQ2Jc7-Tx_HOna9ITB6
It uses more gates than other but the color of the output can be changed and it updates every tick, with a 5-6 gate delay between the input changing and the new value being reflected in the output, but ...
It uses more gates than other but the color of the output can be changed and it updates every tick, with a 5-6 gate delay between the input changing and the new value being reflected in the output, but ...
- Sun Oct 28, 2018 2:53 am
- Forum: Ideas and Suggestions
- Topic: AWay to totally lock a track path.
- Replies: 63
- Views: 25386
Re: AWay to totally lock a track path.
...there IS NO WAY to TOTALLY LOCK a path...
Thats why im suggesting it here in the suggestions section.
Circuit network can send red signal = 1 to a light to lock it red.
A red signal does not always prevent a train from selecting a path. It only gives the pathfinder a penalty for ...
- Sat Oct 27, 2018 6:11 pm
- Forum: Ideas and Suggestions
- Topic: Flamethrower turret improvement
- Replies: 3
- Views: 1790
Flamethrower turret improvement
Instead of targeting where the biter used to be literally 10 seconds ago, ans so always missing. Have it begin laying down a lake of fire in a sweeping motion starting from its minimum range and progressing outward. Currently they are almost entirely worthless against single biters or small fast ...
- Sat Oct 27, 2018 1:44 pm
- Forum: Ideas and Suggestions
- Topic: Clock combinator
- Replies: 5
- Views: 3865
Re: Clock combinator
Can all be easily done with circuit networks. An arithmetic combinator. Wire its input to its output. Settings are Green Plus 1 Output Green.
This will count up at 30 ticks per second.
To have something trigger every e.g. 10 seconds. Add an arithmetic combinator wire its input to the above clocks ...
This will count up at 30 ticks per second.
To have something trigger every e.g. 10 seconds. Add an arithmetic combinator wire its input to the above clocks ...
- Sat Oct 27, 2018 1:33 pm
- Forum: Ideas and Suggestions
- Topic: AWay to totally lock a track path.
- Replies: 63
- Views: 25386
- Sat Oct 27, 2018 1:32 pm
- Forum: Ideas and Suggestions
- Topic: AWay to totally lock a track path.
- Replies: 63
- Views: 25386
Re: AWay to totally lock a track path.
The two signals are a bit confusing at first. Mostly they are misnomered. The 3 light signal will be red if there is a train in the path following it, green if there is no train is the next block. It can also be yellow or blue in certain situations. The singe light signal will copy the state of the ...
- Sat Oct 27, 2018 1:07 pm
- Forum: Ideas and Suggestions
- Topic: Oil (overflow) burner
- Replies: 29
- Views: 18734
Re: Oil (overflow) burner
The way i handle the oil system is using the break down factory's which get toggled by a combinator if there is a shortage.
For example the breakdown factory from benzine to gas get's toggled when gas is below 500 in the nearby tank.
If benzine is lower then 500 the breakdown factory's get ...
- Sat Oct 27, 2018 12:58 pm
- Forum: Ideas and Suggestions
- Topic: Local power connector module for modular armor
- Replies: 97
- Views: 44272
Re: Local power connector module for modular armor
So basically you want two entities. A Charging station to recharge teh suits batteries while standing on it, and a discharge station for powering a network from the suits panels/reactors/batteries. Shouldn't be too difficult to write a mod that implements that behavior. Perhaps require a suit item ...
- Sat Oct 27, 2018 11:53 am
- Forum: Ideas and Suggestions
- Topic: Train Station Status
- Replies: 2
- Views: 1169
Re: Train Station Status
No, those do not address the issue. Which is that I need a train to continue to a stop even though the train stop is disabled after the train begins its trip. Currently the behavior is that if the stop is disabled, the train will immediately reroute to the next stop in its list. For example - The ...
- Mon Oct 22, 2018 5:26 pm
- Forum: Ideas and Suggestions
- Topic: remove maximum_wire_distance limit
- Replies: 2
- Views: 1372
Re: remove maximum_wire_distance limit
Try using a basewide network by connecting all the major power poles via red and/or green wires. Buffer outputs to the network with arithmetic combinators that simply output the desired signal, e.g. green * 1 output green or green + 0 output green. This isolates the network from stray local ...
- Mon Oct 22, 2018 4:52 pm
- Forum: Ideas and Suggestions
- Topic: Enable chat while paused
- Replies: 8
- Views: 2668
- Mon Oct 22, 2018 4:36 pm
- Forum: Ideas and Suggestions
- Topic: Train Station Status
- Replies: 2
- Views: 1169
Train Station Status
Currently train stations can signal only 2 states, enabled or disabled. I propose a third status 'passive'. Which reads as disabled to all trains not already headed to the station, but reads as enabled to trains already enroute. The reason is currently, a station must remain enabled until a train ...
- Tue Jun 12, 2018 1:32 am
- Forum: General discussion
- Topic: Why are 60 UPS = 1s?
- Replies: 26
- Views: 13793
Re: Why are 60 UPS = 1s?
1/60 of a second is the time it takes an item, e.g. a copper plate, to move one space on a blue conveyor. Speeding up or slowing the UPS max would effect conveyor speeds. Besides, your eyes can't even see 60 frames per second, let alone 120. You are fooling yourself if you think you can. it's more ...
- Mon May 14, 2018 11:12 am
- Forum: Pending
- Topic: [0.16.42] Roboport stops working
- Replies: 1
- Views: 967
[0.16.42] Roboport stops working
Personal Roboport 2 (probably also effects roboport 1) stops reacting to deconstruction flags. Robots simply don't deploy. Reloading the game doesn't help, only resetting the roboport by removing it from the armor and reinserting it fixes the issue.
Severity - Game breaking until manually reset ...
Severity - Game breaking until manually reset ...
- Wed May 09, 2018 7:13 pm
- Forum: Ideas and Suggestions
- Topic: 2 new trains - Diesel and Electric
- Replies: 5
- Views: 2284
2 new trains - Diesel and Electric
Diesel train - runs on petroleum (crude, heavy, light, or gas which is pumped into the engine section.
Electric train - runs on battery power. Recharges when it passes over or stops on an electrified rail section.
For the diesel different fuels would give different speed bonuses, with crude being ...
Electric train - runs on battery power. Recharges when it passes over or stops on an electrified rail section.
For the diesel different fuels would give different speed bonuses, with crude being ...
- Wed May 09, 2018 12:49 am
- Forum: Resolved Problems and Bugs
- Topic: [kovarex] [0.16.39] Rail Chain Signal stuck red
- Replies: 5
- Views: 4056
Re: [kovarex] [0.16.39] Rail Chain Signal stuck red
Confirmed fixed in 0.16.41
- Wed May 09, 2018 12:42 am
- Forum: Won't fix.
- Topic: Deposit info cut off when viewing in map mode (0.16.41)
- Replies: 2
- Views: 1838
Deposit info cut off when viewing in map mode (0.16.41)
When zoomed in in map mode, not the zoomed out mode but the zoomed in mode, the information on an ore deposit, e.g. Uranium Ore 569K is cut off if the text extenda from a region that is not revealed by the radar into a region that is.
Severity - graphics glitch, minor
Workaround, move the mouse ...
Severity - graphics glitch, minor
Workaround, move the mouse ...