Files
andors-trail/AndorsTrailEdit/partials/edit_dialogue.html

159 lines
7.4 KiB
HTML

<h3>Dialogue</h3>
<fieldset id="dialoguePhrase">
<legend>NPC phrase</legend>
<button ng-click="showPhraseTree(phrase)" class="btn" title="Show conversation as tree">
<i class="icon-align-center"></i> Show as tree
</button>
<br /><br />
<div class="fieldWithLabel">
<label for="id">Phrase ID:</label>
<input type="text" size="30" id="id" class="field at-input-id" ng-model="phrase.id" />
</div>
<div class="fieldWithLabel">
<label for="message">NPC says:</label>
<textarea rows="4" cols="40" id="message" ng-model="phrase.message"></textarea>
<p ng-ds-fade="!phrase.message && phrase.replies.length > 0" class="dialogueConditional">
Since this phrase does not have any displayed<br />
text, it will not be shown to the player.<br />
Instead, the first reply that matches all<br />
requirements will be automatically followed.
</p>
</div>
<div class="fieldWithLabel">
<label class="checkbox"><input type="checkbox" id="hasRewards" ng-model="phrase.hasRewards" />Reaching this phrase gives rewards</label>
</div>
<div class="fieldWithLabel" ng-ds-fade="phrase.hasRewards">
<label for="rewards">Rewards</label>
<table class="field" id="rewards">
<thead><tr>
<th>Type</th>
<th><span class="hint hint--top" data-hint="Id of the quest, droplist, skill, condition or faction to be affected.">ID</span></th>
<th><span class="hint hint--top" data-hint="For quest rewards: quest stage to reward. For skill rewards: how many skill levels to reward. For conditions: duration of added effetct. For alignment: amount of faction change. Not used for droplists.">
Value
</span></th>
<th></th>
</tr></thead>
<tbody>
<tr ng-repeat="reward in phrase.rewards">
<td>
<select class="field" id="rewardType" ng-model="reward.rewardType">
<option value="0">Quest progress</option>
<option value="1">Droplist</option>
<option value="2">Skill increase</option>
<option value="3">Actor condition</option>
<option value="4">Alignment/faction change</option>
</select>
</td>
<td><input type="text" size="30" ng-model="reward.rewardID" id="rewardID" class="at-input-id"/></td>
<td><input type="text" size="3" ng-model="reward.value" class="at-input-quantity" /></td>
<td><a ng-click="removeReward(phrase, reward)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
</tr>
</tbody>
</table>
<button ng-click="addReward(phrase)" class="btn" title="Add reward"><i class="icon-plus-sign"></i> Add reward</button>
</div>
</fieldset>
<fieldset id="dialoguePhraseReplies">
<legend>Replies</legend>
<div class="fieldWithLabel">
<label class="checkbox"><input type="checkbox" id="hasOnlyNextReply" ng-model="phrase.hasOnlyNextReply" />Phrase leads directly to another<br />phrase without replies</label>
</div>
<div class="fieldWithLabel" ng-ds-fade="phrase.hasOnlyNextReply">
<label for="nextPhraseID">Phrase ID:</label>
<div class="field">
<input type="text" size="30" id="nextPhraseID" class="at-input-id" ng-model="phrase.nextPhraseID" placeholder="leave empty to generate id" />
<a ng-click="proceedToPhrase(phrase, 'nextPhraseID')" class="btn" title="Open editor for the indicated phrase. Leave empty to automatically generate a new phrase id based on the prefix for this phrase, or supply a new phrase id that should be used.">
<span ng-show="phrase.nextPhraseID"><i class="icon-forward"></i> Go</span>
<span ng-show="!phrase.nextPhraseID"><i class="icon-star-empty"></i> Generate</span>
</a>
</div>
</div>
<div class="fieldWithLabel" ng-ds-fade="!phrase.hasOnlyNextReply">
<label for="replies">Replies</label>
<table class="field" id="replies">
<thead><tr>
<th>Reply</th>
<th></th>
<th></th>
</tr></thead>
<tbody>
<tr ng-repeat="reply in phrase.replies">
<td ng-click="selectReply(reply)" class="clickToEdit">
<span ng-show="reply.text">{{reply.text.substring(0, 40)}}</span>
<span ng-show="!reply.text" class="dialogueConditional">(conditional evaluation)</span>
</td>
<td><a ng-click="removeReply(phrase, reply)" class="btn" title="Remove reply"><i class="icon-trash"></i></a></td>
<td><a ng-click="proceedToPhrase(reply, 'nextPhraseID')" class="btn" title="Follow" ng-show="reply.nextPhraseID && reply.nextPhraseID.length > 1"><i class="icon-forward"></i> Go</a></td>
</tr>
</tbody>
</table>
<button ng-click="addReply(phrase)" class="btn" title="Add reply"><i class="icon-plus-sign"></i> Add reply</button>
</div>
</fieldset>
<fieldset id="dialogueReply" ng-show="reply">
<legend>Player reply</legend>
<div class="fieldWithLabel">
<label for="text">Player says:</label>
<textarea rows="4" cols="40" id="text" ng-model="reply.text"></textarea>
</div>
<div class="fieldWithLabel">
<label for="replyLeadsTo">Reply leads to:</label>
<select class="field" id="replyLeadsTo" ng-model="reply.replyLeadsTo">
<option value="">Another phrase</option>
<option value="S">Trading screen</option>
<option value="F">Combat</option>
<option value="X">Conversation ends</option>
<option value="R">NPC is removed from map</option>
</select>
</div>
<div class="fieldWithLabel" ng-ds-fade="!reply.replyLeadsTo">
<label for="nextPhraseID">Next phrase ID:</label>
<div class="field">
<input type="text" size="30" id="nextPhraseID" class="at-input-id" ng-model="reply.nextPhraseID" placeholder="leave empty to generate id" />
<a ng-click="proceedToPhrase(reply, 'nextPhraseID')" class="btn" title="Open editor for the indicated phrase. Leave empty to automatically generate a new phrase id based on the prefix for this phrase, or supply a new phrase id that should be used.">
<span ng-show="reply.nextPhraseID"><i class="icon-forward"></i> Go</span>
<span ng-show="!reply.nextPhraseID"><i class="icon-star-empty"></i> Generate</span>
</a>
</div>
</div>
<div class="fieldWithLabel">
<label class="checkbox"><input type="checkbox" id="hasRequirements" ng-model="reply.hasRequirements" />Player must fulfill requirements to select this reply</label>
</div>
<div class="fieldWithLabel" ng-ds-fade="reply.hasRequirements">
<label for="rewards">Requirements</label>
<table class="field" id="requirements">
<thead><tr>
<th>Type</th>
<th><span class="hint hint--top" data-hint="Id of the item or quest to be required.">ID</span></th>
<th><span class="hint hint--left" data-hint="For item requirements: how many items to require. For quest progress: which quest stage to require.">
Value
</span></th>
<th></th>
</tr></thead>
<tbody>
<tr ng-repeat="require in reply.requires">
<td>
<select class="field" id="requireType" ng-model="require.requireType">
<option value="0">Quest progress</option>
<option value="1">Inventory &amp; item will be removed</option>
<option value="2">Inventory</option>
<option value="3">Worn equipment</option>
</select>
</td>
<td><input type="text" size="30" ng-model="require.requireID" id="requireID" class="at-input-id"/></td>
<td><input type="text" size="3" ng-model="require.value" class="at-input-quantity" /></td>
<td><a ng-click="removeRequirement(reply, require)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
</tr>
</tbody>
</table>
<button ng-click="addRequirement(reply)" class="btn" title="Add requirement"><i class="icon-plus-sign"></i> Add requirement</button>
</div>
</fieldset>
<div class="endSets"> </div>