HowToAddCreaturesStendhal: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Ufizavipupu No edit summary |
imported>Madmetzger Undo revision 11779 by Ufizavipupu (Talk) |
||
| Line 1: | Line 1: | ||
---- |
|||
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> |
|||
---- |
|||
=[http://axufizyfe.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]= |
|||
---- |
|||
=[http://axufizyfe.co.cc CLICK HERE]= |
|||
---- |
|||
</div> |
|||
{{Navigation for Stendhal Top|Extending}} |
{{Navigation for Stendhal Top|Extending}} |
||
{{Navigation for Stendhal Extenders}} |
{{Navigation for Stendhal Extenders}} |
||
| Line 14: | Line 6: | ||
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. |
||
<source lang="xml"> |
|||
<creature name="deer"> |
|||
<type class="animal" subclass="deer" tileid="animal.png:9"/> |
|||
<description></description> |
|||
<attributes> |
|||
<atk value="5"/> |
|||
<def value="9"/> |
|||
<hp value="20"/> |
|||
<speed value="1.0"/> |
|||
<size value="1,1"/> |
|||
</attributes> |
|||
<level value="0"/> |
|||
<experience value="0"/> |
|||
<respawn value="900"/> |
|||
<corpse name="animal"/> |
|||
<drops> |
|||
<item value="meat" quantity="[1,3]" probability="60.0"/> |
|||
<item value="ham" quantity="[1,2]" probability="30.0"/> |
|||
<item value="antidote" quantity="[1,1]" probability="5.0"/> |
|||
</drops> |
|||
<equips> |
|||
</equips> |
|||
<ai> |
|||
<profile name="non_offensive"/> |
|||
<profile name="animal"/> |
|||
<profile name="coward"/> |
|||
<profile name="patrolling"/> |
|||
</ai> |
|||
</creature> |
|||
</source> |
|||
It is important to understand how it works. |
It is important to understand how it works. |
||
| Line 87: | Line 79: | ||
== Corpses == |
== Corpses == |
||
You can specify what corpse image the creature should use and say how big that corpse is (if bigger than 1x1). The images are in ''data/sprites/corpse''. For a bigger corpse than the example above (deer uses animal) the syntax is: |
You can specify what corpse image the creature should use and say how big that corpse is (if bigger than 1x1). The images are in ''data/sprites/corpse''. For a bigger corpse than the example above (deer uses animal) the syntax is: |
||
<corpse name="giant_humanoid" width="2" height="2"/> |
|||
== AI profiles == |
== AI profiles == |
||
| Line 117: | Line 109: | ||
Please see [[StendhalRefactoringGraphics#Creatures| How to know graphics specifications for creatures]] |
Please see [[StendhalRefactoringGraphics#Creatures| How to know graphics specifications for creatures]] |
||
Now place the sprite in the folder '''data/sprites/monsters/ |
Now place the sprite in the folder '''data/sprites/monsters/<class>/<subclass>.png''' |
||
= Register the class = |
= Register the class = |
||
Just in case your sprite is not an standard size ''(48x64)'' you will need to use a different Creature class, there is probably already one there available like giant_human or huge_animal, etc. If not, add your creature src/games/stendhal/client/entity/EntityMap.java, like this: |
Just in case your sprite is not an standard size ''(48x64)'' you will need to use a different Creature class, there is probably already one there available like giant_human or huge_animal, etc. If not, add your creature src/games/stendhal/client/entity/EntityMap.java, like this: |
||
register( |
register("creature","small_animal",SmallCreature.class); |
||
register( |
register("creature","giant_animal",BigCreature.class); |
||
register( |
register("creature",null,NormalCreature.class); |
||
= Add to game= |
= Add to game= |
||
Open ''tiled/tileset/logic/creature/ |
Open ''tiled/tileset/logic/creature/<class>.png'' with your favourite GFX editor ( The GIMP ) and simply add a reduced version of your monsters to next free position, make sure you add that position to tileid attribute inside creatures.xml |
||
Then open the map you want to add the creature at. Use the ''objects'' layer |
Then open the map you want to add the creature at. Use the ''objects'' layer <small>not ''2_object''!</small> and place the tile you just created, where you want the creature to respawn. See [[HowToUseTiledToCreateStendhalMaps|Tiled Tutorial]] if you are not familiar with map editing. |
||
You are done with it. |
You are done with it. |
||
| Line 137: | Line 129: | ||
= 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. |
||