diff --git a/AndorsTrailEdit/AndorsTrailEditor.js b/AndorsTrailEdit/AndorsTrailEditor.js
index f1d1905f5..6b68df57c 100644
--- a/AndorsTrailEdit/AndorsTrailEditor.js
+++ b/AndorsTrailEdit/AndorsTrailEditor.js
@@ -6,7 +6,18 @@ IncludeJavascript("FieldList.js");
IncludeJavascript("DataStore.js");
IncludeJavascript("ImageSelector.js");
IncludeJavascript("EditorTabs.js");
+IncludeJavascript("EditorFunctions.js");
+IncludeJavascript("ImportExport.js");
+
+IncludeJavascript("Editor_ActorCondition.js");
+IncludeJavascript("Editor_Quest.js");
+IncludeJavascript("Editor_Item.js");
+IncludeJavascript("Editor_Droplist.js");
+IncludeJavascript("Editor_Conversation.js");
+IncludeJavascript("Editor_Monster.js");
+
IncludeJavascript("inc/jquery.shorten.min.js");
+IncludeJavascript("inc/jquery.dynatree.min.js");
var model;
@@ -18,201 +29,6 @@ var equipConditionsDialog;
var droplistItemDialog;
-function checkboxHidesElement(checkbox, element, visibleCondition) {
- checkbox.change(function () {
- if (checkbox.attr("checked")) {
- element.fadeIn("slow");
- } else {
- element.fadeOut("slow");
- }
- });
- var visible = bool(visibleCondition);
- checkbox.attr("checked", visible);
- element.toggle(visible);
-}
-
-function bool(v) {
- if (typeof(v) == 'undefined') return false;
- if (v == '') return false;
- if (v == '0') return false;
- if (v == 'false') return false;
- return true;
-}
-
-function setInputFieldsToObjectValues(div, obj) {
- div.find("input,select,textarea").each(function() {
- $(this).val(obj[$(this).attr("id")]);
- });
- div.find("input:checkbox").each(function() {
- $(this).attr("checked", bool(obj[$(this).attr("id")]));
- });
-}
-
-function bindInputFieldChangesToObject(div, obj) {
- div.find("input,select,textarea").unbind("change").change(function() {
- obj[$(this).attr("id")] = $(this).val();
- });
- div.find("input:checkbox").unbind("change").change(function() {
- obj[$(this).attr("id")] = $(this).attr("checked") ? 1 : 0;
- });
-}
-
-function applyEditorBindingsForObject(div, obj) {
- div.find("input").addClass("ui-widget-content ui-corner-all");
- setInputFieldsToObjectValues(div, obj);
- bindInputFieldChangesToObject(div, obj);
-}
-
-function applyCommonEditorBindings(div, obj, dataStore) {
- applyEditorBindingsForObject(div, obj);
- div.find("#" + dataStore.nameField).change(function() { dataStore.onNameChanged(obj, $(this).val()); });
-}
-
-function createMonsterEditor(obj) {
- var div = $( "#templates #editMonster" ).clone();
- applyCommonEditorBindings(div, obj, model.monsters);
- checkboxHidesElement(div.find('#hasConversation'), div.find('#hasConversationDisplay'), obj.phraseID);
- checkboxHidesElement(div.find('#hasCombat'), div.find('#hasCombatDisplay'), obj.attackChance);
- checkboxHidesElement(div.find('#hasCritical'), div.find('#hasCriticalDisplay'), obj.criticalChance || obj.criticalMultiplier);
- checkboxHidesElement(div.find('#hasHitEffect'), div.find('#hasHitEffectDisplay'), obj.hasHitEffect);
- imageSelector.imageify(div.find('#monsterimage'), div.find('#iconID'), 'monsters');
- bindFieldToDataStore( $( "#droplistID", div ), model.droplists , function(obj) { return obj.id; } );
-
-
- var createNewCondition = function() { return { chance: 100, magnitude: 1 }; }
- if (!obj.onHit_conditionsSource) obj.onHit_conditionsSource = [];
- if (!obj.onHit_conditionsTarget) obj.onHit_conditionsTarget = [];
- var setupEditor = function(div) {
- bindFieldToDataStore( $( "#condition", div ), model.actorEffects , function(obj) { return obj.id; } );
- }
- applyTableEditor( $( "#onHit_conditionsSource", div ) , onHitConditionsDialog, obj.onHit_conditionsSource, createNewCondition, setupEditor);
- applyTableEditor( $( "#onHit_conditionsTarget", div ) , onHitConditionsDialog, obj.onHit_conditionsTarget, createNewCondition, setupEditor);
-
- return div;
-}
-
-function createItemEditor(obj) {
- var div = $( "#templates #editItem" ).clone();
- applyCommonEditorBindings(div, obj, model.items);
- checkboxHidesElement(div.find('#hasEquipEffect'), div.find('#hasEquipEffectDisplay'), obj.hasEquipEffect);
- checkboxHidesElement(div.find('#hasUseEffect'), div.find('#hasUseEffectDisplay'), obj.hasUseEffect);
- checkboxHidesElement(div.find('#equip_hasCritical'), div.find('#equip_hasCriticalDisplay'), obj.equip_criticalChance || obj.equip_criticalMultiplier);
- checkboxHidesElement(div.find('#hasHitEffect'), div.find('#hasHitEffectDisplay'), obj.hasHitEffect);
- checkboxHidesElement(div.find('#hasKillEffect'), div.find('#hasKillEffectDisplay'), obj.hasKillEffect);
- imageSelector.imageify(div.find('#itemimage'), div.find('#iconID'), 'items');
-
- var createNewCondition = function() { return { chance: 100, magnitude: 1 }; }
- if (!obj.equip_conditions) obj.equip_conditions = [];
- if (!obj.use_conditionsSource) obj.use_conditionsSource = [];
- if (!obj.hit_conditionsSource) obj.hit_conditionsSource = [];
- if (!obj.hit_conditionsTarget) obj.hit_conditionsTarget = [];
- if (!obj.kill_conditionsSource) obj.kill_conditionsSource = [];
- var setupEditor = function(div) {
- bindFieldToDataStore( $( "#condition", div ), model.actorEffects , function(obj) { return obj.id; } );
- }
- applyTableEditor( $( "#equip_conditions", div ) , equipConditionsDialog, obj.equip_conditions, createNewCondition, setupEditor);
- applyTableEditor( $( "#use_conditionsSource", div ) , onHitConditionsDialog, obj.use_conditionsSource, createNewCondition, setupEditor);
- applyTableEditor( $( "#hit_conditionsSource", div ) , onHitConditionsDialog, obj.hit_conditionsSource, createNewCondition, setupEditor);
- applyTableEditor( $( "#hit_conditionsTarget", div ) , onHitConditionsDialog, obj.hit_conditionsTarget, createNewCondition, setupEditor);
- applyTableEditor( $( "#kill_conditionsSource", div ) , onHitConditionsDialog, obj.kill_conditionsSource, createNewCondition, setupEditor);
-
- return div;
-}
-
-function bindFieldToDataStore(field, dataStore, converter) {
- var dataCallback = function(request, response) {
- var result = [];
- var pattern = new RegExp(request.term, "i");
- dataStore.items.forEach(function(obj) {
- var name = converter(obj);
- if (name.match(pattern)) {
- result.push(name);
- }
- });
- response(result);
- };
- field.autocomplete( "destroy" ).autocomplete({ source: dataCallback, minLength: 0 });
-}
-
-function createStatusEffectEditor(obj) {
- var div = $( "#templates #editActorEffect" ).clone();
- applyCommonEditorBindings(div, obj, model.actorEffects);
- checkboxHidesElement(div.find('#hasRoundEffect'), div.find('#hasRoundEffectDisplay'), obj.hasRoundEffect);
- checkboxHidesElement(div.find('#hasFullRoundEffect'), div.find('#hasFullRoundEffectDisplay'), obj.hasFullRoundEffect);
- checkboxHidesElement(div.find('#hasAbilityEffect'), div.find('#hasAbilityEffectDisplay'), obj.hasAbilityEffect);
- checkboxHidesElement(div.find('#hasCritical'), div.find('#hasCriticalDisplay'), obj.criticalChance || obj.criticalMultiplier);
- imageSelector.imageify(div.find('#statuseffectimage'), div.find('#iconID'), 'effects');
- return div;
-}
-
-function applyTableEditor(table, dialog, array, templateFunction, editorSetup) {
- var updateRowText = function(row, obj) {
- $( "td", row ).each(function() {
- var id = $( this ).attr("id");
- var val = obj[id];
- val = val ? val : "";
- $( "td#" + id, row ).text(val).shorten({
- width: '200'
- }).css('display','');
- });
- };
-
- var addToList = function(obj) {
- var row = $( "
" );
- table.find("th").each(function() {
- var id = $( this ).attr("id");
- row.append( $( "| " ).attr("id", id) );
- });
- updateRowText(row, obj);
- table.append(row);
- row.click(function() {
- applyEditorBindingsForObject( dialog, obj );
- if (editorSetup) { editorSetup(dialog); }
- dialog.unbind( "dialogclose" ).bind( "dialogclose", function() {
- updateRowText(row, obj);
- });
- dialog.dialog( "open" );
- });
- return row;
- };
- table.parent().find("#add").button().click(function() {
- var obj = templateFunction();
- array.push( obj );
- addToList( obj ).click();
- });
- table.addClass("ui-corner-all");
- $( "thead", table ).addClass("ui-widget-header");
- array.forEach(addToList);
-}
-
-function createQuestEditor(obj) {
- var div = $( "#templates #editQuest" ).clone(true);
- applyCommonEditorBindings(div, obj, model.quests);
- if (!obj.stages) obj.stages = [];
- var array = obj.stages;
- var createNewStage = function() {
- var nextProgress;
- if (array.length > 0) { nextProgress = parseInt(array[array.length - 1].progress) + 10; }
- if (!nextProgress) { nextProgress = 10; }
- return { progress: nextProgress };
- };
- applyTableEditor( $( "#stages", div ) , questlogDialog, array, createNewStage, function() {});
- return div;
-}
-
-function createDroplistEditor(obj) {
- var div = $( "#templates #editDroplist" ).clone(true);
- applyCommonEditorBindings(div, obj, model.droplists);
- if (!obj.items) obj.items = [];
- var createNewDroplistItem = function() { return { quantity: 1, chance: 100 } };
- var setupEditor = function(div) {
- bindFieldToDataStore( $( "#itemID", div ), model.items , function(obj) { return obj.searchTag; } );
- }
- applyTableEditor( $( "#items", div ) , droplistItemDialog, obj.items, createNewDroplistItem, setupEditor);
- return div;
-}
-
-
function openTabForObject(obj, dataStore) {
tabs.openTabForObject(obj, dataStore.objectTypename, obj[dataStore.nameField]);
}
@@ -239,30 +55,6 @@ function bindObjectsToItemList(itemListDiv, dataStore) {
};
}
-
-function exportIfExists(dataStore, div) {
- var exists = false;
- if (dataStore && dataStore.items.length > 0) exists = true;
- div.toggle(exists);
- if (!exists) { return; }
- var exportData = dataStore.serialize();
- $( "#value" , div ).val(exportData);
-}
-
-function prepareImport(dataStore, div) {
- var importButton = $( "#import", div );
- var textarea = $( "#value", div );
- importButton.button({ disabled: true }).click(function() {
- if (!textarea.val()) return;
- dataStore.deserialize(textarea.val());
- div.hide('slow');
- });
- textarea.val("").change(function() {
- var disabled = $(this).val() ? false : true;
- importButton.button( "option", "disabled", disabled );
- });
-}
-
function bindEditorType(dataStore, div, createObjectEditor, newObjectCreator) {
tabs.registerEditorType(dataStore.objectTypename, createObjectEditor);
@@ -277,10 +69,30 @@ function bindEditorType(dataStore, div, createObjectEditor, newObjectCreator) {
});
}
+function addExampleModelItems(model) {
+ model.actorConditions.add({id: "bless", name: "Bless", iconID: "items_tiles:318", hasAbilityEffect: 1, attackChance: 15, blockChance: 5});
+ model.actorConditions.add({id: "poison_weak", name: "Weak Poison", iconID: "items_tiles:340", hasRoundEffect: 1, round_visualEffectID: 2, round_boostHP_Min: -1, round_boostHP_Max: -1});
+
+ model.quests.add({id: "testQuest", name: "Test quest", stages: [ { progress: 10, logText: "Stage 10"} , { progress: 20, logText: "Stage 20", finishesQuest: 1 } ] });
+
+ model.items.add({iconID: "items_tiles:70", name: "Test item", searchTag: "item0", category: 0, baseMarketCost: 51, hasEquipEffect: 1, equip_attackChance: 10, equip_attackDamage_Min: 2, equip_attackDamage_Max: 4});
+ model.items.add({iconID: "items_tiles:266", name: "Ring of damage +1", searchTag: "dmg_ring1", category: 7, baseMarketCost: 62, hasEquipEffect: 1, equip_attackDamage_Min: 1, equip_attackDamage_Max: 1});
+
+ model.droplists.add({id: "merchant1", items: [ { itemID: 'dmg_ring1', quantity_Min: 4, quantity_Max: 5, chance: 100 } , { itemID: 'item0', quantity_Min: 1, quantity_Max: 1, chance: 100 } ] } );
+
+ model.dialogue.add({id: "mikhail_default", message: 'Anything else I can help you with?', replies: [ { text: 'Do you have any tasks for me?', nextPhraseID: 'mikhail_tasks' }, { text: 'Is there anything else you can tell me about Andor?', nextPhraseID: 'mikhail_andor1' } ]});
+ model.dialogue.add({id: 'mikhail_andor1', message: 'As I said, Andor went out yesterday and hasn\'t been back since. I\'m starting to worry about him. Please go look for your brother, he said he would only be out a short while.'});
+ model.dialogue.add({id: 'mikhail_tasks', message: 'Oh yes, there were some things I need help with, bread and rats. Which one would you like to talk about?'});
+
+ model.monsters.add({name: "Small ant", iconID: "monsters_insects:2", maxHP: 30, size: '1x1'});
+ model.monsters.add({name: "Red ant", iconID: "monsters_insects:3", maxHP: 20, size: '1x1'});
+ model.monsters.add({name: "Wasp", iconID: "monsters_insects:1", maxHP: 10, size: '1x1'});
+}
+
function startEditor() {
model = {
- actorEffects: new DataStore('effect', new FieldList("[id|name|iconID|isStacking|"
+ actorConditions: new DataStore('actorcondition', new FieldList("[id|name|iconID|isStacking|"
+ "hasRoundEffect|round_visualEffectID|round_boostHP_Min|round_boostHP_Max|round_boostAP_Min|round_boostAP_Max|"
+ "hasFullRoundEffect|fullround_visualEffectID|fullround_boostHP_Min|fullround_boostHP_Max|fullround_boostAP_Min|fullround_boostAP_Max|"
+ "hasAbilityEffect|boostMaxHP|boostMaxAP|moveCostPenalty|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|"
@@ -293,35 +105,21 @@ function startEditor() {
+ "hasKillEffect|kill_boostHP_Min|kill_boostHP_Max|kill_boostAP_Min|kill_boostAP_Max|kill_conditionsSource[condition|magnitude|duration|chance|]|"
+ "];"))
,droplists: new DataStore('droplist', new FieldList("[id|items[itemID|quantity_Min|quantity_Max|chance|]|];"), 'id')
- ,dialogue: new DataStore('dialogue', new FieldList("[id|name|];"))
+ ,dialogue: new DataStore('dialogue', new FieldList("[id|message|progressQuest|rewardDropListID|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|]|];"), 'id')
,monsters: new DataStore('monster', new FieldList("[iconID|name|tags|size|maxHP|maxAP|moveCost|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|droplistID|phraseID|"
+ "hasHitEffect|onHit_boostHP_Min|onHit_boostHP_Max|onHit_boostAP_Min|onHit_boostAP_Max|onHit_conditionsSource[condition|magnitude|duration|chance|]|onHit_conditionsTarget[condition|magnitude|duration|chance|]|"
+ "];"))
};
-
- model.actorEffects.add({id: "bless", name: "Bless", iconID: "items_tiles:318", hasAbilityEffect: 1, attackChance: 15, blockChance: 5});
- model.actorEffects.add({id: "poison_weak", name: "Weak Poison", iconID: "items_tiles:340", hasRoundEffect: 1, round_visualEffectID: 2, round_boostHP_Min: -1, round_boostHP_Max: -1});
-
- model.quests.add({id: "testQuest", name: "Test quest", stages: [ { progress: 10, logText: "Stage 10"} , { progress: 20, logText: "Stage 20", finishesQuest: 1 } ] });
-
- model.items.add({iconID: "items_tiles:70", name: "Test item", searchTag: "item0", category: 0, baseMarketCost: 51, hasEquipEffect: 1, equip_attackChance: 10, equip_attackDamage_Min: 2, equip_attackDamage_Max: 4});
- model.items.add({iconID: "items_tiles:266", name: "Ring of damage +1", searchTag: "dmg_ring1", category: 7, baseMarketCost: 62, hasEquipEffect: 1, equip_attackDamage_Min: 1, equip_attackDamage_Max: 1});
-
- model.droplists.add({id: "merchant1", items: [ { itemID: 'dmg_ring1', quantity_Min: 4, quantity_Max: 5, chance: 100 } , { itemID: 'item0', quantity_Min: 1, quantity_Max: 1, chance: 100 } ] } );
-
- model.monsters.add({name: "Small ant", iconID: "monsters_insects:2", maxHP: 30, size: '1x1'});
- model.monsters.add({name: "Red ant", iconID: "monsters_insects:3", maxHP: 20, size: '1x1'});
- model.monsters.add({name: "Wasp", iconID: "monsters_insects:1", maxHP: 10, size: '1x1'});
-
+ addExampleModelItems(model);
$( "#left #tools" ).accordion({ fillSpace: true });
tabs = new EditorTabs( $( "#center #tabs" ) );
- bindEditorType(model.actorEffects, $( "#tools #effectlist" ), createStatusEffectEditor, function() {
- return {name: "New Effect", id: 'new_effect' };
+ bindEditorType(model.actorConditions, $( "#tools #actorconditionlist" ), createActorConditionEditor, function() {
+ return {name: "New Condition", id: 'new_condition' };
});
bindEditorType(model.quests, $( "#tools #questlist" ), createQuestEditor, function() {
return {name: "New Quest", id: 'new_quest' };
@@ -332,39 +130,17 @@ function startEditor() {
bindEditorType(model.droplists, $( "#tools #droplist" ), createDroplistEditor, function() {
return {id: "new_droplist" };
});
+ bindEditorType(model.dialogue, $( "#tools #conversationlist" ), createConversationEditor, function() {
+ return {id: "new_conversation" };
+ });
bindEditorType(model.monsters, $( "#tools #monsterlist" ), createMonsterEditor, function() {
return {name: "New Monster", maxAP: 10, attackCost: 5, moveCost: 5 };
});
- var importExportDialog;
- $( "#buttons #import" )
- .button()
- .click(function() {
- importExportDialog.dialog({ title: "Import data" });
- $( "div", importExportDialog ).show();
- prepareImport(model.actorEffects, $( "#statuseffects", importExportDialog ));
- prepareImport(model.quests, $( "#quests", importExportDialog ));
- prepareImport(model.items, $( "#items", importExportDialog ));
- prepareImport(model.droplists, $( "#droplists", importExportDialog ));
- prepareImport(model.dialogue, $( "#dialogue", importExportDialog ));
- prepareImport(model.monsters, $( "#monsters", importExportDialog ));
- importExportDialog.dialog( "open" );
- });
- $( "#buttons #export" )
- .button()
- .click(function() {
- importExportDialog.dialog({ title: "Export data" });
- exportIfExists(model.actorEffects, $( "#statuseffects", importExportDialog ));
- exportIfExists(model.quests, $( "#quests", importExportDialog ));
- exportIfExists(model.items, $( "#items", importExportDialog ));
- exportIfExists(model.droplists, $( "#droplists", importExportDialog ));
- exportIfExists(model.dialogue, $( "#dialogue", importExportDialog ));
- exportIfExists(model.monsters, $( "#monsters", importExportDialog ));
- $( "#import", importExportDialog ).hide();
- importExportDialog.dialog( "open" );
- });
+ $( "#buttons #import" ).button().click( showImportDialog );
+ $( "#buttons #export" ).button().click( showExportDialog );
var defaultButtons = {
Close: function() { $( this ).dialog( "close" ); }
@@ -417,7 +193,7 @@ function startEditor() {
imageSelector = new ImageSelector("http://andors-trail.googlecode.com/svn/trunk/AndorsTrail/res/drawable/", $( "#dialog-images" ) );
- imageSelector.add(new TilesetImage("items_tiles", {x: 14, y:30}, {x:34, y:34}, [ 'items', 'effects' ] ));
+ imageSelector.add(new TilesetImage("items_tiles", {x: 14, y:30}, {x:34, y:34}, [ 'items', 'conditions' ] ));
imageSelector.add(new TilesetImage("monsters_armor1", {x: 1, y:1}, undefined, [ 'monsters' ] ));
imageSelector.add(new TilesetImage("monsters_demon1", {x: 1, y:1}, {x:64, y:64}, [ 'monsters' ] ));
imageSelector.add(new TilesetImage("monsters_demon2", {x: 1, y:1}, undefined, [ 'monsters' ] ));
diff --git a/AndorsTrailEdit/DataStore.js b/AndorsTrailEdit/DataStore.js
index faac266be..c64053aed 100644
--- a/AndorsTrailEdit/DataStore.js
+++ b/AndorsTrailEdit/DataStore.js
@@ -36,6 +36,11 @@ function DataStore(objectTypename, fieldList, nameField) {
}
this.get = function(index) { return this.items[index]; }
this.clear = function() { this.items = {}; }
+ this.findById = function(id) {
+ for (var i = 0; i < this.items.length; ++i) {
+ if (this.items[i].id == id) return this.items[i];
+ }
+ }
this.onAdded = function(obj) { }
this.onNameChanged = function(obj, name) { }
diff --git a/AndorsTrailEdit/EditorFunctions.js b/AndorsTrailEdit/EditorFunctions.js
new file mode 100644
index 000000000..1582b6a51
--- /dev/null
+++ b/AndorsTrailEdit/EditorFunctions.js
@@ -0,0 +1,134 @@
+
+function changeHidesElement(changedElement, elementToHide, visibilityEvaluator) {
+ changedElement.change(function () {
+ if (visibilityEvaluator()) {
+ elementToHide.fadeIn("slow");
+ } else {
+ elementToHide.fadeOut("slow");
+ }
+ });
+ elementToHide.toggle(visibilityEvaluator());
+}
+
+function checkboxHidesElement(checkbox, element, visibleCondition) {
+ var visible = bool(visibleCondition);
+ checkbox.attr("checked", visible);
+ var evaluator = function() { return checkbox.attr("checked"); };
+ changeHidesElement(checkbox, element, evaluator);
+}
+
+function checkboxShowsElement(checkbox, element, visibleCondition) {
+ var visible = !bool(visibleCondition);
+ checkbox.attr("checked", visible);
+ var evaluator = function() { return !checkbox.attr("checked"); };
+ changeHidesElement(checkbox, element, evaluator);
+}
+
+function bool(v) {
+ if (typeof(v) == 'undefined') return false;
+ if (v == '') return false;
+ if (v == '0') return false;
+ if (v == 'false') return false;
+ return true;
+}
+
+function setInputFieldsToObjectValues(div, obj) {
+ div.find("input,select,textarea").each(function() {
+ $(this).val(obj[$(this).attr("id")]);
+ });
+ div.find("input:checkbox").each(function() {
+ $(this).attr("checked", bool(obj[$(this).attr("id")]));
+ });
+}
+
+function bindInputFieldChangesToObject(div, obj) {
+ div.find("input,select,textarea").unbind("change").change(function() {
+ obj[$(this).attr("id")] = $(this).val();
+ });
+ div.find("input:checkbox").unbind("change").change(function() {
+ obj[$(this).attr("id")] = $(this).attr("checked") ? 1 : 0;
+ });
+}
+
+function applyEditorBindingsForObject(div, obj) {
+ div.find("input").addClass("ui-widget-content ui-corner-all");
+ setInputFieldsToObjectValues(div, obj);
+ bindInputFieldChangesToObject(div, obj);
+}
+
+function applyCommonEditorBindings(div, obj, dataStore) {
+ applyEditorBindingsForObject(div, obj);
+ if (dataStore) {
+ div.find("#" + dataStore.nameField).change(function() { dataStore.onNameChanged(obj, $(this).val()); });
+ }
+}
+
+function bindFieldToDataStore(field, dataStore, converter) {
+ var dataCallback = function(request, response) {
+ var result = [];
+ var pattern = new RegExp(request.term, "i");
+ dataStore.items.forEach(function(obj) {
+ var name = converter(obj);
+ if (name.match(pattern)) {
+ result.push(name);
+ }
+ });
+ response(result);
+ };
+ field.autocomplete( "destroy" ).autocomplete({
+ source: dataCallback,
+ minLength: 0,
+ select: function(event, ui) {
+ field.val(ui.item.value);
+ field.change();
+ }
+ });
+}
+
+function applyTableEditor(input) {
+
+ var updateRowText = function(row, obj) {
+ $( "td", row ).each(function() {
+ var id = $( this ).attr("id");
+ var val = obj[id];
+ val = val ? val : "";
+ $( this ).text(val).shorten({
+ width: '200'
+ }).css('display','');
+ });
+ };
+
+ var onItemSelected = input.onItemSelected ? input.onItemSelected : function(obj, row) {
+ var dialog = input.dialog;
+ applyEditorBindingsForObject( dialog, obj );
+ if (input.editorSetup) { input.editorSetup(dialog); }
+ dialog.unbind( "dialogclose" ).bind( "dialogclose", function() {
+ updateRowText(row, obj);
+ });
+ dialog.dialog( "open" );
+ };
+
+ var table = input.table;
+ var addToList = function(obj) {
+ var row = $( " |
" );
+ table.find("th").each(function() {
+ var id = $( this ).attr("id");
+ row.append( $( "" ).attr("id", id) );
+ });
+ updateRowText(row, obj);
+ table.append(row);
+ row.click(function() { onItemSelected(obj, row); });
+ return row;
+ };
+ table.parent().find("#add").button().unbind("click").click(function() {
+ var obj = input.templateFunction();
+ input.array.push( obj );
+ if (input.onItemAdded) { input.onItemAdded(obj); }
+ addToList( obj ).click();
+ });
+ table.addClass("ui-corner-all");
+ $( "thead", table ).addClass("ui-widget-header");
+ $( "tbody", table ).empty();
+ input.array.forEach(addToList);
+}
+
diff --git a/AndorsTrailEdit/Editor_ActorCondition.js b/AndorsTrailEdit/Editor_ActorCondition.js
new file mode 100644
index 000000000..3013eccb2
--- /dev/null
+++ b/AndorsTrailEdit/Editor_ActorCondition.js
@@ -0,0 +1,12 @@
+
+function createActorConditionEditor(obj) {
+ var div = $( "#templates #editActorCondition" ).clone();
+ applyCommonEditorBindings(div, obj, model.actorConditions);
+ checkboxHidesElement(div.find('#hasRoundEffect'), div.find('#hasRoundEffectDisplay'), obj.hasRoundEffect);
+ checkboxHidesElement(div.find('#hasFullRoundEffect'), div.find('#hasFullRoundEffectDisplay'), obj.hasFullRoundEffect);
+ checkboxHidesElement(div.find('#hasAbilityEffect'), div.find('#hasAbilityEffectDisplay'), obj.hasAbilityEffect);
+ checkboxHidesElement(div.find('#hasCritical'), div.find('#hasCriticalDisplay'), obj.criticalChance || obj.criticalMultiplier);
+ imageSelector.imageify(div.find('#actorconditionimage'), div.find('#iconID'), 'conditions');
+ return div;
+}
+
diff --git a/AndorsTrailEdit/Editor_Conversation.js b/AndorsTrailEdit/Editor_Conversation.js
new file mode 100644
index 000000000..1aa67e9d9
--- /dev/null
+++ b/AndorsTrailEdit/Editor_Conversation.js
@@ -0,0 +1,302 @@
+
+
+function createConversationEditor(obj) {
+ var div = $( "#templates #editDialogue" ).clone(true);
+
+ var treeDiv = $ ( "#dialogueTree", div );
+ treeDiv.dynatree({
+ title: "Conversation flow"
+ ,imagePath: 'img'
+ });
+ var tree = treeDiv.dynatree("getTree");
+
+ var rootNode = treeDiv.dynatree("getRoot");
+ updatePhraseTreeNodesBelow(tree, rootNode, obj);
+
+ treeDiv.dynatree({
+ onActivate: function(node) {
+ onConversationPhraseSelected(div, node.data.model, tree);
+ }
+ });
+
+ tree.activateKey(obj.id);
+
+ return div;
+}
+
+function getPhraseByPhraseID(phraseID) {
+ if (!phraseID) return;
+ return model.dialogue.findById(phraseID);
+}
+
+function onConversationPhraseSelected(div, obj, tree) {
+ var dialoguePhrase = $( "#dialoguePhrase", div );
+ var dialogueReply = $( "#dialogueReply", div );
+ var dialoguePhraseReplies = $( "#dialoguePhraseReplies", div );
+ dialogueReply.hide();
+ dialoguePhrase.hide();
+ dialoguePhraseReplies.hide();
+ if (!obj) return;
+
+ var treeNodeKey = getTreeNodeKey(obj);
+ var treeNode = tree.getNodeByKey(treeNodeKey);
+ if (!treeNode) {
+ treeNode = updatePhraseTreeNodesBelow(tree, tree.getRoot(), obj, true);
+ }
+
+ treeNode.activateSilently();
+
+ applyCommonEditorBindings(div, obj, model.dialogue);
+
+ if (obj.isPhrase) {
+ buildEditorForPhrase(div, obj, tree, treeNode);
+ } else {
+ buildEditorForReply(div, obj, tree, treeNode);
+ }
+}
+
+// ========================================================
+// Set up editor for NPC phrases
+
+function buildEditorForPhrase(div, phrase, tree, treeNode) {
+ var dialoguePhrase = $( "#dialoguePhrase", div );
+ var dialoguePhraseReplies = $( "#dialoguePhraseReplies", div );
+
+ checkboxHidesElement( $( '#hasProgressQuest', dialoguePhrase ), $( '#hasProgressQuestDisplay', dialoguePhrase ), phrase.progressQuest);
+ checkboxHidesElement( $( '#hasRewardDroplist', dialoguePhrase ), $( '#hasRewardDroplistDisplay', dialoguePhrase ), phrase.rewardDropListID);
+ bindFieldToDataStore( $( "#progressQuest", dialoguePhrase ), model.quests , function(obj) { return obj.id; } );
+ bindFieldToDataStore( $( "#rewardDropListID", dialoguePhrase ), model.droplists , function(obj) { return obj.id; } );
+
+ var reloadReplyTable = function() {
+ applyTableEditor({
+ table: $( "#replies", dialoguePhraseReplies ),
+ array: phrase.replies,
+ templateFunction: function() { return createReplyForPhrase(phrase); },
+ onItemSelected: function(obj) {
+ onConversationPhraseSelected(div, obj, tree);
+ },
+ onItemAdded: function(addedObject) {
+ updatePhraseReplyTreeNodesBelow(tree, treeNode, phrase);
+ }
+ });
+ }
+ reloadReplyTable();
+
+ var hasOnlyNextReply = $( '#hasOnlyNextReply', dialoguePhraseReplies );
+ checkboxHidesElement( hasOnlyNextReply, $( '#hasOnlyNextReplyDisplay', dialoguePhraseReplies ), phrase.hasOnlyNextReply);
+ checkboxShowsElement( hasOnlyNextReply, $( '#hasRepliesDisplay', dialoguePhraseReplies ), !phrase.hasOnlyNextReply);
+
+ hasOnlyNextReply.change(function() {
+ if ( $(this).attr("checked") ) {
+ var nextReply = createReplyForPhrase(phrase);
+ nextReply.text = 'N';
+ phrase.replies = [ nextReply ];
+ } else {
+ phrase.replies = [ ];
+ reloadReplyTable();
+ }
+ updatePhraseReplyTreeNodesBelow(tree, treeNode, phrase);
+ });
+ var nextPhraseID = $( "#nextPhraseID", dialoguePhraseReplies );
+
+ nextPhraseID.unbind("change").change(function() {
+ phrase.replies[0].nextPhraseID = $( this ).val();
+ updatePhraseReplyTreeNodesBelow(tree, treeNode, phrase);
+ });
+ if (phrase.hasOnlyNextReply) {
+ nextPhraseID.val(phrase.replies[0].nextPhraseID);
+ }
+
+ $( "#followNextReply", dialoguePhraseReplies ).button().unbind('click').click(function() {
+ openNextPhrase(nextPhraseID.val(), div, phrase.replies[0], tree);
+ });
+
+ $( '#message', dialoguePhrase ).change(function() { treeNode.setTitle( getPhraseNodeText(phrase) ); });
+
+ dialoguePhrase.show();
+ dialoguePhraseReplies.show();
+}
+
+function createReplyForPhrase(phrase) {
+ return {
+ id: phrase.id,
+ isPhrase: false,
+ phrase: phrase
+ };
+}
+
+function openNextPhrase(nextPhraseID, div, reply, tree) {
+ var createNewPhrase = true;
+ var phrase;
+ if (nextPhraseID) {
+ phrase = getPhraseByPhraseID(nextPhraseID);
+ if (phrase) {
+ createNewPhrase = false;
+ }
+ } else {
+ nextPhraseID = generatePhraseID(reply.phrase.id);
+ }
+
+ if (createNewPhrase) {
+ phrase = { id: nextPhraseID, isPhrase: true };
+ model.dialogue.add(phrase);
+ }
+ reply.nextPhraseID = nextPhraseID;
+
+ var treeNodeKey = getTreeNodeKey(reply.phrase);
+ var treeNode = tree.getNodeByKey(treeNodeKey);
+ updatePhraseReplyTreeNodesBelow(tree, treeNode, reply.phrase);
+ //alert("followNextReply: " + nextPhraseID);
+ onConversationPhraseSelected(div, phrase, tree);
+}
+
+var phraseIDPattern = new RegExp("^(.*)(\d+)$", 'g');
+function generatePhraseID(previousPhraseID) {
+ var suffix;
+ var n = 1;
+
+ var match = /^(.*)(\d+)$/(previousPhraseID);
+ if (match) {
+ suffix = match[1];
+ n = parseInt(match[2]) + 1;
+ } else {
+ suffix = previousPhraseID + "_";
+ }
+
+ for (var i = n; i < 1000; ++i) {
+ var phraseID = suffix + i;
+ if (!getPhraseByPhraseID(phraseID)) return phraseID;
+ }
+}
+
+// ========================================================
+// Set up editor for replies
+
+function buildEditorForReply(div, reply, tree, treeNode) {
+ var dialogueReply = $( "#dialogueReply", div );
+
+ checkboxHidesElement( $( '#requiresItems', dialogueReply ), $( '#requiresItemsDisplay', dialogueReply ), reply.requires_itemID);
+ checkboxHidesElement( $( '#requiresQuest', dialogueReply ), $( '#requiresQuestDisplay', dialogueReply ), reply.requires_Progress);
+ bindFieldToDataStore( $( "#requires_itemID", dialogueReply ), model.items , function(obj) { return obj.searchTag; } );
+ bindFieldToDataStore( $( "#requires_Progress", dialogueReply ), model.quests , function(obj) { return obj.id; } );
+
+ var replyLeadsTo = $( "#replyLeadsTo", dialogueReply );
+ replyLeadsTo.change(function() { nextPhraseID.val( $(this).val() ).change(); });
+ replyLeadsTo.val(reply.nextPhraseID);
+ changeHidesElement(replyLeadsTo, $( "#nextPhraseIDDisplay", dialogueReply ) , function() { return replyLeadsTo.val() == ''; } );
+
+ var nextPhraseID = $( "#nextPhraseID", dialogueReply );
+ nextPhraseID.change(function() {
+ updatePhraseTreeNodesBelow(tree, treeNode, getPhraseByPhraseID(reply.nextPhraseID) );
+ });
+
+ $( "#followReply", dialogueReply ).button().unbind('click').click(function() {
+ openNextPhrase(nextPhraseID.val(), div, reply, tree);
+ });
+
+ $( '#text', dialogueReply ).change(function() { treeNode.setTitle( getReplyNodeText(reply) ); });
+
+ dialogueReply.show();
+}
+
+
+// ========================================================
+// Tree node key generators
+
+ function getTreeNodeKey(obj) {
+ if (!obj) return "";
+ if (obj.isPhrase) return obj.id;
+ return getTreeNodeReplyKey(obj);
+ }
+
+ function getTreeNodeReplyKey(obj) {
+ var idx = 0;
+ for (var i = 0; i < obj.phrase.replies.length; ++i) {
+ if (obj.phrase.replies[i] == obj) {
+ idx = i;
+ break;
+ }
+ }
+ return getTreeNodeReplyKeyIndex(obj, idx);
+ }
+
+ function getTreeNodeReplyKeyIndex(obj, idx) {
+ return getTreeNodeKey(obj.phrase) + "__reply_" + idx;
+ }
+
+
+// ========================================================
+// Tree node title generators
+
+ function getPhraseNodeText(phrase) {
+ return phrase.message ? phrase.message : "(no phrase text)";
+ }
+
+ function getReplyNodeText(reply) {
+ return reply.text ? reply.text : "(no reply text)";
+ }
+
+// ========================================================
+// Tree-building functions
+
+ // (re)Build a NPC phrase node
+ function updatePhraseTreeNodesBelow(tree, parent, phrase, keepExisting) {
+ if (!keepExisting) { parent.removeChildren(); }
+
+ if (!phrase) return;
+
+ phrase.isPhrase = true;
+ var key = getTreeNodeKey(phrase);
+
+ if (tree.getNodeByKey(key)) {
+ parent.addChild({
+ title: '(conversation loop)'
+ ,model: phrase
+ });
+ return;
+ }
+
+ var phraseNode = parent.addChild({
+ title: getPhraseNodeText(phrase)
+ ,key: key
+ ,model: phrase
+ ,icon: 'phrase.png'
+ });
+
+ if (!phrase.replies) phrase.replies = [];
+ updatePhraseReplyTreeNodesBelow(tree, phraseNode, phrase, phrase.replies);
+
+ phraseNode.expand(true);
+ return phraseNode;
+ }
+
+ // (re)Build all nodes below a NPC phrase (i.e. rebuild all reply nodes)
+ function updatePhraseReplyTreeNodesBelow(tree, phraseNode, phrase) {
+ phraseNode.removeChildren();
+
+ if (!phrase.replies) phrase.replies = [];
+
+ if (phrase.replies.length == 1) {
+ var singleReply = phrase.replies[0];
+ if (singleReply.text == 'N') {
+ phrase.hasOnlyNextReply = true;
+ updatePhraseTreeNodesBelow(tree, phraseNode, getPhraseByPhraseID(singleReply.nextPhraseID) );
+ return;
+ }
+ }
+
+ phrase.replies.forEach(function(reply, idx) {
+ jQuery.extend(reply, createReplyForPhrase(phrase));
+ var key = getTreeNodeReplyKeyIndex(reply, idx);
+ var replyNode = phraseNode.addChild({
+ title: getReplyNodeText(reply)
+ ,key: key
+ ,model: reply
+ ,icon: 'reply.png'
+ });
+ if (reply.nextPhraseID) {
+ updatePhraseTreeNodesBelow(tree, replyNode, getPhraseByPhraseID(reply.nextPhraseID) );
+ }
+ replyNode.expand(true);
+ });
+ }
diff --git a/AndorsTrailEdit/Editor_Droplist.js b/AndorsTrailEdit/Editor_Droplist.js
new file mode 100644
index 000000000..e1edbb08f
--- /dev/null
+++ b/AndorsTrailEdit/Editor_Droplist.js
@@ -0,0 +1,18 @@
+
+function createDroplistEditor(obj) {
+ var div = $( "#templates #editDroplist" ).clone(true);
+ applyCommonEditorBindings(div, obj, model.droplists);
+ if (!obj.items) obj.items = [];
+
+ applyTableEditor({
+ table: $( "#items", div ),
+ dialog: droplistItemDialog,
+ array: obj.items,
+ templateFunction: function() { return { quantity: 1, chance: 100 } },
+ editorSetup: function(div) {
+ bindFieldToDataStore( $( "#itemID", div ), model.items , function(obj) { return obj.searchTag; } );
+ }
+ });
+
+ return div;
+}
diff --git a/AndorsTrailEdit/Editor_Item.js b/AndorsTrailEdit/Editor_Item.js
new file mode 100644
index 000000000..ff632fd39
--- /dev/null
+++ b/AndorsTrailEdit/Editor_Item.js
@@ -0,0 +1,60 @@
+
+function createItemEditor(obj) {
+ var div = $( "#templates #editItem" ).clone();
+ applyCommonEditorBindings(div, obj, model.items);
+ checkboxHidesElement(div.find('#hasEquipEffect'), div.find('#hasEquipEffectDisplay'), obj.hasEquipEffect);
+ checkboxHidesElement(div.find('#hasUseEffect'), div.find('#hasUseEffectDisplay'), obj.hasUseEffect);
+ checkboxHidesElement(div.find('#equip_hasCritical'), div.find('#equip_hasCriticalDisplay'), obj.equip_criticalChance || obj.equip_criticalMultiplier);
+ checkboxHidesElement(div.find('#hasHitEffect'), div.find('#hasHitEffectDisplay'), obj.hasHitEffect);
+ checkboxHidesElement(div.find('#hasKillEffect'), div.find('#hasKillEffectDisplay'), obj.hasKillEffect);
+ imageSelector.imageify(div.find('#itemimage'), div.find('#iconID'), 'items');
+
+ var createNewCondition = function() { return { chance: 100, magnitude: 1 }; }
+ if (!obj.equip_conditions) obj.equip_conditions = [];
+ if (!obj.use_conditionsSource) obj.use_conditionsSource = [];
+ if (!obj.hit_conditionsSource) obj.hit_conditionsSource = [];
+ if (!obj.hit_conditionsTarget) obj.hit_conditionsTarget = [];
+ if (!obj.kill_conditionsSource) obj.kill_conditionsSource = [];
+ var setupEditor = function(div) {
+ bindFieldToDataStore( $( "#condition", div ), model.actorConditions , function(obj) { return obj.id; } );
+ }
+
+ applyTableEditor({
+ table: $( "#equip_conditions", div ),
+ dialog: equipConditionsDialog,
+ array: obj.equip_conditions,
+ templateFunction: createNewCondition,
+ editorSetup: setupEditor
+ });
+ applyTableEditor({
+ table: $( "#use_conditionsSource", div ),
+ dialog: onHitConditionsDialog,
+ array: obj.use_conditionsSource,
+ templateFunction: createNewCondition,
+ editorSetup: setupEditor
+ });
+ applyTableEditor({
+ table: $( "#hit_conditionsSource", div ),
+ dialog: onHitConditionsDialog,
+ array: obj.hit_conditionsSource,
+ templateFunction: createNewCondition,
+ editorSetup: setupEditor
+ });
+ applyTableEditor({
+ table: $( "#hit_conditionsTarget", div ),
+ dialog: onHitConditionsDialog,
+ array: obj.hit_conditionsTarget,
+ templateFunction: createNewCondition,
+ editorSetup: setupEditor
+ });
+ applyTableEditor({
+ table: $( "#kill_conditionsSource", div ),
+ dialog: onHitConditionsDialog,
+ array: obj.kill_conditionsSource,
+ templateFunction: createNewCondition,
+ editorSetup: setupEditor
+ });
+
+ return div;
+}
+
diff --git a/AndorsTrailEdit/Editor_Monster.js b/AndorsTrailEdit/Editor_Monster.js
new file mode 100644
index 000000000..302c43813
--- /dev/null
+++ b/AndorsTrailEdit/Editor_Monster.js
@@ -0,0 +1,34 @@
+
+function createMonsterEditor(obj) {
+ var div = $( "#templates #editMonster" ).clone();
+ applyCommonEditorBindings(div, obj, model.monsters);
+ checkboxHidesElement(div.find('#hasConversation'), div.find('#hasConversationDisplay'), obj.phraseID);
+ checkboxHidesElement(div.find('#hasCombat'), div.find('#hasCombatDisplay'), obj.attackChance);
+ checkboxHidesElement(div.find('#hasCritical'), div.find('#hasCriticalDisplay'), obj.criticalChance || obj.criticalMultiplier);
+ checkboxHidesElement(div.find('#hasHitEffect'), div.find('#hasHitEffectDisplay'), obj.hasHitEffect);
+ imageSelector.imageify(div.find('#monsterimage'), div.find('#iconID'), 'monsters');
+ bindFieldToDataStore( $( "#droplistID", div ), model.droplists , function(obj) { return obj.id; } );
+
+ var createNewCondition = function() { return { chance: 100, magnitude: 1 }; }
+ if (!obj.onHit_conditionsSource) obj.onHit_conditionsSource = [];
+ if (!obj.onHit_conditionsTarget) obj.onHit_conditionsTarget = [];
+ var setupEditor = function(div) {
+ bindFieldToDataStore( $( "#condition", div ), model.actorConditions , function(obj) { return obj.id; } );
+ }
+ applyTableEditor({
+ table: $( "#onHit_conditionsSource", div ),
+ dialog: onHitConditionsDialog,
+ array: obj.onHit_conditionsSource,
+ templateFunction: createNewCondition,
+ editorSetup: setupEditor
+ });
+ applyTableEditor({
+ table: $( "#onHit_conditionsTarget", div ),
+ dialog: onHitConditionsDialog,
+ array: obj.onHit_conditionsTarget,
+ templateFunction: createNewCondition,
+ editorSetup: setupEditor
+ });
+ return div;
+}
+
diff --git a/AndorsTrailEdit/Editor_Quest.js b/AndorsTrailEdit/Editor_Quest.js
new file mode 100644
index 000000000..dc1af51cd
--- /dev/null
+++ b/AndorsTrailEdit/Editor_Quest.js
@@ -0,0 +1,21 @@
+
+function createQuestEditor(obj) {
+ var div = $( "#templates #editQuest" ).clone(true);
+ applyCommonEditorBindings(div, obj, model.quests);
+ if (!obj.stages) obj.stages = [];
+ var array = obj.stages;
+ var createNewStage = function() {
+ var nextProgress;
+ if (array.length > 0) { nextProgress = parseInt(array[array.length - 1].progress) + 10; }
+ if (!nextProgress) { nextProgress = 10; }
+ return { progress: nextProgress };
+ };
+ applyTableEditor({
+ table: $( "#stages", div ),
+ dialog: questlogDialog,
+ array: array,
+ templateFunction: createNewStage
+ });
+ return div;
+}
+
diff --git a/AndorsTrailEdit/ImportExport.js b/AndorsTrailEdit/ImportExport.js
new file mode 100644
index 000000000..51f121545
--- /dev/null
+++ b/AndorsTrailEdit/ImportExport.js
@@ -0,0 +1,55 @@
+
+function exportIfExists(dataStore, div) {
+ var exists = false;
+ if (dataStore && dataStore.items.length > 0) exists = true;
+ div.toggle(exists);
+ if (!exists) { return; }
+ var exportData = dataStore.serialize();
+ $( "#value" , div ).val(exportData);
+}
+
+function importDatastore(dataStore, content) {
+ dataStore.deserialize(content);
+}
+
+function prepareImport(dataStore, div) {
+ var importButton = $( "#import", div );
+ var textarea = $( "#value", div );
+ importButton.button({ disabled: true }).click(function() {
+ if (!textarea.val()) return;
+ importDatastore(dataStore, textarea.val());
+ div.hide('slow');
+ });
+ textarea.val("").change(function() {
+ var disabled = $(this).val() ? false : true;
+ importButton.button( "option", "disabled", disabled );
+ });
+}
+
+
+var importExportDialog;
+
+function showImportDialog() {
+ importExportDialog.dialog({ title: "Import data" });
+ $( "div", importExportDialog ).show();
+ prepareImport(model.actorConditions, $( "#actorconditions", importExportDialog ));
+ prepareImport(model.quests, $( "#quests", importExportDialog ));
+ prepareImport(model.items, $( "#items", importExportDialog ));
+ prepareImport(model.droplists, $( "#droplists", importExportDialog ));
+ prepareImport(model.dialogue, $( "#dialogue", importExportDialog ));
+ prepareImport(model.monsters, $( "#monsters", importExportDialog ));
+ importExportDialog.dialog( "open" );
+}
+
+function showExportDialog() {
+ importExportDialog.dialog({ title: "Export data" });
+ exportIfExists(model.actorConditions, $( "#actorconditions", importExportDialog ));
+ exportIfExists(model.quests, $( "#quests", importExportDialog ));
+ exportIfExists(model.items, $( "#items", importExportDialog ));
+ exportIfExists(model.droplists, $( "#droplists", importExportDialog ));
+ exportIfExists(model.dialogue, $( "#dialogue", importExportDialog ));
+ exportIfExists(model.monsters, $( "#monsters", importExportDialog ));
+ $( "#import", importExportDialog ).hide();
+ importExportDialog.dialog( "open" );
+}
+
diff --git a/AndorsTrailEdit/editdialog.html b/AndorsTrailEdit/editdialog.html
deleted file mode 100644
index 5f7e185bf..000000000
--- a/AndorsTrailEdit/editdialog.html
+++ /dev/null
@@ -1 +0,0 @@
-
Dialog Editor
\ No newline at end of file
diff --git a/AndorsTrailEdit/editdroplists.html b/AndorsTrailEdit/editdroplists.html
deleted file mode 100644
index d5ac0bc19..000000000
--- a/AndorsTrailEdit/editdroplists.html
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
- Droplist Editor
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AndorsTrailEdit/edititems.html b/AndorsTrailEdit/edititems.html
deleted file mode 100644
index 498ef975e..000000000
--- a/AndorsTrailEdit/edititems.html
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
- Item Editor
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AndorsTrailEdit/editmonsters.html b/AndorsTrailEdit/editmonsters.html
deleted file mode 100644
index dec831da4..000000000
--- a/AndorsTrailEdit/editmonsters.html
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
- Monster Editor
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AndorsTrailEdit/editor.html b/AndorsTrailEdit/editor.html
index bb61b6974..f10ea7636 100644
--- a/AndorsTrailEdit/editor.html
+++ b/AndorsTrailEdit/editor.html
@@ -6,7 +6,9 @@
+
+
Andor's Trail Content Editor
@@ -17,7 +19,7 @@
Andor's Trail Content Editor
- v0.6.9dev1
+ v0.6.9a0
|