DevBlog #59 | Foundry Fridays: Data Cable System
Author: Mr.McDuck,
published 3 months ago,
Hello everyone!
In today's FOUNDRY Friday I am going to shed light on one of the core features of our upcoming update, the data cable system.
In case you’ve missed it: [b]Update 1, Cables & Creations, launches on the 13th of August and you can find an overview [url=https://store.steampowered.com/news/app/983870/view/4329732963519323214]here[/url][/b], or watch the new [url=https://www.youtube.com/live/8N7RNR26H4w?si=x4NMTeRUfGe7Zdsa]Update First Look Dev Stream[/url] on our YouTube channel.
[h3]What is the Data Cable System?[/h3]
First I want to broadly summarize what data cables are and what you can do with them. Generally speaking, the data system can be used to programmatically interfere with many different machines. Think of data cables like Ethernet. They allow you to read data from various machines (for example read the contents of a logistics container), and to process such data (arithmetic, logical and conditional operations), the results of which can be used to control machine behavior (for example to disable a machine based on a certain condition).
[img]https://clan.cloudflare.steamstatic.com/images//38913947/b9e04b119c44001dc5f2f2d3e78c8ff38504bc03.jpg[/img]
It is hard to speak of it in abstract terms, but it is a lot easier to understand when we’re looking at examples. Therefore the next section will cover how the system looks in terms of gameplay elements, so that you can get a better understanding, and then we are looking at a few examples.
Finally I want to mention that this is an advanced gameplay system that isn’t forced onto players. It is optional and not required to complete the game. For the more sophisticated players however there are opportunities to further improve your factories and make them behave the way you desire.
[h3]Gameplay Mechanics, Part One[/h3]
The core of the system is a new item, the data cable. It is a one voxel sized object that represents a data cable, when built next to each other they automatically merge together and form a data network. Similar to the way pipes work, but you don’t need to manually select the shapes (like curves, T-crossings, …) to build the cable networks you want.
[img]https://clan.cloudflare.steamstatic.com/images//38913947/57164d267636bdbe86e2793b8f251b46bd608fec.jpg[/img]
All supported buildings have a data cable connector (will be highlighted as soon as you have the data cable equipped), that in the same way automatically connects to any adjacent cable.
[img]https://clan.cloudflare.steamstatic.com/images//38913947/c77ec7fb937c7127f3bd1231486054ff70effee0.jpg[/img]
Once a machine is connected to a data network you can configure it on a special interface opened through the handheld tablet and let it behave the way you want it to, for example configure a battery to broadcast its charge percentage.
[img]https://clan.cloudflare.steamstatic.com/images//38913947/5a77d8077aceef15d07a5e8b1a87c8e8eabc76f4.png[/img]
Data networks are made of signals, and a signal is made of two things, the signal type and the signal value. In FOUNDRY there is a signal type per game item and on top of that there are a bunch of custom signals representing letters, numbers and colors. Some of you might have seen similar systems and will immediately know what's up, but for the ones of you that are reading something like this for the first time: Stick with me, it’s less complicated than it sounds, I promise!
[img]https://clan.cloudflare.steamstatic.com/images//38913947/b293e871f8cc0b77533cfe1bd9363ee7369b4248.png[/img]
[h3]Example: Disable a loader or belt depending on item count in a container[/h3]
[img]https://clan.cloudflare.steamstatic.com/images//38913947/1cc09bdf7a6924a224c166fa433d89b14a36488b.jpg[/img]
Once a logistics container is connected to a data cable network it will automatically broadcast all its content. Let’s assume it contains 200 Biomass, that means it will broadcast a signal of the type “Biomass” with a value of 200.
[img]https://clan.cloudflare.steamstatic.com/images//38913947/5a77d8077aceef15d07a5e8b1a87c8e8eabc76f4.png[/img]
If the same data network is connected to a conveyor belt or loader, we can set the “enable based on condition” setting and tell the machine to only operate if a certain condition is true. An example would be to configure that the machine only operates if there are more than 100 Biomass items in the logistics container.
[h3]Example: Turn off lights based on time of day[/h3]
[img]https://clan.cloudflare.steamstatic.com/images//38913947/3caac1e4ddfbe37c203234aa908f249aa4c156cf.jpg[/img]
Solar panels can broadcast the sun angle in degrees (0-359), this then can be used to configure lights so that they are only enabled during certain times of the day. Conserves power and might look better!
Note: Because of their size not all lights have a data cable connection, however transformers can also be disabled should you have your lights on an isolated building wall or ceiling.
[h3]Example: Generators that only run when your batteries are low[/h3]
[img]https://clan.cloudflare.steamstatic.com/images//38913947/75553d5e0975fbe8dda35f9f031a0924b945c776.jpg[/img]
Batteries can broadcast their charge rate in percentage (0-100), this can be used to tell back-up generators to power up so that your factory doesn’t run out of power.
[img]https://clan.cloudflare.steamstatic.com/images//38913947/62fd5a7c923cf6bce062042bad35828d7730abc9.png[/img]
[img]https://clan.cloudflare.steamstatic.com/images//38913947/f1afeb3cd04a118b59c7225cbeac1f1133347917.png[/img]
Stretch–goal: If you keep the condition simple (charge rate below 20%) the generators would most likely circle rather rapidly between an on and off state as they would raise the charge rate above the threshold and then after they shut down it would quickly fall below the threshold again. However, through advanced logic you could set it up so that those generators should start as soon as the charge rate falls below 20% and only stop once the charge rate is back up above 80%.
[h3]Example: Make a light switch[/h3]
[img]https://clan.cloudflare.steamstatic.com/images//38913947/db7b259274e05c4a36fb7ea6e8fe41a821a3b2f8.jpg[/img]
We have custom data system interaction objects, like buttons, levers or static data sources. Use a lever to make your own light switch, all you need to do is link the lever to the lights you want to remote control and configure the signals accordingly. In that case that means you pick a signal your lever should broadcast and tell the lights to listen to it.
This signal-type based logic allows you to connect multiple lights to the same data network and potentially use different levers with different signals to control different lights without the need of having multiple data networks.
[h3]Data System Buildings & Data Manipulation[/h3]
Together with the data cables this update will also bring a few related machines that can be used to further interact with the data system.
[b]Data Processor[/b]
The data processor allows arithmetic and logical operations on signals. It supports the basics like add, subtract, multiply and divide, but also more advanced operations like modulo or logical AND, OR and XOR.
It comes with an optionally configurable condition so that you can easily set up something like “subtract 10 if value is above 20”.
[img]https://clan.cloudflare.steamstatic.com/images//38913947/c1c6a75b2a3c7c7d535da37aafd436e7ad877703.png[/img]
[b]Data Evaluator[/b]
Use this to check for various conditions, basically a “if-then”-behavior. Supports all regular comparison operators like equals, non-equal, smaller, smaller or equals, and so on.
[img]https://clan.cloudflare.steamstatic.com/images//38913947/7a76c663b0bab7f6dd2c8a6cf4fc77ef76b05e49.png[/img]
[b]Data Sources[/b]
Data sources are objects that broadcast one or more configured signals. There is a static signal source that will constantly broadcast the signals, a lever-version that you can interact with in world space and a button that will only pulse the configured signals once.
[img]https://clan.cloudflare.steamstatic.com/images//38913947/8223e3e0b59444c369b57b407d0708aef0498049.png[/img]
[b]Data Memory Cell[/b]
The memory cell listens to a certain signal on an input network and will indefinitely store the last non-zero value, which can then be broadcast on the output network. It can listen to a reset signal which will reset the stored value as soon as the reset signal is present (not zero).
[img]https://clan.cloudflare.steamstatic.com/images//38913947/b7251b90b8c535d2c4aa09f35ce26fcd91f56ffb.png[/img]
[h3]Gameplay Mechanics, Part Two[/h3]
I know that many of you want to know the specifics and limitations of that system, so this paragraph is for our technically versed user base:
[list]
[*] Data networks are updated 60 times a second, once per game tick.
[*] On a network all signal types are constantly present with a default value of zero, which makes it hidden in the UI.
[*] Signal values are whole numbers in the range of a 32 bit signed integer.
[*] Signals values are additive, multiple machines broadcasting the same signal will have their values summed up.
[*] Data manipulation buildings do not require power as the result of breaking data systems because of missing power would be too frustrating.
[*] For certain buildings and operations there are advanced signal types like “Each” or “Any” that can be used to perform bulk-operations.
[/list]
[i]Yes, you can build those types of things...[/i]
[img]https://clan.cloudflare.steamstatic.com/images//38913947/71cf6368009931e26ac803eaff2122fbd44ece7b.jpg[/img]
[h3]More to come[/h3]
This is the first iteration of the data system and there are more features planned, we have quite a few ideas for more data system buildings. A few examples would be screens that can display certain signal values, a way to create your own notification system (for example to receive a notification when an ore patch runs out of ore) or more creative use-cases like creating your own light shows.
We feel that the current update has a good feature-set to make this into a meaningful addition and we’re looking forward to hearing your feedback and to see what you will build with this system.
Hope you’ll enjoy the upcoming update,
-mrmcd
Follow us on socials:
[list]
[*] [url=https://discord.com/invite/eqvCtNH]Discord[/url]
[*] [url=https://twitter.com/foundry_game]Twitter[/url]
[*] [url=https://www.reddit.com/r/foundry_game/]Reddit[/url]
[*] [url=https://www.facebook.com/foundrygame/]Facebook[/url]
[*] [url=https://forum.paradoxplaza.com/forum/forums/foundry.1153/]Paradox Forum[/url]
[/list]
Stay tuned for more news!
https://store.steampowered.com/app/983870/FOUNDRY/