HowToAddCreaturesStendhal: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>AntumDeluge
Ant Command Line: how to use the enemy balancer
imported>AntumDeluge
Add GFX: add asset warning
 
(3 intermediate revisions by the same user not shown)
Line 105: Line 105:


= Add GFX=
= Add GFX=

{{AssetWarning}}

Now you need to find a nice sprite for your monster.
Now you need to find a nice sprite for your monster.


Line 127: Line 130:
Now let's play.
Now let's play.


= 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 <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. The balancer bases its output on the configured creature level & HP values. So those two values must be decided on & set in the XML configuration. Before running the balancer ATK, DEF, & XP can be set to any value as the balancer ignores these.
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. The balancer bases its output on the configured creature level & HP values. So those two values must be decided on & set in the XML configuration. Before running the balancer ATK, DEF, & XP can be set to any value as the balancer ignores these.

<span style="color:green; font-weight:bold; font-style:italic;">IMPORTANT NOTE:</span> ''The balancer does not make any adjustments to configured creatures nor does it report whether or not a creature is balanced in its current configuration. It only outputs suggested ATK, DEF, & XP values based on the creature's current configured level & HP values. It is up to you to manually change any configured creatures' stats.''


== Using the Balancer Utility ==
== Using the Balancer Utility ==
Line 173: Line 178:
#** <code>java -cp "./build/build_stendhaltools/:./:./build/build_server/:./tests/:./libs/*" games.stendhal.tools.BalanceRPGame orc "mountain orc"</code>
#** <code>java -cp "./build/build_stendhaltools/:./:./build/build_server/:./tests/:./libs/*" games.stendhal.tools.BalanceRPGame orc "mountain orc"</code>
#** <span style="color:green; font-style:italic;">'''NOTE:''' Creature names containing whitespace must be enclosed in quotes (").</span>
#** <span style="color:green; font-style:italic;">'''NOTE:''' Creature names containing whitespace must be enclosed in quotes (").</span>
#* To display XP suggestion, add the <code>-Dshowxp</code> option:
#** <code>java -cp "./build/build_stendhaltools/:./:./build/build_server/:./tests/:./libs/*" -Dshowxp games.stendhal.tools.BalanceRPGame</code>


=== Ant Command Line ===
=== Ant Command Line ===
Line 179: Line 186:
* To run the balancer using the <code>ant</code> command, you will need to have [https://ant.apache.org/ Apache Ant] installed.
* To run the balancer using the <code>ant</code> command, you will need to have [https://ant.apache.org/ Apache Ant] installed.
* Currently this method does ''NOT'' support running the balancer without any creature name arguments.
* Currently this method does ''NOT'' support running the balancer without any creature name arguments.
* Currently this method supports only one creature name argument.
* Currently this method does ''NOT'' support displaying XP suggestion.
* Currently this method does ''NOT'' support displaying XP suggestion.


Steps:
Steps:
# From your command line, navigate to the root directory of the Stendhal source.
# From your command line, navigate to the root directory of the Stendhal source.
# Execute the following command (replace "creature name" with the creature you want to balance):
# Execute the following command (replace "name" with the creature you want to balance):
#* <code>ant balance -Dcreature="creature name"</code>
#* <code>ant balance -Dcreature="name"</code>
#* Multiple creatures can be processed at once by simply adding multiple creature names separated with whitespace: <code>-Dcreature="lion tiger bear"</code>
#* Creature names containing whitespace '''''must''''' be enclosed within nested double or single quotes. Examples:
#** <code>-Dcreature="\"mountain orc\""</code> ''(single creature)''
#** <code>-Dcreature="'mountain orc'"</code> ''(single creature)''
#** <code>-Dcreature='"mountain orc"'</code> ''(single creature)''
#** <code>-Dcreature="'mountain orc' orc"</code> ''(multiple creatures)''


=== Implementing Output ===
=== Implementing Output ===