HowToAddCreaturesStendhal: Difference between revisions
Content deleted Content added
imported>Neoneurone No edit summary |
imported>Kymara major updates. |
||
Line 5:
For example.
<pre>
<creature name="deer">
<description></description>
<atk value="5"/>▼
<level value="0"/>▼
<drops>▼
<respawn value="900"/>
<item value="meat" quantity="[1,4]" probability="80"/>▼
<item value="ham" quantity="[1,2]" probability="40"/>▼
<equips>▼
<ai>▼
</equips>
<profile name="animal"/>▼
<profile name="non_ofensive"/>▼
</ai>▼
</creature>▼
<profile name="patrolling"/>
▲ </creature>
</pre>
Line 42 ⟶ 46:
The next attribute inside ''type'' tag is tileid that points to the file and position ''(starting from
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.
* DEF it is a value proportional to how much damage the creature can block. Note also the defense is also proportional to creature level.
* HP is the health measure
* Speed it is how fast creature moves. Range from 0 to 1.
* Size it is the size of the collision area on the ground of the creature in tiles: usually
Now the ''level'' and ''experience'' tags.
The level is used by the balancer application and the players to measure a creature ''(because they don't know ATK, DEF or HP values )''. The experience determine the reward the player will get by killing this creature. ''respawn'' is how long it takes to respawn. 0.005 * ''respawn'' is the average respawn time, in minutes. The actual respawn is randomly chosen from the interval [respawn/2 , 3 respawn/2].
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].
Aditionally you can equip items at a creature slots:
Line 64 ⟶ 68:
* feet
It is a good idea not to equip creatures ( because they take more memory ) if it is possible. Archers should equip arrows and bows. So they'll have extra attack from this. So you should give them less attack than other creatures of similar level or they will be too strong.
Most AI is useless right now don't worry about it, just copy and paste the data. Ones which 'work' already are lifesteal, heal and archer. Easiest first is archer, if it has that profile it 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.
= Add GFX=
Now you need to find a nice sprite for your monster.
Most RPGMaker 2000 sprites (like at [http://charas-project.net]) works for stendhal. But they are in 24x32 size.
We need to scale it using scale2x to get the best quality possible to 48x64.
Either use [http://scale2x.sourceforge.net/ scale2x] or send us the original sprite and we will scale it.
Line 80 ⟶ 84:
* Convert it to RGB mode with Image -> Mode -> RGB
* Add transparency to the image with Layer->Transparency->Add Alpha Channel
* Select the coloured background (green from Charas) by doing Tools->Selection Tools->Fuzzy Select (or pressing Z), and clicking on the green background. Make sure that the 'threshold' is set to 0 which means it will only select exactly that green colour. Also turn
* Remove the green background by pressing Ctrl-k (or Edit->Clear). Gimp should show the transparency as gray checker board pattern.
* Repeat the selection and clearing steps for any remaining green areas, if everything was not cleared at once.
Line 92 ⟶ 96:
= Edit GameObjects=
Just in case your sprite is not an standard size ''(48x64)'' you will need to use a different Creature class
register("creature","small_animal",SmallCreature.class);
Line 100 ⟶ 104:
= Add to game=
Open ''tiled/
You are done with it.
| |||