Alex wrote: I may add a feature to read/write external files... it has been requested in the past. But what would you use it for? (Bear in mind that we want to have games that work when played online as well)
<script>
<![CDATA[
if (1 <> 2) {
msg ("values are not equal")
}
]]>
</script>
<object verbs="Look at/Eat/Take">apple</object>
Alex wrote:Yes you can do that - you can call the JavaScript ASLEvent function. At the moment the only way to embed a call to ASLEvent would be to embed your own HTML using the insert command (http://quest5.net/index.php?title=Insert) but we could easily add a syntax like your example.
Alex wrote:
But that would still not solve the problem of a simple way to embed the object's displayverbs, because you'd still need to list them explicitly to get them to be passed to the UI.
<a onclick="ASLEvent('someASLfunction', 'my parameter')">click this</a>
Do you mean this as a technical problem of Q5 or as a problem of the User in the editor?
Alex wrote:With the "insert" command, you can insert HTML like this:
<a onclick="ASLEvent('someASLfunction', 'my parameter')">click this</a>
This will call the ASL function "someASLfunction" with parameter "my parameter".
Alex wrote:
I mean as a problem for the user in the editor.
Alex wrote: I don't think there's any harm in leaving "start=false" explicitly - if you really want to remove it, you can go to the Attributes tab and delete it there.
Alex wrote:
(Also if you're using your own language template, I'd be very happy for contributions! The more languages we can ship with Quest, the better)
Alex wrote:How do other German text adventure games handle compass directions?
Alex wrote:But it might be nice to visually distinguish exits somehow, maybe with an icon in the tree.
Pertex wrote:
Now that beta1 is published, could I convince you to handle #623 in the near future?I am thinking of an game without the lines "You are in...", "You can see..." and "You can go...", only displaying the room- and the objects-descriptions.
if (LengthOf(val.description)>0 and val.alias <> "me" and val.description <> val.look) {
if (HasString(val, "description") and LengthOf(val.description)>0 and val <> player) {
Alex wrote:Very nice! I think this is a nice example of what I've been saying for a while about how easy it is to extend the Core libraries.
Alex wrote:Thirdly, I'm not sure why you're comparing the "look" and "description" properties there?
Alex wrote:Please let me know what you think!
<description><![CDATA[This is a <object verbs="look/take">window</object> .]] </description>
<control>
<controltype>multi</controltype>
<caption>Description</caption>
<attribute>description</attribute>
<types>
string=Text; script=Run script
</types>
<editors>
string=richtext
</editors>
<listwidth>150</listwidth>
<expand/>
</control>
<function name="ScopeVisible" type="objectlist">
return (ScopeVisibleNotHeld() + ScopeInventory())
</function>
<function name="ScopeVisible" type="objectlist">
return (ScopeVisibleForRoom(player.room))
</function>
<function name="ScopeVisibleForRoom" type="objectlist" parameters="room">
return (ScopeVisibleNotHeldForRoom(room) + ScopeInventory())
</function>
<function name="cmb_setAttrib" parameters="object,attrib,value">
if (cmb_chkObject(object)){
...
}
</function>Alex wrote:I'd like to set up an area for libraries, probably on the main textadventures.co.uk site. So please email me if you want to submit a library and I will add it to a new section.
<type name="maleplural">
<displayverbs type="list">[LookAt];[SpeakTo]</displayverbs>
<gender>[MalePluralGender]</gender>
<article>[MalePluralArticle]</article>
[b]<xtype>maleplural</xtype>[/b]
</type>
<command name="merken">
<pattern>merke #blabla#</pattern>
<script>
msg (blabla)
</script>
</command><!--Saved by Quest 5.0.4239.31339-->
<asl version="500">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="StringListTest">
<start type="script">
player.list_2 = NewStringList()
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
<list_1 type="list"></list_1>
</object>
</object>
<command name="test">
<pattern>test</pattern>
<script>
Test
</script>
</command>
<function name="Test">
msg ("count for list 1 is " + ListCount(player.list_1))
msg ("count for list 2 is " + ListCount(player.list_2))
msg ("first element of list 1 is " + StringListItem(player.list_1, 0) + ".")
</function>
</asl>
<library>
<template name="Test1">This is test 1</template>
<template name="Test2">This is test 2</template>
<command name="test1">
<pattern>test1</pattern>
<script>
msg ("[Test1]")
</script>
</command>
<command name="test2">
<pattern>test2</pattern>
<script>
msg (Template("Test2"))
</script>
</command>
</library><!--Saved by Quest 5.0.4239.31339-->
<asl version="500">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<include ref="Template Test_lib.aslx" />
<template name="Test1">This is test 1 again</template>
<template name="Test2">This is test 2 again</template>
<game name="Template Test" />
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
</object>
</object>
<walkthrough name="test">
<steps>
test1
test2
</steps>
</walkthrough>
</asl><unresolved>[BuyItemNotKnown]</unresolved>
<!--Saved by Quest 5.0.4239.31339-->
<asl version="500">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="create_exit_test" />
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
</object>
</object>
<object name="room2">
<inherit name="editor_room" />
<exit alias="east" to="room">
<inherit name="eastdirection" />
</exit>
</object>
<object name="room3">
<inherit name="editor_room" />
<exit alias="southeast" to="room">
<inherit name="southeastdirection" />
</exit>
</object>
<command name="create">
<pattern>create</pattern>
<script>
create exit ("northwest", room, room3)
create exit ("west", room, room2)
</script>
</command>
</asl><!--Saved by Quest 5.0.4259.15119-->
<asl version="500">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="FontSize">
<defaultfontsize type="int">11</defaultfontsize>
</game>
<object name="room">
<inherit name="editor_room" />
<description type="script">
SetFontSize (14)
msg ("My Title")
SetFontSize (game.defaultfontsize)
msg ("game.defaultfontsize = " + game.defaultfontsize)
</description>
<object name="player">
<inherit name="defaultplayer" />
</object>
</object>
</asl>
<command name="test">
<pattern type="string"><![CDATA[^(test|teste) (?<text>.*) ]]></pattern>
<script>
msg ("This is " +text)
</script>
</command>
pressKey
MoveObject (player, S1_Platz)
pressKey
MoveObject (player, S1_Garage)
pressKey
MoveObject (player, S1_Baracke)
foreach (x, ScopeInventory()) {
if (GetBoolean(x, "m_dontmove" )) {
MoveObject (x, GetObject (GetString (x,"m_parent" )))
}
}
pressKey
MoveObject (player, S1_Garage)
pressKey
MoveObject (player, S1_Platz)
pressKey
MoveObject (player, ort)
create exit ("Osten", S1_Office, H2_Officeinnen, "eastdirection")