Little Fighter Empire - Forums

Full Version: Counter Template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Counter Template is a research character that showcases a super meter that is filled by
landing a blow with a move or using a charging move
He can then spend his charges of meter to perform other moves.

Counter Template uses a super meter that has maximum of 70 charges.

He has a number of moves that show his capabilities:
D>A: Gains 1 charge when punching something
DvA: Gains 5 charge when punching something
D^A: Gains 10 charge when punching something

D>J: Shoots a projectile, when hitting enemy or weapon, template gains 10 charges
DvJ: A charging move, character gains 1 charge. Does not require attacking

DJA: A punch that can only be used by spending 50 charges.


The super meter of Counter Template is managed by type: 3 object that increments/decrements its counter derived from actions of template.
This meter, uses many itr kind 8 (therefore limit of itr in single frame is a major consideration for the meter), type: 3 state: 10 interaction along with state: 3000 interaction.

The meter is an advanced version of that used by Killis, a Dennis mod that unlocks his moves by using a very similar counter.

The basic working principle is character summons a t3 that detects if duplicates of it exists, otherwise it becomes a counter. The counter is then manipulated by itr kind: 8. Garbage collection is done with state: 10 properties.

The maximum number of charges a meter can have is dependent on how the meter is structured.
The manipulation flexibility is limited by the max number (5) of itr in a frame.

There must be one itr kind: 8 listed as the last itr of a frame that leads back to the same frame, this serves as a position chaser to the character.
Therefore you can only use at most 4 itr kind: 8 for changing number of charges.
Since a super meter is designed to have methods to increase and decrease charge, typically it can only take at most 3 increasing or 3 decreasing methods, leaving 1 for the opposite.

The number of frames used is largely dependent on the maximum charge, number of methods that has distinct number of decreasing charges and how many charge is spent for each method.

In this meter, each charge occupies 2 frames, and each interaction that decreases charge at a distinct charge occupies 2 frames.

So if a character has maximum of 100 charges and has one move that consumes 100 charges, he will use 100*2 +2 = 202 frames, not counting headers for initializing meters, which should normally cost less than 30 frames.
If a character has a move that consumes 50 charges instead, he will use 100*2 + (100-50+1)*2 = 302 frames.
It means if a character has multiple moves that spend few charges, but his maximum charge is large he will possibly require more than 390 frames to be used (which is bad considering only about 390 frames can be used safely for a .dat file) However in P.S. a method is provided to circumvent this restriction.

If multiple methods will increase or decrease the same amount of charges, they can summon the same object to change the meter, which greatly reduces work done.

This template provides methods for melee, projectile and charging, the way to use them is just to summon an object with similar header:

Melee: A delayed detection object. Uses hitlag mechanism. If hitlag is detected, object summons an increment t0 that causes existing counter to increment itself and kill the object. If object survives (therefore no existing counter) it becomes a new counter.

Ranged: Uses state: 3000 with frame 10 hitting mechanism. If object goes into frame 10 it does something similar to what Melee does.

Charging: Character has bdy that directly increments counter. He also summons an object that is killed by a counter that just incremented itself. If object survives it becomes a counter.

The counter enters a short phase that has an itr kind: 0 that kills to-be counters. The latter is in state: 10 and will be directed to frame 20 which deletes itself if hit by an existing counter. It is also shared by all projectiles in the same .dat file, including the "Ranged trigger".
This means to use projectiles inside this .dat file, your projectiles are recommended to be invisible but summon graphics to present them.


If your are designing something with this meter that starts with full charge and decreases over time, you can reverse the sprite orders.

For instance, a soldier holds a rifle that carries 10 bullets per magazine. He can reload to replenish all 10 charges. Instead of making the character have a meter that increases when shooting, the meter can have graphic that shows remaining bullets, when it hits 0 it prevents the character from shooting. When rifle is reloaded, the meter is changed to 10 again.

If a character is designed only has moves that spend very few charges but has a much larger maximum charge, you can instead make the meter summoning an anti-authorization object only if meter is below the required charge.

A meter that has 100 max charge and allows a 10-charge move would cost 200+(100-90+1)*2 = 388 frames if object is summoned when charge is at least 10. If object is summoned when charge is below 10, it costs 200+(10)*2 = 220 frames. You must initiate the meter at start of game if you wish to use a "below-some-amount" charge method (use s100 in f0 and summon object after character "lands" on ground), otherwise no object will be summoned when meter is not yet initiated.

To create a meter at start of game, it requires generating meter after a frame nexted from frame 219, which is caused by a bug in LF2 that causes player characters to go frame 219 by improper gravity applying. You also need to allocate a header that doesn't increase the counter whenever character lands on ground, which means an itr is possibly consumed to making this work.

[Image: aLbEMAn.gif]


STM for DC advice
Cool tutorial. There are lots of possibilities with this. I worked on a system for Louis some months ago where he raises a meter by successfully blocking an attack. A special bdy is located in frame 111 which would raise the meter (T3) up to 10 levels. (Never finished it tough)

Anyway, nice work! :) Never saw a tutorial & study example about that system unfortunately.