BattleMaster Community

BattleMaster => BM General Discussion => Topic started by: Gabanus family on May 31, 2018, 08:38:30 PM

Title: Script to copy your Battle Report to the Wiki easily
Post by: Gabanus family on May 31, 2018, 08:38:30 PM
I've made a script a while back to make it very easy to put battle reports on the wiki to save them for all times. A few things to mention

1) It's in VBA, so you need to have microsoft word on your computer. If you don't, sorry.
2) I've described step by step how to use it, but if anything is unclear just hit me up here or on Discord:
https://discordapp.com/channels/386317706158276610/386317706695016462 (https://discordapp.com/channels/386317706158276610/386317706695016462)

The script to do it and step by step guide:
http://wiki.battlemaster.org/wiki/Battle_Reports#Code_to_paste_in_module: (http://wiki.battlemaster.org/wiki/Battle_Reports#Code_to_paste_in_module:)

*Updated version, the battle report now also autofills most of a military infobox to make it even cooler.
** Update 7-6-2018: Managed to finish the second part of the infobox, so it now shows it completely
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Medron Pryde on June 01, 2018, 07:49:46 AM
Very nice dude.
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Wimpie on June 01, 2018, 07:59:47 AM
I appreciate the work mate! Looks very nice and useful.

If not just for recording historical facts for your character/realm, you can also use this to save a battle report which you need for a bugreport. Battle reports will expire after a time, so uploading them to wiki using this and linking them on the bugreport will also help us as developers a lot.

Thanks again! Looking forward to the second part as well.
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Gabanus family on June 07, 2018, 02:07:22 PM
Your welcome and on your suggestion I finished the InfoBox first, so it now shows everything. Second script is also coming along, but not yet ready:

** Update 7-6-2018: Managed to finish the second part of the infobox, so it now shows it completely
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Andrew on June 10, 2018, 07:32:04 PM
Gabanus, any chance of you doing this in something I can host on a website, in PHP perhaps?
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Wimpie on June 10, 2018, 09:21:51 PM
Gabanus, any chance of you doing this in something I can host on a website, in PHP perhaps?

As far as I am aware, this is in VBA script.
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Anaris on June 10, 2018, 09:28:09 PM
As far as I am aware, this is in VBA script.

Kill it with fire!
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Andrew on June 10, 2018, 09:59:41 PM
As far as I am aware, this is in VBA script.

While yes, I could just host the script, I was thinking of something like a text box you put a battle report in, press submit, and get it reformatted for forum or wiki or whatever. All I'd really need is code that can parse a text input and generate a text output. I can build the form and everything else myself.
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Wimpie on June 12, 2018, 06:51:30 PM
Kill it with fire!

I for one like a solution for this, even if it's with a technology that not everyone can use or is an admirer of.
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Anaris on June 12, 2018, 07:33:14 PM
I for one like a solution for this, even if it's with a technology that not everyone can use or is an admirer of.

As do I; I have hopes of being able to provide something more official in the medium-term future.
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: Gabanus family on June 18, 2018, 12:03:18 PM
Gabanus, any chance of you doing this in something I can host on a website, in PHP perhaps?

I'm afraid that my knowledge on that end is somewhat limited.

The initial purpose of these scripts were to have actual challenges for me to expand my knowledge on coding. I'm not entirely sure how you would transform a VBA script into something webbased.

In the case of BM itself for instance I would imagine it may even be easier to just take a look at the part of the script that gives the layout of a battle report and in turn give a second option to change that layout to a wiki friendly one. In the BM code you already have the different variables after all, which I now had to retroactively reproduce as the source code was just a piece of text, void of the variables used to create it.

If you have specific questions or suggestions on how to do this and think I may be able to aid feel free to let me know though. So far I've only really been focussing on VBA and SQL though, so my knowledge on any other language is limited at best. Do plan on adding php within a few months, but will focus on SQL properly first.
Title: Re: Script to copy your Battle Report to the Wiki easily
Post by: MTYL on June 19, 2018, 01:00:01 PM
Gabanus is right. It's very much possible to translate his script to php, js or anything web-usable really. In fact with all the variables already there for battle reports it shouldn't even be that much effort to make it part of bm official. And since it already uses wiki heavily I don't see why not.