Jump to content

Tool WIP: Scenario Organiser


Recommended Posts

Hello,

I would like to introduce a small tool (work in progress) which I have created for CMBN.

Its creation was inspired by the need for having some kind of listing or overview of scenarios, which is highlighted in this thread: http://www.battlefront.com/community/showthread.php?t=98648

The tool in its current form will create a listing (html-file) of all scenarios in one directory. The listing can then be sorted for all data which has been defined for these scenarios.

For the purpose of gathering the data, the scenario files (.btt files) are analysed. So there is no need of any meta data accompanying the scenario for this tool to work. It will only require the scenatio file itself (which, of course, should have all the important parameters set).

The following screenshot will give an idea:

cmbnscenariolisting.jpg

This is the listing generated from my current "scenarios" folder in the CMBN directory.

I think this tool might be quite helpful, maybe especially to repository sites, because it could be adapted to automatically generate this output for all the accumulated scenarios on that site, to present them in a more sortable way (instead of just relying on a title and some user rating).

Any thoughts or comments would be appreciated.

Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

I would like to introduce a small tool (work in progress) which I have created for CMBN.

Its creation was inspired by the need for having some kind of listing or overview of scenarios,

<snip>

That sounds excellent. I would like to have that for my own machine but what would be even better would be to have a site on the web which had all this information plus the link to download the scenario. At least someone could use your tool to create such a list and add in the url to link to the scenario to the table. Can I run your tool and point it at any directory and have it produce the table?

Is your generated HTML valid XHTML? If so it will be fairly easy to add additional information to the table from other sources. I would be interested in trying this out if you need Beta testers. I would be happy to give you feedback on the output and how to make it easier to allow others to augment it with more information.

Link to comment
Share on other sites

OK, trying to answer some questions:

When could you get this tool?

I think in its first version very soon, I will try to get it out (just have to do some checks) this weekend. This will be a very minimal version, which should be stable enough, but I haven't put any effort in softening the rough edges yet.

What about a box for if it's a campaign or single battle ?

At the moment, it only works for scenarios (btt files). Campaigns will have a different file structure, which I haven't looked at yet. Might be possible though. I will have a look at a later point.

Is variable end time(and duration if so) a data point that can be extracted?

Hm, this is an interesting question. For some reason, I couldn't find the entry for the defined variable time in the file (amongst others like Wind Strength and Source or Intel Strength for example). It must be there. Otherwise, I can't understand how it is saved if you define it.

It might be that the exact amount of extra time is only determined when the scenario is loaded from the file (this is my expectation). So the exact duration would never be defined in the file itself.

Can I run your tool and point it at any directory and have it produce the table?

Not yet, at the moment the tool will only analyse any btt-file it can find in the current working directory (the place the tool is started in). Selection of any other directory could be added quite easily by giving the tool some kind of minimal UI (at the moment it is "executeable only", meaning you start it, it produces output - or not - and finishes without any feedback except the actual produced listing). I will get around to this quite soon, I think.

Is your generated HTML valid XHTML?

I'm quite sure it isn't. I'm not an expert for HTML and everything related (webdesign etc.), but my understanding is good enough to have created this simple proof of concept. Maybe we could eventually collaborate to get this included / working? I was also thinking about creating a more generic XML output, which could in turn be used by any "end user application" to create its own design to display the data.

Just some general info:

The tool is written in JAVA, so a working JVM is required (shouldn't be a big problem, as Java is quite widespread). I have developed this on Windows7, which means that I don't have a version for the Mac (and I don't intend to do one, as I don't have a Mac - my wife has one - but I'm quite sure that I can't requisition it from here :D). For a Mac version, the whole file handling (directories etc.) would have to be adapted.

Anyway, thanks for the replies and questions so far and as I've said, I will try to get a first version out this weekend.

Link to comment
Share on other sites

<snip>

Not yet, at the moment the tool will only analyse any btt-file it can find in the current working directory (the place the tool is started in). Selection of any other directory could be added quite easily by giving the tool some kind of minimal UI (at the moment it is "executeable only", meaning you start it, it produces output - or not - and finishes without any feedback except the actual produced listing). I will get around to this quite soon, I think.

<snip>

Oh that counts. Someone can create an arbitrary directory and put a bunch of btt files in it and run your program to get output. It does not have to be the actual game's scenario directory.

<snip>

I'm quite sure it isn't. I'm not an expert for HTML and everything related (webdesign etc.), but my understanding is good enough to have created this simple proof of concept. Maybe we could eventually collaborate to get this included / working? I was also thinking about creating a more generic XML output, which could in turn be used by any "end user application" to create its own design to display the data.

<snip>

Having XML output that can then be processed by another tool would be awesome! Your program could produce either XML or HTML and internally you could parse the btt files and create an XML structure and then use that to produce your current HTML. Others could then use that HTML and be happy or use the XML and do more stuff. I would be happy to help test / suggest changes.

Regarding Mac support if your program is written in Java and deals with the files in the current directory I think it would work on the Mac just as well as on a PC. Mind you I am not a Mac expert either so I could be missing something.

Link to comment
Share on other sites

OK, version 0.1 of the CMBN Scenario Organiser has been uploaded to the repository and should hopefully show up quite soon. A small README with instructions is included in the .rar-archive.

Any feedback (suggestions, problems or even complaints :eek:) can be given in this thread and would be appreciated (well, maybe not the complaints ;)).

Link to comment
Share on other sites

Regarding Mac support if your program is written in Java and deals with the files in the current directory I think it would work on the Mac just as well as on a PC. Mind you I am not a Mac expert either so I could be missing something.

Hi Ian,

I think you might be right, I use Javas "System.getProperty("user.dir")" mechanism to obtain the current directory. This should automatically return the correct directory, even on a Mac. The program creates one directory to store the scenario pictures, but in theory, even this should work on a Mac. I'm still not sure, because I haven't tested it on a Mac and the devil might be in some minor detail.

Link to comment
Share on other sites

Hello Mad Mike, this is going to be a very handy mod. Any chance of you uploading it to Green As Jade, I and maybe some others find the Repository to be almost an impenetrable maze and hard on the eyes to read due to the bright background. I dread trying to use it and use Green As Jade whenever possible.

Link to comment
Share on other sites

Hello Mad Mike, this is going to be a very handy mod. Any chance of you uploading it to Green As Jade, I and maybe some others find the Repository to be almost an impenetrable maze and hard on the eyes to read due to the bright background. I dread trying to use it and use Green As Jade whenever possible.

Hi Georgie,

done, the CMBN Scenario Organiser is now also available at GreenAsJade's Combat Mission Mods Warehouse.

Link to comment
Share on other sites

I would like to introduce a small tool (work in progress) which I have created for CMBN.

<snip>

Very cool - I really like it. on my non wide screen there are issues with the formatting of the table but that's just HTML tweaking. I would really like to see an optional xml output so people can add useful properties them selves. I for one would like a scenario list with links to the URI of the source of the scenario. That way people can dl there own copy. I have been studiously collecting scenarios and URI links as I go.

With some luck (as in I get time) I'll work up some additional feedback and send it to you.

Ian

Link to comment
Share on other sites

Re formatting-I have a problem with the group of items containing duration time and size info etc--spaces here too narrow for words and words superimposed over one another---all other sections fine and I think the tool is very valuable. (widescreen 1920/1080)

Any feedback re the problem described

Link to comment
Share on other sites

Thanks for the feedback so far.

I can recreate the superimposing quite easily, it seems to be down to the setting of "Zoom" and "Font Size" in the browsers "View" menu. It's difficult to address this directly, but I admit that my knowledge about HTML (how to make auto-adjustable tables for almost every combination of zoom / size settings) leaves much to be desired. I will try to work on this for the next version of the tool.

pcelt, do you use Internet Explorer or Firefox? Regardless, you can try to adjust the zoom / size settings i mentioned above to see if it gives you any better result.

Link to comment
Share on other sites

as a non programming geek, I gotta ask even if the answer makes me feel foolish. Java virtual machine...anything you recommend? I googled and looked at a few items, but this is out of my knowledge spectrum.

All you need to run is the Java Runtime Environment (JRE) which you can find at the link below. But before you download anything try it fist. Most computers now a days come with Java already installed. Download his .zip file, unzip it so the CMBN_Scen_Organiser_v0.1.jar is in your scenario directory and just double click on it. If after a few moments you get a Scenarios.html file then you do not need to install anything.

If you have to install a JRE then download it from here and install it. Then the above procedure should work.

Link to comment
Share on other sites

Hi guys,

thanks for the kind feedback so far, I'm glad that you find the tool useful. I'm even positively surprised to have learned that it works on the Mac as well without problems .. and this without testing it on MacOS :P.

For the next version, I think I will take a look at campaigns. I had a first quick glance and I think it should be possible to provide the same thing for all the campaigns, showing all the individual battles which are contained in a campaign (with their parameters as they can be seen now for scenarios).

I would be extremely pleased if I can find the decision making in the campaign file as i've always felt that I would like to know the campaign scenario tree with its decision points.

BFC have provided these in the past (sometimes, for CMSF campaigns), but sometimes those seemed to be older versions, not really reflecting the campaign (and the decision which result in the current battle will lead to which next scenario) as contained in the .cam file.

Anyway, not sure this is do-able, but I will have a look.

Thanks and cheers,

Mad Mike

Link to comment
Share on other sites

OK, situation update:

I managed to analyse the campaigns as well. I even found the decision making parts, which helped me to manually create the following two flow charts for "Panzer Marsch" and "Courage and Fortitude" (I also had a look at TF Raff, but its structure is very simplistic):

Panzer Marsch Campaign Flowchart:

panzermarschflowchart.jpg

Courage and Fortitude Campaign Flowchart:

courageandforudeflowcha.jpg

As well as providing an overview of the campaign and the scenarios contained in it, it is also possible to extract the single scenarios, enabling them to be played independently from the campaign. I also did this manually with TF Raff (because it has only 3 battles in it ;)), but this could be automated as well. Only drawback would be that a maximum of units would be present in each scenario, as casualties are not carried over from the previous battles.

I think I will do a rather quick update (1-2 weeks) to include the campaigns in a "no feedback"-version of the tool (the way it is now), before starting to add some small User Interface to it, which will allow for some choices and status displays.

Any ideas, suggestions etc. are still welcome.

Cheers,

Mad Mike

Link to comment
Share on other sites

  • 2 weeks later...

Hello all,

I've uploaded a new version of my tool, v0.2, to the repository (should appear sometime later) and to GreenasJade's mod warehouse (http://cmmods.greenasjade.net/mods/4492/details).

In addition to the already available scenario listings, the tool will now also analyse campaigns, providing an overview of the scenarios contained within the campaign and the connection between them (decision parameters for battle selection, see trees in one of my posts above). Basically, the tool reads out the campaign script which has been used when the campaign was created.

As special highlight for this release, the tool will also extract all individual scenarios from the campaign and will put them in a separate folder. These battles can then be played independently of the campaign or they could even be changed in the Scenario editor. I think this should be especially useful, as it has been requested numerous times before and up to now was only possible if the campaign creator published these scenarios independently.

Keep in mind though that obviously, as casualties do not carry over, some of the later campaign scenarios will be too easy, because as the player you will have the full amount of troops which have been defined to be available in the scenario.

Feedback can be left, as usual, in this thread.

Cheers,

Mad Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...