Implement a quest system and job board

- The job board is loosely based on Exile III's job board; the dialog is converted from the one contained as a relic of E3 in BoE
- Quest system is loosely based on a mix of Exile III jobs and Blades of Avernum quests
- Talking to a monster (even a hostile one) can now trigger an arbitrary special node

Dialog engine:
- LED's now support wrapped labels
This commit is contained in:
2015-02-01 01:30:15 -05:00
parent db627e54a8
commit 4efcb08932
35 changed files with 714 additions and 52 deletions

View File

@@ -129,6 +129,15 @@
<sector-start x="20" y="20"/>
<!-- Definitions of special items, if any -->
<specials/>
<!-- Define quests here -->
<quest start-with='false'>
<!-- Quests can have a deadline, and an event that waives the deadline -->
<deadline relative='true' waive-if='5'>12</deadline>
<!-- Quests can have an automatic reward -->
<reward xp='12000' gold='250'/>
<name>Sample Quest</name>
<description>Your mission, if you choose to accept it, is...!!??</description>
</quest>
</game>
<editor>

View File

@@ -136,6 +136,32 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="quest" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name='deadline' minOccurs='0'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:integer'>
<xs:attribute name="relative" type="bool"/>
<xs:attribute name='waive-if' type='xs:integer'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name='reward' minOccurs='0'>
<xs:complexType>
<xs:attribute name='xp' type='xs:integer'/>
<xs:attribute name='gold' type='xs:integer'/>
</xs:complexType>
</xs:element>
<xs:element name='bank' type='xs:integer' minOccurs='0' maxOccurs='2'/>
<xs:element name="name" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
</xs:sequence>
<xs:attribute name="start-with" type="bool"/>
</xs:complexType>
</xs:element>
<xs:element name="timer" minOccurs="0" maxOccurs="20">
<xs:complexType>
<xs:simpleContent>

View File

@@ -111,8 +111,10 @@
<xsl:if test='./@state'>
background-image: url('img/button/led-<xsl:value-of select='./@state'/>.png');
</xsl:if>
background-position: left top;
left: <xsl:value-of select='./@left'/>px; top: <xsl:value-of select='./@top'/>px;
width: <xsl:value-of select='./@width'/>px;
height: <xsl:value-of select='./@height'/>px;
</xsl:attribute>
<xsl:value-of select='.'/>
</div>

View File

@@ -0,0 +1,30 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog defbtn='okay' debug='true'>
<pict type='dlog' num='16' top='8' left='8'/>
<text size='large' top='8' left='50' width='100' height='17'>Editing Quests</text>
<text top='8' left='200' width='100' height='16'>Quest number:</text>
<text name='num' top='8' left='300' width='100' height='16'/>
<text top='58' left='50' width='132' height='16'>Name of Quest:</text>
<text top='85' left='50' width='118' height='16'>Quest Description:</text>
<field name='name' top='57' left='205' width='252' height='16'/>
<field name='descr' top='84' left='205' width='252' height='104'/>
<text top='209' left='50' width='160' height='28'>Must be completed by day:<br/>(-1 for no deadline)</text>
<field name='chop' top='208' left='205' width='110' height='16'/>
<text top='247' left='50' width='150' height='28'>Event to waive deadline:<br/>(-1 for none)</text>
<field name='evt' top='246' left='205' width='100' height='16'/>
<text size='large' top='280' left='50' width='220' height='17'>Reward for completing:</text>
<text top='307' left='50' width='150' height='16'>Experience Points:</text>
<field name='xp' top='306' left='205' width='110' height='16'/>
<text top='333' left='50' width='150' height='16'>Gold:</text>
<field name='gold' top='332' left='205' width='110' height='16'/>
<led name='rel' wrap='true' top='208' left='330' width='120' height='28'>Deadline is relative to start day</led>
<led name='start' wrap='true' top='246' left='330' width='120' height='28'>Player is given quest when scenario starts</led>
<led name='inbank' top='285' left='330' width='120'>Include in a job bank:</led>
<field name='bank1' top='306' left='344' width='110' height='16'/>
<field name='bank2' top='332' left='344' width='110' height='16'/>
<button name='left' type='left' def-key='left' top='358' left='50'/>
<button name='right' type='right' def-key='right' top='358' left='115'/>
<button name='cancel' type='regular' def-key='esc' top='358' left='322'>Cancel</button>
<button name='okay' type='regular' top='358' left='387'>OK</button>
</dialog>

View File

@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog defbtn='done' debug='true'>
<pict type='dlog' num='3' top='9' left='9'/>
<text size='large' top='9' left='54' width='161' height='19'>THE JOB BOARD:</text>
<text top='9' left='230' width='92' height='19'>Current day:</text>
<text name='day' top='9' left='324' width='92' height='19'/>
<text name='feedback' framed='true' top='313' left='19' width='183' height='18'/>
<text name='job1' top='38' left='54' width='364' height='60'/>
<button name='take1' type='regular' top='78' left='426'>Take</button>
<text name='job2' top='104' left='54' width='364' height='60'/>
<button name='take2' type='regular' top='144' left='426'>Take</button>
<text name='job3' top='170' left='54' width='364' height='60'/>
<button name='take3' type='regular' top='210' left='426'>Take</button>
<text name='job4' top='236' left='54' width='364' height='60'/>
<button name='take4' type='regular' top='276' left='426'>Take</button>
<button name='done' type='done' top='305' left='426'/>
</dialog>

View File

@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<dialog defbtn='done' debug='true'>
<pict type='dlog' num='21' top='8' left='8'/>
<text name='name' framed='true' top='9' left='55' width='257' height='19'/>
<text name='descr' framed='true' top='39' left='55' width='257' height='87'/>
<text top='136' left='55' width='80' height='16'>Received on:</text>
<text name='start' framed='true' top='136' left='140' width='100' height='16'/>
<text top='156' left='55' width='80' height='16'>Deadline:</text>
<text name='chop' framed='true' top='156' left='140' width='100' height='16'/>
<text top='176' left='55' width='80' height='16'>Pay:</text>
<text name='pay' framed='true' top='176' left='140' width='100' height='16'/>
<button name='done' type='done' top='208' left='251'/>
</dialog>

View File

@@ -242,6 +242,7 @@
</xs:attribute>
<xs:attributeGroup ref="rect"/>
<xs:attributeGroup ref="font"/>
<xs:attribute name="wrap" default="false" type="bool"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>

View File

@@ -5,7 +5,7 @@ Looking (Outdoors)
Looking (Town/Combat)
Entering town
Leaving town
Talking
In conversation
Using special item
Town event timer triggered
Scenario event timer triggered
@@ -21,4 +21,5 @@ Monster using special ability
Attacking at melee
Being attacked at melee
Attacking at range
Being attacked at range
Being attacked at range
Initiating conversation