if you know some coding already, then definately look into using Functions (able to use Parameters and returning Values), Object Types (Classes), and~or Delegates to reduce code redundancy.
http://docs.textadventures.co.uk/quest/http://docs.textadventures.co.uk/quest/guides/http://docs.textadventures.co.uk/quest/elements/ (the OBJECTS of quest's Object-Oriented Programming, not to be confused with one of those OBJECTS~Elements: the 'Object' Element~OBJECT, within quest. OBJECTS: Elements: Objects, Exits, Functions, Commands, Verbs, Turnscripts, Timers, Object Types, etc)
http://docs.textadventures.co.uk/quest/types/ (Attributes)
http://docs.textadventures.co.uk/quest/ ... ction.htmlhttp://docs.textadventures.co.uk/quest/ ... /type.html (Object Types)
http://docs.textadventures.co.uk/quest/ ... gates.htmlFunctions and Objects Types are very simple to use (I'm still trying to learn Delegates ~ being a noob to coding), examples:
<function name="xxx" parameters="x1x,x2x,xetcx" type="xxx">
// in the above tag code line, the 'parameters' and 'type' are optional.
// scripting~scripts
</function>
<type name="xxx">
// attributes tag lines
</type>
<!-- example below -->
<object name="player">
<inherit name="character_object_type" />
<alias>knight</alias>
<attr name="luck_integer_attribute" type="int">75</attr>
<attr name="current_life_integer_attribute" type="int">999</attr>
<attr name="maximum_life_integer_attribute" type="int">999</attr>
</object>
<object name="orc">
<inherit name="character_object_type" />
<inherit name="non_playable_character_object_type" />
<attr name="luck_integer_attribute" type="int">50</attr>
</object>
<verb>
<property>fight</property>
<pattern>fight</pattern>
<defaultexpression>"You can't fight that."</defaultexpression>
</verb>
<type name="character_object_type">
<attr name="strength_integer_attribute" type="int">25</attr>
<attr name="endurance_integer_attribute" type="int">25</attr>
<attr name="dexterity_integer_attribute" type="int">25</attr>
<attr name="agility_integer_attribute" type="int">25</attr>
<attr name="speed_integer_attribute" type="int">25</attr>
<attr name="luck_integer_attribute" type="int">25</attr>
<attr name="current_life_integer_attribute" type="int">500</attr>
<attr name="maximum_life_integer_attribute" type="int">500</attr>
<attr name="condition_string_attribute" type="string">normal</attr>
</type>
<type name="non_playable_character_object_type">
<fight type="script"><![CDATA[
if (not this.condition_string_attribute = "dead" and not player.condition_string_attribute = "dead") {
this.current_life_integer_attribute = this.current_life_integer_attribute - (player.strength_integer_attribute * critical_hit_function (player))
if (this.current_life_integer_attribute <= 0) {
this.condition_string_attribute = "dead"
msg ("You killed the orc.")
} else {
player.current_life_integer_attribute = player.current_life_integer_attribute - (this.strength_integer_attribute * critical_hit_function (this))
if (player.current_life_integer_attribute <= 0) {
player.condition_string_attribute = "dead"
msg (player.alias + " has been killed.")
}
}
} else {
msg ("The orc, player, and~or both orc and player, are dead.")
}
]]></fight>
</type>
<function name="critical_hit_function" type="int" parameters="object_parameter">
boolean_variable = RandomChance(character_parameter.luck_integer_attribute))
if (boolean_variable) {
value = 2
} else {
value = 1
}
return (value)
</function>
-------
I'm still a code noob, so others can help with what is the best method to do what you want.