Getting started, some questions
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
I'm definitely hoping to move to MudPortal as the main point of contact for non-mudders, so I'll probably have some questions as I begin to roll this out. Thanks for the site!
Some starting questions:
1) I'm implementing MSSP soon, any thoughts if MudPortal can interact/benefit there?
2) Is it possible to disable triggers on my client for BIYG?
3) Can we set a default window size? Would it be bad to default it maximized which overwrites the MudPortal MUD list?
4) Is it possible to setup chat windows? Maybe this is a good example for me to follow?
5) Can we personalize the client/play window? Add some text or images?
Please Log in or Create an account to join the conversation.
- plamzi
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Zeno wrote: My MUD (BIYG) is fairly niche, so my goal has always been to aim outside the MUD community for players. At one point I had a Facebook app pointing to a webpage on my server that hosted FMud, which connected to the MUD. It brought in chunks of new mudders, but Facebook's API changes too much for me to keep up.
I'm definitely hoping to move to MudPortal as the main point of contact for non-mudders, so I'll probably have some questions as I begin to roll this out.
Welcome, and I hope you'll find this site useful. At some point, there will definitely be a Facebook version of the app, as well as a tablet-friendly version.
Zeno wrote: 1) I'm implementing MSSP soon, any thoughts if MudPortal can interact/benefit there?
Not in the short term. I'm not looking to build yet another MUD list. I'd rather have few but select games listed and maintained by devs who are interested in reaching non-vets or otherwise exploring the capabilities of a web interface. I'd like to see the portal app used as a foundation for next-gen MUD UX.
In the long term, everything that enhances the reach and effectiveness of the portal will be put to use.
Zeno wrote: 2) Is it possible to disable triggers on my client for BIYG?
I've added configuration parameters for this. Just add the following code inside a .js file that's posted in the "Official" category and linked to your MUD server:
Config.notriggers = 1;
I'll be starting a separate article soon that will document all the configuration options.
Zeno wrote: 3) Can we set a default window size? Would it be bad to default it maximized which overwrites the MudPortal MUD list?
If you're deep-linking to the app (e. g. via a "Play" button), you can use the &width and &height parameters.
In Javascript, you can do:
Config.width = 900;
This should also work:
Config.width = '100%';
If you want the default to be full-width, go for it. Note that people will always be able to resize the window. And if they are registered users, their window positions will be saved.
Also note that if you don't want the Game Center and Portal page header to be displayed, you can add '&clean' to a deep link. I'll soon add an option to not open the Game Center, or to limit the games shown in it only to your game (and any profiles the player has created based on your game).
Zeno wrote: 4) Is it possible to setup chat windows? Maybe this is a good example for me to follow?
Yes, that's the example showing how to activate and configure the ChatterBox plugin.
Zeno wrote: 5) Can we personalize the client/play window? Add some text or images?
Yes, in pretty much every way you please. When you post code in the "Official" category, you can, for example:
Use jQuery to change style sheets, such as add a custom background:
j('#page').css({
background: 'url("/images/Bedlam_Bg.png") no-repeat fixed 0 0 #000000',
width: '100%',
margin: '0px auto'
});
Register to listen for the 'scrollview_ready' event so you can manipulate the ScrollView after it's loaded:
Event.listen('scrollview_ready', function() {
//customize
});
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
www.mudportal.com/20-app-code/private/32-biyg-js
Please Log in or Create an account to join the conversation.
- plamzi
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
When I looked at it, it was in "Official" but in an unpublished state, which may have erroneously prevented you from editing it further. I published it and authorized your account to post official code for your game. It's now loading fine on the app page and disables triggers.
Note that players are able to opt out of official code, so this is not going to stop anyone determined to use triggers (nothing will).
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
I did see it was unpublished, but that seems like the default state it was in even after hitting save the first time. Thanks, I can access it now.
(Yeah it's not like I can prevent triggers with normal MUD clients, so that's fine)
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
I did fix up the regex and it should catch my tell format:
Batman tells you 'hello'
Assuming you can view my JS file, any thoughts what I'm doing wrong?
On the subject of questions, is there a way to pass the original IP address?
Please Log in or Create an account to join the conversation.
- plamzi
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
I tweaked the ChatterBox code to show more in the console when you have &debug=1. Let me know if that helps.
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
<GREEN>Zeno chats '<CYAN>Hello there<GREEN>'
But sometimes players personalize their chats, and can make it like:
<GREEN>Zeno chats '<CYAN><WHITE>Hello there<GREEN>'
So matching colors is pretty hard when players can control their own colors sent.
Please Log in or Create an account to join the conversation.
- plamzi
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Zeno wrote: Interesting. Is there a way to ignore or strip the color? My chat looks like:
<GREEN>Zeno chats '<CYAN>Hello there<GREEN>'
But sometimes players personalize their chats, and can make it like:
<GREEN>Zeno chats '<CYAN><WHITE>Hello there<GREEN>'
So matching colors is pretty hard when players can control their own colors sent.
I see. It's probably doable with just RegEx but it will be a tough cookie to crack.
It may be a bit easier if you subscribe a custom function to "before_process" that strips color codes from certain lines, but then you lose the ability to display those lines in the colors the author intended.
The cleanest solutions I can think of involve doing some things on the server side. You can cc certain communications out of band and send them exactly as you want them to be shown in the ChatterBox (e. g. colors stripped). Or, you can pre-format communications differently for this client, e. g. ignore people's custom colors.
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
I think I'd actually prefer this. So what would I be stripping, the raw ANSI color tags from the output? I'll play around with before_process.but then you lose the ability to display those lines in the colors the author intended.
On the subject of questions, is there a way to pass the original IP address of the user?
Please Log in or Create an account to join the conversation.
- plamzi
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Zeno wrote:
I think I'd actually prefer this. So what would I be stripping, the raw ANSI color tags from the output? I'll play around with before_process.but then you lose the ability to display those lines in the colors the author intended.
"before_process" is the earliest hook, so yes, the colors would be still in ANSI. I added a quick function to strip ANSI inside the Colorize module. So try this:
Event.listen('before_process', function(d) {
var lines = d.split('\n');
//for each line in lines
//if line is communication
line = Colorize.stripANSI(line);
return lines.join('\n');
});
Zeno wrote: On the subject of questions, is there a way to pass the original IP address of the user?
If you mean the proxy passing the user's IP to the game server, that's already being done in 3 ways: TTYPE, MSDP, GMCP. If you are negotiating any of these, you should be getting it already.
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- plamzi
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
The examples are there just for easy viewing. You can always see the latest code for all of these modules on the page itself.
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
The notriggers config still doesn't seem to work though?
Also, is there a config to make the Game Center start minimized? I'd like to have it open but start minimized.
Please Log in or Create an account to join the conversation.
- plamzi
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
There's no config for GC starting minimized but it can be easily added. You can plan for "Config.collapse = [ '#control-panel' ];".
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
www.mudportal.com/play?host=biyg.org&port=1801
This will take me to the raw MUD, with none of my JS loaded. It works as a guest. In the JS console, there's an error:
Uncaught TypeError: Cannot read property '' of undefined on MacroPane.js?v=62:26
Please Log in or Create an account to join the conversation.
- plamzi
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- plamzi
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Zeno wrote: ...I can't seem to load my MUD page under my user.
www.mudportal.com/play?host=biyg.org&port=1801
This will take me to the raw MUD, with none of my JS loaded. It works as a guest. In the JS console, there's an error:
Uncaught TypeError: Cannot read property '' of undefined on MacroPane.js?v=62:26
I'm not actually able to reproduce this so I'm working in the blind. I think the key here is that you're saying your official code is not loading when you view the app page with your user. That should not be the case. Can you trace what is being loaded on the page and look for a URL like this one:
www.mudportal.com/index.php?option=com_p...1801&_=1385129357707
If it's not there at all, or is there, but empty, that will help me understand what's going on.
Thanks!
Please Log in or Create an account to join the conversation.
- Zeno
- Topic Author
- Offline
- Junior Member
- Posts: 32
- Thank you received: 1
Please Log in or Create an account to join the conversation.