|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Wed Dec 24, 2008 1:12 pm
[3.03] Updating room exits using %roomexit() not working |
I want to update the room exits on the mapper to reflect the actual exits in the room. I cannot get #call %roomexit(,..new exit string list...) to work. It retrieves, just won't update. I've tried adding the %roomkey() first argument...still does not work. I retrieved the room exits after making a change and they remained the same as before, so it's not a graphics update problem. I am in the mapper mode, not tracker, when I tried to make the changes.
Then it dawned on me that if I manually remove a room exit using the properties window, I get a confirm delete alert. So I'm assuming something won't let me update the exits carte blanche programmatically.
I don't remember having this extra confirm step in 2.37 on Vista, but the computer is nearly brand new and I may not have tried to do it there.
Is this a Vista thing? A feature that crept into the new mapper? Is anyone else having problems programmatically updating room exits?
Thanks |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Dec 24, 2008 2:28 pm |
Have you made sure that the mapper's in edit mode rather than follow mode? You can't update the map database, even with scripts, when the mapper's in follow mode.
|
|
|
|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Wed Dec 24, 2008 6:29 pm |
Correct. I meant edit mode when I was calling it 'mapper' mode. I was in edit mode.
|
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Wed Dec 24, 2008 8:38 pm |
It's kind of working here, for some value of working.
Steps:
Create an entirely new room with no exits, set it as the current room.
#call %roomexit(,"n|s")
#call %roomexit(,"e|w")
Room now has exits n|s|e|w.
You can repeat to get exits, for example, n|n|n|s|s|s|e|e|e|w|w|w...
Looks broken to me. |
|
|
|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Thu Dec 25, 2008 12:06 am |
I was trying to remove exits that were erroneously added to a room by the mapper.
Your demonstration is consistent with what I am seeing, gamma_ray. Instead of the room having exits east and west after your second call to roomexit (the e|w replacing the n|s), it is just adding the second pair to the first pair.
I was starting with a room that had every possible exit except In and Out and was trying to replace the original exits with a sub-set of those exits. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Dec 25, 2008 12:28 am |
You don't play Imperian do you? :/
|
|
|
|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Thu Dec 25, 2008 12:34 am |
How clairvoyant of you, gamma_ray!
I was trying to find a way to programmatically correct the starburst rooms I get when creating a new room. I've sent an external bug report to them to fix their ATCP blasts, but haven't heard anything yet. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Dec 25, 2008 12:43 am |
Have you actually fixed the problem temporarily client-side yet? You should be able to write a trigger that fires on the Room.Exits info over suboption 200 - you can then see if the exits string has every exit and if it doesn't, then #tag. Making a trigger for one of the ATCP elements should override CMUD's default behaviour for that element. Since what you call starburst rooms (I like that name btw :P) are extremely rare (I've never seen one), ignoring them shouldn't be an issue.
|
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Dec 25, 2008 12:57 am |
No, it's Imperian, they never fix anything, at most they'll send you a message back saying that they can't fix ATCP anyway since it's supposed to be in a section of the code that only the main IRE people can touch, but at the same time how is it broken for only Imperian?
And seriously, Imperian has broken ATCP.
Quote: |
| H:323 M:399 E:1516 W:1996 <eb> w
0.0035 | w
0.1118 | Telnet 200: Room.Brief An underground tunnel (road)
0.0002 | Telnet 200: Room.Exits n,ne,e,se,s,sw,w,nw,u,d,i,o
0.0001 | Telnet 200: Room.Brief An underground tunnel
0.0001 | Telnet 200: Room.Exits e,w
0.0001 | Telnet 200: Char.Vitals<LF>H:3556/3556 M:4392/4612 E:16678/16680 W:21960/21960 NL:16/100
0.0321 |
0.0003 | An underground tunnel. (road).
0.0004 | An obsidian eye sigil is here. A sigil in the shape of a small, rectangular
0.0004 | monolith is on the ground.
0.0003 | You see exits leading east and west.
0.0004 | H:323 M:399 E:1516 W:1996
0.5057 | H:323 M:399 E:1516 W:1996 <eb> w
0.0017 | w
0.1082 | Telnet 200: Room.Brief A dark tunnel (road)
0.0003 | Telnet 200: Room.Exits n,ne,e,se,s,sw,w,nw,u,d,i,o
0.0002 | Telnet 200: Room.Brief A dark tunnel
0.0001 | Telnet 200: Room.Exits e,w
0.0001 | Telnet 200: Char.Vitals<LF>H:3556/3556 M:4392/4612 E:16676/16680 W:21960/21960 NL:16/100
0.0389 |
0.0003 | A dark tunnel. (road).
0.0004 | An obsidian eye sigil is here. A sigil in the shape of a small, rectangular
0.0004 | monolith is on the ground.
0.0004 | You see exits leading east and west.
0.0004 | H:323 M:399 E:1516 W:1996
0.4734 | H:323 M:399 E:1516 W:1996 <eb> w
0.0017 | w
0.1097 | Telnet 200: Room.Brief Continuing into darkness (road)
0.0003 | Telnet 200: Room.Exits n,ne,e,se,s,sw,w,nw,u,d,i,o
0.0002 | Telnet 200: Room.Brief Continuing into darkness
0.0001 | Telnet 200: Room.Exits e,w
0.0001 | Telnet 200: Char.Vitals<LF>H:3556/3556 M:4392/4612 E:16674/16680 W:21960/21960 NL:16/100
0.0357 |
0.0003 | Continuing into darkness. (road).
0.0004 | An obsidian eye sigil is here. A runic totem is planted solidly in the ground.
0.0004 | A sigil in the shape of a small, rectangular monolith is on the ground.
0.0004 | You see exits leading east and west.
0.0004 | H:323 M:399 E:1515 W:1996
0.5081 | H:323 M:399 E:1515 W:1996 <eb> |
That's just walking through a normal series of rooms which all have east and west exits only.
The major problem is that #tag isn't overriding CMud, so setting up a tag for only the correct ones doesn't prevent it from taking the incorrect ones, too. |
|
|
|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Thu Dec 25, 2008 1:03 am |
I hadn't tried to #tag the second Room.Exits, but it sounds like gamma_ray has pursued that track.
If I could update the room exits, then I could attempt to fix the problem another way. I was experimenting with that approach when I noticed that I was unable to programmatically change the exits, hence this topic. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Dec 25, 2008 1:27 am |
You could try overriding ATCP entirely. I'm too exhausted/angry to do it at the moment, but it might work.
I did have something working once, but I got annoyed with how kludgy it was so I tried to re-write it and now nothing works again...blah. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Dec 25, 2008 2:02 am |
Have you reconfigured the mapper since you set up your #tag trigger? You need to to make sure the mapper's aware of the new triggers - someone else had a similar problem the other day that was caused by this. Once you have something triggering on Room.Exits CMUD should stop doing it on its own - if it's not, make a separate thread for that bug report.
|
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Dec 25, 2008 3:04 am |
Yeah, I reconfigured. And then I created a new map and a new set of triggers and did that one really carefully and configured it all once it was done. And so on and so forth. It's just a huge headache.
|
|
|
|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Thu Dec 25, 2008 3:12 am |
So what you are saying Fang is that if I can recognize the second Room.Exits and tag it for the mapper, the mapper should stop trying to figure things out another way. I'll give it a try. And I will remember to reconfigure after I create the tag.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Dec 25, 2008 11:24 am |
Mmm. The basic idea is going to be:
#trig {Room.Exit (*)} {#if (%1!="n,ne,e,se,s,sw,w,nw,u,d,i,o") {#tag exit %replace(%1,",","|")} "" {telnet|param=200}
But I've not tested that. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Dec 25, 2008 12:23 pm |
Got it.
Code: |
#if (%1 != "n,ne,e,se,s,sw,w,nw,u,d,i,o") {
$temp = %subchar( %1, ",", "|")
$temp = %replace( $temp, "i", "in")
$temp = %replace( $temp, "o", "out")
room.exits = $temp
}
#tag exits @room.exits |
works
Code: |
#if (%1 != "n,ne,e,se,s,sw,w,nw,u,d,i,o") {
$temp = %subchar( %1, ",", "|")
$temp = %replace( $temp, "i", "in")
$temp = %replace( $temp, "o", "out")
room.exits = $temp
#tag exits @room.exits
} |
fails horribly.
I would really, really like an option in the mapper to force it to rely on tag for whatever you want to force... just a list of checkboxes, "Use only #tag data for: [ ] name, [ ] exits, ..." |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Dec 25, 2008 12:34 pm |
New problem: now it's getting extra exits, because the first line (the bogus exits line) is getting replaced with the exits from the previous room, so it's adding those to the exits for this room.
Obvious solution is:
Code: |
#if (%1 != "n,ne,e,se,s,sw,w,nw,u,d,i,o") {
$temp = %subchar( %1, ",", "|")
$temp = %replace( $temp, "i", "in")
$temp = %replace( $temp, "o", "out")
room.exits = $temp
} {room.exits = %null}
#tag exits @room.exits |
but then (oh, Imperian, why are you so broken?) #look refuses to work, because it gets this:
Quote: |
0.0032 | ql
0.1099 | Telnet 200: Room.Brief The edge of the Khandava Council
0.0006 | Telnet 200: Room.Exits n,ne,e,se,s,sw,w,nw,u,d,i,o
0.0002 | Telnet 200: Char.Vitals<LF>H:3360/3556 M:4612/4612 E:16680/16680 W:17724/21960 NL:19/100
0.0365 |
0.0002 | The edge of the Khandava Council.
0.0004 | Rising up from the fertile earth, a flourishing rowan sapling thrusts itself
0.0003 | towards the sun. A statue of lovely dryad, holding a sapling like a treasure,
0.0003 | stands here in a silent vigil. An obsidian eye sigil is here. A giant stone
0.0003 | statue of a glowing eyed fell beast rests on an oval dais. A sigil in the shape
0.0025 | of a small, rectangular monolith is on the ground. A Lycaean seer is manning a
0.0003 | bolt thrower here. He has forty-nine bolts.
0.0002 | You see exits leading north and northwest. |
and says that it sees no exits. Grr. We really also need a kind of within lines trigger for telnet triggers, so that we can discriminate between a set of two exit lines and only one... bah. Humbug. |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Thu Dec 25, 2008 3:01 pm |
I'm going to say this is an Imperian thing, because Achaea isn't like this.
|
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Thu Dec 25, 2008 3:27 pm |
Sorry if I'm completely off here but why not make an ansi trigger for exits?
That's how I've mapped both exits and room name (both in Achaea and Lusternia), and haven't had
any problem as of yet (likely descriptions are messier but I couldn't really care enough about them).
I did the two triggers, re-configured the map and everything worked just the way it should.
I mean, it should work for Imperian, shouldn't it? It's not like exit line itself is being shown twice, it's just ATCP. |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Dec 25, 2008 4:44 pm |
Gamma_ray: the new mapper AI, when it's written, is going to be smarter about understanding #tag.
And you should be able to use telnet triggers as multistate triggers just like you can all the other kinds... give it a go. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Dec 25, 2008 4:44 pm |
Yes, it is an Imperian thing, I tested other IRE games and they're fine.
And yeah, I could go back to the old ZMud way. If I really had to. But then I couldn't complain as much about Imperian. |
|
|
|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Thu Dec 25, 2008 4:53 pm |
I've tried gamma's and Fang's suggestions. I no longer get the starburst but the results are still not right. I'll tinker around some more
I don't want to lose track of the original topic:
#call %roomexit(,exit_list) does not update the room exits as advertised. As gamma_ray demonstrated, it seems to add to, not replace. Which doesn't help with the all-inclusive starburst. I am checking while I'm in the mapping/edit mode.
As a corollary, does a manual delete of an exit have to bring up a confirm delete dialogue? It didn't use to be that way.
I think this is a bug, or I'm misreading the Help text. Thanks for all the help and advice. |
|
|
|
|
|
|
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
|
|