Use this thread to ask Adventuron system related questions
I'm dabbling with a few ideas to get around the two-word limitation and still make the game feel rich and atmospheric, yet player friendly.
Let's say I have a road that goes north and south and a hotel off to the west. There are connections to the north and south, but no connection to the west. You can ENTER HOTEL to enter it and GO EAST (or E) to return from the hotel to the road. The latter is implemented using a oneway exit. So far, so good.
However, you can also EXAMINE HOTEL to discover that it is to the west. Once you know this, you can GO WEST (or W) to enter the hotel to save typing. This is implemented as follows:
: match "examine hotel" {
: if (is_present "hotel") {
: print "To west.";
: done;
}
}
: match "w _;enter hotel" {
: if (is_present "hotel") {
: goto "room_hotel";
: done;
}
}
Why is west being shown as an exit from the road when it doesn't have a connection defined? Is Adventuron parsing my match statements and determing that an exit west is possible and adding the exit when I don't want it shown? If so, can I prevent this? I only want exits shown when a connection is defined, not when it's in a match statement.
One technical question. Let's say that i write object definition as :
cat_lump : scenery "YELLOW FURBALL" msg = "SOME TEXT" ;
So "cat_lump" is just a tag identifier for object. But it seems the engine uses this when writing "get lump". When i write "get furball" or "get yellow" the engine does not recognize any of these two words. Then "YELLOW FURBALL" is just a description text visible in scene but it is not used by engine when parsing get/take commands?
As you have discovered, the object id consists of an (optional) adjective followed by a noun and it is preferable that these are the same as the object description, so "cat_lump" should be "yellow_furball". You can use the vocabulary{} block to define synonyms for furball. I'm sure Adventuron can explain this better than I can.
Yes, the text in the quotes is just narrative only.
The id of the object is a shorthand for the associated adjective and noun, but specifying explicit adjective and/or noun will override this behaviour.
You can also switch off this entity_id association in the game_settings {} section, but it is on by default, and I think it's a sensible default.
objects { noun : scenery "anytext"; adjective_noun : scenery "anytext"; anything_you_line : scenery "anytext" noun="lump" adjective ="yellow"; }
You can't specify multiple nouns or multiple adjectives per object, but you can create noun groups and adjective groups that the parser will automatically collect together:
vocabulary { : verb / aliases = [pet, stroke] : noun / aliases = [cat, creature, feline] : adjective / aliases = [yellow, golden] }
In the : match "" {} section, you can use any item in a noun group to match on, and it will treat it the same as any other member of the group. That is : match "stroke cat" {} is exactly the same as : match "stroke feline" {}, the player could type STROKE CAT, or STROKE FELINE, or PET CAT, or PET FELINE, and it both these match statement would match all 4 of these inputs.
If you want a completely different noun to represent the same object, but the noun is not a synonym, then you can also chain together nouns in match statements like this:
// You may not want to put "lump" as a synonym for cat, therefore you can just list it as a different match item
: match "stroke cat; stroke lump" { : print "Cat Purrs." }
I'll be using questions in this thread to bolster the documentation so thank you for reminding me I need to improve this.
I think it's a little bit confusing. I mean, the rules say "[...] sane responses to common inputs" and in my mind "pet brown cat" make more sence than "pet cat" with question "more specific?". And the problem is if player types "pet brown cat" the game will ask him "which one cat you want to pet?" anyway. As a player I think "what? I just told you which one! Why are you asking me again?".
I hope I clearly expressed my thought. Sorry if you confused, it's hard to write in English in the morning. It's not about the jam, it's about overall engine logic.
Adventuron is being upgraded to a proper entity matching system soon fully aware of the context of a noun referred to by a verb and how to disambiguate using natural language, but right now, it's a weak area.
All I can suggest is to try to find a way to give each cat an individual noun for now, or try to just call all cats, cats without an adjective at all, except in the examine message.
You can create multiple objects with the same noun like this:
cat_1 : object "a cat" treasure="true"; cat_2 : object "a cat" treasure="true"; cat_3 : object "a cat" treasure="true"; cat_4 : object "a cat" treasure="true";
I know this isn't ideal, and if I can upgrade the entity matching system before the end of the jam, I will. I'm about to set off on a long journey, so that's the best I can suggest for now unfortunately.
Ordinarily, you could say GET BROWN CAT or GET GREY CAT and Adventuron knows exactly which object you're talking about from the object ids brown_cat and grey_cat. If you just say GET CAT and only one is present, it knows to get that one. If you say GET CAT and both cats are present it prompts you for clarification and you have to enter 1 or 2. (Personally, I hate this mechanism, but that's just the way it is.)
Because of the two-word restriction in this jam, you must be able to do everything with two words (verb + noun), so you can't use three-word inputs (verb + adjective + noun). However, you can be a little more creative. I have a similar situation and the way I'm handling this is if you say GET CAT, it says "Which one?" You can then say GET BROWN or GET GREY. This is easily implemented with some clever match statements and appropriate tests.
In my case, the objects requiring disambiguation are in the same location. It gets a little more complicated if they can move around. In this case, you can say GET CAT and if there's only one cat present, then you get it. If there's two or more cats present, then you do what I described above.
I've erased everything already but try to reproduce. I've tried this (as you advised in the documentation thread):
: if (treasure_deposited() == treasure_total()) { : clear_screen hide_status_bar = "true" ; : print {(win_msg)}; : press_any_key; }
in the on_describe of treasure room. Maybe I put it in the wrong place.
Message is displaying, but after key press it going to standard screen with header. I can't get how to stop game here.
Vertsion 1.0.0. Beta 22
Ah, you want "win_game".
The standard treasure hunt mode will automatically wire up the win game, but as you chose "treasure_hunt_mode = bespoke", you have to use the win_game command yourself.
: if (treasure_deposited() == treasure_total()) { : clear_screen hide_status_bar = "true" ; : print {(win_msg)}; : win_game ; }
That's correct. treasure_hunt_mode applies to the whole game.
If you use default mode, it automatically determines the end of the game for you and prints the message in the all_treasures_found_win_game system message.
If you use bespoke mode, you have to determine the end of the game yourself. That's what Adventuron was describing. This is where you get the opportunity to clear the screen and remove the status bar.
Reading back through your thread, it looks like you want to clear the screen when the game is over. It's 2:00 a.m. here, so I haven't got time to solve your problem right now, but Adventuron did describe this in the documentation thread (the one that's now locked). He gave you two methods to do this. Can you please try this and get back to me if it doesn't work. Remember that the code he gave you goes into the on_tick{} block. If it doesn't work, post the whole of your on_tick{} block here.
I've tried as you described. Doesn't work.
on_tick { : set_integer var = "rnd_tick" {(random(count_descs))} ; : if (treasure_deposited() == treasure_total()) { : clear_screen hide_status_bar = "true" ; : print "You remember nothing, just have the feeling that this night was full of fear and adventure."; : win_game ; } }
And the result screen attached. I don't want the red header to be shown.
It looks like as soon as you print something, the status bar comes back. I'm not sure if this is by design or not. Unless Adventuron has a better solution, I think the best way to overcome your problem is to apply a new theme without a status bar before clearing the screen. Here is a complete game based on the treasure hunt example in the tutorial that does what you want.
start_at = treasure_room
treasure_room = treasure_room
start_theme = two
locations {
treasure_room : location "The treasure room";
tomb : location "A tomb";
}
connections {
from, direction, to = [
treasure_room, east, tomb,
]
}
objects {
lamp : object "a lamp" at = "tomb" treasure = "true";
}
game_settings {
treasure_hunt_mode = bespoke
}
on_tick {
: if (treasure_deposited() == treasure_total()) {
: set_theme "my_theme";
: clear_screen;
: print "You remember nothing. You just have the feeling that this night was full of fear and adventure.";
: win_game;
}
}
themes {
my_theme : theme {
extends = two
theme_settings {
layout = D X O
}
}
}
I'm using beta 22 and have capitalization = original in theme_settings{} and inventory_list_empty = "nothing" in system_messages{}. When I take an inventory at the start of the game (when the player is empty-handed), the list of carried items is displayed as "Nothing". The capitalisation setting is being ignored and the original string is being converted to sentence case. (This was confirmed by using other strings for test purposes.)
Incidentally, I have a lead-in phrase, so "nothing" is used for consistency with all the objects, which are also lower case.
Yes. sorry about that. I'll have to fix this more urgently given the problem it appears to be causing. If you want autocomplete to work for a theme that extends another theme, comment out "extends = two" in your theme.
The system messages, I'll have to document fully in the documentation too. Thanks for letting me know how much this has inconvenienced you, and I promise to correct this.
The system was aimed at beginner level programmers, so I kind of purposefully omitted any features (like theming) that would possibly intimidate beginner level coders. I still choose to omit this from the side-panel documentation, but I'm treating the html documentation as the advanced documentation. It's still a work in progress and sometimes I dump information in chapter 9 as it's required. I'll reword the structure and order of things and move them into their own chapters later. Understanding the pain points is useful to make sure that the documentation is there to remove them.
If you are using "extends = two", this suppresses some of the Ctrl+Space hints. This is a known bug that Adventuron will fix in a future build. It is mentioned in one of the other threads. If you temporarily comment out this line, you can see the Ctrl+Space hints for most (if not all) all of the pre-defined system messages. Once you've finished fiddling with the system messages, don't forget to uncomment "extends = two".
On the beta 27 version appears strange bug (or feature?). It waits for keypress after each print of room description when entering a room. After "refresh" ("look" command) it appears sometimes, but if you go from room -- it waits, and if you then return -- it waits again. It reproduces every time you go to another room.
Didn't test on the compiled game, just in editor.
UPD. And after key pressed description dissappears and keep empty until next "refresh" with "look".
I think it's kinda bug with autoredescribe.
Please check out the following post:
https://itch.io/jam/treasure-hunt/topic/691248/beta-27a-released-bugfix-release-...
Pay attention to the changes to the way that objects and exits are listed. If this behaviour does not suit your game, you can use a custom theme to re-assert your preferences (code snippet given in the post above).
Please check out the following post:
https://itch.io/jam/treasure-hunt/topic/691248/beta-27a-released-bugfix-release-...
Pay attention to the changes to the way that objects and exits are listed. If this behaviour does not suit your game, you can use a custom theme to re-assert your preferences (code snippet given in the post above).
My biggest lesson from this jam was that it is really hard to test your own game without the help of others. However one idea sprung to mind. How about having a setting that prompts the user if we can log the inputs that give a bad response. This way we could bulk fix this and focus the feedback on design problems. This is not a feature request I’m just curious of your take on this.
As of beta 31c, you can use layout
layout = SB + G D X O
+ = force add leading vertical padding (uses screen/paragraph_spacing_multiplier as the vertical padding amount). (off by default for graphics)
- = force remove trailing vertical padding (uses screen/paragraph_spacing_multiplier as the vertical padding amount). (on by default for graphics)
start_at = my_location
start_theme = my_theme locations {
my_location : location "You are in a room." graphic = "blue" ;
} themes {
my_theme : theme {
theme_settings {
layout = SB + G - D X O
}
status_bar {
: fixed_text "Left" ;
: fixed_text "Right" ;
}
screen {
paragraph_spacing_multiplier = 1
}
colors {
status_bar_paper = #fff
status_bar_pen = #000
}
}
} assets {
graphics {
blue : base64_png "iVBORw0KGgoAAAANSUhEUgAAAQAAAABQCAIAAAB56TxyAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADkSURBVHhe7dNBDQAwCACxOdsX8YhCyDWphb4/C1kCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCkCYAaQKQJgBpApAmAGkCEDZ7YUT2KK7hXcoAAAAASUVORK5CYII=";
}
}