UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412 (KHTML, 
like Gecko) Safari/412
IP: 65.37.49.4
URI: http://wesnoth.slack.it/?RandomTraitUnit
 - - - - -
Index: RandomTraitUnit
===================================================================
RCS file: /home/wesnoth/cvsroot/wikiroot/RandomTraitUnit,v
retrieving revision 1.5
diff -u -r1.5 RandomTraitUnit
--- RandomTraitUnit     10 Apr 2005 02:41:48 -0000      1.5
+++ RandomTraitUnit     4 Jul 2005 02:39:10 -0000
@@ -8,10 +8,9 @@
  )}
 will create an Orcish Grunt with two random traits at 20,14.
 
-NOTE: To create a fully realistic unit, also add 'upkeep=full', and give it a 
name. (Actually I know of no way to
-randomly generate fully realistic(to Wesnoth)
-names. However you can copy names out of names.cfg into a list for {RANDOM}, 
and use the result as a name. -EP)
-(With 0.9, generate_description=yes will create fully realistic names -MadMax)
+NOTE: To create a fully realistic unit, also add 'upkeep=full' and give it a 
name or use generate_description=yes to
+make the game generate names for you (v0.9 and later).
+(Added an entry for [resilient, quick].  For those two, order does produce 
different results - scott)
 
  #define TRAIT_IF NUMBER DESC TRAIT1 TRAIT2 STATS
  [if]
@@ -33,24 +32,26 @@
  #enddef
 
  #define RANDOM_TRAIT_UNIT STATS
- {RANDOM 1..6}
+ {RANDOM 1..7}
  {TRAIT_IF 1 quick,resilient ({TRAIT_QUICK}) ({TRAIT_RESILIENT}) ({STATS})}
  {TRAIT_IF 2 strong,resilient ({TRAIT_STRONG}) ({TRAIT_RESILIENT}) ({STATS})}
  {TRAIT_IF 3 intelligent,resilient ({TRAIT_INTELLIGENT}) ({TRAIT_RESILIENT}) 
({STATS})}
  {TRAIT_IF 4 strong,quick ({TRAIT_STRONG}) ({TRAIT_QUICK}) ({STATS})}
  {TRAIT_IF 5 strong,intelligent ({TRAIT_STRONG}) ({TRAIT_INTELLIGENT}) 
({STATS})}
  {TRAIT_IF 6 quick,intelligent ({TRAIT_QUICK}) ({TRAIT_INTELLIGENT}) ({STATS})}
+ {TRAIT_IF 7 resilient,quick ({TRAIT_RESILIENT}) ({TRAIT_QUICK}) ({STATS})}
  #enddef
 
 Warning: In multiplayer, as of 0.8.7, you must use PseudoRandom, not {RANDOM}:
  #define RANDOM_TRAIT_UNIT STATS
- {PSEUDORANDOM 6}
+ {PSEUDORANDOM 7}
  {TRAIT_IF 1 quick,resilient ({TRAIT_QUICK}) ({TRAIT_RESILIENT}) ({STATS})}
  {TRAIT_IF 2 strong,resilient ({TRAIT_STRONG}) ({TRAIT_RESILIENT}) ({STATS})}
  {TRAIT_IF 3 intelligent,resilient ({TRAIT_INTELLIGENT}) ({TRAIT_RESILIENT}) 
({STATS})}
  {TRAIT_IF 4 strong,quick ({TRAIT_STRONG}) ({TRAIT_QUICK}) ({STATS})}
  {TRAIT_IF 5 strong,intelligent ({TRAIT_STRONG}) ({TRAIT_INTELLIGENT}) 
({STATS})}
  {TRAIT_IF 6 quick,intelligent ({TRAIT_QUICK}) ({TRAIT_INTELLIGENT}) ({STATS})}
+ {TRAIT_IF 7 resilient,quick ({TRAIT_RESILIENT}) ({TRAIT_QUICK}) ({STATS})}
  #enddef
 
 A special version for elves, taking into account the elf-specific dextrous 
trait
@@ -88,25 +89,6 @@
  {TRAIT_IF 10 quick,intelligent ({TRAIT_QUICK}) ({TRAIT_INTELLIGENT}) 
({STATS})}
  #enddef
 
-How to do have random unit names (now defunct):
-
-
- # to be used like this:
- # {RANDOM_NAME}
- # [unit]
- # user_description=$randomname
- # ...
- # [/unit]
- # {CLEAR_VARIABLE randomname}
-
- #define RANDOM_NAME
- [set_variable]
- name=randomname
- random= _ "Names,Go,Here,In,A,List,Like,This"
- [/set_variable]
- #enddef
-(I don't think there's a practical way to use PseudoRandom for this)
-
 
 ||See Also||
 




_______________________________________________
Wesnoth-wiki-changes mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/wesnoth-wiki-changes

Reply via email to