[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Open the same World file multiple times?

Open the same World file multiple times?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Blixel   (80 posts)  [Biography] bio
Date Sun 03 Sep 2017 10:17 PM (UTC)

Amended on Sun 03 Sep 2017 10:18 PM (UTC) by Blixel

Message
I have 2 characters in a world I'm playing in. (And will probably create a 3rd.) Is it possible to open the same world file 2 or more times?

I have a bunch of custom scripting in my world file, and I'm keeping it generalized so that I can use the same scripting no matter which player I'm logged in as. But I want to be able to log in and play both characters at the same time because they can help each other.

So far I've just copied the world file to another file name ... but that is getting tiresome because any time I make a scripting change, I have to close everything out, exit MUSHclient, and then copy the world file over so that the changes are reflected in the copied file.

So ... is there any way to play multiple characters from the same world file?

Also, can I have MUSHclient automatically vertically tile my worlds when the program is opened?
[Go to top] top

Posted by Nick Gammon   Australia  (22,982 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 04 Sep 2017 06:35 AM (UTC)
Message
A world file represents a single connection, so there is no way of having the same file be "opened" multiple times. This is similar to programs like Word. You don't open the same document multiple times.

There are a couple of ways you can work around this. One is to save your triggers, aliases, etc. as "defaults". See:

http://www.gammon.com.au/scripts/doc.php?general=defaults

Alternatively, you can use plugins which let you put things you do for each character into their own plugin file. There is a plugin "wizard" to simplify creating plugins.

http://www.gammon.com.au/scripts/doc.php?general=plugins

By using plugins you can then make changes which automatically will affect all world files that use that plugin.




Quote:

Also, can I have MUSHclient automatically vertically tile my worlds when the program is opened?


You can execute the script command:


DoCommand ("TileWindowsVertically")


You can put that into the world configuration -> Scripting tab. Under World Events -> Open, put:



!/DoCommand ("TileWindowsVertically")


The "!" makes that string be sent to the script engine, if you make "/" the "scripting prefix" (same dialog box).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Blixel   (80 posts)  [Biography] bio
Date Reply #2 on Mon 04 Sep 2017 11:56 AM (UTC)

Amended on Mon 04 Sep 2017 04:40 PM (UTC) by Blixel

Message
Nick Gammon said:

Alternatively, you can use plugins which let you put things you do for each character into their own plugin file. There is a plugin "wizard" to simplify creating plugins.

http://www.gammon.com.au/scripts/doc.php?general=plugins

By using plugins you can then make changes which automatically will affect all world files that use that plugin.


Ok... the plugin method sounds more flexible. It seemed simple to do. I brought up the main world I've been using, and then used the Plugin Wizard to automatically export my triggers and aliases to a plugin file. I then created a new world file and added that plugin. Incredibly, it "just worked".

So the only other question I have at the moment is about editing the triggers and aliases. Since they are now inside the plugin file, I can't see them any more when I go to ALT+ENTER and look under Triggers and Aliases. So does that mean I now have to edit them from Notepad instead? I suppose I can do that, but being able to edit them from inside MUSHclient was convenient because I was able to categorize everything.

EDIT: Actually nevermind on this question. I realized I could import my plugin, and then when I use the plugin wizard, I uncheck the option to remove the triggers/aliases from the original world file. I'll use that world file as my "master" copy I guess.
[Go to top] top

Posted by Nick Gammon   Australia  (22,982 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 05 Sep 2017 06:52 AM (UTC)
Message
Yes, that would work. It isn't too tedious to make minor changes to the plugin file itself. Also you can copy/paste from the plugin to the world, or vice versa. See these links:

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


You can use the "copy from world, paste to plugin" technique to fairly painlessly add further triggers and aliases to the plugin.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


13,626 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]