|
tgrunwald Newbie
Joined: 07 Apr 2010 Posts: 7
|
Posted: Wed Apr 07, 2010 1:58 pm
Automapper help - Medievia -PARTIALLY SOLVED - Request more assistance |
I have been trying numerous ways to get the Automapper configured for Medievia. This is my first attempt at posting here on Zuggsoft.com, so please be nice :)
I have looked through all the forums and cannot find an answer or anyone who has attempted to configure the automapper to work for medievia. So if I may, i would like to post a few outputs here and see if someone can help me with this. One problem is that medievia uses its own map that displays. sometimes the Room name is IN the map, but if the room name is longer than the map then it is outside the map. This has created quite a problem for me.
Code: |
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³±±±±±±±ººBºº²²ùùº ºè±±±³
³ÍÍ»±ÉÍͼº±ºº²ÉÍͼ º±±±±³
³Íͼ±ºÚÄļ°È¼°È¼°ÈÍÍ»º±±±±³
³±±±±º³è °°°°°°°°°±Pºº±±±±³
³±ÉÍͼÀÄÄ»°°°°°°°ÉÍͼº±ÉÍͳ
³²ÈÍÍͼ²È¼°°°°ÈÍÍͼ²È¼²³
³²²²²²²²²°°°ê°°°²²²²²²²²³
³²É»²ÉÍÍÍ»°°°°É»²É»²É»²³
³Íͼ±ºÉÍͼ°°°°°°°Èºùººùº¼±³
³±±±±ººP±°°°°°°°°°ºùººùº±±³
³ÍÉ»±ºÈÍÍ»°É»°É»°ÉÈͼÈͼÍͳ
³ º±ÈÍÍ»ÉÍͼ²Èº±º ³
³ º±±±±ººùù²²²º^º ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
The City of Medievia - Castle Square
Heavy slabs of stone have been perfectly aligned to give a solid and even
surface for the citizens of this city. Rumor has it that all the traffic of the
world passes through this courtyard at one time or another, and this, the
center, is the best place to watch it. Never still, at any time of day or
night, the courtyard is a consistent bustle of activity. Standing in the shadow
of Castle Medievia, floating high above, posts bearing magically glowing globes
have been erected to bring light to the eternal dark. Stone steps lead upwards
to the castle far above, unsupported by anything physical yet sturdy enough to
take the weight of many travelers. To one side stands a simple stone arch,
unattached to anything but noticeable from the shimmering in the air within the
arch itself. A steady stream of people appear to be walking to this arch,
walking through and fading from view. Just as frequently, people solidify from
air on the other side, pausing and then going about their business. There is a
FAQ posted on a nearby wall that you should read. (Type LOOK FAQ)
There appears to be a big chunk of the sun lying here.
A feather lies here in the dirt.
(3) There is a bright ball of light on the ground here.
A large fountain gurgles out an endless stream of water.
Nuelox the Great Patriarch is resting here. (Blue Aura)
(HERO)(TRAVELER)Duchess Aeriada willing slave to the Templars is here.
An Appaloosa belonging to Zocuten, tethered to a post, is resting here.
An Appaloosa is standing here, watching you suspiciously.
An Appaloosa is resting here.
Obvious exits:
North - The Main Courtyard of Medievia
East - The Main Courtyard of Medievia
South - The Main Courtyard of Medievia
West - The Main Courtyard of Medievia
Up - The Castle Stairs
|
The above is an example of the room name being displayed outside the map.
Code: |
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ºùù²²²ùùº ºè±±±³
³ ÈÍÍ»²ÉÍͼ º±±±±³
³ÍÍÍÍÍÍÍ»ÃÃü²ÈÍÍ» º±±±±³
³±±±±±±±ºÃ±±²²²±¬º ºè±±±³
³±±±±±±±ºÃ±Ã»²ÉÍͼ º±±±±³
³±±±±±±±ºÃ±Ãº²ÈÍÍ» º±±±±³
³±±±±±±±ºÃHúê²ùùº ºè±±±³
³ÍÍ»±ÉÍͼÃÃú²ÉÍͼ º±±±±³
³Íͼ±ºÚÄļ°È¼°È¼°ÈÍÍ»º±±±±³
³±±±±º³è °°°°°°°°°±Pºº±±±±³
³±ÉÍͼÀÄÄ»°°°°°°°ÉÍͼº±ÉÍͳ
³²ÈÍÍͼ²È¼°°°°ÈÍÍͼ²È¼²³
³²²²²²²²²°°°ô°°°²²²²²²²²³
ÀÄÄÄ´Windstrider RoadÃÄÄÄÄÙ
The granite paving of the courtyard has been extended onto this road, the slabs
having been perfectly aligned to make a good, even surface. The walkways are
somewhat narrower than the ideal would have been, for the many citizens and
adventurers walking along them are crowded together in jostling masses. The
light is dim here, for the shadow of Medievia Castle extends slightly past the
courtyard itself.
A piece of paper lies here softly blowing in the breeze.
Obvious exits:
North - Windstrider Road, South of a Bridge
East - The Chambers of the Ancient Council
South - The Main Courtyard of Medievia
|
This is the Room name being displayed inside the map.
This is my prompt:
Code: |
[LPK][sfilmpqvw] <1051/1051hp 1071/1071m 610/610mv 100br -r>
|
This is the code I have so far for the mapper:
Code: |
<class name="AutomapperAll" initenable="true" id="2463">
<alias name="checkroom" id="2464">
<value>#IF (@InRoom) {#IF (@RoomExits) {#TAG name,descpara,exit {@RoomName} {@RoomDesc} {@RoomExits};#VAR RoomLook 0};#IF (!@RoomLook) {#VARIABLE InRoom 0;#STATE "roomname" 0;#VARIABLE RoomDesc %null;#VARIABLE RoomExits %null}}</value>
</alias>
<alias name="RoomLook" id="2465">
<value>#VAR RoomLook 1;look;exits</value>
</alias>
<var name="InRoom" id="2466">0</var>
<var name="RoomName" id="2467">%t1</var>
<var name="RoomDesc" id="2468"/>
<var name="RoomExits" id="2469"/>
<var name="RoomLook" id="2470">0</var>
<trigger name="roomname" priority="23520" ansi="true" id="2471">
<pattern>^[1;33m([%a%p'])[0m$</pattern>
<value>#VARIABLE InRoom 1
</value>
<trigger>
<pattern>Obvious exits:</pattern>
<value>#VARIABLE RoomName %stripansi( "%t1");#OK</value>
</trigger>
<trigger type="Manual">
<pattern>({North|South|East|West|Up|Down})%s- *</pattern>
<value>#VARIABLE RoomExits %trim( %concat( @RoomExits, " ", %1))</value>
</trigger>
</trigger>
<trigger name="roomdesc" priority="23550" ansi="true" id="2474">
<pattern>^[1;35m([%a%p'])[0m$</pattern>
<value>#IF (@InRoom) {#IF (@RoomDesc) {#VARIABLE RoomDesc %concat( @RoomDesc, %crlf, %stripansi( "%1"))} {#VARIABLE RoomDesc %stripansi( "%1")}}
</value>
</trigger>
<trigger priority="23560" id="2475">
<pattern>You collapse, totally out of breath!</pattern>
<value>#ALARM +1 {#STEP}</value>
</trigger>
<trigger priority="23570" id="2476">
<pattern>You have to stand up before you can do that.</pattern>
<value>#STEP</value>
</trigger>
</class>
|
The problems now are that it does not properly create the room name...it is always my prompt. And also it does not properly create the exits.
Can anyone help? |
|
Last edited by tgrunwald on Thu Apr 08, 2010 7:50 pm; edited 2 times in total |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Apr 07, 2010 4:55 pm |
One bug I see is that in a couple places you have quote around %1 and around %t1. Remove those quotes--"%1" means literally a percent sign and a numeral 1. Since that bug is in the roomdesc trigger, that might be your main problem.
I don't see where you execute the checkroom alias. Since that is where the #TAG command is, the mapper won't learn the values until checkroom is run.
I assume you know that every time you change these triggers and aliases, you will have to re-configure the mapper, to be sure it catches your changes? |
|
|
|
tgrunwald Newbie
Joined: 07 Apr 2010 Posts: 7
|
Posted: Wed Apr 07, 2010 7:29 pm |
You are right, I left that out. I call checkroom from my prompt trigger. Here it is:
Code: |
#TRIGGER {~[(%w)]~[&9] <%n/%nhp %n/%nm %n/%n} {#VAR RoomPK {%1};#IF (%defined( checkroom)) {checkroom};#IF (!@RoomLook) {#TAG prompt}} "" {nocr|prompt}
#VAR RoomPK {LPK}
|
I also removed the "" around %1 still to no avail.
Here is the whole code I have again:
Code: |
<class name="AutomapperAll" initenable="true" id="2463">
<alias name="checkroom" id="2464">
<value>#IF (@InRoom) {#IF (@RoomExits) {#TAG name,descpara,exit {@RoomName} {@RoomDesc} {@RoomExits};#VAR RoomLook 0};#IF (!@RoomLook) {#VARIABLE InRoom 0;#STATE "roomname" 0;#VARIABLE RoomDesc %null;#VARIABLE RoomExits %null}}</value>
</alias>
<alias name="RoomLook" id="2465">
<value>#VAR RoomLook 1;look;exits</value>
</alias>
<var name="InRoom" id="2466">0</var>
<var name="RoomName" id="2467">%t1</var>
<var name="RoomDesc" id="2468"/>
<var name="RoomExits" id="2469"/>
<var name="RoomLook" id="2470">0</var>
<trigger name="roomname" priority="23520" ansi="true" id="2471">
<pattern>^[1;33m([%a%p'])[0m$</pattern>
<value>#VARIABLE InRoom 1</value>
<trigger>
<pattern>Obvious exits:</pattern>
<value>#VARIABLE RoomName %stripansi( %t1);#OK</value>
</trigger>
<trigger type="Manual">
<pattern>({North|South|East|West|Up|Down})%s- *</pattern>
<value>#VARIABLE RoomExits %trim( %concat( @RoomExits, " ", %1))</value>
</trigger>
</trigger>
<trigger name="roomdesc" priority="23550" ansi="true" id="2474">
<pattern>^[1;35m([%a%p'])[0m$</pattern>
<value>#IF (@InRoom) {#IF (@RoomDesc) {#VARIABLE RoomDesc %concat( @RoomDesc, %crlf, %stripansi( %1))} {#VARIABLE RoomDesc %stripansi( %1)}}</value>
</trigger>
<trigger priority="23560" id="2475">
<pattern>You collapse, totally out of breath!</pattern>
<value>#ALARM +1 {#STEP}</value>
</trigger>
<trigger priority="23570" id="2476">
<pattern>You have to stand up before you can do that.</pattern>
<value>#STEP</value>
</trigger>
<event event="OnRoomCreate" priority="24790" id="2479">
<value>#IF (@RoomPK = "") {#NOOP %roomcol( ,white)};#IF (@RoomPK = "NPK") {#NOOP %roomcol( ,yellow)};#IF (@RoomPK = "CPK") {#NOOP %roomcol( ,red)}</value>
</event>
<event event="OnRoomEnter" enabled="false" id="2480">
<value>#WAIT 200
#IF (@RoomPK = "") {#NOOP %roomcol( ,white)};#IF (@RoomPK = "NPK") {#NOOP %roomcol( ,yellow)};#IF (@RoomPK = "CPK") {#NOOP %roomcol( ,red)}</value>
</event>
<trigger priority="24820" newline="false" prompt="true" id="2482">
<pattern>~[(%w)]~[&9] <%n/%nhp %n/%nm %n/%n</pattern>
<value>#VAR RoomPK {%1};#IF (%defined( checkroom)) {checkroom};#IF (!@RoomLook) {#TAG prompt}</value>
</trigger>
</class> |
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Apr 08, 2010 4:44 pm |
You had some bad characters in your XML. In four places, you had a literal ESC character, instead of a %e, and in one place you had a < rather than a %lt. I had to change those before I could even save it on a blank session. Here is the changed XML; see if this works:
Code: |
<class name="AutomapperAll" initenable="true" id="18">
<alias name="checkroom" id="19">
<value>#IF (@InRoom) {#IF (@RoomExits) {#TAG name,descpara,exit {@RoomName} {@RoomDesc} {@RoomExits};#VAR RoomLook 0};#IF (!@RoomLook) {#VARIABLE InRoom 0;#STATE "roomname" 0;#VARIABLE RoomDesc %null;#VARIABLE RoomExits %null}}</value>
</alias>
<alias name="RoomLook" id="20">
<value>#VAR RoomLook 1;look;exits</value>
</alias>
<var name="InRoom" id="21">0</var>
<var name="RoomName" id="22">%t1</var>
<var name="RoomDesc" id="23"/>
<var name="RoomExits" id="24"/>
<var name="RoomLook" id="25">0</var>
<trigger name="roomname" priority="23520" ansi="true" id="26">
<pattern>^%e[1;33m([%a%p'])%e[0m$</pattern>
<value>#VARIABLE InRoom 1</value>
<trigger>
<pattern>Obvious exits:</pattern>
<value>#VARIABLE RoomName %stripansi( %t1);#OK</value>
</trigger>
<trigger type="Manual">
<pattern>({North|South|East|West|Up|Down})%s- *</pattern>
<value>#VARIABLE RoomExits %trim( %concat( @RoomExits, " ", %1))</value>
</trigger>
</trigger>
<trigger name="roomdesc" priority="23550" ansi="true" id="29">
<pattern>^%e[1;35m([%a%p'])%e[0m$</pattern>
<value>#IF (@InRoom) {#IF (@RoomDesc) {#VARIABLE RoomDesc %concat( @RoomDesc, %crlf, %stripansi( %1))} {#VARIABLE RoomDesc %stripansi( %1)}}</value>
</trigger>
<trigger priority="23560" id="30">
<pattern>You collapse, totally out of breath!</pattern>
<value>#ALARM +1 {#STEP}</value>
</trigger>
<trigger priority="23570" id="31">
<pattern>You have to stand up before you can do that.</pattern>
<value>#STEP</value>
</trigger>
<event event="OnRoomCreate" priority="24790" id="32">
<value>#IF (@RoomPK = "") {#NOOP %roomcol( ,white)};#IF (@RoomPK = "NPK") {#NOOP %roomcol( ,yellow)};#IF (@RoomPK = "CPK") {#NOOP %roomcol( ,red)}</value>
</event>
<event event="OnRoomEnter" enabled="false" id="33">
<value>#WAIT 200
#IF (@RoomPK = "") {#NOOP %roomcol( ,white)};#IF (@RoomPK = "NPK") {#NOOP %roomcol( ,yellow)};#IF (@RoomPK = "CPK") {#NOOP %roomcol( ,red)}</value>
</event>
<trigger priority="24820" newline="false" prompt="true" id="34">
<pattern>~[(%w)]~[&9] %lt%n/%nhp %n/%nm %n/%n</pattern>
<value>#VAR RoomPK {%1};#IF (%defined( checkroom)) {checkroom};#IF (!@RoomLook) {#TAG prompt}</value>
</trigger>
</class>
|
|
|
|
|
tgrunwald Newbie
Joined: 07 Apr 2010 Posts: 7
|
Posted: Thu Apr 08, 2010 6:42 pm |
OK that solved it. I greatly appreciate your assistance.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|