HowToAddCreaturesStendhal: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Kymara →Add GFX: clean up |
imported>Kymara expand ai profiles and equipping item sections. correct some outdated things on level, respawn and the balancer tool (which does now use atk and def not just level) |
||
| Line 1: | Line 1: | ||
You can add new creatures to game in a few very simple steps: |
You can add new creatures to game in a few very simple steps: |
||
=Edit |
=Edit creatures.xml= |
||
This file contains all the description of the creatures in game. |
This file contains all the description of the creatures in game. |
||
For example. |
For example. |
||
| Line 49: | Line 49: | ||
Inside the ''attributes'' tag you can specify the attributes the entity has: |
Inside the ''attributes'' tag you can specify the attributes the entity has: |
||
* ATK it is a value proportional to the damage the creature can do. |
* ATK it is a value proportional to the damage the creature can do. Note also the total attack is also proportional to creature level. |
||
* DEF it is a value proportional to how much damage the creature can block. Note also the defense is also proportional to creature level. |
* DEF it is a value proportional to how much damage the creature can block. Note also the total defense is also proportional to creature level. |
||
* HP is the health measure |
* HP is the health measure |
||
* Speed it is how fast creature moves. Range from 0 to 1. |
* Speed it is how fast creature moves. Range from 0 to 1, 1 is speed of player. |
||
* Size it is the size of the collision area on the ground of the creature in tiles: usually 1x1 |
* Size it is the size of the collision area on the ground of the creature in tiles: usually 1x1 |
||
Now the ''level'' and ''experience'' tags. |
Now the ''level'' and ''experience'' tags. |
||
The level is used |
The level is used in the damage calculations for attack and defense, as well as chance of player hitting it or chance of hitting player, and the players to measure a creature . The experience determine the reward the player will get by killing this creature. ''respawn'' is how long it takes to respawn. The actual respawn uses a memoryless distribution so that if you wait for ''respawn'' time you have a better than half chance of finding the creature, but the respawn itself does not depend at all on when the creature was last killed. |
||
Now the ''drops'' tag specify what the creature drops when it is killed. Each of the item has a probability of being dropped (''probability attribute'') and the quantity of it that may be dropped (''quantity attribute''). If you only want it to drop one item, we still write the quantity as between 1 and 1, like [1,1]. |
Now the ''drops'' tag specify what the creature drops when it is killed. Each of the item has a probability of being dropped (''probability attribute'') and the quantity of it that may be dropped (''quantity attribute''). If you only want it to drop one item, we still write the quantity as between 1 and 1, like [1,1]. |
||
==Equipping items to creatures== |
|||
You can equip items at a creature's slots: |
|||
* rhand |
* rhand |
||
* lhand |
* lhand |
||
| Line 68: | Line 69: | ||
* feet |
* feet |
||
Equipping with defensive items does not change the attack or def so it is not worth doing at the moment. Equipping with weapons makes the creature hit with the rate of the weapon. It does not add to the attack. If a creature is equipped with weapon of rate less than 5, is attacking faster, so it needs a smaller attack than other creatures of similar level. Likewise slower hitting creatures should hit harder to have the same overall effect. |
|||
Unless you want the creature to attack with a rate other than the default of 5, it is a good idea not to equip creatures ( because they take more memory ). |
|||
AI to do with coward/brave and human/animal etc are useless right now. Don't worry about them, just copy and paste the data. A non_offensive creature does not select you as an enemy until you attack it, at which point it moves towards you. An offensive creature selects you as an enemy once you are close enough to it. A patrolling creature follows a set path. A non patrolling creature never moves even when you attack it. Other ai profiles which are more complex are lifesteal, heal and archer. Easiest first, is archer. An archer profiled creature uses a ranged attack where it always tries to stay 1 tile from what it is attacking. Next heal, if it has heal profile with params [5,50] say, then it heals 5 HP each time a certain number of turns has passed. The second number determines the number of turns, the bigger it is the longer the interval. Finally the lifesteal profile which has a parameter between 0 and 1. Lets explain by example. We have some creature with lifesteal 0.5. He hits a player and causes 20 hp of damage from the player. That means he 'lifesteals' 10 HP of damage back which heals him. The player hurts just as much (like normal) but the creature heals 50% of any damage it makes. |
|||
Archers should equip arrows and bows so they have something to shoot with. |
|||
If a creature equips a weapon the drops are not changed. |
|||
== AI profiles == |
|||
These are added as in the example above. See also [[StendhalBestiary]] where examples are given of creatures with each profile. |
|||
* offensive / non offensive |
|||
A non offensive creature does not select you as an enemy until you attack it, at which point it moves towards you. An offensive creature selects you as an enemy once you are close enough to it. |
|||
* patrolling / non patrolling |
|||
A patrolling creature follows a set path. A non patrolling creature never moves even when you attack it. |
|||
* coward / stupid coward/ brave |
|||
A coward runs away when you attack it. A brave creature does not. A stupid coward is not so smart at changing directions when it meets a wall and just runs into it. |
|||
* animal / human |
|||
These mean nothing at the moment. |
|||
* archer |
|||
An archer profiled creature uses a ranged attack where it always tries to stay some tiles away from what it is attacking. The ai profile adds some attack on top of normal creatures so an archer should be given less attack than creatures of a similar level. |
|||
* lifesteal |
|||
The lifesteal profile which has a parameter between 0 and 1. Lets explain by example. We have some creature with lifesteal 0.5. He hits a player and causes 20 hp of damage from the player. That means he 'lifesteals' 10 HP of damage back which heals him. The player hurts just as much (like normal) but the creature heals 50% of any damage it makes. |
|||
* heal |
|||
Creatures can have a heal profile which has two parameters [regen amount, turns]. For params [5,50] say, then it heals 5 HP each time a certain number of turns has passed. The second number determines the number of turns, the bigger it is the longer the interval. |
|||
* poison |
|||
Poisonous creatures with parameters [chance, poison item] have a chance/100 probability of poisoning you every time they hit you. Your defence does not help you defend against a poisonous creature. They poison with a specific poisonous item, so that the total amount poisoned, the frequency and the amount of health lost each time is taken from the poison item itself. |
|||
* rare |
|||
Some creatures can be given very low probability of spawning (which gives an average respawn time which is very long, say 6 weeks) and these should not be requested by the Mayor as a kill, nor appear in deathmatch which would ruin the novelty of them. For these use the rare ai profile. They cannot be summoned in raids except in a test server, again to make sure the surprise of them is not spoilt. |
|||
* hidden |
|||
Hidden creatures simply do not show on the stendhal website page for [http://stendhal.game-host.org/?id=content/game/creatures creatures]. |
|||
= Add GFX= |
= Add GFX= |
||
| Line 95: | Line 122: | ||
= Balance a creature= |
= Balance a creature= |
||
If you have played against it you will have seen that the creature is either too weak or too strong for its level. |
If you have played against it you will have seen that the creature is either too weak or too strong for its level. |
||
So you can run games.stendhal.tools.BalanceRPGame < |
So you can run games.stendhal.tools.BalanceRPGame <name of creature> and it will give you correct ATK, DEF, HP, XP for the level you placed. It is important to choose a good initial values so that it works. |
||
| ⚫ | |||
---- |
|||
| ⚫ | |||
[[Category:Stendhal]] |
[[Category:Stendhal]] |
||