{"id":216,"date":"2012-05-25T19:05:25","date_gmt":"2012-05-25T17:05:25","guid":{"rendered":"https:\/\/herr-rau.de\/blogs\/inform\/?page_id=216"},"modified":"2012-06-17T08:02:06","modified_gmt":"2012-06-17T06:02:06","slug":"debugging-befehle","status":"publish","type":"page","link":"https:\/\/herr-rau.de\/blogs\/inform\/?page_id=216","title":{"rendered":"Debugging-Befehle"},"content":{"rendered":"<p>Einige Befehle k\u00f6nnen in der Regel nur in der Entwicklungsumgebung verwendet werden, nicht in fertigen Spielen.<\/p>\n<p>Dazu geh\u00f6ren: <code>showme<\/code> (an object), <code>gonear<\/code> (an object), <code>purloin<\/code> (an object), <code>tree<\/code> (optional: an object), <code>actions, rules, relations<\/code> und <code>test<\/code>.<\/p>\n<hr\/>\n<p><strong>Showme<\/strong>, gefolgt von einem Objektbezeichner. Dieser Befehl zeigt alle Attribute eines Objekts und deren Werte:<\/p>\n<blockquote><p><code>>showme red cap<br \/>\nred cap - thing<br \/>\nlocation: in the Family's House<br \/>\nsingular-named, improper-named; unlit, inedible, portable<br \/>\nprinted name: \"red cap\"<br \/>\nprinted plural name: none<br \/>\nindefinite article: none<br \/>\ndescription: \"The cap is made of velvet and very soft and very red. It is your favourite cap.\"<br \/>\ninitial appearance: none<br \/>\n<\/code><\/p><\/blockquote>\n<hr\/>\n<p><strong>Gonear<\/strong>, gefolgt von einem Objektbezeichner, bringt die Spielerfigur sofort in den Raum, in dem sich der Gegenstand befindet. <code>Gonear red cap.<\/code><\/p>\n<hr\/>\n<p><strong>Purloin<\/strong>, gefolgt von einem Objektbezeichner, f\u00fcgt den bezeichneten Gegenstand sofort ins Inventar der Spielerfigur ein, egal um was es sich handelt und wo es sich vorher befunden hat. <code>Purloin red cap.<\/code><\/p>\n<hr\/>\n<p><strong>Actions.<\/strong> Actions sind die Handlungen der Spielfigur, die durch die eingetippten Befehle (&#8220;commands&#8221;) des Spielers explizit oder implizit ausgel\u00f6st werden. Mit dem Befehl <code>actions<\/code> beziehungsweise <code>actions off<\/code> macht man die Aktionen sichtbar und erf\u00e4hrt, welche davon erfolgreich sind oder nicht und welche weiteren Aktionen sie nach sich ziehen:<\/p>\n<blockquote><p><code>>actions<br \/>\nActions listing on.<\/p>\n<p>>wear cap<br \/>\n[wearing the red cap]<br \/>\n(first taking the red cap)<br \/>\n[(1) taking the red cap - silently]<br \/>\n[(1) taking the red cap - silently - succeeded]<\/code><\/p>\n<p><code>You put on the red cap.<br \/>\n[wearing the red cap - succeeded]<\/code><\/p><\/blockquote>\n<p>Die eckigen Klammern beziehen sich auf die Aktionen und ihren Erfolg &#8211; erst versucht man die M\u00fctze zu nehmen (erfolgreich), dann sie aufzusetzen (ebenfalls erfolgreich).<\/p>\n<hr\/>\n<p><strong>Tree<\/strong> zeigt alle Objekte des Spiels und ihren aktuellen &#8220;Holder&#8221; &#8211; wenn eine Kiste im Schrank ist, und der Schrank in einem Zimmer, dann ist das Zimmer der Holder des Schranks und der Schrank der Holder der Kiste. Mit <code>tree<\/code>, gefolgt von einem Objektbezeichner erh\u00e4lt man nicht den gesamten Baum aller Objekte, sondern nur den Teilbaum vom genannten Objekt an:<\/p>\n<blockquote><p><code>>tree Cottage<br \/>\nCottage (58)<br \/>\n&nbsp;&nbsp;  an old table<br \/>\n&nbsp;&nbsp;  an ancient wardrobe (closed)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;    a cardboard box (closed)<br \/>\n&nbsp;&nbsp;  a bed<\/code>\n<\/p><\/blockquote>\n<hr\/>\n<p><strong>Relations<\/strong> zeigt alle Relationen, bis auf die g\u00e4ngigen Ist-in-, Ist-auf-, Wird-getragen-von-Relationen &#8211; also vor allem die selbst definierten Relationen.<\/p>\n<blockquote><p><code>>relations<br \/>\nLock-fitting relates one thing (called the matching key) to various things:<br \/>\n  The bronze key  >=>  the ancient wardrobe<br \/>\n<\/code>\n<\/p><\/blockquote>\n<hr\/>\n<p>Der Befehl <strong>rules<\/strong> (ausgeschaltet mit <code>rules off<\/code>) f\u00fchrt zur Ausgabe aller Regeln, die in Folge einer Spielerangabe \u00fcberpr\u00fcft werden (und die bestimmen, wie und ob sich die Welt sich aufgrund dieser Eingabe ver\u00e4ndert):<\/p>\n<blockquote><p><code>>rules<br \/>\nRules tracing now switched on. Type \"rules off\" to switch it off again, or \"rules all\" to include even rules which do not apply.<\/code><\/p>\n<p><code>>take cap<br \/>\n[Rule \"can't take yourself rule\" applies.]<br \/>\n[Rule \"can't take other people rule\" applies.]<br \/>\n[Rule \"can't take component parts rule\" applies.]<br \/>\n[Rule \"can't take people's possessions rule\" applies.]<br \/>\n[Rule \"can't take items out of play rule\" applies.]<br \/>\n[Rule \"can't take what you're inside rule\" applies.]<br \/>\n[Rule \"can't take what's already taken rule\" applies.]<br \/>\n[Rule \"can't take scenery rule\" applies.]<br \/>\n[Rule \"can only take things rule\" applies.]<br \/>\n[Rule \"can't take what's fixed in place rule\" applies.]<br \/>\n[Rule \"use player's holdall to avoid exceeding carrying capacity rule\" applies.]<br \/>\n[Rule \"can't exceed carrying capacity rule\" applies.]<br \/>\n[Rule \"standard taking rule\" applies.]<br \/>\n[Rule \"standard report taking rule\" applies.]<br \/>\nTaken.<br \/>\n<\/code><\/p><\/blockquote>\n<hr\/>\n<p>Mit dem Schl\u00fcsselwort <strong>test<\/strong>, gefolgt von einem Bezeichner und einem String mit nacheinander auszuf\u00fchrenden Befehlen, kann man eine Testroutine schreiben:<\/p>\n<pre class=\"brush: inform7; title: ; notranslate\" title=\"\">Test me with &quot;take cap \/ e  \/ e \/ s&quot;.<\/pre>\n<p>erm\u00f6glicht die Ausf\u00fchrung der Befehle durch den Aufruf von <code>test me<\/code>:<\/p>\n<blockquote><p><code>Family's House<br \/>\nA nice, comfortable house. It's very small, though.  The walls are decorated with bookshelves, and on one wall hangs a painting. A doorway leads to the east.<\/p>\n<p>You can see a red cap, a tasty cake, a bottle of wine and a little basket (empty) here.<\/p>\n<p>>test me<br \/>\n(Testing.)<\/p>\n<p>>[1] take cap<br \/>\nTaken.<\/p>\n<p>>[2] e<\/p>\n<p>Path<br \/>\nThis path leads from a house in the west to a forest in the east. The sun shines brightly, but dark shadows come from the forest.<\/p>\n<p>>[3] e<\/p>\n<p>Forest<br \/>\nA forest, dark in some places and lighter in others. Birds sing in the background, and butterflies fly around. You can go out of the forest if you go east, and a path goes south.<\/p>\n<p>A big bad wolf is standing casually in the middle of the path.<\/p>\n<p>>[4] s<\/p>\n<p>Meadow<br \/>\nA bright and shiny meadow in a clearing in the middle of the Forest. There are many beautiful flowers here. A path goes north.<\/p>\n<p>><\/code><\/p><\/blockquote>\n<hr\/>\n<p>Alle Debugging-Befehle, die kursiven noch nicht erkl\u00e4rt:<\/p>\n<ul>\n<li>Showme (Objektbezeichner)<\/li>\n<li>Actions\/actions off<\/li>\n<li>Rules\/rules off<\/li>\n<li>Tree (optional: Objektbezeichner)<\/li>\n<li>Relations<\/li>\n<li><em>Abstract<\/em> + Objektbezeichner + <em>to<\/em> Bezeichner von Objekt\/Raum<\/li>\n<li><em>Scenes\/scenes off<\/em><\/li>\n<li><em>Scope<\/em> (optional: Objektbezeichner)<\/li>\n<li>Test (+ Bezeichner + String von Befehlen)\n<li><em>Random<\/em><\/li>\n<li><em>Trace<\/em> + eine Zahl von 1 bis 5<\/li>\n<li><em>Showverb<\/em> + Verb<\/li>\n<li><em>Showheap<\/em><\/li>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Einige Befehle k\u00f6nnen in der Regel nur in der Entwicklungsumgebung verwendet werden, nicht in fertigen Spielen. Dazu geh\u00f6ren: showme (an object), gonear (an object), purloin (an object), tree (optional: an object), actions, rules, relations und test. Showme, gefolgt von einem &hellip; <a href=\"https:\/\/herr-rau.de\/blogs\/inform\/?page_id=216\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":145,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-216","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/pages\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=216"}],"version-history":[{"count":0,"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/pages\/216\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/pages\/145"}],"wp:attachment":[{"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}