Rimworld

File information

Last updated

Original upload

Created by

Supes

Uploaded by

Superne

Virus scan

Safe to use

About this mod

Power Logic is primarily based on Switching logic gates and sensor logic.

Permissions and credits
Changelogs
Donations
Description:
Power Logic is primarily based on Switching logic gates and sensor logic.

Additional Info
Originally I was going to create a bunch of And Gates, Or Gates, Not Gates, but after the And gate I thought to myself "hmm, needs some switches to show it in action" and after creating one sensor, then I decided "hmm, what about a remote switch", and so on and so forth. so now it turned into a mod with an And gate and a bunch of sensor switches with some wifi thrown in for good measure.


Switches



Stay On Switch (Formally the 'And Gate Switch' in A15)
This switch is intended to be connected to 3 or more power conduits, when power is detected in 2 of the connected conduits, power is allowed through the switch until power is lost completely or flicked on/off.


Pressure Sensor Plate
This is a floor sensor switch that will allow power to transmit through it when a pawn is standing on the sensor. it will also work as a grid of Pressure Sensors in case one was not wide enough, and also contains Friend Foe detection.


Stack Sensor Plate
This is a floor sensor switch that powers on when it has over a certain amount of items on it.


Proximity Sensor
The Proximity sensor will allow power through it when someone is within its range, and disallow power when no one is in range. This type of sensor doesn't consume power, but has poor range.


Capacitor Sensor Switch
Monitors stored power levels, and turns off when power gets to the set 'low' point, and back on again when it reaches another set 'high' point.


Current Sensor Switch
This switches on when it detects positive or negative power.


Light Sensor Switch
This turns on when light level is low, this senses both sunlight and lamp lighting.


Heat Sensor Switch
This turns on when above or below a specific target temperature.


Entangled Switch
This does the opposite of whichever switch it is entangled with. Entanglement between this and another switch is permanent, so be sure you are linking to the correct switch (the Entangle tab shows the distance away from other devices, as well as a visual line to help).


Zone Switch
This switch counts the number of items within a zone.  For stockpiles, the count is restricted to allowed items. 

Wireless Devices


Remote Proximity Sensor
Similar to the proximity sensor in the way that it triggers when someone is nearby, except this time without the switch component, and instead it transmits a wireless signal to a nearby receiver device. This sensor is also powered, which means it has better range that can be adjusted.


Remote Controlled Switch
This switch activates when it detects a wireless signal, and deactivates when there's no signal.


Signal Repeater
The Signal Repeater does exactly what it says, it repeats any signal that it receives on the same channel as the repeater, effectively increasing the wireless range of your Transmitter or Remote Switch


Signal Transmitter
The Signal Transmitter does exactly what it says, it transmits a signal when powered. Useful for bridging channels or when used in conjunction with another sensor to activate a Remote Controlled Switch.


Remote Controlled Door
This door does what a usual autodoor does, but when it receives a wireless signal, it can perform a series of actions.


Remote Flicker
This device flicks on any adjacent device when it receives a signal.


Remote Gizmo Servo
This device activates a gizmo button on a single adjacent device (that it is pointing at) when it receives a signal. Unlike the remote flicker, it only works when powered.


Boom Box
A Boombox that plays a sound when powered or when powered and detecting a wireless signal. If multiple boomboxes are used, then only one will be heard at a time in a "first on first played" basis.

Laser Tech


Laser Emitter
A Laser Emitter, well, it emits a laser.  This can be paired with a laser switch to create a laser tripwire.  The beam can be bent round corners using laser mirrors and splitters.  Using more power will extend the laser length, this has the side effect of making the beam slightly hazardous to cross if high enough.  Warning, the laser emitter generates a lot of heat, consider using vents or coolers to avoid extreme heat or explosive mishaps.  The emitter beam doesn't differentiate between hostile or friendly pawns, take this into consideration if creating a laser based trap.


Laser Mirror
This Mirror can reflect a laser beam at a 90 degree angle.


Laser Splitter
This Laser Splitter, if struck by a beam at any angle, will split the beam into two perpendicular beams.


Laser Merger
This Laser Merger, if struck by one or more beams, will direct all beams towards the same direction (directed beams will exit out the wide flat side where the arrows are pointing) using refraction through a prism.


Laser Window
This wall will allow laser beams through it unimpeded


Laser Power Panel
When a laser is directed into one of the panels, the beam is diverted into a reservoir of water, the water quickly turns to steam and that steam pushes through a central turbine, causing power to be generated.


Laser Switch
This switch will turn on if struck by a laser beam.


Logic Gates

Input Socket
All gates (with the exception of the Not Inverter) require an input socket placed directly between the gate and a power conduit you plan to use as an input.


Logic Gate
Can be configured as AND, OR, XOR. Any conduit that is neither an input socket nor inverter are considered the gates output.
If configured as AND, then when it is attached to two powered inputs, it allows power through it.
If configured as OR, then when attached to at least one powered input, it allows power through it.
If configured as XOR, then when attached to one powered input, it allows power through it. But turns off if both inputs are powered.


Inverter (Not)
when put directly next to a gate, the Inverter reverses the function of the gate (e.g. AND become NAND). Note, this requires a constant power source to function

Misc


Protective Fuse
Made from a very thin copper wire in a glass tube, this fuse halves the chance that batteries will completely discharge.  More effective when used in sequence or to separate groups of batteries.


Radar
Radio Detection And Ranging, or Radar for short, by sending out sensing reflected radio waves, it can determine where an object is over vast distances.  Has a popout minimap.

A common question I get is "why doesn't such and such switch connect to my conduits?", The reason is that all Switches, be them a vanilla switch or one added by a mod, work by flaging as no power grid on the switches square when off, but flagged as a power grid when on. Therefore when off, a conduit doesn't link until the switch turns on.

All proximity type sensors have friend foe settings that can be changed.

All wireless devices can have their channel changed, and will not communicate with devices on different channels. Selecting a wireless device will highlight transmitters or receivers the device can see, green for ones on the same channel and red for ones on another channel.

All Proximity Sensors will not detect people that are not in the same room

An example on how to use the And Gate Switch would be combining 2 power input connections, one input has a clear path to a battery/generator, and the second is connected to a pressure plate which is then connected to another or the same power source. the and gate outputs to a conduit connected to a bunch of turrets located outside the my prison, and the pressure plate is right outside the door to the prison, I've set the sensor to trigger on Enemies only so my wardens don't trigger the sensor. Now when a prison break is attempted, the prisoner breaks through the door, steps on the pressure plate, the And Gate Switch turns on, the turrets activate and mow down the prisoner. Those turrets will now remain on until I flick/reset the And Gate off again.

For best use of the Capacitor Sensor Switch, use it to disconnect parts of the grid or high powered devices so it allows your batteries to recharge.  Make sure there's an unbroken route of power between the batteries and the capacitor (any switches inbetween the Capacitor sensor switch and the batteries will sever the grid between them when the switch turns off).

The Stack Sensor Plate can be placed under anything, this allows you to place it under things like a hopper so you can control power going to a nutrient paste dispenser for example.

Fun fact. it is perfectly possible to entangle an entangled switch with another entangled switch.

PowerLogic can be added to an ongoing save


Now go have fun with your Sensor Traps, or saving power on unneeded lighting

Author/Mod Team
Textures and Code, Supes


How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.


Power Logic by Supes is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.