CRPL-Cores sending packets/energy?

Started by thepenguin, August 10, 2013, 11:32:06 AM

Previous topic - Next topic

thepenguin

Since they can consume packets now, can they also send them out?

ex. core takes in AC, and then spits out energy, or vice versa.

This way, we can do things like generators, amongst other things
We have become the creeper...

knucracker

Sending packets (using the game's engine) isn't possible currently.  That would tie into how the engine determines what structure to request a packet from (currently limited to tracking CN's and guppies).  You can of course send a fake packet between your own structures in the way I do on Farbor, though.

Energy production isn't possible either, though that one might be easier to add support for (maybe,  maybe not).  That ties into how units know what subnet they are on and how overproduction gets handled, etc.  That is limited to CN's and resource packs right now.

In both cases, I have to extend what units are tracked and implement the appropriate interfaces on the CRPLTower unit.  Their are data structures that keep track of energy sources, packets sources, etc.  Allowing a CRPLTower to do either means dynamically adding or removing a unit from those data structures.

All possible, but I have to maintain discipline and get the game finished off at this point.  Then I can swing back around and maybe make these things possible.

thepenguin

couldn't it emulate a collector or a reactor?

I don't know if it will work, but it's an idea.
We have become the creeper...

knucracker

That how it will work for energy.  But to do that a CRPLTower has to know what network it is on.  Right now that is kept up with for Reactors and Collectors.  I'll have to add CRPLTowers to that list... but only if they are something that can make energy (I don't want to do it for every little CRPLTower that might be a 'bullet').  Do-able, just a few hours of careful work and testing.

thepenguin

okay.  If that won't work for you, will you just allow CONST_AMMO and CONST_AMMOAC to work with SetUnitAttribute on CNs too?

After that, I can code the rest myself.
We have become the creeper...

knucracker

So you are needing this for a current map you are working on?  Do you need just energy production like a reactor might make?

thepenguin

Quote from: virgilw on August 10, 2013, 03:45:33 PM
So you are needing this for a current map you are working on?  Do you need just energy production like a reactor might make?
I don't really need this for a map yet.  I just saw how they can request packets, and thought there might be a symmetric equivalent of dispatching packets/energy.  It's not time-urgent, but I can see myself using it in the future if it is implemented.
We have become the creeper...

Annonymus

You can try to do this by creating ressource crystals (and a siphon on top of it) under the CRPL tower and hiding it with the image of the CRPL tower, so it will look as if the CRPL tower is producing energy/dispatching ore/generating aether.
If a topic started by me is in the wrong place feel free to move it at anytime.

Creepman

why not make it like a siphon but need AC to run and undeplete able energy

Asbestos

You could also make the CRPL core generate a bunch of reactors underneath it once you fill it up, then have it delete those reactors if you deplete it.