HegemonKhan wrote:simply open your game file with notepad, wordpad, or notepad++, highlight it, copy it, and then paste it here.
unless it's not something you've done, then maybe the library code just needs to be adjusted for the new 5.3 version of quest.
--------
your game's not broken, quest simply requires your code to be perfect, so something is wrong with just the coding. you can simply remove the library and its coding, and your game will be back to normal as it was, or we can try to figure out what the problem is, but we'll need you to post the game code, first, before we can help you.
dwn wrote:I mainly wanted to implement an "ask about" conversation menu...so that if you talked to an NPC, choices would appear depending on places you've visited, other NPC's you talked to, or objects you have.
HegemonKhan wrote:read the libraries carefully, and follow along carefully
the tiniest simpliest mistake will give your quest an error when trying to load the game and~or when actually playing your game... (beware of creating an infinite loop, as that "crashes" the game, lol. I had this problem with my combat system, but I got it fixed, all on my own, or mostly so, as Pertex has been helping me too with it, I can't remember now what I had done all on my own, and what I had help with in doing from Pertex, it's been too long now for my bad memory to remember exactly, lol)
<game name="???">
<topics type="list">???,???,???</topics>
<??? type="boolean">false</???>
<??? type="boolean">false</???>
</game>
<command name="hint">
<pattern>hint</pattern>
<script>
hint_system
</script>
</command>
<function name="hint_system">
show menu ("Hint about what?", game.topics, false) {
hint = result
switch (hint) {
case ("???") {
if (game.??? = true) {
msg ("???")
}
else {
msg ("No hint available")
}
}
case ("???") {
if (game.??? = true) {
msg ("???")
}
else {
msg ("No hint available")
}
}
}
</function><command name="hint">
<pattern>hint #text#</pattern>
<script>
hint_system (text)
</script>
</command>
<function name="hint_system" parameters="text">
result = text
switch (result) {
case ("???") {
if (game.??? = true) {
msg ("???")
}
else {
msg ("No hint available")
}
}
case ("???") {
if (game.??? = true) {
msg ("???")
}
else {
msg ("No hint available")
}
}
}
</function>HegemonKhan wrote:the basic code blocks would be:
(these two code blocks do NOT involve a character to ask the hints of, instead you type in the command, to bring up this hint system, but they are also what you would use to work with a character using its ask/tell verbs, though for full~best usage, I'll need to use the subtracting/joining~adding of lists for what you want, but I still have to learn this, albiet it shouldn''t take too much time)
these will require some explaining for you, so ask me about them.
------------
I'll need to learn how to work with lists, and subtracting/adding~joining items from/to a list, to give a better response to what you want, so this might take me a bit longer to do so.
I could try to make a demo game, so you can see it fully, but this will take even more time to do so.
HegemonKhan wrote:the dynamic conversation library does this already, I can help you get it to work... this time around, hehe. it uses a creative method of having the topics being as held objects of the character, and using the scope to hide the objects and thus so their topic scripts.
the other way is either using the ask/tell, or creating our own slightly modified verb, so we can implement the coding for it.
I've looked over this stuff, and I can help you do it, I'll get working on making a game file for you on this, I've just been a bit lazy, as it will take a little time to construct it for you.
<ask type="scriptdictionary">
</ask><object name="wizard">
<inherit name="editor_object />
<ask type="scriptdictionary">
</ask>
</object><object name="orc">
<inherit name="editor_object" />
<lookat type="script">
dictionary add (wizard.ask, orc, msg ("You need to kill the orc for his key to open up the locked door"))
msg ("He's big, green, and mean")
</lookat>
</object><object name="wizard">
<inherit name="editor_object />
<ask type="scriptdictionary">
<item key="orc">
msg ("You need to kill the orc for his key to open up the locked door")
</item>
</ask>
</object><game name="Testing Game Stuff">
<topics type="list"></topics>
</game>
<object name="wizard">
<speak type="script">
show menu ("Hint about what?", game.topics, false) {
switch (result) {
<!--
HK Edit: thanks Pertex for this correction! of switch (game.topics) { to switch (result) {
-->
case ("orc") {
msg ("You need to kill the orc for his key to open up the locked door")
}
}
}
</speak>
</object>
<object name="orc">
<lookat type="script">
list add (game.topics, orc)
msg ("He's big, green, and mean")
</lookat>
</object>
HegemonKhan wrote:<game name="Testing Game Stuff">
<topics type="list"></topics>
</game>
<object name="wizard">
<speak type="script">
show menu ("Hint about what?", game.topics, false) {
switch (game.topics) {
case ("orc") {
msg ("You need to kill the orc for his key to open up the locked door")
}
}
}
</speak>
</object>
switch (result) {<game name="Testing Game Stuff">
<topics type="list"></topics>
</game>
<object name="wizard">
<speak type="script">
show menu ("Hint about what?", game.topics, false) {
switch (result) {
case ("orc") {
msg ("You need to kill the orc for his key to open up the locked door")
}
}
}
</speak>
</object>
<object name="orc">
<lookat type="script">
list add (game.topics, orc)
msg ("He's big, green, and mean")
</lookat>
</object><asl version="530">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
<turns type="int">0</turns>
<statusattributes type="stringdictionary">turns = </statusattributes>
<hint_list type="list">null_hint</hint_list>
<autodisplayverbs type="boolean">false</autodisplayverbs>
<pov type="object">player</pov>
<start type="script">
character_creation
</start>
<hint_dict type="scriptdictionary">
<item key="doormat_hint">
msg ("Try to pull the doormat. Type in: pull doormat")
</item>
</hint_dict>
</game>
<object name="homeyard">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
<inherit name="editor_player" />
<drop type="boolean">false</drop>
<displayverbs>Look at</displayverbs>
<inventoryverbs>Look at; Use; Drop</inventoryverbs>
</object>
<object name="guide">
<inherit name="editor_object" />
<drop type="boolean">false</drop>
<displayverbs>Look at; Hint</displayverbs>
<inventoryverbs>Look at; Use; Drop</inventoryverbs>
<hint type="script">
show menu ("Hint about what?", game.hint_list, false) {
switch (result) {
case ("null_hint") {
msg ("No hints are available")
}
case ("doormat_hint") {
msg (ScriptDictionaryItem (game.hint_dict,"doormat_hint"))
}
}
}
</hint>
</object>
<exit name="to_frontyard" to="frontyard" />
</object>
<object name="frontyard">
<inherit name="editor_room" />
<object name="doormat">
<inherit name="editor_object" />
<drop type="boolean">false</drop>
<displayverbs>Look at</displayverbs>
<pull type="script">
MakeObjectVisible (frontdoorkey)
msg ("You found a key under the doormat")
</pull>
<look type="script">
list add (game.hint_list, "doormat_hint")
msg ("Your guide has a new hint for you now")
</look>
</object>
<object name="frontdoorkey">
<inherit name="editor_object" />
<alias>key</alias>
<drop />
<take />
<visible type="boolean">false</visible>
</object>
<exit name="to_homeyard" to="homeyard" />
</object>
<turnscript name="game_turns">
<enabled />
<script>
if (frontdoorkey.parent = player) {
msg ("You've won the game!")
finish
}
game.turns = game.turns + 1
</script>
</turnscript>
<verb>
<property>hint</property>
<pattern>hint</pattern>
<defaultexpression>"You can't hint " + object.article + "."</defaultexpression>
</verb>
<function name="character_creation">
msg ("What is your name?")
get input {
player.alias = result
msg (" - " + player.alias)
show menu ("What is your gender?", split ("male;female",";"), false) {
player.gender = result
show menu ("What is your race?", split ("american;european;african;asian",";"), false) {
player.race = result
show menu ("What is your eye color?", split ("blue;green;hazel;amber;brown",";"), false) {
player.eye_color = result
show menu ("What is your hair color?", split ("yellow;orange;red;brown;black;grey;white",";"), false) {
player.hair_color = result
show menu ("What is your skin color?", split ("white;light;tan;dark;red;brown;black",";"), false) {
player.skin_color = result
show menu ("What is your maturity?", split ("adult;teen;child",";"), false) {
player.maturity = result
msg ("What is your age?")
get input {
player.age = result
msg (" - " + player.age)
msg (player.alias + " is a " + player.age + " year old " + player.gender + " " + player.race + " " + player.maturity + " with " + player.eye_color + " eyes, " + player.hair_color + " hair, and " + player.skin_color +" skin.")
wait {
ClearScreen
}
}
}
}
}
}
}
}
}
</function>
</asl>
HegemonKhan wrote:.
.
@dwn,
here's a *very* brief (lol) demo game:
(copy this code below ~ click on the blue ' select all ' hyperlink, start up a new quest game, go into the Code View mode ~ click on the toggle button for the GUI~Code View mods ~ looks like a notepage, highlight all of your new game code, delete all of it, and then paste in this code below, save your game file, close down your game, restart your game and play it, can you win my game? Let's see if you can!, lol, hehe)
(to add in your own stuff, just look at this game code, and hopefully you'll understand, if not, then ask me, and I'll explain it)<asl version="530">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
<turns type="int">0</turns>
<statusattributes type="stringdictionary">turns = </statusattributes>
<hint_list type="list">null_hint</hint_list>
<autodisplayverbs type="boolean">false</autodisplayverbs>
<pov type="object">player</pov>
<start type="script">
character_creation
</start>
<hint_dict type="scriptdictionary">
<item key="doormat_hint">
msg ("Try to pull the doormat. Type in: pull doormat")
</item>
</hint_dict>
</game>
<object name="homeyard">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
<inherit name="editor_player" />
<drop type="boolean">false</drop>
<displayverbs>Look at</displayverbs>
<inventoryverbs>Look at; Use; Drop</inventoryverbs>
</object>
<object name="guide">
<inherit name="editor_object" />
<drop type="boolean">false</drop>
<displayverbs>Look at; Hint</displayverbs>
<inventoryverbs>Look at; Use; Drop</inventoryverbs>
<hint type="script">
show menu ("Hint about what?", game.hint_list, false) {
switch (result) {
case ("null_hint") {
msg ("No hints are available")
}
case ("doormat_hint") {
msg (ScriptDictionaryItem (game.hint_dict,"doormat_hint"))
}
}
}
</hint>
</object>
<exit name="to_frontyard" to="frontyard" />
</object>
<object name="frontyard">
<inherit name="editor_room" />
<object name="doormat">
<inherit name="editor_object" />
<drop type="boolean">false</drop>
<displayverbs>Look at</displayverbs>
<pull type="script">
MakeObjectVisible (frontdoorkey)
msg ("You found a key under the doormat")
</pull>
<look type="script">
list add (game.hint_list, "doormat_hint")
msg ("Your guide has a new hint for you now")
</look>
</object>
<object name="frontdoorkey">
<inherit name="editor_object" />
<alias>key</alias>
<drop />
<take />
<visible type="boolean">false</visible>
</object>
<exit name="to_homeyard" to="homeyard" />
</object>
<turnscript name="game_turns">
<enabled />
<script>
if (frontdoorkey.parent = player) {
msg ("You've won the game!")
finish
}
game.turns = game.turns + 1
</script>
</turnscript>
<verb>
<property>hint</property>
<pattern>hint</pattern>
<defaultexpression>"You can't hint " + object.article + "."</defaultexpression>
</verb>
<function name="character_creation">
msg ("What is your name?")
get input {
player.alias = result
msg (" - " + player.alias)
show menu ("What is your gender?", split ("male;female",";"), false) {
player.gender = result
show menu ("What is your race?", split ("american;european;african;asian",";"), false) {
player.race = result
show menu ("What is your eye color?", split ("blue;green;hazel;amber;brown",";"), false) {
player.eye_color = result
show menu ("What is your hair color?", split ("yellow;orange;red;brown;black;grey;white",";"), false) {
player.hair_color = result
show menu ("What is your skin color?", split ("white;light;tan;dark;red;brown;black",";"), false) {
player.skin_color = result
show menu ("What is your maturity?", split ("adult;teen;child",";"), false) {
player.maturity = result
msg ("What is your age?")
get input {
player.age = result
msg (" - " + player.age)
msg (player.alias + " is a " + player.age + " year old " + player.gender + " " + player.race + " " + player.maturity + " with " + player.eye_color + " eyes, " + player.hair_color + " hair, and " + player.skin_color +" skin.")
wait {
ClearScreen
}
}
}
}
}
}
}
}
}
</function>
</asl>
<asl version="530">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
<turns type="int">0</turns>
<statusattributes type="stringdictionary">turns = </statusattributes>
<hint_list type="list">null_hint</hint_list>
<autodisplayverbs type="boolean">false</autodisplayverbs>
<pov type="object">player</pov>
<start type="script">
character_creation
</start>
<hint_dict type="scriptdictionary">
<item key="doormat_hint">
msg ("Try to pull the doormat. Type in: pull doormat")
</item>
</hint_dict>
</game>
<object name="homeyard">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
<inherit name="editor_player" />
<drop type="boolean">false</drop>
<displayverbs>Look at</displayverbs>
<inventoryverbs>Look at; Use; Drop</inventoryverbs>
</object>
<object name="your_character_name">
<inherit name="editor_object" />
<drop type="boolean">false</drop>
<displayverbs>Look at; Whatever_the_verb_you_are_using</displayverbs>
<inventoryverbs>Look at; Use; Drop</inventoryverbs>
<whatever_the_verb_you_are_using type="script">
show menu ("Hint about what?", game.hint_list, false) {
switch (result) {
case ("null_hint") {
msg ("No hints are available")
}
case ("doormat_hint") {
msg (ScriptDictionaryItem (game.hint_dict,"doormat_hint"))
}
}
}
</whatever_the_verb_you_are_using>
</object>
<exit name="to_frontyard" to="frontyard" />
</object>
<object name="frontyard">
<inherit name="editor_room" />
<object name="doormat">
<inherit name="editor_object" />
<drop type="boolean">false</drop>
<displayverbs>Look at</displayverbs>
<pull type="script">
MakeObjectVisible (frontdoorkey)
msg ("You found a key under the doormat")
</pull>
<look type="script">
list add (game.hint_list, "doormat_hint")
msg ("Your guide has a new hint for you now")
</look>
</object>
<object name="frontdoorkey">
<inherit name="editor_object" />
<alias>key</alias>
<drop />
<take />
<visible type="boolean">false</visible>
</object>
<exit name="to_homeyard" to="homeyard" />
</object>
<turnscript name="game_turns">
<enabled />
<script>
if (frontdoorkey.parent = player) {
msg ("You've won the game!")
finish
}
game.turns = game.turns + 1
</script>
</turnscript>
<verb>
<property>hint</property>
<pattern>hint</pattern>
<defaultexpression>"You can't hint " + object.article + "."</defaultexpression>
</verb>
<function name="character_creation">
msg ("What is your name?")
get input {
player.alias = result
msg (" - " + player.alias)
show menu ("What is your gender?", split ("male;female",";"), false) {
player.gender = result
show menu ("What is your race?", split ("american;european;african;asian",";"), false) {
player.race = result
show menu ("What is your eye color?", split ("blue;green;hazel;amber;brown",";"), false) {
player.eye_color = result
show menu ("What is your hair color?", split ("yellow;orange;red;brown;black;grey;white",";"), false) {
player.hair_color = result
show menu ("What is your skin color?", split ("white;light;tan;dark;red;brown;black",";"), false) {
player.skin_color = result
show menu ("What is your maturity?", split ("adult;teen;child",";"), false) {
player.maturity = result
msg ("What is your age?")
get input {
player.age = result
msg (" - " + player.age)
msg (player.alias + " is a " + player.age + " year old " + player.gender + " " + player.race + " " + player.maturity + " with " + player.eye_color + " eyes, " + player.hair_color + " hair, and " + player.skin_color +" skin.")
wait {
ClearScreen
}
}
}
}
}
}
}
}
}
</function>
</asl>
HegemonKhan wrote:simple:
in your GUI mode, go to your character's verb tab, and add in the talk to or speak to (there's a button on the right for a pull down menu, it should ahve the talk to or speak to verb there, as I get confused which verb you use: talk, speak, talk to, or speak to) verb. You do this, so it creates the code line for you (for when you go into the code view mode).
now, go into your code view mode, and simply use my script block (you may need to adjust it slightly for use in your game) of my guide's ' hint ' script, for your character's (talk, speak, talk to, or speak to) verb coding.
HegemonKhan wrote:refresh and see my previous post, as I added in what the game code should look like, for what you want for your game.
P.S.
so... were you able to win my demo game?
(did you find and take the key?)
sgreig wrote:Not to hijack the thread or anything, but I just want to address the comment dwn made about Quest being for experienced programmers and scripters.
It's actually not the case. However, even though systems like Inform and Quest can abstract the syntax of a programming language to make it more palatable to people, at the end of the day you still have to learn how to think logically and methodically about how to accomplish what you want to do. That, in itself, is the real foundation of programming. Quest is designed to boil programming down to this bare essence so that new people have a lower barrier to entry to learning game logic, as they don't have to learn syntax on top of everything, but if you stick with it it's quite rewarding.
Alex wrote:Quest is a community effort. If there's anything you want to change, by all means suggest it - but if you have the time, all the code and documentation is there to be updated by anybody that wants to.
So, if something's not clear in the documentation, or you think something is missing, certainly ask a question about it - and when you find the answer, you can go straight in and update the documentation for everybody.
The wiki is at http://quest5.net/wiki/Main_Page and if you need an account, just ask (I've turned off the registration form as it gets hammered by spammers). All you need to do is email me with your desired username.