Introducing the 'emotional emitter'

Started by TheDutcher, March 19, 2015, 07:19:30 PM

Previous topic - Next topic

TheDutcher

So I got bored, wanted to make stuff, and I came up with this...

Summary of actions:
An emotional emitter, having 2 types of behaviour. putting it down boldly: it can get angry (emits more Creeper faster) and happy (emits less Creeper slower) relative to the original amount of emitters and the current amount. Hovering over him displays his amt, delay and mood. The mood is also reflected with the emitter's collor. The emitter starts slightly more green as it's 'content' since it has something new to destroy (you) and/or is surrounded with family.

Behaviour explanation:
Spoiler
1) The emitter has a certain starting and ending value for both the amt and the delay. The more of his family (other (emotional) emitters) die, the angrier he gets, but family joining him will make him happier and emit Creeper less, slower.
What the starting values do is obvious, though the ending values mean what his amt and delay will be once he's all alone.
2) The emitter is only focused on how much of his family gets killed, he doesn't care if anybody joins him in his fight, he'll simply never get any happier than he is from the start.
Obviously has certain starting values again, but this time instead of having 'ending' values, he has an increment value for his amt and a reduction value for his delay, making this emitter able to technically produce an infinite amount of Creeper continuously, if emitters are added over time. Forever.
[close]

User-defined variables with explanation:
Spoiler
Format: variable name (default value): For which behaviour(s) --- Description.
startingAmt (20): For both behaviours --- The amt of the emitter when it's created.
startingDelay (15): For both behaviours --- The delay of the emitter when it's created.
endingAmt (60): For first behaviour --- The amt of the emitter when all other (emotional) emitters are killed.
endingDelay (10): For first behaviour --- The delay of the emitter when all other (emotional) emitters are killed.
minimumAmt (10): For first behaviour --- The minimum amt of the emitter (when adding emitters the amt goes down in the same ratio it would increase, this value will prevent an emitter going peaceful).
     Negative values will mean there is no limit (same as a value of 0).
maximumDelay (30): For first behaviour --- The maximum delay of the emitter (when adding emitters the delay goes up in the same ratio it would decrease, this value will prevent an emitter going near peaceful).
     Negative values will mean there is no limit.
amtIncrement (25): For second behaviour --- The amount the amt will increase with for every emitter ever killed.
delayReduction (0): For second behaviour --- The amount the delay will decrease with for every emitter ever killed.
maximumAmt (-1): For second behaviour --- The maximum amt of the emitter. Since the emitter can technically reach an infinite amt without any limit, you can use this to... Well... Make a limit!
     Negative values will mean there is no limit.
minimumDelay (5): For second behaviour --- The minimum delay of the emitter. Since the emitter can technically reach a delay of 0 (emitting creeper continuesly) without any limit, you can use this to... Well... Make a limit!
     Negative values will mean there is no limit.
countsForVictory (1): N/A --- Whether or not the destruction of this object is required to win the map. Positive values mean it's required, 0 or negative values mean it isn't required.
createPZ (1): N/A --- Whether or not the destruction of this object would create a power zone. Positive values mean it will, 0 or negative values mean it won't.
behaviour (0): N/A --- Which behaviour the emitter will follow. Positive values mean the second behaviour, 0 or negative values mean the first behaviour.
[close]

In-code limitations and checks:
Spoiler

  • An emotional emitter can never request ammo;
  • An emotional emitter has a cell height and width of 1;
  • An emotional emitter cannot be connected with;
  • An emotional emitter takes damage from nullifiers;
  • An emotional emitter does not request anti creeper packets;
  • An emotional emitter does not request packets;
  • An emotional emitter does now show it's anti creeper ammo bar;
  • An emotional emitter does not show it's ammo bar;
  • An emotional emitter does not show it's health bar;
  • An emotional emitter is not a sniper target;
  • An emotional emitter supports digitalis;
  • An emotional emitter cannot be build on;
  • The starting amt cannot be less than 0 (will be made 0 if value is less than 0);
  • The starting delay cannot be less than 0 (will be made 0 if value is less than 0);
  • The ending amt cannot be less than 0 (will be made 0 if value is less than 0);
  • The ending delay cannot be less than 0 (will be made 0 if value is less than 0).
[close]

Map introducing the emotional emitter:
Spoiler
It's been out for a little while, so you might have already seen it, but I've created a map introducing the emotional creeper.
Map #: 1886
Title: Emotional enemy
Author: TheDutcher
Forum post: http://knucklecracker.com/forums/index.php?topic=18289
[close]

Note for coders:
Spoiler
If you wish to identify if a unit is an emotional creeper, use the following code:
GetCoresWithVar("unitName" "EmotionalEmitter")
I commented the code as much as I thought was necesairy, feel free to copy, but I prefer you not to edit my creation directly.
[close]

Note for map makers:
Spoiler
(Obviously) you are free to use my creation in your maps, though a reference to me would be appreciated,
[close]

Final note:
If you would like to see any additions or changes, feel free to make a post about it.
If you have any other ideas for me to create, feel free to make a post about it.

metalsiagon

This is kind of along the lines of what I'm looking for to plan out my first map, right off the bat I have a very basic level of coding knowledge though.

I'm trying to make a map that is a puzzle where emitters, spores, runner nests need to be destroyed in the right order, other wise they increase in an exponential level each time the wrong one is nullified. Ideally I would like to base the solution off of some sort of mathematical problem (possibly by writing it out in terrain levels), or logic interpretation to deduce the proper sequence.

I'm not sure what the rules are for requesting knowledge on coding is, so if I'm out of line or in the wrong place just let me know.

warren

The general rule would be to try something using the wiki as starting point then post a new topic here when it does not work.

TheDutcher

Quote from: warren on March 20, 2015, 01:47:21 AM
The general rule would be to try something using the wiki as starting point then post a new topic here when it does not work.
I do think you are allowed to ask for both other people to make it for you (so basically suggest the idea) as to ask for where to start, since some people simply don't have the experience, but do want to take a challenge.

TheTiconTech

Quote from: TheDutcher on March 19, 2015, 07:19:30 PM
  • An emotional emitter does not request packets;

No! He does! [sarcasm /_- It obviously DONT need packets!]

TheDutcher

#5
Quote from: TheTiconTech on March 21, 2015, 01:12:45 PM
Quote from: TheDutcher on March 19, 2015, 07:19:30 PM
  • An emotional emitter does not request packets;

No! He does! [sarcasm /_- It obviously DONT need packets!]
As you can edit all constants of a CRPL core, I felt that it was necessary to define which constants actually can't be changed without editing the code.

TheDutcher

Map is created and added to the main post, for people that are interested.