Modders Resource (2 Viewers)

  • Thread starter Doomknight
  • Start date
  • Watchers 2
D

Doomknight

[DIALOGUE LINE]
package obj.dialogue
{
import com.adobe.serialization.json.*;
import obj.*;

public class DialogueLine extends Object
{
public var _settings:Object;
public var _style:String;
public var _mood:String;
public var _held:String;
public var _nextLine:String;
public var _phrase:String;
public static var SPEAKING_STYLE:String = "Speak";
public static var THOUGHT_STYLE:String = "Thought";
public static var HIM_STYLE:String = "Him";
public static var advancedController:AdvancedDialogueController;

public function DialogueLine(param1:String, param2:Object = null) : void
{
this._phrase = param1;
if (param2)
{
this._settings = param2;
if (param2["style"])
{
this._style = param2["style"];
}
if (param2["mood"])
{
this._mood = param2["mood"];
}
if (param2["held"])
{
this._held = param2["held"];
}
if (param2["next"])
{
this._nextLine = param2["next"];
}
}
else
{
this._settings = {};
}
return;
}// end function

public function get phrase() : String
{
return this._phrase;
}// end function

public function get settings() : Object
{
return this._settings;
}// end function

public function get style() : String
{
return this._style ? (this._style) : (SPEAKING_STYLE);
}// end function

public function get mood() : String
{
return this._mood ? (this._mood) : ("");
}// end function

public function get held() : String
{
return this._held ? (this._held) : ("");
}// end function

public function get nextLine() : String
{
return this._nextLine;
}// end function

public function get canPlay() : Boolean
{
if (advancedController && !advancedController.canPlay(this))
{
return false;
}
if (g.her.passedOut && this._style == THOUGHT_STYLE)
{
return false;
}
if ((!this._style || this._style == SPEAKING_STYLE) && !g.her.canSpeak())
{
return false;
}
if (this._mood && g.her.mood != this._mood)
{
return false;
}
if (this._held)
{
if (this._held == "true" && Him.armPositions[g.him.currentArmPosition] != "Holding")
{
return false;
}
if (this._held == "false" && Him.armPositions[g.him.currentArmPosition] != "Free")
{
return false;
}
}
return true;
}// end function

public function export() : String
{
var settingsObjectString:String;
var settingsObject:Object;
if (this._style && this._style != SPEAKING_STYLE)
{
settingsObject["style"] = this._style;
}
if (this._mood)
{
settingsObject["mood"] = this._mood;
}
if (this._nextLine)
{
settingsObject["next"] = this._nextLine;
}
if (this._held)
{
settingsObject["held"] = this._held;
}
if (this._settings["set"])
{
settingsObject["set"] = this._settings["set"];
}
if (this._settings["check"])
{
settingsObject["check"] = this._settings["check"];
}
try
{
settingsObjectString = JSON.encode(settingsObject);
}
catch (e:Error)
{
}
if (settingsObjectString == "{}")
{
settingsObjectString;
}
return "\"" + this._phrase + "\"" + settingsObjectString;
}// end function

}
}

[ADVANCED DIALOGUE CONTROLLER]
package obj.dialogue
{
import flash.utils.*;

public class AdvancedDialogueController extends Object
{
public var _dialogueDataStore:Dictionary;

public function AdvancedDialogueController() : void
{
this.reset();
return;
}// end function

public function reset() : void
{
this._dialogueDataStore = new Dictionary();
return;
}// end function

public function readAdvancedLineSettings(param1:DialogueLine) : void
{
if (param1.settings["set"])
{
this.setValues(param1.settings["set"]);
}
return;
}// end function

public function setValues(param1:Object) : void
{
var _loc_2:String = null;
var _loc_3:Object = null;
for (_loc_2 in param1)
{

_loc_3 = param1[_loc_2];
if (_loc_3 is String && !isNaN(Number(_loc_3)))
{
if (!this._dialogueDataStore.hasOwnProperty(_loc_2))
{
this._dialogueDataStore[_loc_2] = 0;
}
if ((_loc_3 as String).charAt(0) == "-")
{
this._dialogueDataStore[_loc_2] = this._dialogueDataStore[_loc_2] + Number(_loc_3);
this.outputLog(_loc_2 + ": " + "decrement by " + Number(_loc_3) + " = " + this._dialogueDataStore[_loc_2]);
}
else if ((_loc_3 as String).charAt(0) == "+")
{
this._dialogueDataStore[_loc_2] = this._dialogueDataStore[_loc_2] + Number(_loc_3);
this.outputLog(_loc_2 + ": " + "increment by " + Number(_loc_3) + " = " + this._dialogueDataStore[_loc_2]);
}
continue;
}
this.outputLog("Storing " + _loc_2 + " = " + _loc_3);
this._dialogueDataStore[_loc_2] = _loc_3;
}
return;
}// end function

public function canPlay(param1:DialogueLine) : Boolean
{
var _loc_2:Object = null;
var _loc_3:String = null;
var _loc_4:Object = null;
var _loc_5:Boolean = false;
var _loc_6:Number = NaN;
var _loc_7:Object = null;
var _loc_8:Boolean = false;
if (param1.settings["check"])
{
this.outputLog("Running checks for line: \"" + param1.phrase + "\"");
_loc_2 = param1.settings["check"];
for (_loc_3 in _loc_2)
{

_loc_4 = _loc_2[_loc_3];
_loc_5 = _loc_4 is Number;
_loc_6 = Number(_loc_4.toString().replace(/[>|<|=]""[>|<|=]/g, ""));
if (!_loc_5 && _loc_4 is String)
{
_loc_5 = !isNaN(_loc_6);
}
_loc_7 = this._dialogueDataStore.hasOwnProperty(_loc_3) ? (this._dialogueDataStore[_loc_3]) : (_loc_5 ? (0) : (false));
if (_loc_7 is Number && _loc_4 is String && _loc_5)
{
_loc_8 = true;
if (_loc_4.charAt(0) == ">")
{
if (_loc_4.charAt(1) == "=")
{
_loc_8 = _loc_7 >= _loc_6;
}
else
{
_loc_8 = _loc_7 > _loc_6;
}
}
else if (_loc_4.charAt(0) == "<")
{
if (_loc_4.charAt(1) == "=")
{
_loc_8 = _loc_7 <= _loc_6;
}
else
{
_loc_8 = _loc_7 < _loc_6;
}
}
else
{
_loc_8 = _loc_7 == _loc_6;
}
if (!_loc_8)
{
this.outputLog(" Line will not play: \"" + _loc_3 + "\" needs to be " + _loc_4 + " but is currently set to " + this._dialogueDataStore[_loc_3]);
return false;
}
}
if (_loc_7 is Boolean && (_loc_4 == "true" || _loc_4 == "false"))
{
_loc_4 = _loc_4 == "true";
}
if (!(_loc_5 && _loc_4 is String) && _loc_7 != _loc_4)
{
this.outputLog(" Line will not play: \"" + _loc_3 + "\" needs to be " + _loc_4 + " but is currently set to " + this._dialogueDataStore[_loc_3]);
return false;
}
}
this.outputLog(" Okay.");
}
return true;
}// end function

public function replaceValues(param1:String) : String
{
return param1.replace(/\*(.*?)\*""\*(.*?)\*/gi, this.customValueReplacer);
}// end function

public function customValueReplacer() : String
{
if (arguments.length == 4 && this._dialogueDataStore.hasOwnProperty(arguments[1]))
{
return this._dialogueDataStore[arguments[1]];
}
return "";
}// end function

public function outputLog(param1:String) : void
{
g.dialogueEditor.appendLog(param1);
return;
}// end function

}
}

[DIALOGUE STATE]
package obj.dialogue
{
import flash.utils.*;

public class DialogueState extends Object
{
public var _buildLevel:Number = 0;
public var _maxBuild:Number = 0;
public var _priority:uint = 0;
public var _prevPhrases:Dictionary;
public var _prevPhrasesLength:uint = 0;
public var _lastUsed:uint = 0;
public var _defaultReduceSpeed:Number = 1;
public var _noBuildDelay:uint = 0;

public function DialogueState(param1:Number, param2:uint, param3:Number = 1) : void
{
this._prevPhrases = new Dictionary();
this._maxBuild = param1;
this._priority = param2;
this._defaultReduceSpeed = param3;
return;
}// end function

public function buildState(param1:Number) : void
{
if (this._noBuildDelay == 0)
{
this._buildLevel = Math.min(this._maxBuild, this._buildLevel + param1);
}
return;
}// end function

public function reduce(param1:Number = -1) : void
{
if (param1 == -1)
{
param1 = this._defaultReduceSpeed;
}
if (this._noBuildDelay > 0)
{
var _loc_2:String = this;
var _loc_3:* = this._noBuildDelay - 1;
_loc_2._noBuildDelay = _loc_3;
}
this._buildLevel = Math.max(0, this._buildLevel - param1);
return;
}// end function

public function clearBuild() : void
{
this._buildLevel = 0;
return;
}// end function

public function delayBuild(param1:uint = 120) : void
{
this._noBuildDelay = param1;
return;
}// end function

public function maxBuild() : void
{
this._buildLevel = this._maxBuild;
return;
}// end function

public function randomPhrase(param1:Array) : uint
{
var _loc_5:uint = 0;
var _loc_6:uint = 0;
var _loc_2:* = param1.length;
if (this._prevPhrasesLength >= _loc_2)
{
this._prevPhrases = new Dictionary();
this._prevPhrases[this._lastUsed] = true;
this._prevPhrasesLength = 1;
}
var _loc_3:* = new Array();
var _loc_4:uint = 0;
while (_loc_4 < _loc_2)
{

if (!this._prevPhrases[_loc_4])
{
_loc_3.push(_loc_4);
}
_loc_4 = _loc_4 + 1;
}
if (_loc_3.length == 0)
{
this.clearPrevPhrases();
return 0;
}
_loc_5 = Math.floor(Math.random() * _loc_3.length);
_loc_6 = _loc_3[_loc_5];
this._prevPhrases[_loc_6] = true;
var _loc_7:String = this;
var _loc_8:* = this._prevPhrasesLength + 1;
_loc_7._prevPhrasesLength = _loc_8;
this._lastUsed = _loc_6;
return _loc_6;
}// end function

public function clearPrevPhrases() : void
{
this._prevPhrases = new Dictionary();
this._prevPhrasesLength = 0;
return;
}// end function

public function get build() : Number
{
return this._buildLevel;
}// end function

public function get max() : Number
{
return this._maxBuild;
}// end function

public function get priority() : uint
{
return this._priority;
}// end function

}
}
 
D

Doomknight

[WORD]
-> More dialogue stuff.
package obj.dialogue
{
import obj.*;

public class Word extends Object
{
public var word:String;
public var wordLength:uint;
public var phonemes:Array;
public var actionWord:Boolean = false;

public function Word(param1:String) : void
{
var _loc_2:uint = 0;
var _loc_3:String = null;
var _loc_4:Array = null;
var _loc_5:Boolean = false;
var _loc_6:uint = 0;
this.word = param1;
this.phonemes = new Array();
this.wordLength = this.word.length;
if (param1.match(/\[.*?\]""\[.*?\]/))
{
this.actionWord = true;
}
else
{
_loc_2 = 0;
_loc_3 = "";
_loc_4 = this.word.match(/\W*\w""\W*\w/i);
if (_loc_4 && _loc_4.length > 0)
{
_loc_5 = _loc_4[0].match(/[^aeiouy]""[^aeiouy]/);
_loc_6 = 0;
while (_loc_6 < this.wordLength)
{

if (_loc_5)
{
if (this.word.charAt(_loc_6).match(/[^bcdfghjklmnpqrstvwxz]""[^bcdfghjklmnpqrstvwxz]/i))
{
_loc_5 = false;
this.phonemes[_loc_6] = this.findPhonemes(_loc_3);
_loc_3 = "";
}
}
else if (this.word.charAt(_loc_6).match(/[bcdfghjklmnpqrstvwxz]""[bcdfghjklmnpqrstvwxz]/i))
{
_loc_5 = true;
this.phonemes[_loc_6] = this.findPhonemes(_loc_3);
_loc_3 = "";
}
_loc_3 = _loc_3 + this.word.charAt(_loc_6);
_loc_6 = _loc_6 + 1;
}
this.phonemes[_loc_6] = this.findPhonemes(_loc_3);
}
}
return;
}// end function

public function get action() : String
{
return this.word.replace(/\W""\W/gi, "");
}// end function

public function letter(param1:uint) : String
{
return this.word.charAt(param1);
}// end function

public function phoneme(param1:uint) : Object
{
return this.phonemes[param1] ? (this.phonemes[param1]) : (null);
}// end function

public function phonemeLength(param1:uint) : uint
{
var _loc_2:uint = 0;
var _loc_3:* = this.phoneme(param1);
param1 = param1 + 1;
while (param1 < this.wordLength && (!this.phoneme(param1) || this.phoneme(param1) == _loc_3))
{

_loc_2 = _loc_2 + 1;
param1 = param1 + 1;
}
return _loc_2;
}// end function

public function get length() : uint
{
return this.wordLength;
}// end function

public function findPhonemes(param1:String) : Object
{
var _loc_2:Object = null;
var _loc_3:Boolean = false;
if (param1 == "I")
{
_loc_2 = Her.MouthShapeUH;
}
else if (param1)
{
if (param1.match(/f|ph""f|ph/i))
{
_loc_2 = Her.MouthShapeFF;
}
else if (param1.match(/m|p|b""m|p|b/i))
{
_loc_2 = Her.MouthShapeMM;
}
else if (param1.match(/a|^a$""a|^a$/))
{
_loc_2 = Her.MouthShapeAH;
}
else if (param1.match(/^i$|ee|ea|oe|ou|^y$""^i$|ee|ea|oe|ou|^y$/i))
{
_loc_2 = Her.MouthShapeEE;
}
else if (param1.match(/^e$|^u$|ou""^e$|^u$|ou/i))
{
_loc_2 = Her.MouthShapeUH;
}
else if (param1.match(/^o$|oa""^o$|oa/i))
{
_loc_2 = Her.MouthShapeOH;
}
else if (param1.match(/oo|w""oo|w/i))
{
_loc_2 = Her.MouthShapeOO;
}
else
{
_loc_2 = Her.MouthShapeUH;
}
if (param1.match(/l""l/i))
{
_loc_3 = true;
}
}
if (_loc_2)
{
return {phoneme:_loc_2, sayL:_loc_3};
}
return null;
}// end function

}
}
 
D

Doomknight

[DIALOGUE LIBRARY, Part 1]
-> Seperated into parts for easier reading.
package obj.dialogue
{
import __AS3__.vec.*;
import com.adobe.serialization.json.*;
import flash.utils.*;
import obj.*;

public class DialogueLibrary extends Object
{
public var dialogueLibraryName:String = "Default";
public var normalLibrary:Dictionary;
public var happyLibrary:Dictionary;
public var angryLibrary:Dictionary;
public var ahegaoLibrary:Dictionary;
public var finishes:Dictionary;
public var customLibrary:Dictionary;
public var customFinishes:Dictionary;
public var OTHER_FINISH:String = "Other";
public var initialSettingsObject:Object;
public var customAudio:Dictionary;
public var customClears:Dictionary;
public var allCleared:Boolean = false;
public var finishesCleared:Boolean = false;
public var dialogueTypes:Array;
public var dialogueTypesPattern:RegExp;
public static var DEFAULT_NAME:String = "Default";
public static var allDialogueTypes:Array;

public function DialogueLibrary() : void
{
var _loc_1:String = null;
this.prepareLibraries();
this.prepareTypeArray();
for each (_loc_1 in this.dialogueTypes)
{

this.checkMissingDialogue(this.normalLibrary, _loc_1);
this.checkMissingDialogue(this.happyLibrary, _loc_1);
this.checkMissingDialogue(this.angryLibrary, _loc_1);
this.checkMissingDialogue(this.ahegaoLibrary, _loc_1);
}
this.customLibrary = new Dictionary();
this.customClears = new Dictionary();
this.customAudio = new Dictionary();
return;
}// end function

[DIALOGUE LIBRARY, Part 2]
public function checkMissingDialogue(param1:Dictionary, param2:String) : void
{
if (!param1[param2])
{
param1[param2] = [];
}
return;
}// end function

public function get libraryName() : String
{
return this.dialogueLibraryName;
}// end function

public function setLibraryName(param1:String) : void
{
this.dialogueLibraryName = param1;
g.inGameMenu.setDialogueLibraryName(this.dialogueLibraryName);
return;
}// end function

public function getMoodLibrary() : Dictionary
{
switch(g.her.mood)
{
case Her.ANGRY_MOOD:
{
return this.angryLibrary;
}
case Her.HAPPY_MOOD:
{
return this.happyLibrary;
}
case Her.AHEGAO_MOOD:
{
return this.ahegaoLibrary;
}
case Her.NORMAL_MOOD:
{
}
default:
{
return this.normalLibrary;
break;
}
}
}// end function

public function getCurrentDialogue() : Dictionary
{
var _loc_2:String = null;
var _loc_1:* = new Dictionary();
for each (_loc_2 in this.dialogueTypes)
{

if (this.customLibrary[_loc_2])
{
_loc_1[_loc_2] = this.customLibrary[_loc_2];
continue;
}
if (!this.allCleared)
{
_loc_1[_loc_2] = this.getMoodLibrary()[_loc_2];
}
}
for (_loc_2 in this.customLibrary)
{

if (!this.getMoodLibrary()[_loc_2])
{
_loc_1[_loc_2] = this.customLibrary[_loc_2];
}
}
return _loc_1;
}// end function

public function getCurrentFinishes() : Dictionary
{
var _loc_2:String = null;
var _loc_1:* = new Dictionary();
if (this.finishesCleared)
{
for (_loc_2 in this.customFinishes)
{

_loc_1[_loc_2] = this.customFinishes[_loc_2];
}
}
else
{
for (_loc_2 in this.finishes)
{

_loc_1[_loc_2] = this.finishes[_loc_2];
}
}
return _loc_1;
}// end function

public function getPhrases(param1:String) : Array
{
if (this.customClears[param1] || this.allCleared || !this.getMoodLibrary()[param1])
{
return this.customLibrary[param1] || [];
}
return (this.getMoodLibrary()[param1] || []).concat(this.customLibrary[param1] || []);
}// end function

[DIALOGUE LIBRARY, Part 3]
public function getFinishes(param1:uint) : Array
{
if (this.finishesCleared)
{
if (this.customFinishes[param1])
{
return this.customFinishes[param1];
}
return this.customFinishes[this.OTHER_FINISH] ? (this.customFinishes[this.OTHER_FINISH]) : ([]);
}
else
{
if (this.customFinishes[param1])
{
return this.customFinishes[param1];
}
if (this.finishes[param1] || this.customFinishes[param1])
{
return (this.finishes[param1] || []).concat(this.customFinishes[param1] || []);
}
}
return (this.finishes[this.OTHER_FINISH] || []).concat(this.customFinishes[this.OTHER_FINISH] || []);
}// end function

public function playAudio(param1:String) : AudioMod
{
var _loc_2:* = this.customAudio[param1];
if (_loc_2)
{
g.soundControl.playDialogue(_loc_2);
return _loc_2;
}
return null;
}// end function

public function playInterruptAudio(param1:String) : AudioMod
{
var _loc_2:* = this.customAudio[param1];
if (_loc_2)
{
g.soundControl.playDialogueInterrupt(_loc_2);
return _loc_2;
}
return null;
}// end function

public function resetCustomDialogue() : void
{
this.customLibrary = new Dictionary();
this.customClears = new Dictionary();
this.customFinishes = new Dictionary();
this.customAudio = new Dictionary();
this.allCleared = false;
this.finishesCleared = false;
this.setLibraryName(DEFAULT_NAME);
g.soundControl.resetAudioMods();
return;
}// end function

public function setDialogueLibraryName(param1:String) : void
{
this.dialogueLibraryName = param1;
return;
}// end function

public function setupDialogueMod(param1:String, param2:Boolean) : void
{
this.setLibraryName(param1);
if (param2)
{
this.resetCustomDialogue();
this.allCleared = true;
}
return;
}// end function

public function loadDialogueMod(param1) : void
{
var _loc_2:String = null;
var _loc_3:String = null;
var _loc_4:AudioMod = null;
if (param1.hasOwnProperty("lineType") && param1.hasOwnProperty("dialogueLine"))
{
_loc_2 = param1.lineType;
_loc_3 = param1.dialogueLine;
if (!this.customLibrary[_loc_2])
{
this.customLibrary[_loc_2] = new Array();
}
this.customLibrary[_loc_2].push(new DialogueLine(_loc_3));
if (param1.hasOwnProperty("audio") && param1.hasOwnProperty("volume"))
{
_loc_4 = new AudioMod(param1.audio, param1.volume);
this.customAudio[_loc_3] = _loc_4;
if (_loc_2 == "cough")
{
g.soundControl.loadAudioMod("cough", _loc_4);
}
}
}
return;
}// end function
 
D

Doomknight

[DIALOGUE LIBRARY, Part 4]
public function loadFromDialogueEditor(param1:Vector.<DialogueEditorLine>) : void
{
var _loc_3:DialogueEditorLine = null;
var _loc_4:String = null;
var _loc_2:* = new Dictionary();
this.allCleared = true;
for each (_loc_3 in param1)
{

if (_loc_3.finish)
{
_loc_4 = _loc_3.trigger.replace("finish", "");
if (!_loc_2[_loc_4])
{
_loc_2[_loc_4] = new Array();
}
_loc_2[_loc_4].push(_loc_3.getDialogueLine());
continue;
}
if (!this.customLibrary[_loc_3.trigger])
{
this.customLibrary[_loc_3.trigger] = new Array();
}
this.customLibrary[_loc_3.trigger].push(_loc_3.getDialogueLine());
}
this.finishesCleared = true;
this.customFinishes = _loc_2;
return;
}// end function

public function loadCustomDialogue(param1:String) : void
{
var dialogueNameRegex:RegExp;
var nameFound:Array;
var initialSettingsRegex:RegExp;
var initialSettingsMatch:Array;
var allClearFound:Array;
var finishesClearFound:Array;
var customDialogue:* = param1;
if (customDialogue)
{
this.resetCustomDialogue();
this.outputLog("Loading custom dialogue.\n------------------------------");
customDialogue.replace(/vigourous:""vigourous:/g, "vigorous:");
dialogueNameRegex = new RegExp(Dialogue.DIALOGUE_NAME_KEY + ":\\s?\"(.+?)\"");
nameFound = customDialogue.match(dialogueNameRegex);
if (nameFound && nameFound.length > 0)
{
this.setLibraryName(nameFound[0].replace(dialogueNameRegex, "$1"));
}
else
{
this.setLibraryName("No name");
}
initialSettingsRegex = new RegExp("initial_settings" + ":(.*)");
initialSettingsMatch = customDialogue.match(initialSettingsRegex);
if (initialSettingsMatch && initialSettingsMatch.length == 2)
{
customDialogue = customDialogue.replace(initialSettingsRegex, "");
this.outputLog("Reading initial settings.");
try
{
this.initialSettingsObject = JSON.decode(initialSettingsMatch[1], false);
this.outputLog(" Okay.");
g.dialogueControl.advancedController.setValues(this.initialSettingsObject);
}
catch (e:Error)
{
initialSettingsObject = {};
outputLog("ERROR - Could not decode initial settings:\n " + initialSettingsMatch[1] + "\n " + e.message);
}
}
allClearFound = customDialogue.match(/all:\s?""CLEAR""""all:\s?"CLEAR"/);
if (allClearFound && allClearFound.length > 0)
{
this.allCleared = true;
}
finishesClearFound = customDialogue.match(/finish:\s?""CLEAR""""finish:\s?"CLEAR"/);
if (finishesClearFound && finishesClearFound.length > 0)
{
this.finishesCleared = true;
}
customDialogue = customDialogue.replace(/finish(.+):""(.*)""""finish(.+):"(.*)"/g, this.customFinishPopulator);
customDialogue.replace(/(.*?):""(.*?)""(.*)""(.*?):"(.*?)"(.*)/g, this.customLibraryPopulator);
this.outputLog("Done.\n------------------------------");
}
return;
}// end function

public function customLibraryPopulator() : String
{
arguments = new activation;
var trigger:String;
var phrase:String;
var settingsObject:Object;
var arguments:* = arguments;
if (length - 3 >= 2)
{
trigger = [1];
phrase = [2];
if ( == "CLEAR")
{
this.customClears[] = true;
}
else if ( != "all" && != Dialogue.DIALOGUE_NAME_KEY)
{
if (allDialogueTypes.indexOf() != -1 && !this.customClears[])
{
this.customClears[] = true;
}
if (!this.customLibrary[])
{
this.customLibrary[] = new Array();
}
this.outputLog("Adding custom line: \"" + + "\"");
if (length - 3 == 3)
{
try
{
settingsObject = JSON.decode([3], false);
}
catch (e:Error)
{
if (e[3].replace(/\s""\s/gi, "") != "")
{
outputLog("ERROR - Could not decode custom settings:\n " + e[3] + "\n " + e.message);
}
}
}
this.customLibrary[].push(new DialogueLine(, ));
}
}
return "";
}// end function

[DIALOGUE LIBRARY, Part 5]
public function customFinishPopulator() : String
{
arguments = NaN;
if (arguments.length - 3 == 2)
{
arguments = Number(arguments[1]);
if (!isNaN(arguments))
{
if (!this.customFinishes[arguments])
{
this.customFinishes[arguments] = new Array();
}
this.finishesCleared = true;
this.customFinishes[arguments].push(new DialogueLine(arguments[2]));
}
else if (arguments[1] == this.OTHER_FINISH)
{
if (!this.customFinishes[this.OTHER_FINISH])
{
this.customFinishes[this.OTHER_FINISH] = new Array();
}
this.finishesCleared = true;
this.customFinishes[this.OTHER_FINISH].push(new DialogueLine(arguments[2]));
}
}
return "";
}// end function

public function exportLibrary() : String
{
var stateName:String;
var stateArray:Array;
var dialogueLine:DialogueLine;
var settingsObjectString:String;
var currentFinishes:Dictionary;
var dialogueOutput:String;
var newline:String;
dialogueOutput = dialogueOutput + (Dialogue.DIALOGUE_NAME_KEY + ":\"" + this.dialogueLibraryName + "\"" + newline + newline);
if (this.initialSettingsObject)
{
try
{
settingsObjectString = JSON.encode(this.initialSettingsObject);
}
catch (e:Error)
{
}
if (settingsObjectString && settingsObjectString != "{}")
{
dialogueOutput = dialogueOutput + ("initial_settings:" + settingsObjectString + newline + newline);
}
}
if (this.allCleared)
{
dialogueOutput = dialogueOutput + "all:\"CLEAR\"";
}
var currentDialogue:* = this.getCurrentDialogue();
var _loc_2:int = 0;
var _loc_3:* = currentDialogue;
while (_loc_3 in _loc_2)
{

stateName = _loc_3[_loc_2];
stateArray = currentDialogue[stateName];
var _loc_4:int = 0;
var _loc_5:* = stateArray;
while (_loc_5 in _loc_4)
{

dialogueLine = _loc_5[_loc_4];
dialogueOutput = dialogueOutput + (newline + stateName + ":" + dialogueLine.export());
}
}
if (this.finishesCleared)
{
dialogueOutput = dialogueOutput + (newline + newline + "finish:\"CLEAR\"");
currentFinishes = this.getCurrentFinishes();
var _loc_2:int = 0;
var _loc_3:* = currentFinishes;
while (_loc_3 in _loc_2)
{

stateName = _loc_3[_loc_2];
stateArray = currentFinishes[stateName];
var _loc_4:int = 0;
var _loc_5:* = stateArray;
while (_loc_5 in _loc_4)
{

dialogueLine = _loc_5[_loc_4];
dialogueOutput = dialogueOutput + (newline + "finish" + stateName + ":" + "\"" + dialogueLine.phrase + "\"");
}
}
}
return dialogueOutput;
}// end function

public function appendLibrary(param1:String, param2:Array, param3:String) : String
{
var _loc_4:DialogueLine = null;
for each (_loc_4 in param2)
{

param1 = param1 + (param3 + ":\"" + _loc_4.phrase + "\"\n");
}
return param1;
}// end function

public function customEscape(param1:String) : String
{
param1 = param1.replace(/\\\"""\\/g, "%22");
param1 = param1.replace(/\*""\*/g, "%2A");
param1 = param1.replace(/:"":/g, "%3A");
return param1;
}// end function

public function outputLog(param1:String) : void
{
g.dialogueEditor.appendLog(param1);
return;
}// end function

[DIALOGUE LIBRARY, Part 6]
public function prepareLibraries() : void
{
var _loc_1:* = new Array();
var _loc_2:* = new Array();
var _loc_3:* = new Array();
_loc_3.push(new DialogueLine("I can\'t take it any deeper!"));
_loc_3.push(new DialogueLine("I can\'t go any deeper."));
_loc_3.push(new DialogueLine("I don\'t think I can take any more."));
_loc_3.push(new DialogueLine("Stop pushing me down* YOU*!"));
_loc_3.push(new DialogueLine("Stop pushing me so far down!"));
_loc_3.push(new DialogueLine("That\'s deep enough* YOU*!"));
var _loc_4:* = new Array();
new Array().push(new DialogueLine("I can take it deeper, keep going."));
_loc_4.push(new DialogueLine("That\'s it* YOU*, push it in!"));
_loc_4.push(new DialogueLine("Do you want to go deeper* YOU*?"));
_loc_4.push(new DialogueLine("I got a bit further that time* YOU*."));
_loc_4.push(new DialogueLine("Don\'t worry* YOU*, I can take it."));
var _loc_5:* = new Array();
new Array().push(new DialogueLine("What do you think you\'re doing?!"));
_loc_5.push(new DialogueLine("Quit trying to force it in!"));
_loc_5.push(new DialogueLine("Stop pushing me down* YOU*!"));
_loc_5.push(new DialogueLine("Stop pushing me so far down!"));
_loc_5.push(new DialogueLine("That\'s deep enough* YOU*!"));
var _loc_6:* = new Array();
new Array().push(new DialogueLine("I can\'t take any more than that!"));
_loc_6.push(new DialogueLine("I can\'t take it all!"));
_loc_6.push(new DialogueLine("That\'s as deep as I can take it!"));
_loc_6.push(new DialogueLine("Please* YOU*, stop!"));
_loc_6.push(new DialogueLine("That\'s too deep!"));
_loc_6.push(new DialogueLine("Too deep!"));
_loc_6.push(new DialogueLine("You\'re making me gag* YOU*!"));
_loc_6.push(new DialogueLine("You\'re making me choke* YOU*!"));
_loc_6.push(new DialogueLine("I\'ll choke!"));
_loc_6.push(new DialogueLine("You\'re choking me!"));
_loc_6.push(new DialogueLine("You can\'t push it any deeper!"));
_loc_6.push(new DialogueLine("That\'s my throat!"));
_loc_6.push(new DialogueLine("Stop!"));
var _loc_7:* = new Array();
new Array().push(new DialogueLine("Nearly... I think I can take it all now."));
_loc_7.push(new DialogueLine("Come on, push it all the way in."));
_loc_7.push(new DialogueLine("You\'re nearly in my throat."));
var _loc_8:* = new Array();
new Array().push(new DialogueLine("Are you trying to force it all down my throat?!"));
_loc_8.push(new DialogueLine("Hey! You\'re hitting my throat!"));
_loc_8.push(new DialogueLine("That\'s my throat, stop trying to push it deeper!"));
_loc_8.push(new DialogueLine("That\'s my throat!"));
_loc_8.push(new DialogueLine("You can\'t force it any deeper!"));
var _loc_9:* = new Array();
new Array().push(new DialogueLine("I can\'t believe you made me take it all*, YOU*."));
_loc_9.push(new DialogueLine("You forced it into my throat!"));
_loc_9.push(new DialogueLine("My throat!"));
_loc_9.push(new DialogueLine("That\'s my throat*, YOU*!"));
_loc_9.push(new DialogueLine("You pushed it all the way in..."));
var _loc_10:* = new Array();
new Array().push(new DialogueLine("I swallowed it all! It made my throat feel so full."));
_loc_10.push(new DialogueLine("I can\'t believe I took it all!"));
_loc_10.push(new DialogueLine("I can\'t believe I swallowed it all!"));
_loc_10.push(new DialogueLine("Ahh... push it all the way in again."));
_loc_10.push(new DialogueLine("That was amazing, push it into my throat again!"));
var _loc_11:* = new Array();
new Array().push(new DialogueLine("I can\'t believe you!"));
_loc_11.push(new DialogueLine("That\'s enough! Don\'t push it into my throat again."));
_loc_11.push(new DialogueLine("That\'s enough! Don\'t do that again."));
var _loc_12:* = new Array();
new Array().push(new DialogueLine("That\'s too deep!"));
_loc_12.push(new DialogueLine("Stop pushing me down!"));
_loc_12.push(new DialogueLine("Stop forcing me down!"));
_loc_12.push(new DialogueLine("Stop making me take it so deep!"));
_loc_12.push(new DialogueLine("Stop making me take it all!"));
_loc_12.push(new DialogueLine("Stop pushing it in so deep!"));
_loc_12.push(new DialogueLine("I can\'t breathe!"));
_loc_12.push(new DialogueLine("Don\'t push me down!"));
_loc_12.push(new DialogueLine("Let me off!"));
_loc_12.push(new DialogueLine("Let me breathe!"));
var _loc_13:* = new Array();
new Array().push(new DialogueLine("Ahh! My throat feels so full."));
_loc_13.push(new DialogueLine("Do you like my throat?"));
_loc_13.push(new DialogueLine("Do you like it?"));
_loc_13.push(new DialogueLine("Push it in again, I can take it."));
var _loc_14:* = new Array();
new Array().push(new DialogueLine("Let me off!"));
_loc_14.push(new DialogueLine("Let me breathe!"));
_loc_14.push(new DialogueLine("Stop pushing me down!"));
_loc_14.push(new DialogueLine("Stop forcing me down!"));
var _loc_15:* = new Array();
new Array().push(new DialogueLine("Wait... let me catch my breath."));
_loc_15.push(new DialogueLine("Can\'t... breathe!"));
_loc_15.push(new DialogueLine("Let me breathe* YOU*!"));
_loc_15.push(new DialogueLine("I can\'t breathe!"));
_loc_15.push(new DialogueLine("I\'m going to pass out!"));
_loc_15.push(new DialogueLine("I\'m going to faint!"));
_loc_15.push(new DialogueLine("I can\'t take it for so long!"));
_loc_15.push(new DialogueLine("Don\'t hold me down for so long*, YOU*!"));
var _loc_16:* = new Array();
new Array().push(new DialogueLine("You\'re making my head spin!"));
_loc_16.push(new DialogueLine("You\'re making me so dizzy!"));
_loc_16.push(new DialogueLine("I can take it, just let me catch my breath."));
_loc_16.push(new DialogueLine("Don\'t worry* YOU*, I can take it."));
_loc_16.push(new DialogueLine("My throat feels so full."));
var _loc_17:* = new Array();
new Array().push(new DialogueLine("Let me off!"));
_loc_17.push(new DialogueLine("Let me breathe!"));
_loc_17.push(new DialogueLine("What are you trying to do?!"));
_loc_17.push(new DialogueLine("Get off me!"));
_loc_17.push(new DialogueLine("Stop holding me down!"));
var _loc_18:* = new Array();
new Array().push(new DialogueLine("Wh- where..."));
_loc_18.push(new DialogueLine("What happened?"));
_loc_18.push(new DialogueLine("Wha-?"));
_loc_18.push(new DialogueLine("*YOU, *... you made me faint!"));
_loc_18.push(new DialogueLine("*YOU, *... you made me pass out!"));
var _loc_19:* = new Array();
new Array().push(new DialogueLine("I told you to let me breathe!"));
_loc_19.push(new DialogueLine("What were you thinking?! I need to breathe!"));
_loc_19.push(new DialogueLine("I can\'t believe you, you made me pass out!"));
var _loc_20:* = new Array();
new Array().push(new DialogueLine("Slow down* YOU*!"));
_loc_20.push(new DialogueLine("Wait! Slow down!"));
_loc_20.push(new DialogueLine("You\'re too rough!"));
_loc_20.push(new DialogueLine("You\'re being too rough!"));
_loc_20.push(new DialogueLine("Stop being so rough!"));
_loc_20.push(new DialogueLine("It\'s too rough!"));
_loc_20.push(new DialogueLine("You\'re tearing my throat!"));
_loc_20.push(new DialogueLine("My throat!"));
_loc_20.push(new DialogueLine("You\'re going to tear my throat!"));
_loc_20.push(new DialogueLine("Wait! You\'re being too rough!"));
_loc_20.push(new DialogueLine("I can\'t take any more* YOU*!"));
var _loc_21:* = new Array();
new Array().push(new DialogueLine("Keep going* YOU*!"));
_loc_21.push(new DialogueLine("Yes! Fuck my throat* YOU*!"));
_loc_21.push(new DialogueLine("Use my mouth like a pussy* YOU*!"));
_loc_21.push(new DialogueLine("I can take it, don\'t stop!"));
_loc_21.push(new DialogueLine("You\'re making my head spin."));
var _loc_22:* = new Array();
new Array().push(new DialogueLine("What do you think you\'re doing?!"));
_loc_22.push(new DialogueLine("Stop!"));
var _loc_23:* = new Array();
new Array().push(new DialogueLine("Are you almost there?"));
_loc_23.push(new DialogueLine("Are you nearly there?"));
var _loc_24:* = new Array();
new Array().push(new DialogueLine("Come on* YOU*, give me your cum!"));
_loc_24.push(new DialogueLine("Cum for me* YOU*!"));
_loc_24.push(new DialogueLine("Cum on my face* YOU*!"));
_loc_24.push(new DialogueLine("Give it to me* YOU*!"));
var _loc_25:* = new Array();
new Array().push(new DialogueLine("Are you done yet?"));
_loc_25.push(new DialogueLine("Hurry up and finish!"));
var _loc_26:* = new Array();
new Array().push(new DialogueLine("Ugh... you didn\'t have to shoot all over my face."));
_loc_26.push(new DialogueLine("You came all over my face."));
_loc_26.push(new DialogueLine("You came all over me."));
_loc_26.push(new DialogueLine("Ugh... it\'s everywhere."));
_loc_26.push(new DialogueLine("*YOUR cum... *It\'s all over my face."));
_loc_26.push(new DialogueLine("*YOUR cum... *It\'s everywhere."));
_loc_26.push(new DialogueLine("It\'s so hot."));
var _loc_27:* = new Array();
new Array().push(new DialogueLine("You came so much!"));
_loc_27.push(new DialogueLine("You came all over me."));
_loc_27.push(new DialogueLine("*YOUR cum... *It\'s all over my face."));
_loc_27.push(new DialogueLine("*YOUR cum... *It\'s everywhere."));
_loc_27.push(new DialogueLine("It\'s so warm."));
var _loc_28:* = new Array();
new Array().push(new DialogueLine("Did you have to shoot all over my face?!"));
_loc_28.push(new DialogueLine("Ugh! You\'ve covered me in it!"));
var _loc_29:* = new Array();
new Array().push(new DialogueLine("Swallow it?"));
_loc_29.push(new DialogueLine("Swallow?"));
_loc_29.push(new DialogueLine("Drink it?"));
_loc_29.push(new DialogueLine("You want me to swallow it?"));
var _loc_30:* = _loc_29.slice();
_loc_29.slice().push(new DialogueLine("Can I swallow it?"));
_loc_30.push(new DialogueLine("Can I drink it?"));
_loc_30.push(new DialogueLine("So much..."));
var _loc_31:* = new Array();
new Array().push(new DialogueLine("You expect me to swallow this?"));
_loc_31.push(new DialogueLine("Ugh... what were you thinking?!"));
_loc_31.push(new DialogueLine("You want me to swallow this?"));
var _loc_32:* = new Array();
new Array().push(new DialogueLine("I\'m so full."));
_loc_32.push(new DialogueLine("I can feel it all inside me."));
_loc_32.push(new DialogueLine("I can feel it inside me."));
_loc_32.push(new DialogueLine("You came right down my throat..."));
_loc_32.push(new DialogueLine("You came straight into my stomach."));
var _loc_33:* = new Array();
new Array().push(new DialogueLine("Ugh, you came right down my throat!"));
_loc_33.push(new DialogueLine("At least I didn\'t have to taste it."));
_loc_33.push(new DialogueLine("Ugh, I can feel it all down my throat."));
var _loc_34:* = new Array();
new Array().push(new DialogueLine("My eyes!"));
_loc_34.push(new DialogueLine("I can\'t see!"));
_loc_34.push(new DialogueLine("Ow!"));
var _loc_35:* = new Array();
var _loc_36:* = new Array();
new Array().push(new DialogueLine("I\'m so full."));
_loc_36.push(new DialogueLine("I can\'t believe you made me drink it all*, YOU*."));
_loc_36.push(new DialogueLine("I can\'t believe you made me swallow it all*, YOU*."));
_loc_36.push(new DialogueLine("I can still taste it."));
_loc_36.push(new DialogueLine("I can feel it all inside me."));
_loc_36.push(new DialogueLine("So much..."));
var _loc_37:* = new Array();
new Array().push(new DialogueLine("Mm, I can still taste it."));
_loc_37.push(new DialogueLine("I can feel it all inside me."));
_loc_37.push(new DialogueLine("So much..."));
var _loc_38:* = new Array();
new Array().push(new DialogueLine("Ugh, it tastes horrible."));
_loc_38.push(new DialogueLine("I can\'t believe you made me drink it all*, YOU*."));
_loc_38.push(new DialogueLine("I can\'t believe you made me swallow it all*, YOU*."));
var _loc_39:* = new Array();
new Array().push(new DialogueLine("I couldn\'t swallow it all* YOU*."));
_loc_39.push(new DialogueLine("I couldn\'t drink it all."));
_loc_39.push(new DialogueLine("It tastes bitter"));
var _loc_40:* = new Array();
new Array().push(new DialogueLine("I couldn\'t swallow it all."));
_loc_40.push(new DialogueLine("I didn\'t mean to spill it* YOU*. Give me more?"));
var _loc_41:* = new Array();
new Array().push(new DialogueLine("I\'m not swallowing that!"));
_loc_41.push(new DialogueLine("I\'m not going to drink that!"));
_loc_41.push(new DialogueLine("Ugh, I can still taste it."));
var _loc_42:* = new Array();
new Array().push(new DialogueLine("W-wait... you still want more?!"));
_loc_42.push(new DialogueLine("W-wait... you want more?!"));
_loc_42.push(new DialogueLine("Again?!"));
_loc_42.push(new DialogueLine("You\'re still hard?!"));
_loc_42.push(new DialogueLine("H-hey, you\'re still going?!"));
_loc_42.push(new DialogueLine("Isn\'t *FINISHES* enough?!"));
var _loc_43:* = new Array();
new Array().push(new DialogueLine("You want more?"));
_loc_43.push(new DialogueLine("I can go more than *FINISHES* if you can."));
_loc_43.push(new DialogueLine("*FINISHES* isn\'t enough right? Keep going."));
var _loc_44:* = new Array();
new Array().push(new DialogueLine("Aren\'t you done?!"));
_loc_44.push(new DialogueLine("Again?!"));
_loc_44.push(new DialogueLine("Isn\'t *FINISHES* enough?!"));
var _loc_45:* = new Array();
new Array().push(new DialogueLine("-mphh!"));
_loc_45.push(new DialogueLine("-mph!"));
_loc_45.push(new DialogueLine("-!"));
_loc_45.push(new DialogueLine("-ghmph!"));
_loc_45.push(new DialogueLine("-mmbh!"));
_loc_45.push(new DialogueLine("-nngh!"));
_loc_45.push(new DialogueLine("-mmn!"));
_loc_45.push(new DialogueLine("-ghch!"));
_loc_45.push(new DialogueLine("-mmb!"));
_loc_45.push(new DialogueLine("-mmbh!"));
_loc_45.push(new DialogueLine("-mnh!"));
_loc_45.push(new DialogueLine("-ng!"));
var _loc_46:* = new Array();
new Array().push(new DialogueLine("-aghck"));
_loc_46.push(new DialogueLine("-ack"));
_loc_46.push(new DialogueLine("-ackph"));
_loc_46.push(new DialogueLine("-agph"));
_loc_46.push(new DialogueLine("-achf"));
this.normalLibrary = new Dictionary();
this.normalLibrary[Dialogue.INTRO] = _loc_2;
this.normalLibrary[Dialogue.RESISTANCE] = _loc_3;
this.normalLibrary[Dialogue.GENERAL] = _loc_1;
this.normalLibrary[Dialogue.INTERRUPT] = _loc_45;
this.normalLibrary[Dialogue.COUGH] = _loc_46;
this.normalLibrary[Dialogue.FIRST_THROAT] = _loc_6;
this.normalLibrary[Dialogue.FIRST_DT] = _loc_9;
this.normalLibrary[Dialogue.PULL_OFF] = _loc_12;
this.normalLibrary[Dialogue.HELD] = _loc_15;
this.normalLibrary[Dialogue.WAKE] = _loc_18;
this.normalLibrary[Dialogue.VIGOROUS] = _loc_20;
this.normalLibrary[Dialogue.PRE_CUM] = _loc_23;
this.normalLibrary[Dialogue.CUM_ON_FACE] = _loc_26;
this.normalLibrary[Dialogue.CUM_IN_MOUTH] = _loc_29;
this.normalLibrary[Dialogue.CUM_IN_THROAT] = _loc_32;
this.normalLibrary[Dialogue.CUM_IN_EYE] = _loc_34;
this.normalLibrary[Dialogue.CUM_IN_NOSE] = _loc_35;
this.normalLibrary[Dialogue.SWALLOW] = _loc_36;
this.normalLibrary[Dialogue.DROOL] = _loc_39;
this.normalLibrary[Dialogue.RESTART] = _loc_42;
this.happyLibrary = new Dictionary();
this.happyLibrary[Dialogue.INTRO] = _loc_2;
this.happyLibrary[Dialogue.RESISTANCE] = _loc_4;
this.happyLibrary[Dialogue.GENERAL] = _loc_1;
this.happyLibrary[Dialogue.INTERRUPT] = _loc_45;
this.happyLibrary[Dialogue.COUGH] = _loc_46;
this.happyLibrary[Dialogue.FIRST_THROAT] = _loc_7;
this.happyLibrary[Dialogue.FIRST_DT] = _loc_10;
this.happyLibrary[Dialogue.PULL_OFF] = _loc_13;
this.happyLibrary[Dialogue.HELD] = _loc_16;
this.happyLibrary[Dialogue.WAKE] = _loc_18;
this.happyLibrary[Dialogue.VIGOROUS] = _loc_21;
this.happyLibrary[Dialogue.PRE_CUM] = _loc_24;
this.happyLibrary[Dialogue.CUM_ON_FACE] = _loc_27;
this.happyLibrary[Dialogue.CUM_IN_MOUTH] = _loc_30;
this.happyLibrary[Dialogue.CUM_IN_THROAT] = _loc_32;
this.happyLibrary[Dialogue.CUM_IN_EYE] = _loc_34;
this.happyLibrary[Dialogue.CUM_IN_NOSE] = _loc_35;
this.happyLibrary[Dialogue.SWALLOW] = _loc_37;
this.happyLibrary[Dialogue.DROOL] = _loc_40;
this.happyLibrary[Dialogue.RESTART] = _loc_43;
this.angryLibrary = new Dictionary();
this.angryLibrary[Dialogue.INTRO] = _loc_2;
this.angryLibrary[Dialogue.RESISTANCE] = _loc_5;
this.angryLibrary[Dialogue.GENERAL] = _loc_1;
this.angryLibrary[Dialogue.INTERRUPT] = _loc_45;
this.angryLibrary[Dialogue.COUGH] = _loc_46;
this.angryLibrary[Dialogue.FIRST_THROAT] = _loc_8;
this.angryLibrary[Dialogue.FIRST_DT] = _loc_11;
this.angryLibrary[Dialogue.PULL_OFF] = _loc_14;
this.angryLibrary[Dialogue.HELD] = _loc_17;
this.angryLibrary[Dialogue.WAKE] = _loc_19;
this.angryLibrary[Dialogue.VIGOROUS] = _loc_22;
this.angryLibrary[Dialogue.PRE_CUM] = _loc_25;
this.angryLibrary[Dialogue.CUM_ON_FACE] = _loc_28;
this.angryLibrary[Dialogue.CUM_IN_MOUTH] = _loc_31;
this.angryLibrary[Dialogue.CUM_IN_THROAT] = _loc_33;
this.angryLibrary[Dialogue.CUM_IN_EYE] = _loc_34;
this.angryLibrary[Dialogue.CUM_IN_NOSE] = _loc_35;
this.angryLibrary[Dialogue.SWALLOW] = _loc_38;
this.angryLibrary[Dialogue.DROOL] = _loc_41;
this.angryLibrary[Dialogue.RESTART] = _loc_44;
this.ahegaoLibrary = new Dictionary();
this.finishes = new Dictionary();
this.finishes[1] = [new DialogueLine("once")];
this.finishes[2] = [new DialogueLine("twice")];
this.finishes[3] = [new DialogueLine("three times")];
this.finishes[4] = [new DialogueLine("four times")];
this.finishes[5] = [new DialogueLine("five times")];
this.finishes[6] = [new DialogueLine("six times")];
this.finishes[7] = [new DialogueLine("seven times")];
this.finishes[8] = [new DialogueLine("eight times")];
this.finishes[9] = [new DialogueLine("nine times")];
this.finishes[10] = [new DialogueLine("ten times")];
this.finishes[this.OTHER_FINISH] = [new DialogueLine("that many times")];
return;
}// end function
 
D

Doomknight

[DIALOGUE LIBRARY, Part 7]
public function prepareTypeArray() : void
{
this.dialogueTypes = new Array();
this.dialogueTypes.push(Dialogue.INTRO);
this.dialogueTypes.push(Dialogue.HEAD_GRABBED);
this.dialogueTypes.push(Dialogue.PULLED_UP);
this.dialogueTypes.push(Dialogue.PULLED_DOWN);
this.dialogueTypes.push(Dialogue.RESISTANCE);
this.dialogueTypes.push(Dialogue.GENERAL);
this.dialogueTypes.push(Dialogue.INTERRUPT);
this.dialogueTypes.push(Dialogue.COUGH);
this.dialogueTypes.push(Dialogue.FIRST_THROAT);
this.dialogueTypes.push(Dialogue.FIRST_DT);
this.dialogueTypes.push(Dialogue.PULL_OFF);
this.dialogueTypes.push(Dialogue.HELD);
this.dialogueTypes.push(Dialogue.WAKE);
this.dialogueTypes.push(Dialogue.LICK_PENIS);
this.dialogueTypes.push(Dialogue.LICK_BALLS);
this.dialogueTypes.push(Dialogue.VIGOROUS);
this.dialogueTypes.push(Dialogue.PRE_CUM);
this.dialogueTypes.push(Dialogue.CUM_ON_FACE);
this.dialogueTypes.push(Dialogue.CUM_IN_MOUTH);
this.dialogueTypes.push(Dialogue.CUM_IN_THROAT);
this.dialogueTypes.push(Dialogue.CUM_IN_EYE);
this.dialogueTypes.push(Dialogue.CUM_IN_NOSE);
this.dialogueTypes.push(Dialogue.SWALLOW);
this.dialogueTypes.push(Dialogue.DROOL);
this.dialogueTypes.push(Dialogue.RESTART);
DialogueLibrary.allDialogueTypes = this.dialogueTypes;
this.dialogueTypesPattern = new RegExp("(" + this.dialogueTypes.join("|") + "):\\s?\"(.+?)\"", g);
return;
}// end function

}
}


[DIALOGUE, Part 1]
-> Seperated into parts for easier reading.
public var tfContainer:MovieClip;
public var library:DialogueLibrary;
public var advancedController:AdvancedDialogueController;
public var GENERAL_PHRASE_FREQ:Number = 0.8;
public var SPEAK_DELAY:uint = 20;
public var DEFAULT_TYPING_SPEED:uint = 55;
public var typingSpeed:uint = 55;
public var typingDelay:uint = 0;
public var coughDelay:uint = 0;
public var continueDelay:uint = 0;
public var lastFrameTime:uint;
public var currentTime:uint;
public var frameTime:uint;
public var dialogueTicks:uint;
public var clearTime:uint = 60;
public var clearDelay:uint = 0;
public var nextLineTimer:Number = 0;
public var speaking:Boolean = false;
public var interruptTimer:uint = 0;
public var showingText:Boolean = false;
public var fadingOut:Boolean = false;
public var fadingIn:Boolean = false;
public var currentText:String;
public var words:Array;
public var sayingState:String;
public var sayingPhrase:String;
public var sayingWord:uint;
public var sayingChar:int;
public var sayingSpace:Boolean = false;
public var sayingSpeakingStyle:Boolean = false;
public var waitingToContinue:Boolean = false;
public var queuedPhrase:String = "";
public var sayingAudio:Sound;
public var audioCues:Array;
public var cumulativeMovement:Number = 0;
public var postEjaculation:Boolean = false;
public var firstThroatSpoken:Boolean = false;
public var states:Dictionary;
public var debugMode:Boolean = false;
public var debugBars:Dictionary;
public static var ZERO_STATE:String = "zero_state";
public static var RESISTANCE:String = "resistance";
public static var FIRST_THROAT:String = "first_throat";
public static var FIRST_DT:String = "first_dt";
public static var PULL_OFF:String = "pull_off";
public static var HELD:String = "held";
public static var WAKE:String = "wake";
public static var VIGOROUS:String = "vigorous";
public static var LICK_PENIS:String = "lick_penis";
public static var LICK_BALLS:String = "lick_balls";
public static var PRE_CUM:String = "pre_cum";
public static var CUM_ON_FACE:String = "cum_on_face";
public static var CUM_IN_MOUTH:String = "cum_in_mouth";
public static var CUM_IN_THROAT:String = "cum_in_throat";
public static var CUM_IN_EYE:String = "cum_in_eye";
public static var CUM_IN_NOSE:String = "cum_in_nose";
public static var SWALLOW:String = "swallow";
public static var DROOL:String = "drool";
public static var HEAD_GRABBED:String = "head_grabbed";
public static var PULLED_UP:String = "pulled_up";
public static var PULLED_DOWN:String = "pulled_down";
public static var QUEUED:String = "queued";
public static var INTRO:String = "intro";
public static var GENERAL:String = "general";
public static var RESTART:String = "restart";
public static var COUGH:String = "cough";
public static var INTERRUPT:String = "interrupt";
public static var ONE_OFF_BUILD:uint = 120;
public static var FRAME_BUILD:uint = 4;
public static var TICK_BUILD:uint = 16;
public static var MAX_BUILD:uint = 320;
public static var STATE_THRESHOLD:uint = 20;
public static var DIALOGUE_NAME_KEY:String = "dialogue_name";

[DIALOGUE, Part 2]
public function Dialogue() : void
{
var _loc_1:uint = 0;
var _loc_2:String = null;
var _loc_3:DebugBar = null;
this.debugBars = new Dictionary();
this.x = 0;
this.y = g.screenSize.y;
gotoAndStop("speaking");
mouseEnabled = false;
mouseChildren = false;
this.library = new DialogueLibrary();
this.advancedController = new AdvancedDialogueController();
DialogueLine.advancedController = this.advancedController;
this.states = new Dictionary();
this.states[ZERO_STATE] = new DialogueState(0, 0);
this.states[HEAD_GRABBED] = new DialogueState(MAX_BUILD, 1);
this.states[PULLED_UP] = new DialogueState(MAX_BUILD, 0);
this.states[PULLED_DOWN] = new DialogueState(MAX_BUILD, 0);
this.states[RESISTANCE] = new DialogueState(MAX_BUILD, 0);
this.states[FIRST_THROAT] = new DialogueState(MAX_BUILD + 80, 1);
this.states[FIRST_DT] = new DialogueState(MAX_BUILD + 80, 2);
this.states[PULL_OFF] = new DialogueState(MAX_BUILD, 0);
this.states[HELD] = new DialogueState(MAX_BUILD + 160, 0);
this.states[WAKE] = new DialogueState(MAX_BUILD + 80, 4);
this.states[LICK_PENIS] = new DialogueState(MAX_BUILD, 1);
this.states[LICK_BALLS] = new DialogueState(MAX_BUILD, 1);
this.states[VIGOROUS] = new DialogueState(MAX_BUILD + 100, 0);
this.states[PRE_CUM] = new DialogueState(MAX_BUILD, 2);
this.states[CUM_ON_FACE] = new DialogueState(MAX_BUILD + 240, 3, 0.1);
this.states[CUM_IN_MOUTH] = new DialogueState(MAX_BUILD + 240, 3, 0.1);
this.states[CUM_IN_THROAT] = new DialogueState(MAX_BUILD + 240, 3, 0.1);
this.states[CUM_IN_NOSE] = new DialogueState(MAX_BUILD + 240, 4, 0.1);
this.states[SWALLOW] = new DialogueState(MAX_BUILD + 80, 0);
this.states[DROOL] = new DialogueState(MAX_BUILD + 80, 1);
this.states[RESTART] = new DialogueState(MAX_BUILD + 160, 2);
this.states[QUEUED] = new DialogueState(MAX_BUILD + 300, 5, 0.1);
this.states[INTRO] = new DialogueState(0, 0);
this.states[GENERAL] = new DialogueState(0, 0);
this.states[CUM_IN_EYE] = new DialogueState(0, 0);
if (!this.debugMode)
{
this.alpha = 0;
}
this.readyToSpeak();
if (this.debugMode)
{
_loc_1 = 0;
for (_loc_2 in this.states)
{

_loc_3 = new DebugBar();
_loc_3.scaleX = this.states[_loc_2].max / MAX_BUILD;
_loc_3.x = 100;
_loc_3.y = _loc_1 * 12 - 550;
_loc_3.labelField.text = _loc_2;
this.addChild(_loc_3);
this.debugBars[_loc_2] = _loc_3;
_loc_1 = _loc_1 + 1;
}
}
return;
}// end function
 
D

Doomknight

K, well that is my modders resource. If you need some more code, ask, and I'll pull up that code for you, in a spoiler as usual.

Enjoy! Happy Modding!
 

anonymous

Avid Affiliate
Joined
Feb 16, 2011
I'm deleting this thread tomorrow, so either throw this stuff on pastebin under various files, upload separate txt files, or don't, but there is no reason to have 25 posts for one thing.
 
D

Doomknight

Your call. I just thought people wouldn't mind it all in one convenient spot ON the forums. Didn't know how many replys I would need, for posting that much code. Plus, with Pastebin or seperate txt files, it would require people to leave the forums to use it, which kinda defeats the purpose of having a tutorial on the forums. Just my two cents.

EDIT: Reread the rules, FAQ, and guidelines. Basically, you are deleting it because I "bumped" my own post, amirite? Also, as per the Guidelines, it states to not have tons of attachments (which it would be at least 15 attachments, for each individual text file), so that option is out, and I've found pastebin to be notoriously unuseful and extremely unreliable. So I'm fubar, for making a tutorial on this stuff, then?

Q: Is there an alternative way of doing a tutorial on this, that doesn't include attachments or pastebin, as I go over the 65,000 character limit about 4-5 times over, hence why I reserved reply posts?
 

anonymous

Avid Affiliate
Joined
Feb 16, 2011
Doomknight said:
Your call. I just thought people wouldn't mind it all in one convenient spot ON the forums. Didn't know how many replys I would need, for posting that much code. Plus, with Pastebin or seperate txt files, it would require people to leave the forums to use it, which kinda defeats the purpose of having a tutorial on the forums. Just my two cents.

EDIT: Reread the rules, FAQ, and guidelines. Basically, you are deleting it because I "bumped" my own post, amirite? Also, as per the Guidelines, it states to not have tons of attachments (which it would be at least 15 attachments, for each individual text file), so that option is out, and I've found pastebin to be notoriously unuseful and extremely unreliable. So I'm fubar, for making a tutorial on this stuff, then?

Q: Is there an alternative way of doing a tutorial on this, that doesn't include attachments or pastebin, as I go over the 65,000 character limit about 4-5 times over, hence why I reserved reply posts?
I don't understand why you can't make a single text file and attach said file.
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
i figured i would give a little input on this topic.

personally, my modding resource is a decompiled sdt that i look sectionally as needed. although organizing the variables into categories on the forum can be helpful to see what might relate and some of what is available, i am doubtful that modders would use it because konashion has the parts of sdt pretty well broken up already, and they can (with some digging) look up what they do.

the posted variables might be useful if they included some comment on what they did, but this can be a very difficult thing to describe sometimes, and is soooo much work. this would essentially mean mulling over the sdt code enough to understand it, and then documenting it afterward. if taken in small chunks, i can see this possible, but you never know when an update will change things.

i think more people's opinion on this would be good to see if it should continue, but just know that i think it is not worth the effort. :-\

- edit - if that is all there is, i'd say just leave it there. the amount of space that that text is combined is probably 50kb, pretty small compared to a screenshot.
 
D

Doomknight

Well if it was a text file, how would one be able to search through it and find something of interest without scrolling through thousands of lines of code, in a timely manner? This way, you can just click on the respective spoiler and look at what the file has to offer.
 

anonymous

Avid Affiliate
Joined
Feb 16, 2011
sby said:
- edit - if that is all there is, i'd say just leave it there. the amount of space that that text is combined is probably 50kb, pretty small compared to a screenshot.
This. The reason for the rule regarding a massive amount of attachments is to save server space, all of that code wouldn't amount to a single image.
 

BuckWild

Modder
Streamer
Joined
Feb 3, 2013
Actually, the entire text file is about 671kb currently. I decided to copy/paste for fear of the resource's deletion. I can't decompile SDT because I don't have Flash CS5, and I don't know of an alternate decompiler I could use. Besides, this list is pretty organized and helpful as well for those people who can't figure out a function through their own experimentation.
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.