Creating Folders
Spindraft
27 Dec 2013, 23:56Since I am still trying to learn how quest works with menus and such I am building my conversations using a series of flags, functions and commands (just getting started actually) and this looks like it is going to really pile up the file tree in the editor. Can I make files to store similar items right in the tree and then move items into these files or will this screw up the paths somehow?
HegemonKhan
28 Dec 2013, 03:48yes, you can click and drag stuff directly in the "tree of things" within the GUI~Editor. For example:
objects
-> game
->-> verbs
->-> commands
-> room
->-> player
etc...
let's say I created another room: "room_2", and I want the "player" to be in that new room instead of the default "room":
objects
-> game
->-> verbs
->-> commands
-> room
->-> player
-> room_2
etc...
you can simply click on the "player", holding down the button, and drag it over the "room_2", letting go of the button, to drop it into the "room_2", and now your "player" will start (barring any "Move" or "Parent" scripting, lol) in "room_2" instead of in the default "room".
objects
-> game
->-> verbs
->-> commands
-> room
-> room_2
->-> player
etc...
-----------------------------
ya, the scripting in the GUI~Editor gets really "smushed" against the right side quickly from the nesting lol, but you can open up the scripting to a code~text window within the GUI~Editor, there should be a (?parser?) button to do so. Or, you can just craft it in Code View mode (In-Code) too.
to reduce this, one way is to break up your scripting~functions into smaller functions, for example:
(and this can sometimes be a very good idea too, such as it allows for looping! ... it depends though in whether you want to break a big function into smaller functions or to keep it all as one big function, on what you're doing; depends on the situation)
<game name="blah">
-> // blah scripts ~ code lines
-> <start type="script">
->-> character_creation_function
-> </start>
</game>
<function name="character_creation_function">
-> alias_character_creation_function
-> on ready {
->-> gender_character_creation_function
->-> on ready {
->->-> etc functions
->-> }
-> }
</function>
<function name="alias_character_creation_function">
-> msg ("What is your name?")
-> get input {
->-> game.pov.alias=result
-> }
</function>
<function name="gender_character_creation_function">
-> show menu ("What is your gender?", split ("male;female",";"), false) {
->-> game.pov.gender_string=result
-> }
</function>
// etc functions
-------------------------
Read about "libraries", though it's a bit complicated.
The Quest Game Engine~software itself is a bunch of "Added" Libraries ("patched" or "expansion packs" or "add-ons" or "mods" of code; have you ever played TES: Morrowind+ ??? Libraries work like adding "mods" for Morrowind anyways... I haven't played Oblivion, nor Skyrim, sadly... I hate being old, an adult, with work to do and not much money too, and no time for gaming like I had as a, kid, lol).
Look inside your Quest Program Folder:
*.aslx = a Game File' or a Library File's Name Extension
Game File Taggings: <asl version="540">(your mass of game code, lol)</asl>
Library File Taggings: <library>(your mass of code)</library>
Core.aslx, CoreDescriptions.aslx,CoreEditor.aslx, etc Core____.aslx, English.aslx, German.aslx, etc Languages.aslx, and etc *.aslx
notice your two default included libraries:
Objects
-> Game
->-> Verbs
->-> Commands
-> room
->-> player
Functions
Timers
Walkthrough
Advanced
-> Libraries
->-> English.aslx
->-> Core.aslx
-> Object Types
-> JavaScript
these two libraries is literally the underlying quest game engine coding, and as best as I understand it, the "core.aslx" causes all of the many many other "Core___.aslx" Files to be initialized (used for the underlying game code), and the English (or whatever language).aslx also has some vital game code as well as setting what language the text is for your quest program.
In otherwords, Alex has constructed an extremely customizable game program. If you're a good coder, you can "easily" create your entire own text adventure game programming, from Alex's quest program.
Also, you can include as many libraries as you want, for example (Pixie's Libraries, as he's got tons of them for us to use, lol):
Pixie's "Shop Library":
Add Pixie's shop library within the game:
the "tree of things" (within the GUI~Editor mode, the left side panel~window):
Objects
-> Game
->-> Verbs
->-> Commands
-> room
->-> player
Functions
Timers
Walkthrough
Advanced
-> Libraries
->-> English.aslx
->-> Core.aslx
->-> Shop.aslx
-> Object Types
-> JavaScript
.
.
.
.
Filter -> Show Library Elements -> this reveals (toggle button of revealing~hiding) your libraries' contents~code as light-greyed text in your "tree of things".
---
and also have Pixie's "Shop.aslx" Library File in the same Folder as the "Quest.exe" so that it can find and read~use the library file.
-------------
or, you can simply use a library file as a "saved document", from which you can just open up and copy and paste the code you want from it, into your new game file (new game project) that you're working on.
objects
-> game
->-> verbs
->-> commands
-> room
->-> player
etc...
let's say I created another room: "room_2", and I want the "player" to be in that new room instead of the default "room":
objects
-> game
->-> verbs
->-> commands
-> room
->-> player
-> room_2
etc...
you can simply click on the "player", holding down the button, and drag it over the "room_2", letting go of the button, to drop it into the "room_2", and now your "player" will start (barring any "Move" or "Parent" scripting, lol) in "room_2" instead of in the default "room".
objects
-> game
->-> verbs
->-> commands
-> room
-> room_2
->-> player
etc...
-----------------------------
ya, the scripting in the GUI~Editor gets really "smushed" against the right side quickly from the nesting lol, but you can open up the scripting to a code~text window within the GUI~Editor, there should be a (?parser?) button to do so. Or, you can just craft it in Code View mode (In-Code) too.
to reduce this, one way is to break up your scripting~functions into smaller functions, for example:
(and this can sometimes be a very good idea too, such as it allows for looping! ... it depends though in whether you want to break a big function into smaller functions or to keep it all as one big function, on what you're doing; depends on the situation)
<game name="blah">
-> // blah scripts ~ code lines
-> <start type="script">
->-> character_creation_function
-> </start>
</game>
<function name="character_creation_function">
-> alias_character_creation_function
-> on ready {
->-> gender_character_creation_function
->-> on ready {
->->-> etc functions
->-> }
-> }
</function>
<function name="alias_character_creation_function">
-> msg ("What is your name?")
-> get input {
->-> game.pov.alias=result
-> }
</function>
<function name="gender_character_creation_function">
-> show menu ("What is your gender?", split ("male;female",";"), false) {
->-> game.pov.gender_string=result
-> }
</function>
// etc functions
-------------------------
Read about "libraries", though it's a bit complicated.
The Quest Game Engine~software itself is a bunch of "Added" Libraries ("patched" or "expansion packs" or "add-ons" or "mods" of code; have you ever played TES: Morrowind+ ??? Libraries work like adding "mods" for Morrowind anyways... I haven't played Oblivion, nor Skyrim, sadly... I hate being old, an adult, with work to do and not much money too, and no time for gaming like I had as a, kid, lol).
Look inside your Quest Program Folder:
*.aslx = a Game File' or a Library File's Name Extension
Game File Taggings: <asl version="540">(your mass of game code, lol)</asl>
Library File Taggings: <library>(your mass of code)</library>
Core.aslx, CoreDescriptions.aslx,CoreEditor.aslx, etc Core____.aslx, English.aslx, German.aslx, etc Languages.aslx, and etc *.aslx
notice your two default included libraries:
Objects
-> Game
->-> Verbs
->-> Commands
-> room
->-> player
Functions
Timers
Walkthrough
Advanced
-> Libraries
->-> English.aslx
->-> Core.aslx
-> Object Types
-> JavaScript
these two libraries is literally the underlying quest game engine coding, and as best as I understand it, the "core.aslx" causes all of the many many other "Core___.aslx" Files to be initialized (used for the underlying game code), and the English (or whatever language).aslx also has some vital game code as well as setting what language the text is for your quest program.
In otherwords, Alex has constructed an extremely customizable game program. If you're a good coder, you can "easily" create your entire own text adventure game programming, from Alex's quest program.
Also, you can include as many libraries as you want, for example (Pixie's Libraries, as he's got tons of them for us to use, lol):
Pixie's "Shop Library":
Add Pixie's shop library within the game:
the "tree of things" (within the GUI~Editor mode, the left side panel~window):
Objects
-> Game
->-> Verbs
->-> Commands
-> room
->-> player
Functions
Timers
Walkthrough
Advanced
-> Libraries
->-> English.aslx
->-> Core.aslx
->-> Shop.aslx
-> Object Types
-> JavaScript
.
.
.
.
Filter -> Show Library Elements -> this reveals (toggle button of revealing~hiding) your libraries' contents~code as light-greyed text in your "tree of things".
---
and also have Pixie's "Shop.aslx" Library File in the same Folder as the "Quest.exe" so that it can find and read~use the library file.
-------------
or, you can simply use a library file as a "saved document", from which you can just open up and copy and paste the code you want from it, into your new game file (new game project) that you're working on.
HegemonKhan
28 Dec 2013, 04:21if you simply mean in-code ~ in-game-file organization:
I see you quickly realized how cumbersome~bad the use of booleans~flags are... lol (unfortunately, they're so simple to use... sighs)
A better design I have realized is to do this (using string lists or whatever list~dictionary):
(though it involves understand of lists and~or dictionaries, which isn't noobie-friendly)
Game Using As Booleans~Flags:
while so simple to use and understand, they quickly pile up... you literally need a boolean for everything, lol
Tagging ("Creation"):
<object name="Object_Name">
-> <Attribute_Name type="Attribute_Type">Attribute_Value</Attribute_Name>
</object>
Scripting ("Action"):
player.flying=false_or_true
player.running=false_or_true
player.swimming=false_or_true
player.jumping=false_or_true
player.sneaking=false_or_true
monster.dead=false_or_true
player.poisoned=false_or_true
player.blinded=false_or_true
player.defending=false_or_true
player.resting=false_or_true
player.male_boolean=false_or_true
player.female_boolean=false_or_true
etc etc etc
a better way is to use String Lists and Strings:
(this is a bit advanced code design~organization though)
Tagging ("Creation"):
Scripting ("Action"):
(an single example)
// you just drank a "flying_potion"
list add (player.locomotion_string_list, "flying")
// you are trying to take a magical key floating high up in the air above you
if (ListContains (player.locomation_string_list, "flying") {
-> msg ("Now being able to fly, you easily get the key")
-> key.parent = player
} else {
-> msg ("What?! Did you think you can fly?")
}
----------------
and for organizing and~or storage (within the Game File or Library File), I've shown a great method above already, but here it is in detail:
"data objects"
and they can be used (in Scripting):
if (date_and_time_data_object.month_string="january") {
-> msg ("It is " + date_and_time_data_object.month_string +".")
// outputs~displays: It is january.
I see you quickly realized how cumbersome~bad the use of booleans~flags are... lol (unfortunately, they're so simple to use... sighs)
A better design I have realized is to do this (using string lists or whatever list~dictionary):
(though it involves understand of lists and~or dictionaries, which isn't noobie-friendly)
Game Using As Booleans~Flags:
while so simple to use and understand, they quickly pile up... you literally need a boolean for everything, lol
Tagging ("Creation"):
<object name="Object_Name">
-> <Attribute_Name type="Attribute_Type">Attribute_Value</Attribute_Name>
</object>
Scripting ("Action"):
player.flying=false_or_true
player.running=false_or_true
player.swimming=false_or_true
player.jumping=false_or_true
player.sneaking=false_or_true
monster.dead=false_or_true
player.poisoned=false_or_true
player.blinded=false_or_true
player.defending=false_or_true
player.resting=false_or_true
player.male_boolean=false_or_true
player.female_boolean=false_or_true
etc etc etc
a better way is to use String Lists and Strings:
(this is a bit advanced code design~organization though)
Tagging ("Creation"):
<object name="player">
-> <inherit name="editor_object" />
-> <inherit name="editor_player" />
-> <locomotion_string_list type="simplestringlist">walking;bipedal</locomotion_string_list>
-> <status_effect_string type="simplestringlist">none</status_effect_string>
-> <gender_string type="string">male</gender_string>
-> etc etc etc
</object>
<object name="global_data_object">
-> <inherit name="editor_object" />
-> <locomotion_string_list type="simplestringlist">walking;running;jumping;falling;flying;floating;swimming;jogging;crawling;climbing;gliding;bipedal;quadripedal</locomotion_string_list>
-> <status_effect_string_list type="simplestringlist">poisoned;silenced;asleep;blinded;confused;stunned;petrified;paralyzed;cursed;blessed</status_effect_string_list>
</object>
-> <status_condition_string_list type="simplestringlist">dead;healthy;wounded;unconcious;critically_wounded</status_condition_string_list>
-> gender_string_list type="simplestringlist">male;female</gender_string_list>
-> etc etc etc
</object>
Scripting ("Action"):
(an single example)
// you just drank a "flying_potion"
list add (player.locomotion_string_list, "flying")
// you are trying to take a magical key floating high up in the air above you
if (ListContains (player.locomation_string_list, "flying") {
-> msg ("Now being able to fly, you easily get the key")
-> key.parent = player
} else {
-> msg ("What?! Did you think you can fly?")
}
----------------
and for organizing and~or storage (within the Game File or Library File), I've shown a great method above already, but here it is in detail:
"data objects"
<asl version="540">
<include ref="English.aslx"/>
<include ref="Core.aslx"/>
<game name="Testing Game Stuff">
<gameid>d67ec73f-f879-4911-9d88-c02ea527c534</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
<object name="character_attribute_data_object">
<inherit name="editor_object" />
<strength_integer type="int">0</strength_integer>
<endurance_integer type="int">0</endurance_integer>
<dexterity_integer type="int">0</dexterity_integer>
<agility_integer type="int">0</agility_integer>
<speed_integer type="int">0</speed_integer>
<piety_integer type="int">0</piety_integer>
<intelligence_integer type="int">0</intelligence_integer>
<spirituality_integer type="int">0</spirituality_integer>
<mentality_integer type="int">0</mentality_integer>
<luck_integer type="int">0</luck_integer>
<perception_integer type="int">0</perception_integer>
<personality_integer type="int">0</personality_integer>
<charisma_integer type="int">0</charisma_integer>
<leadership_integer type="int">0</leadership_integer>
<alignment_integer type="int">0</alignment_integer>
<level_integer type="int">0</level_integer>
<experience_integer type="int">0</experience_integer>
<cash_integer type="int">0</cash_integer>
</object>
<object name="date_and_time_data_object">
<inherit name="editor_object" />
<day_string type="string"></day_string>
<month_string type="string"></month_string>
<season_string type="string"></season_string>
<second_integer type="int">0</second_integer>
<minute_integer type="int">0</minute_integer>
<hour_integer type="int">0</hour_integer>
<day_integer type="int">0</day_integer>
<week_integer type="int">0</week_integer>
<month_integer type="int">0</month_integer>
<year_integer type="int">0</year_integer>
</object>
// etc "Data Objects"
</asl>
and they can be used (in Scripting):
if (date_and_time_data_object.month_string="january") {
-> msg ("It is " + date_and_time_data_object.month_string +".")
// outputs~displays: It is january.