Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ MUSHclient triggers disappearing
MUSHclient triggers disappearing
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Cedron
(5 posts) Bio
|
Date
| Mon 07 Jul 2014 08:00 PM (UTC) |
Message
| I'm revisiting an old mud I haven't played since '95-97, armagedon, and I'm getting a weird bug I've never seen before. This mud is monochrome, so I'm using triggers to add some color to text I deem important.
The issue seems to be the sheer number of triggers I'm using, as when I log off and quit out of mushclient I seem to lose triggers the next time I play. For an example, the door guard at the local bar was no longer text colored. And he was among the first that I created a trigger for way back when I started replaying this mud.
So far I've not been able to tell if its a First In First Out (lost trigger) event, or if its random which trigger is lost. What I am doing is creating a default trigger named 'aaaaa' for example, for each of the different coloring groups that I want. Then when I start the game and run into new things I want to color, I'll duplicate that default a few times so all I need to do at that point is copy and paste in the text I want to replace that placeholder.
It makes it simpler for me, but apparently its creating issues for the game client. When I had 3 or 5 aaaaa triggers for each group when I closed out for the day and then logged in the next time it was reduced to just one instance of aaaaa for each group I thought nothing of it, until I started running into NPCs and room text where I had been before that had lost its coloring.
So my question being, is this a bug? Mushclient 4.84 Or is there a limit on the sheer number of triggers I can have at one time? This is the first time I've had around 100 triggers for any mud ever.
Thanks guys. Happy gaming. | Top |
|
Posted by
| Fiendish
USA (2,535 posts) Bio
Global Moderator |
Date
| Reply #1 on Mon 07 Jul 2014 08:10 PM (UTC) |
Message
| Please show us your world file in its entirety so that we can better understand what it is that you are doing. Make sure to remove any stored login credentials first. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Cedron
(5 posts) Bio
|
Date
| Reply #2 on Mon 07 Jul 2014 08:17 PM (UTC) |
Message
| This will be my first time doing this. How would I do this? | Top |
|
Posted by
| Fiendish
USA (2,535 posts) Bio
Global Moderator |
Date
| Reply #3 on Mon 07 Jul 2014 08:43 PM (UTC) Amended on Mon 07 Jul 2014 08:44 PM (UTC) by Fiendish
|
Message
| You can use a website like pastebin to share large amounts of text.
Just open up the .mcl file that you're using (in MUSHclient\worlds) with a text editor like Notepad, and then copy+paste the contents of the file into pastebin. Make sure that you remove any stored login/password information. Then you can share the pastebin link with us here. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #4 on Mon 07 Jul 2014 08:57 PM (UTC) Amended on Mon 07 Jul 2014 09:06 PM (UTC) by Nick Gammon
|
Message
| The latest version (4.92) is released here:
http://www.gammon.com.au/forum/?id=12431
However there has never been a bug such as you describe. You should be able to have thousands of triggers.
I am wondering if the game file is being saved after you add the triggers.
In the world configuration there is an Info tab (General -> Info). That shows the count of triggers. You should be able to add a trigger and see that go up.
Also on the triggers list tab there is a count of the number of triggers.
You should also be able to save the world, close it, re-open it, and see the extra trigger still. Please confirm this is working.
I tried a test, adding 1000 triggers (use the Intermediate scripting window to reproduce):
math.randomseed (1)
for i = 1, 1000 do
AddTrigger ( "", math.random (), "sigh", trigger_flag.Enabled, 0, 0, "", "")
end -- for
This generates 1000 triggers, and if you force a matching output line (Eg. "0.00085451826532792") then it sends "sigh" as expected.
However if you save this file and re-open it you only get 987 triggers in the trigger list! So is this a bug?
Well no, and this is because of an enhancement Fiendish suggested fairly recently (on 12 December 2011). Unlabelled triggers, aliases and timers, which match exactly the same thing, are discarded at world load time. This is to stop a lot of useless duplicates, perhaps inadvertently added by a script.
So your multiple "aaaaa" triggers are indeed being discarded. I suggest you make one, and then use the Copy button to make a copy on the clipboard. Then if you need to get it back use the Paste button to paste the trigger back, and then amend it. Or just Copy/Paste an existing one and change the copy. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #5 on Mon 07 Jul 2014 08:59 PM (UTC) |
Message
| Just to amplify, you should not be losing triggers that are unique. However if you had a "door" trigger which coloured the message, and then had lots of copies of that, then the one which was discarded at load time might have been a copy that did not colour the message.
So don't add "dummy" triggers, that is your problem. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #6 on Mon 07 Jul 2014 09:04 PM (UTC) |
Message
| This modified script proves my point:
math.randomseed (1)
t = {}
for i = 1, 1000 do
match = math.random ()
AddTrigger ( "", match, "sigh", trigger_flag.Enabled, 0, 0, "", "")
if t [match] then
print ("Duplicate match: ", match)
end -- if
t [match] = true
end -- for
count = 0
for k, v in pairs (t) do
count = count + 1
end -- for
print ("Unique: ", count)
Output:
Duplicate match: 0.13162633136998
Duplicate match: 0.080111087374493
Duplicate match: 0.7796563615833
Duplicate match: 0.049623096407971
Duplicate match: 0.56920072023682
Duplicate match: 0.78810998870815
Duplicate match: 0.27497177037873
Duplicate match: 0.42680135502182
Duplicate match: 0.64763328959014
Duplicate match: 0.68816187017426
Duplicate match: 0.30399487289041
Duplicate match: 0.74721518601032
Duplicate match: 0.00085451826532792
Unique: 987
The random number generator happened to generate 987 unique match strings, and thus the extra (duplicate) ones were discarded, which matches what we observed. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Cedron
(5 posts) Bio
|
Date
| Reply #7 on Mon 07 Jul 2014 10:59 PM (UTC) |
Message
| I had wondered about the duplicate NPC since I have been redoing them the last few days. I hadn't seen any duplicates, so thank you for automating that process. As a user I can appreciate that. Armagedon is monochrome, so I like coloring the npc guards and bartender a darker color so the players stand out more when I do a room look.
The info shows me
Counts
Triggers: 466 (5275 matched)
10.567181 seconds
Aliases: 162 (101 used)
Timers: 2 (0 fired)
I had already copied aaaa to create 5 duplicates. So I just added a couple of NPC from the street to the list and deleted the extra aaaaa triggers. The count of triggers did change after I did the ctrl+s to save the details. Most of the time when I'm wandering the world, I'll be adding several NPC at a time, so I'm more or less in the habit of control s after each time. However, if I forget the game still reminds me when I close the window don't I want to save Yes/No. Which I do.
I'll upgrade to the latest version and I'll let you know how it goes. Thanks all. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #8 on Mon 07 Jul 2014 11:34 PM (UTC) |
Message
| This script will show you any duplicate trigger match strings:
tl = GetTriggerList()
m = {} -- matches
if tl then
for k, v in ipairs (tl) do
match = GetTriggerInfo (v, 1)
if m [match] then
print ("Duplicate trigger", v, "matching on", match)
end -- if
m [match] = true
end -- for
end -- if we have any triggers
That uses GetTriggerInfo to find the match string, from all triggers located by GetTriggerList, and displays the label and match string for such a trigger.
You can run that in the Immediate window (using Lua as the scripting language). |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Cedron
(5 posts) Bio
|
Date
| Reply #9 on Mon 14 Jul 2014 06:42 AM (UTC) |
Message
| Hey all. I hadn't been playing Armagedon as much lately, but I did manage to get the Mushclient upgraded that day and as far as I can tell all the NPC that I've added to the triggers have been saved and its coloring them like I want. Thanks Nick for responding so quickly. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
26,982 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top