Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: milkev on February 08, 2016, 07:23:20 PM

Title: crpl's producign energy
Post by: milkev on February 08, 2016, 07:23:20 PM
Hello, im looking for a code in a crpl that will increase the amount of energy you produce(like a reactor) when connected to your network. I want it outside the map so just using CreateUnit"REACOTR" wont work. :(
Title: Re: crpl's producign energy
Post by: GameGibu on February 08, 2016, 07:43:08 PM
Great question, but the energy production is so hard-coded that you can't do that. The only way to simulate that effect is to make a core that, when sent a packet or two, raises the tech level for energy efficiency. However that could result in some frustrating limits on gameplay, so I'll test a theory I have and post back here if it works.

-GameGibu
Title: Re: crpl's producign energy
Post by: TLFP on February 08, 2016, 07:46:40 PM
Quote from: GameGibu on February 08, 2016, 07:43:08 PM
Great question, but the energy production is so hard-coded that you can't do that. The only way to simulate that effect is to make a core that, when sent a packet or two, raises the tech level for energy efficiency. However that could result in some frustrating limits on gameplay, so I'll test a theory I have and post back here if it works.

-GameGibu
You can't raise the tech level for forge upgrades with CRPL. Sorry  :P
Title: Re: crpl's producign energy
Post by: GameGibu on February 08, 2016, 07:52:32 PM
You're absolutely right TheLongFellowPLAYER. I was thinking of settechlimit.

Bah, this one's difficult.

-GameGibu
Title: Re: crpl's producign energy
Post by: TLFP on February 08, 2016, 08:14:52 PM
Quote from: GameGibu on February 08, 2016, 07:52:32 PM
You're absolutely right TheLongFellowPLAYER. I was thinking of settechlimit.

Bah, this one's difficult.

-GameGibu
There were some people in the past that wanted to do this but it's not accessible through CRPL.
Title: Re: crpl's producign energy
Post by: GameGibu on February 08, 2016, 08:20:55 PM
Well, the answer to milkev's question depends on what effect this core is supposed to have.

Why not just a resource crystal?

-GameGibu
Title: Re: crpl's producign energy
Post by: TLFP on February 09, 2016, 07:33:52 AM
Quote from: GameGibu on February 08, 2016, 08:20:55 PM
Well, the answer to milkev's question depends on what effect this core is supposed to have.

Why not just a resource crystal?

-GameGibu
He wants it connected to your network. The ONLY way you could conceivably do this is if you check EVERY reactor and collector on the map then see if they are connected to a CN. This is riddled with bugs though because it will only work with 1 CN and collectors will still mess it up... You could try a resource crystal as that MIGHT work but note it won't increase your energy. It depends on what Milkev is trying to do.
Title: Re: crpl's producign energy
Post by: Builder17 on February 09, 2016, 08:23:13 AM
Why outside the map? More information , please. Energy crystals give energy only when you are in deficit so it doesn't work. CreateUnit "REACTOR" is only way to do so. Limit reactors into 0 from tech limits? Have CRPLcore check when it's connected into network create reactor and when not remove reactor?
Title: Re: crpl's producing energy
Post by: milkev on February 09, 2016, 10:19:26 PM
Quote from: Builder17 on February 09, 2016, 08:23:13 AM
Why outside the map? More information , please. Energy crystals give energy only when you are in deficit so it doesn't work. CreateUnit "REACTOR" is only way to do so. Limit reactors into 0 from tech limits? Have CRPLcore check when it's connected into network create reactor and when not remove reactor?
I'm having the player starting in the corner of the map with little space to build. BUT the spore attacks cant be handled without extra energy and there isn't the room to add it in the map :( Reactors is what i'm using now, but id like it to be an invisible source as though the base produces more energy naturally. I hope that's some better information :)
Edit: Added Picture File: I would like the crpl core to be were the reactors currently are.
Title: Re: crpl's producign energy
Post by: GameGibu on February 09, 2016, 10:57:37 PM
How about making the only place to land a CN have a power zone in the middle? I think that produces a little more energy.

-GameGibu
Title: Re: crpl's producign energy
Post by: Builder17 on February 10, 2016, 06:51:40 AM
Have CRPLcore to hide reactors somehow? Void texture image into core and core over reactors?
PZ CN only has 2x range , but not extra energy production.
Title: Re: crpl's producign energy
Post by: GameGibu on February 10, 2016, 07:13:26 AM
Quote from: Builder17 on February 10, 2016, 06:51:40 AM
PZ CN only has 2x range , but not extra energy production.

Wow, I cannot get this one right...

-GameGibu
Title: Re: crpl's producign energy
Post by: GoodMorning on February 14, 2016, 05:30:08 AM
Could you potentially PZ the Reactor/s?

Failing that, when editing the map, units can be moved on top of each other, so you could provide stacked reactors.

Finally, a resource crystal is a source of finite energy at an infinite rate, whereas standard collection is infinite power at a finite rate.
Thus a resource crystal that is topped up to 0.1 energy regularly can provide extra power, though it won't show up on the CN panel.

I can't remember how long a resource pack/siphon combination persists after emptying, however, you have a few frames to top it up before you require a new one.

It's not 'true' power production, but it's giving constant power at a finite rate. Also, it can be made to only work for a limited time. Just cover the siphon graphic and it might work.
Tech won't affect it.
Title: Re: crpl's producign energy
Post by: TLFP on February 14, 2016, 07:35:21 AM
The only way you could PZ reactors is you have to destroy them, then place the PZ, then all the reactors because if you just plop a PZ on it doesn't take effect.
Title: Re: crpl's producign energy
Post by: GoodMorning on February 14, 2016, 05:46:47 PM
True, but it depends upon how much power you need.

I also don't recall if it is possible to add additional units on top of an existing one directly. Anyone?
Title: Re: crpl's producign energy
Post by: GameGibu on February 14, 2016, 09:50:58 PM
How abouts this?

1. Create reactor
2. SetCellOccupiedCount to 0 for each of the nine cells this takes up
3. Repeat until satisfied

-GameGibu

"We wants it. We needs it. My Precioussss..."
Title: Re: crpl's producign energy
Post by: GoodMorning on February 14, 2016, 10:56:55 PM
I haven't come across that command.
Maybe have a Core and script combination that works during map testing?

These all work by being on the map...

I favour a covered crystal, which can self-destruct when its not required anymore.
Perhaps call it a "georeactor", or some such, and allow it to build a reserve as well?