Custom object attributes in QuestJS/Quest 6

Howdy folks ---

I'm transitioning my WIP to Quest 6 to force myself to learn a bit of coding, but I can't figure out how to add trackable attributes to the objects like we have in Quest 5. I've read the wiki but it seems that attributes in Quest 6 are referring to something different than in Quest 5. What am I misunderstanding?

Also, is there a list of all the different dictionaries I can look at? How is one supposed to know all the different attributes/properties you can add to an object or room?

Thanks,

dubz


I think this is the wrong place for this.


Hello.

I'm transitioning my WIP to Quest 6 to force myself to learn a bit of coding

Err... You might not want to do that quite yet. Quest 6 is still being updated in game-breaking ways at the moment.

https://textadventures.co.uk/forum/questkit/topic/agsnxs3fwkkvtyugvi62bw/game-changing-updates-in-0-8


Don't get me wrong. If you just want to learn how to mess with it, it's fine right now. If you have a complete game to write right now, it's fine. I wouldn't start messing with a work in progress quite yet, though. You'd just be setting yourself up for extra work whenever Pixie updates the main code, which usually adds features you'd want while changing the way lots of other things work behind the scenes.


I can't figure out how to add trackable attributes to the objects like we have in Quest 5.

What do you mean by "trackable" attributes?

I've read the wiki but it seems that attributes in Quest 6 are referring to something different than in Quest 5. What am I misunderstanding?

I've used both Quest 5 and Quest 6, and I don't understand what you mean.

https://github.com/ThePix/QuestJS/wiki/Attributes-for-items

That shows the default attributes.

https://github.com/ThePix/QuestJS/wiki/NPCs:-Attributes

That one concerns the Non-Playable Characters' attributes.


Most of the default attribute names are different, but we can still easily add custom attributes to stuff. We just have to know Javascript to code them.


Also, is there a list of all the different dictionaries I can look at? How is one supposed to know all the different attributes/properties you can add to an object or room?

https://github.com/ThePix/QuestJS/wiki/Attributes-for-rooms

Besides the default attributes, we can whatever custom attributes we wish and write code to handle them.


Forgive me. I'm pretty sure I'm not understanding what you're wanting.

Quest 6 isn't even released yet, so there are only two or three of us who know anything about it. One of the others will presumably see this thread soon and add their two cents.


I think this is the wrong place for this.

We are unofficially using the QuestKit Forum for Quest 6 stuff, but it's not a big deal. A moderator will eventually move this thread to that forum, and all will be well in the land.


Happy gaming!


As KV says, Quest 6 is in a state of flux, but is certainly useable. I am hoping all the big changes have been done now, and plan to release version 0.8 over the weekend. I plan/hope to release version 1.0 (without an editor) at the end of September. So it is is useable, but be aware that occasional changes can impact your game.

An advantage of that is that it you stumble across a bug in Quest itself, it will get fixed a lot faster.

With regards to custom attributes, add any you want.

createRoom("lounge", {
  desc:"The lounge is boring, the author really needs to put stuff in it.",
  aCustomAttribute:14,
  anotherAttribute:"blue",
  anArrayAttribute:["yes", "no", "maybe"],
})

And you can add more whenever you want.

w.lounge.yetAnnother = 19

That said, array attributes will only get saved (i.e., when the user saves the game) if they are arrays of only numbers or arrays of only strings; and dictionary, object, function and regular expression attributes will not get saved at all.

If you are talking about change listeners, there is now a Wiki page about them here:
https://github.com/ThePix/QuestJS/wiki/Change-listeners

Make sure you use the most up-to-date files (not version 0.7), as before today's update, it was bugged and not saved.

If you are talking about stats attributes, see here:
https://github.com/ThePix/QuestJS/wiki/The-UI#status-attributes


This topic is now closed. Topics are closed after 14 days of inactivity.

Support

Forums