News:

A forum for users of LackeyCCG

Main Menu

Request: Rulebook Button

Started by Ascent, September 30, 2011, 04:10:29 AM

Previous topic - Next topic

Ascent

I would like to be able to provide a rulebook with the starwars plugin hosted from the IDC website that players could click a button within lackey and it would launch the PDF. Of course, the PDF would launch independently of Lackey. There's no need to get fancy. Maybe if the button could be accessible during play would be great.

What do you think? It's just a button and a Rulebook PDF within a folder in the plugin from the IDC website rather than the Lackey website. So it's minimally invasive to Lackey.

Trevor

Why not just open the pdf with any number of designated pdf readers which people already have anyway?

If I were to do something, I would probably just make a button that opens the pdf with your computer's default pdf reader program. I'm not sure that's more convenient than just people opening the pdf file in their lackey folder.

Ascent

#2
I'm not sure why you thought I was saying to launch it in Lackey. I'm saying simply launch it, like a simple shortcut command in Lackey. That's all. No major programming. Just a button. You're saying exactly what I was. And it is more convenient, because they don't have to go opening file folders. This way, just click and launch. What's not convenient about that? Again, the button should be located in the game playing area somewhere where it's visible during play.

There would obviously have to be an entry somewhere in the Lackey files that lets the plugin designer assign the location from where the rulebook would be downloaded.

Ascent

#3
There's another reason why this should be done. I can't find the rules for dbzccg or most of the other games. If the plugin designer knows to include the rulebook location, then I don't have to go hunting down the rulebook that probably can't be located through a search engine anymore anyway. It simply comes with the plugin.

Also, the download request would be coming from the person's computer, so there would be no "hot linking" blocks associated with it (that I'm aware of).

Trevor

Remember we are talking about a small convenience of not opening the file directly, or doing a net search.
Compare that with the minor inconveniences of having a button somewhere taking up space and one more complexity (albeit optional) to plugin creation. Also, I am sure people will complain to me about how it isn't opening properly because they don't have a PDF opening program.

Where do you suggest this button go in the interface?

How about a nice simple "/rulebook" command in the log that opens it?

Ascent

#5
"/Rulebook" or "/rules" works too. That would allow it to be added to the command buttons. That's fine with me.

As for the other problem, anyone that doesn't have a PDF reader, well ... wow. Besides, a programmer's job is to deal with "problems".  :P The player simply makes the request.

As for the problem, perhaps you could have Lackey check first to see if they have a program associated with the PDF file extension. (I believe that's just a single command line.) If they don't have one, then a link would be provided in the log window to a free PDF reader. (Adobe most likely.) I believe that, too, would fit on the same command line in the programming. It seems like a simple If>Then proposition to me. Problem solved.

Cyrus

Its a thankless job, working for nerds

What rulebook can't be found on boardgamegeek?

Ascent

#7
Allow me to put you to task on that. How about, at boardgame geek you look up:

1) Latest SWTCG IDC Rulebook
2) SWTCG Rulebook (WOTC)
4) Dragonball Z Rulebook
5) Dr. Who CCG Rulebook

In fact, most rulebooks of retired games can't be found online that I've seen. You have to already know where to find them, and boargamegeek ain't it.

But my point is avoiding having to go through the searching, but to have the rulebook at your fingertips. It's certainly better to have the plugin designer provide a rulebook than for a bunch of potential players scratching their heads about where they go to learn how to play.

Cyrus

I agree that plugin creators should include a rulebook with the plugin, no question there.
/rules seems like a good idea too, to go along with that

Trevor

#9
Ok, this is all done, and will be public as soon as I post the next version. Here is how it works.

By default, the rulebook is assumed to be adjacent to plugininfo.txt in the plugin's folder, and named "rulebook.pdf". If you do not want to name your rulebook that exactly, you can include a line like this in your plugininfo.txt.

<definition><kind>RULEBOOKFILE</kind><value>MyRuleBook.pdf</value></definition>

Remember, if you name your rulebook "rulebook.pdf", you don't have to modify plugininfo.txt at all.

Users will be able to type "/rule" or "/rules" or "/rulebook" (they all do the same thing) in the chat log. This will both open up the file with your computer's default handler of that file type, and it will also add in the log a message like:
QuoteTrevor looks at the rulebook. (plugins/chess/rulebook.pdf)
The underlined text is clickable by all players, and all players will be able to open the rulebook by clicking it.

Similarly, you will be able to use "/file X" where X is the file path of any file relative to your active plugin's path. So typing "/file rulebook.pdf" is going to do the same thing as "/rulebook". You might want to do something like "/file readme.txt" or "/file changes.txt" or "/file howtoplay.txt".

Remember, these functions will NOT transfer any files. So if your opponent clicks the underlined linked text, and there is no corresponding file on their computer, they will just get an error messaging explaining they don't have a file there to open.

You can transfer files, but that's done with other commands, namely "/send" and "/get".

And plugin makers need to add the rulebook.pdf file to their updatelist.txt file in order for people to actually get one, obviously.

Ascent

Spectacular. Much appreciated, Trevor. This will really help a lot toward helping plugin makers spread their games.

Picks-at-Flies

Out of curiosity, could you set RULEBOOKFILE to be a URL?

Ascent

He addressed that. No, you can't. You can only make it part of the plugin. Thus, you put the URL in the updatelist.txt file, but the /rulebook command will only launch it if it's in the same folder as the plugininfo.txt file.

Ascent

By the way, putting the link to the Lackey file in the window for all players was a thoughtful edition. I like it.

Ascent

Trevor:

When updating the Rulebook, will we need to list it in the file that deletes old files? Or will a plugin update automatically replace it?