Logic Gates

I have a few questions, have not gone to nexus yet so I didn't see.
Does it remove all of the physical models for the connectors, and replace
them with blocks, that have a representative icon for the function? Also
does it remove the wires? The last what is the length that they can function,
and the load is it increased or decreased?

The reason why I asked, is because, if all of the topological models are replaced,
it not only is neater visually but it also would lower the amount of tris render in
an area.

Potential future
The second is a quest like expansion, a station that supplies a grid, gens heat, must
be protected, is a revolving intermittent quest, allows for plug and play connecting
to the grid. Promotes coal or other recycle fuel gathering to keep it running.
 
Last edited:
I have a few questions, have not gone to nexus yet so I didn't see.
Does it remove all of the physical models for the connectors, and replace
them with blocks, that have a representative icon for the function? Also
does it remove the wires? The last what is the length that they can function,
and the load is it increased or decreased?

The reason why I asked, is because, if all of the topological models are replaced,
it not only is neater visually but it also would lower the amount of tris render in
an area.

Potential future
The second is a quest like expansion, a station that supplies a grid, gens heat, must
be protected, is a revolving intermittent quest, allows for plug and play connecting
to the grid. Promotes coal or other recycle fuel gathering to keep it running.
Hi,

First of all thanks for the interest
It doesnt remove anything it just adds new system to bypass electricity 1 input limitaiton, so basicly it let's says adds new electricity system just for control signals. Code itself doesnt limit you regarding the lednght limit, but since its uinrealisitc I will likely set certain limit, regaridng load iI havent noticed any fps drop so far, but i didnt create nothing complex, most complex thing i built is 2 bit calculator and SR latch, but i would like you to try it out and test it since its still in early development but should be usable, still I have to create proper models for them since I never created any models if there is someone willing to help with models i would appriciate it!

Remember when testing in order to "convert" vanilla electricity into signal use "Signal sensor" (it has to be placed on neighbouring block, same for signal power sources) then use signal it produces to connect it to the gates (hold E on them in order to connect and choose "Mark as source" than hold E on the element you wich conenction to go to and press "Link source here ), also to convert it back to the electricity use "Signal" power sources

Here is the showcase video of latest version:
 
I haven't tried it and probably won't just because I don't really need it, but I do like that you're trying to add logic gates to the game. I know it's a work in progress and you probably already have plans for improvement, but from watching the video, I think it would be a very good thing to create individual logic gate blocks for each gate type and simply connect power through those the way you would through anything else, like a relay. Having a bunch of special radial commands to link and unlink things will be very confusing for people to figure out. Just watching the video, I feel that I'd have to learn how to use this instead of it being obvious.

Consider the steps you're taking right now versus:

Place power source, place logic gate, place target item, use the wire tool to connect them together.

This would be obvious to anyone who has played the game as it's how everything already works for power. It just adds new logic gate blocks. But the way you have it would require figuring out how to do it and it would be less obvious.

Now, I don't know what's required to make working logic gates and maybe it's not so simple to make them as individual custom blocks that accept normal wire connections, but if it's something you can do, I'd recommend that.

Example NOT block:

Single 1x1 block with a NOT logic gate symbol on it (or whatever you want it to look like)
1+ inputs for wire connections
1+ outputs for wire connections

If power is supplied, change the power state for the output to no power.
If power is not supplied, change the power state for the output to powered.

I would assume this requires a DLL but that it is possible to grab the powered/unpowered state of the inputs and to flip the bit for them to the opposite when sending that state to the output.

Then just a similar thing for the other logic gates based on the gate type. You can then string gates together easily to do anything you want.


Anyhow, that's just feedback. I think you've done a good job already and this isn't meant to be a negative to what you've done. What you've done looks good.
 
I haven't tried it and probably won't just because I don't really need it, but I do like that you're trying to add logic gates to the game. I know it's a work in progress and you probably already have plans for improvement, but from watching the video, I think it would be a very good thing to create individual logic gate blocks for each gate type and simply connect power through those the way you would through anything else, like a relay. Having a bunch of special radial commands to link and unlink things will be very confusing for people to figure out. Just watching the video, I feel that I'd have to learn how to use this instead of it being obvious.

Consider the steps you're taking right now versus:

Place power source, place logic gate, place target item, use the wire tool to connect them together.

This would be obvious to anyone who has played the game as it's how everything already works for power. It just adds new logic gate blocks. But the way you have it would require figuring out how to do it and it would be less obvious.

Now, I don't know what's required to make working logic gates and maybe it's not so simple to make them as individual custom blocks that accept normal wire connections, but if it's something you can do, I'd recommend that.

Example NOT block:

Single 1x1 block with a NOT logic gate symbol on it (or whatever you want it to look like)
1+ inputs for wire connections
1+ outputs for wire connections

If power is supplied, change the power state for the output to no power.
If power is not supplied, change the power state for the output to powered.

I would assume this requires a DLL but that it is possible to grab the powered/unpowered state of the inputs and to flip the bit for them to the opposite when sending that state to the output.

Then just a similar thing for the other logic gates based on the gate type. You can then string gates together easily to do anything you want.


Anyhow, that's just feedback. I think you've done a good job already and this isn't meant to be a negative to what you've done. What you've done looks good.
Thank you on a reply,

Well yes you are right it would be ideal if it would be possible but unfortunatelly its not possible, since vanilla has limit of 1 input wire, so you cant set 2 wire as input into a realy,switch or any other element, there were several unsucessfull attemps all failed because of the same reason: "limit of 1 input wire", this is the reason I created completely new system to do logic, actully this is somewhat comparable with real life where you have control circuit and main circuit acting independetly, what I could do, maybe, is to set so connections in my system could use vanilla wire tool
 
I think it would be a very good thing to create individual logic gate blocks for each gate type and simply connect power through those the way you would through anything else, like a relay. Having a bunch of special radial commands to link and unlink things will be very confusing for people to figure out. Just watching the video, I feel that I'd have to learn how to use this instead of it being obvious.
This is what I was asking about. It is interesting, but the things to consider,
learning curve vs desire, and longevity of the mod's lifespan. A logic system
has long been desired and attempted multiple times. Most add more steps.

In the early alphas it would have been more highly accepted. But reading the
room, meaning the forum player base, the main contention point is convenience
and obvious, vs intricate and detailed now. For longevity I am comparing it to
the plethora of mods available. Look at the common denominator(s) for the ones
that are continuously used. There have been some overhauls that, are works of
pure imagination but the systems and subsystems, limited their shelf life.

I will draw a simple; meaning I will use mspaint with a Legend, to express visually
what I was writing about. But I still find the thought interesting.
Back in a bit.
 
Thank you on a reply,

Well yes you are right it would be ideal if it would be possible but unfortunatelly its not possible, since vanilla has limit of 1 input wire, so you cant set 2 wire as input into a realy,switch or any other element, there were several unsucessfull attemps all failed because of the same reason: "limit of 1 input wire", this is the reason I created completely new system to do logic, actully this is somewhat comparable with real life where you have control circuit and main circuit acting independetly, what I could do, maybe, is to set so connections in my system could use vanilla wire tool
I don't know what is possible with DLL mods with this game as I haven't programmed anything for the game and have only done simple XML mods, but there are often ways around problems when programming. I wouldn't give up entirely. Maybe there is a way to "trick" the game into multiple inputs. Maybe that does require a different connection than what you get with the wire tool, but if you have some form of connection between a source and a target, even if it's not a wire that is currently used for electrical, you may be able to not treat it as a new connection, but instead grab the data from the source (power state, amount of power available, etc.) and use it to manipulate the state on a target.

For example:

In vanilla, you have a power source that offers 100W of power and it connects to a relay and then to a light and the light draws the required power if the power state is on.

In a mod, you have a custom AND gate. It's just a block that doesn't really have inputs or outputs for power but does allow a special custom connection similar to what you're currently doing. If connected with the alternate "wire" (perhaps connected using a custom wire tool), the DLL reads the state of the sources connected to it (power state, amount of power, etc.) and then determines if all connected sources have a power state of on or not. If so, it sets the input power of the target equal to the power being supplied and sets the power state to on. If not, it sets the power state to off with no power. You're manipulating the values for the inputs and outputs of the electrical systems without really connecting multiple power sources to a single item. In the end, you don't really have a powered connection from the source to the target because there's no actual connection there. Instead, you're just manipulating the data for those inputs and outputs.

Now, there is a somewhat more complicated issue to consider. Power usage is related to how many items are being used (power draw). You would need to also find out what that power draw is and manipulate that value for the sources.

Here's a basic view of it:

Vanilla:
Generator > Relay > Light

Mod:

Generator 1 (not connected to anything directly, or if necessary to make it work, connected to its own relay)
Generator 2 (not connected to anything directly, or if necessary to make it work, connected to its own relay)

==> (connections from Generator 1 and Generator 2 are not made with normal wires but with a custom system that works like wires but doesn't actually use the input and output electrical connections)

Custom AND block

==> (connection from custom AND block to light made with the custom system instead of normal wires)

Light



In the above example, the mod reads the power state of Generator 1 and Generator 2 to see if they are on or off. If both are on (AND gate), it sets the power state for the input of the light to on. It checks the power draw of the light and anything else in the connection to see the total draw. It then compares that draw to the power available from the generators to see if there's enough power or not. If not, it works just like in the game when there's not enough power in a circuit. It also sets the power draw on the output of both generators (50% of total draw to each generator since there are 2 generators) so that the fuel usage changes the correct amount for the draw and so the draw is shown on the generators.

In the end, there isn't any real (vanilla electrical) connection through the AND gate but it's mimicked through data manipulation in the backrgound.

This *should* be possible, but like I said, I haven't programmed DLLs for this game and don't know what is available to use. Maybe they don't expose the input or output information or allow it to be changed. I don't know. But I'd say there could still be a way to make it work, that feels like normal electrical connections even if it's not. So don't give up. :)
 
Back
Top