Statistics
Latest topics
» List of weapons approved (after test)
Wed Feb 22, 2012 12:43 pm by 7Sins Admin

» MetaLife FAQ
Wed Feb 22, 2012 11:58 am by 7Sins Admin

» MetaLife License
Wed Feb 22, 2012 11:09 am by 7Sins Admin

» MetaLife Feature List, version 1.21
Fri Feb 17, 2012 11:19 am by 7Sins Admin

» NEU MetaLIfe 2 Bedienungsanleitung (deutsch)
Fri Feb 17, 2012 10:56 am by 7Sins Admin

» NOUVEAU MetaLife2 manuel d'instruction (franšais)
Fri Feb 17, 2012 10:53 am by 7Sins Admin

» NEW MetaLIfe 2 Manual (English)
Fri Feb 17, 2012 10:47 am by 7Sins Admin

» NUOVO MetaLIfe 2 - manuale di istruzioni (italiano)
Fri Feb 17, 2012 10:46 am by 7Sins Admin

» NUOVO - manuale di istruzioni (italiano)
Fri Feb 17, 2012 10:43 am by 7Sins Admin


How to develop weapons for MetaLife 1.10 PART ONE

View previous topic View next topic Go down

How to develop weapons for MetaLife 1.10 PART ONE

Post  Tala on Tue Jul 01, 2008 4:38 pm

In short: in the MetaLife system all weapons are characterized by one, two or three parameters: strength, range and stamina damage. "Strength" determines how much damage a weapon causes. "Range" determines for melee weapons what is the optimal distance between attacker and victim in order to achieve highest damage values (this only applies to melee weapons). "Stamina damage" determines, how much of the damage strength will be used to lower stamina. If you don't supply these parameters in your attacks, don't worry, MetaLife will set them to reasonable values. In addition, in order to provide continuity the attacks presently used for other safezone based meters can also be used since they are internally translated into MetaLife damages (see the list below for how this is done).


1a. HOW TO MIGRATE YOUR WEAPONS FROM OTHER SAFEZONE BASED PROTOCOLS TO METALIFE (APPROACH 1)

Don't change anything. Your weapons will work correctly but will cause more lag than a ML native weapon, for this reason we will limits damage for compatible weapons, quick.


1b. HOW TO MIGRATE YOUR WEAPONS FROM OTHER SAFEZONE BASED PROTOCOLS TO METALIFE (APPROACH 2)

In order to reduce lag and use the MetaLife protocol with extended features, simply replace all your "sword" and "arrow" attacks (or whatever you may use) by the following line (after a sensor event)
    llWhisper((integer)("0x"+llGetSubString((string)llDetectedKey(0),0,7)), "damage,"+llKey2Name(llGetOwner())+","+llDetectedName(0));

However, you are advised to read on and learn how to use extended MetaLife features


2. THE METALIFE PHILOSOPHY

These are the core ideas:

  1. MetaLife simulates a physical body.
    Therefore, MetaLife determines how the damage of a weapon impacts the "body". To stress this: MetaLife calculates the damage, NOT the weapon itself (this approach is contrary to other commonly used meters, since it is highly illogical to let a weapon decide what damage to do). Therefore: no modifiers to damage types!
  2. MetaLife supports fair combat.
    "Fairness" implies that fighters who can only click their mousebutton as fast as possible have NO advantage, no matter how much damage their weapon wants to do (so, no matter if you throw a rock 1000 times a second or a heavy bolt). For fast-clickers, the damages of the different weapons will in average be the same. Fairness also implies that ONLY the fighting abilities of the person can give an advantage.
  3. MetaLife is a balanced meter.
    If you want to make your weapon better by adjusting one of the parameters, an opposing parameter will be automatically reduced. Yes, like in real life. Example: if you want to build a stronger weapon, you will have to make is slower. If you want to build a long weapon (say, a spear) then you won't be able to hit from close, and the valid opening angle will be reduced.
  4. MetaLife does not trust weapons.
    If you want to cheat, MetaLife will enforce fair conditions. The only thing you generate by a cheater weapon is lag (nota bene: the use of different damage types like "arrow", "bolt", "lhxyzabcsword" etc ENCOURAGES cheating, since it's so tempting to let a thrown apple hit like a bolt. And even if this can A POSTERIORI be verified, such RP disputes only cause grief)


3. THE METALIFE PROTOCOL

In the MetaLife protocol you can specify these three values almost independently and freely in the following way:
    "damage|STRENGTH|RANGE|STAMINA_DAMAGE,ATTACKER,VICTIM"

For a usual sword attack you would eg write
    "damage|15|1.5|0,Joe Black,Jim White"

or simply
    "damage,Joe Black,Jim White" (missing parameters are set to standard values)

But for a dagger, which is weaker and has its full power when used close to the victim, you would write
    "damage|10|0.7|0"
The correct choice of these parameters is up to! Choose them reasonably, suiting the style of your weapon. Read section 4 in order to see why all parameters make a legal weapon.

Therefore you can see that the parameter STRENGTH tells the meter, how much damage a weapon can do. By default all this damage affects the health, thus representing injuries coming from cuts etc. But a melee weapon can also be used for thrusting. This is reflected in a stamina decrease for the victim. Its amount is determined by the variable STAMINA_DAMAGE. The latter value must always be lower than STRENGTH, since the health damage is computed from the difference STRENGTH-STAMINA_DAMAGE (see example below)

The same would apply to an arrow:
    "damage|15" (for ranged attacks, the second parameter is ignored)

or also
    "damage"
For a strong bolt you should write
    "damage|20"

NOTE: the common attack types known from the other meters (like "sword", "dagger", "arrow", "bolt", "kick" etc) are supported, too. But in order to avoid lag and increase performance you are advised to switch to the MetaLife protocol.


4. Simulating heavy weapons

Fighting with heavy weapons weakens the attacker. This weakening appears by a stamina drain. For this, there is a special "attack type":
    staminadrain|STAMINA_DRAIN,ATTACKER,ATTACKER
.
For example when Joe Black attacks with a heavy axe, the weapon could in addition issue the self-attack
    staminadrain|5,Joe Black,Joe Black
.
The meter does not check nor enforce the use of this attack type.


5. Armor, helmets, shields and blocking

Passive element like armor etc must register with the meter before then become active. This is the only duty the weapon maker has to do: make sure the armor is registered correctly. The syntax is:
    armor|AMOUNT,WEARER,WEARER
    helmet|AMOUNT,WEARER,WEARER
    shield|AMOUNT,WEARER,WEARER

The higher AMOUNT, the higher the effect. But high values have negative effects, too, like affecting stamina negatively. WEARER is the name of the person who wears the item.
Make sure to issue these commands e.g. on attaching or on drawing the item. Only one piece of armor and one helmet is allowed, so the last one registering with the meter will be considered only. Give the user a possibility to re-register your item again, e.g. by registering it again on touch (see the sample weapons in the ML package). You can wear more than one shielding/blocking device, but only the one with highest strength will be active.
To unregister, set AMOUNT to zero.


6. NO LIGHT WITHOUT SHADOW

Of course you do not get higher weapon strength for free. In order to keep the use of weapon fair, stronger weapons will be punished with a higher time delay between attacks. In principle you are free to attack at maximum rate, since the MetaLife system will discard overspeeded attacks. But for the sake of lag reduction make sure you include a timer, so that the weapon obeys the following delay times:

Melee:
    DELAY_TIME = STRENGTH/30

Ranged:
    DELAY_TIME = 0.06*STRENGTH


When you have developed weapons for other safezone based combat meters, you will have come across units like HPS (hits per second) and BPS (bullets per second). These units are not suitable to compare weapons and measure their strength. MetaLife uses the unit DPS (Damage Per Second), and it measures how many units of damage a weapon can do per second. The formula relating to delay time is
    DELAY_TIME = STRENGTH / DPS

Thus, the maximum legal values are fixed to:

Melee:
    30 DPS

Ranged:
    16.7 DPS


MetaLife also automatically calculates valid attack arcs, so you are free to specify sensors with 360 degrees for your weapons. The higher the specified core range of a weapon, the smaller is the opening angle chosen by the meter (that means, a spear can attack from a larger distance, but not at a 90 degree opening angle like a sword, but at a much smaller angle)
Summarizing:
You are free to choose a high damage, but this will make your weapon slow.
You are free to choose a high range, but this will the opening angle smaller

Whatever you do, these parameters are balanced against each other so that the weapon will always be legal.

When you provide the STAMINA_DAMAGE parameter, remember that this value is subtracted from STRENGTH in order to find the damage affecting health. An example:
Consider the attack
    damage|20|1.5|5

This weapon will try to do 5 points stamina damage and 20-5=15 points health damage. We call this a
    (20/5)-weapon


MetaLife uses distance information of attacks in order to validate them. You can use sensors with any range, but for the sake of lag reduction please use the following values:

Melee:
    SENSOR_RANGE = RANGE + 1.5 (max 5.5m)

Ranged:
    SENSOR_RANGE = 4.5

Remark: probably you're surprised on the high values. Well, internally MetaLife works differently than other meters ...


7. DYNAMIC CHANNELS

MetaLife accepts attacks on the safezone channel (20). For the sake of lag reduction you are advised to use a dynamic channel, which is determined in the following way after sensoring a victim:
    (integer)("0x"+llGetSubString((string)llDetectedKey(0),0,7))

MetaLife does not insist on dynamic channels, though.


8. THINGS YOU SHOULD DO

Since MetaLife does all the nasty maths for you, your only duties are:

A) Build reasonable weapons:

  • A dagger with a range of 4m is not reasonable. It will not give you any advantages, it is only ... stupid.
  • DO NOT USE THE STRENGTH VARIABLE TO SIMULATE HEAD SHOTS ETC WITH INCREASED DAMAGE!
    MetaLife does not support this idea, which has unfortunately been introduced by meter makers without much thought on consequences. If you do so, your weapon will be punished for it. Nota bene: there is no punishment for using various modifiers etc, since these will simply be ignored


B) Build lag-reduced weapons:

  • use dynamic channels
  • use the MetaLife protocol instead of the various safezone extensions
  • use timers for delays as specified above
  • don't use llShout or llRegionSay
  • use low prim weapons and low prim arrows
  • don't use high resolution textures, especially not on tiny prims/faces
  • use as few alpha textures as possible


9. THINGS YOU COULD DO

If you want to add more features to your weapon consider scripting it to work in different 'states' with different weapon strength. For example, a long sword led by two hands can inflict more damage than when swung with one hand only. So you could include a (slower!) two-handed mode with increased weapon strength for advanced fighters. You might want to think of similar features for ranged weapons. The message MetaLife wants to spread the word among the weapon scripters is: Be unconstrained! Be creative!


.... continued in part 2!

Tala
Admin

Posts : 56
Join date : 2008-06-27

View user profile http://metalife.powerrpg.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum