Hello,
I've an other question : are there a liste for functions for items / rooms ?
Example : openMsg() or / onOpen()
Thanks per advance.
Best regards
Hello.
This should help:
https://github.com/ThePix/QuestJS/wiki/Tutorial-2:-Rooms-and-exits#scripts
Also, these are all the properties on my game's first room:
0: "name"
1: "pronouns"
2: "isAtLoc"
3: "isHere"
4: "isHeld"
5: "isHereOrHeld"
6: "countAtLoc"
7: "scopeSnapshot"
8: "canReachThrough"
9: "canSeeThrough"
10: "itemTaken"
11: "itemDropped"
12: "canTalkPlayer"
13: "getExits"
14: "hasExit"
15: "getWorn"
16: "moveToFrom"
17: "postLoad"
18: "templatePostLoad"
19: "preSave"
20: "templatePreSave"
21: "getSaveString"
22: "eventActive"
23: "eventCountdown"
24: "eventIsActive"
25: "doEvent"
26: "room"
27: "beforeEnter"
28: "beforeFirstEnter"
29: "afterEnter"
30: "afterEnterIf"
31: "afterEnterIfFlags"
32: "afterFirstEnter"
33: "onExit"
34: "visited"
35: "lightSource"
36: "description"
37: "examine"
38: "darkDescription"
39: "getContents"
40: "getRandomExit"
41: "findExit"
42: "setExitLock"
43: "setExitHide"
44: "getReverseExit"
45: "desc"
46: "up"
47: "alias"
48: "listalias"
49: "getListAlias"
50: "pluralAlias"
51: "verbFunctions"
52: "nameModifierFunctions"
53: "scopeStatusForRoom"
54: "scopeStatus"
55: "backgroundNames"
To get that list, I made a function:
function listItemAtts(obj){
var keys = Object.keys(obj);
var txt = '';
var a = 0;
for (var key in keys) {
txt+=a.toString() + ": " + keys[a]+"<br/>";
a++;
}
msg(obj.name + " PROPERTIES:");
msg(txt);
return keys;
};
With the function in my code, I just opened the browser's console and entered listItemAtts(w.cellar)
.
(My room's name is "cellar".)
You could also code your game to call the function. I just felt it would be easier (and faster) to call it from the console.
Oh thank you very much. :)
I've a last question about language items :
{nv:char:put:true}
It's defined where ? Because in French Language, when we wear an equipment, we say : "Nous enfilons".
Umm....
Does this help?
https://github.com/ThePix/QuestJS/wiki/The-Language-File#language-constructs
I honestly don't know how that stuff works.
If that link doesn't help, The Pixie will probably see this thread and help you out soon!
{nv:char:put:true}
It is a text processor directive, that says we want a noun-verb, using the noun "char" is set to, the verb "put" and we want a capital at the start. This is defined in _text.js, and discussed here:
https://github.com/ThePix/QuestJS/wiki/The-Text-Processor#cj-nv-and-pv
It uses lang.nounVerb (in lang-en.js), so to make it work in French, you need your own version of that (and in theory, you should not need to change the text processor). That is discussed here:
https://github.com/ThePix/QuestJS/wiki/The-Language-File#conjugating