The Corrupted Units thread

Started by Clean0nion, January 16, 2014, 11:19:45 AM

Previous topic - Next topic

Annonymus

I'll try to create the units you requested but I need more information about what they should exactly do, for example I have no idea what you mean by "a different version of those receptors at the end of the game that require energy from corrupted beam towers to produce a rather large shield, and that fire a much thicker beam at something that looks like the thing from the end of the game (only mable with a swirle of energy over it) that dosn't really do anything but needs power from the thicker beams or it blows up and when it dose you win." and I won't be able to do the graphics, only the code which means you'd have to give me the images or ask someone else to draw them.
If a topic started by me is in the wrong place feel free to move it at anytime.

Azraile

I guess I can try and figure something out with the images....

The first is basic...

A corrupt reactor and a code that dose one of two things....  make the corrupted unites the code is added to need to be connected to the reactor to work (ends the code if it's not hooked up) ...   or makes reactors send out packets (able to set how much power they have maybe?)  that the codes don't run on theThis  units unless they have 'ammo'

This will let me set up nasty defenses that can only be taken out by destroying the reactor(s) powering it first as the corrupted collectors and shields will protect them as long as they are powered.


The final mission stuff I've though through more and the idea is to have corrupted beam towers powering a CRPL unit that as long as it's getting energy from at least one beam tower it will fire another beam that only targets a second kin of CRPL unit, it will also produce a shield that will stop any air attacks, destroy  any units that land near it, and push back AC with a good deal of strength making the area in the shield untouchable.....  The second CRPL unit that it targets just produces creep and self destructs if it's not getting energy from the first units beams for a set amount of time...   maybe let both units run on ammo and give them a fair amount so they will run for a little bit after disconnected....   But when the second is dystroied you win

The general idea is it's a large power plant thats been corrupted. There will be an outer ring with 6 or 8 corrupted generator (or generator clusters) that power defenses on the ring and down 'spokes' there will be beam towers fiering at larger shielded reactors on an inner ring that work together to create the reaction in the center.

Annonymus

I made the corrupted reactor but I had no time to test it for now.

In the script for the corrupted reactor you will have to insert the UID of the core you attached the PowerManager.crpl script to.
Besides all the reactors you will have to build another core (which will be invisible and not influence the gameplay in any way (besides managing the power from the reactors of course)) and add PowerManager.crpl on it.

I will make the other scripts later today and test them after I finished all of them.

If you want you can test the reactors already but since there are no units that require energy from them that might be a bit difficult... (unless you add
showtracelog
cleartracelog
<-totalReactorPower trace

to the end of the PowerManager.crpl script)

Else you can start building the map already with the reactors.
Or wait until I made the other units, too.
If a topic started by me is in the wrong place feel free to move it at anytime.

Azraile

ok sounds good....

this is what It did for the reactor

Annonymus

I'm quite busy in RL right now so the other units will be delayed a bit, I'll try to make them tomorrow (Sunday), else I'll do them on Monday
If a topic started by me is in the wrong place feel free to move it at anytime.

tornado

Here's an idea
Corrupted terps
They set terrain to level one
Now CEO of Particular Endeavors. http://knucklecracker.com/forums/index.php?topic=23752.new#new
We apologize for all inconveniences that we caused.
Quotefirst, you have to imagine a very big box, fitting inside a very samll box.
then, you have to build one

Asbestos

There's already a corrupted terp.

Azraile

take your time... i can normal units to desine the map

Annonymus

#23
I think I made all of the units you requested (attached) but, as I said, I did not make anything with the graphics and I am still to busy to test them, so you'll either have to test them by yourself or wait unitl I find the time for it (which I don't know how much it will take, depending on how things go my next opportunity might be next wednesday...)

Explanation about the variables:
CorruptedReactor.crpl has to be on every corrupted reactor.
    IsReactor: has to be 1 always, else you break the other scripts, DO NOT CHANGE
    Power: how much energy this reactor generates
    dropsEnergyOnDeath: if 1 it will drop a ressourcepack when nullified, if 0 it won't
    EnergyDropped: how much energy the dropped ressourcepack will contain
PowerManager.crpl has to be attached to only 1 core on the entire map, if it's more than 1 you will break the scripts
    IsPowerManager: has to be 1 always, else you break the other scripts, DO NOT CHANGE
    ReactorRange: how big the power-supply range of the reactors is
    DigitalisOnReactorRange: will fill the range of the reactors with digitalis (if 1)
    DigitalisOnReactorDestroyable: if 1 the digitalis (created by DigitalisOnReactorRange) will renew every frame, this means that you can fire at it but not destroy it
CorruptedBeam.crpl has to be attached to every corrupted beam
    IsCorruptedBeam: always leave at 1 DO NOT CHANGE
    powerconsumed: how much energy this beam requires
BigBeam.crpl has to be attached to the big beam powering the final unit which needs it to live
Inhibitor.crpl has to be attached to the last unit which will destroy itself when not powered by BigBeam.crpl

P.S. I have updated CorruptedReactor, you now no longer need to manually insert PowerManager's UID

EDIT:forgot to attach the files
EDIT2: corrected a typo in CorruptedReactor.crpl
EDIT3: corrected another error in CorruptedReactor.crpl
If a topic started by me is in the wrong place feel free to move it at anytime.

Azraile

Thats awsome, thanks!

I like the idea of a final energy burst on death and the diti stuff, I will probly only use the stuff to figure out if stuff is in range but I'm sure others will find lots of use for those ideas.

Azraile

Quote from: Annonymus on May 18, 2014, 07:51:20 AM
CorruptedBeam.crpl has to be attached to every corrupted beam
    IsCorruptedBeam: always leave at 1 DO NOT CHANGE
    powerconsumed: how much energy this beam requires


dose this include beam towers far away being used for defense and not this fuction?  or am I right in thinking I should use the normal currupt beam tower code on them.

Quote from: Annonymus on May 18, 2014, 07:51:20 AM
PowerManager.crpl has to be attached to only 1 core on the entire map, if it's more than 1 you will break the scripts
     IsPowerManager: has to be 1 always, else you break the other scripts, DO NOT CHANGE
     ReactorRange: how big the power-supply range of the reactors is
     DigitalisOnReactorRange: will fill the range of the reactors with digitalis (if 1)
     DigitalisOnReactorDestroyable: if 1 the digitalis (created by DigitalisOnReactorRange) will renew every frame, this means that you can fire at it but not destroy it


Is this the code that will shut down currupt units that arn't connected to the power grid?

Azraile

oh if you can't get them to work off a power grid maybe you can get them to work of a digi grid like with the collectors on this map:

http://knucklecracker.com/forums/index.php?topic=15020.0

Annonymus

The corrupted beams I made can ONLY be used to do what you asked me for (shoot at another big beam which is used to power yet another core), if you change the "IsCorruptedBeam" var you will break the scripts since other scripts refer to this to identify it, if you have another script which can be used to create creeper-controlled beams that will not interfere with any of my scripts as long as there are no variables with the same name.

No, the PowerManager.crpl is needed as a point of referral for CorruptedReactor.crpls to add their own power to it and for CorruptedBeam.crpls to know how much energy is available, they will shut themselves down if there's not enough power (although it is possible right now for the creeper to go into a slight deficit (like the player), which means 1 beam can be only partially powered by the reactors but still work).

They aren't based on a power grid right now, but check if they are near enough to a reactor and if there is still energy available before they fire (at the BigBeam.crpl)

If you need a script of a corrupted beam that attacks the player, I need to make another one but that will have to wait until I'm less busy IRL, however 3P alwready made a good one so you may want to use his' instead.

Right now I'm not sure if tall the scripts work as intended because they are partially based on the order of execution and things like that, so if you encounter some problems tell me, that will accelerate the process of fixing them when I have time to, again (because I don't have to go search for errors myself).
If a topic started by me is in the wrong place feel free to move it at anytime.

Azraile

It's ok, I can use the ones at the start of the thread.

I like the idea of using Digitalis for a power grid, the final stage beam towers just needing to be in range is fine.

Azraile

made an image for corupted ore deposits