Jump to content

Tool WIP: Scenario Organiser


Recommended Posts

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Are the files human readable after decryption (or whatever it is that you are doing?)

There is nothing as sophisticated as decryption going on here. All the information I'm extracting is in the files in binary format, so it's just a case of finding out which bytes are what and then "translating" them.

Regarding the bitmaps or individual scenarios I extract from the files, those are parts of the parent files in their complete, stand-alone form. Which again means that you can extract them quite easily, if you know where they begin and where they end.

In the scenario files, map and unit data itself seems to be encrypted, at least it is not straightforward at all to make sense of the data. I think this has been done, at least for one reason, to prevent cheating by altering scenario / save / pbem files (which are almost the same, regarding their internal structure).

On the one hand, I think this is good because it does prevent cheating.

On the other hand, it also prevents support for computer-aided transfer of real-world map data (from Google Earth, for example) into CMx2 map data, to give just one example.

Link to comment
Share on other sites

Mad Mike, this is not working for me. I unzipped, put the jar and sortable js in both my scenarios and campaigns folders, double-clicked the jar file, and waited, and waited, and waited. More than 5 minutes with the scenarios and more than 10 minutes with the campaigns. Zip. Zilch. Zero. I tried about a half-dozen times. No joy. Not happenin. Game Over.

(Before I even tried it, I first downloaded and installed Java and made sure to "open with" "Java Platform SE Binary"--then after no luck, re-downloaded/installed just to make sure. Goose egg. Nadda. No Dice.)

Mad Mike, fix or somfink!:)

@@@@Never mind. I had installed Java 6, didn't see Java 7 on their website the first time around. All is well in my world now.

Link to comment
Share on other sites

Mad Mike, fix or somfink!:)

@@@@Never mind. I had installed Java 6, didn't see Java 7 on their website the first time around. All is well in my world now.

Hi mjkerner,

It seems as if i was a little bit too slow ;).

So does that mean it is working for you now?

A directory (scenpics or campaignpics) should be created almost immediately after starting the program, so if that doesn't happen, something would be (very) wrong. No need to wait for minutes, it should happen instantly.

My guess in your case would have been that maybe the Java Install wasn't set up correctly so that it wouldn't automatically execute jar files.

Happy to hear that it is working now.

But your problem showed me that I should really work on including some kind of interface or, at least, error log (even if that wouldn't have helped in your case, if the file never got executed).

Cheers,

Mad Mike

Link to comment
Share on other sites

Excellent work! Would it be possible modify your Scenario Organiser also for CM Shock Force?

Hi mikkey,

thank you very much and yes, it should be possible, but to be honest, i'm currently not planning to do this.

The file structure between CMSF and CMBN seems to be a little bit different and I don't think CMSF will receive the kind of attention now with CMBN being available - I certainly won't be playing CMSF again, probably ever.

So, hopefully understandably, my motivation for doing this is very low at the moment.

Cheers,

Mad Mike

Link to comment
Share on other sites

"Victory level determined by overall campaign score". Does your program detail how this score is determined?

Hi Rankorian,

no, it can not determine / detail this.

The "Victory level determined by overall campaign score" is only interesting for scenarios which can end the campaign (otherwise it is "don't care").

The manual states (on pages 146 - 148, Campaign Script file) that maximum allowed and minimum required victory levels can be defined for scenario outcomes which end the campaign. This means that a maximum victory can be defined for the campaign outcome, which means that you could have performed very well in previous scenarios, but due to a defeat in the current scenario, you are only allowed to have a Tactical Defeat as the best possible outcome for example (see the "Road to Montebourg" campaign for good examples on this).

If these qualifiers are not present, the overall campaign score is determined from an accumulated score for all scenario results. I have no idea how this works in the program, as it is not something which can be influenced or set from the outside. Only BFC can comment on this (or maybe a very knowledgable Beta Tester :confused:).

One possibility could be that all results are added and averaged over the number of scenarios, giving an accumulated score for both sides and then determining the overall cmpaign score with the same relational thresholds as defined for scenarios (e.g. a relative 10 to 1 score for you would mean Total victory). But I'm only guessing and have no way of knowing.

Hope this clarifies it, at least a little bit.

Link to comment
Share on other sites

It looks really useful. But forgive me, don't know what a JAVA Virtual Machine is or how to make one.

Hi Erwin,

the JAVA Virtual Machine (JVM) is the environment a JAVA program is executed in (see http://en.wikipedia.org/wiki/Java_Virtual_Machine for further explanations, but this is not really required).

What is important for you: You probably don't have to do anything, because a JVM is most likely already installed on your computer.

You can check if this is the case here: http://www.java.com/en/download/installed.jsp (if the check should recommend that you install an updated version of JAVA, you can do so, but it should not be required for the CMBN Scenario Organisor to run).

After this, you should be ready to go, so just download the program, follow the included instructions and enjoy the results. Worst thing that could happen is that nothing is happening at all when you execute the program ;).

Link to comment
Share on other sites

  • 8 months later...

Hi Mad Mike,

I am not able to get this to run. I have it set to open with SE Binary when I try to run it, a dos command window flashes up and shuts down before I can read. Otherwise, no joy.

Any ideas?

Further amplification: with Java 6, I would get the above error, with Java 7, when I click on the tool, it opens up in a 7Zip window with a bunch of class files showing. In both cases, when I unzip the organizer, it does not show as a Java executable, but remains a .jar file.

Link to comment
Share on other sites

@Topkick

Not sure what the issue would be but try this. Open a command window in the directory where the scenarios and scenario organizer are located and run this command:

java -jar CMBN_Scen_Organiser_v0.3.jar

If you get errors report them back here and I'll try and help.

Hi Mad Mike,

I get the following:

Error: Unable to access jarfile CMBN_Scen_Organiser_v0.3.jar

1. I have version 0.22, the code you gave me ends with v0.3. Is there a version 0.3? If so I cannot find it.

2. There is a folder named "source" that shows up in the 7zip manager file list, am I supposed to do something with that folder?

Link to comment
Share on other sites

I'm not Mad Mike but I have used his tool and conversed with him about it several times. And as a Java developer I might be able to help you get it to run.

Hi Mad Mike,

I get the following:

Error: Unable to access jarfile CMBN_Scen_Organiser_v0.3.jar

1. I have version 0.22, the code you gave me ends with v0.3. Is there a version 0.3? If so I cannot find it.

OK that just means I have some test version he sent me you should replace the name "CMBN_Scen_Organiser_v0.3.jar" with whatever your .jar file is named. Sharing the error message you see after you do that might allow me (or others) to figure out what is wrong.

2. There is a folder named "source" that shows up in the 7zip manager file list, am I supposed to do something with that folder?

You are not supposed to do anything with that. It is there for java developers to see his source code. I have not even looked at it though. Don't worry about it. And using 7zip manager will not get the program to run it will just show you the inner workings of the .jar file. Which is not likely to help you in any way.

Link to comment
Share on other sites

I'm not Mad Mike but I have used his tool and conversed with him about it several times. And as a Java developer I might be able to help you get it to run.

OK that just means I have some test version he sent me you should replace the name "CMBN_Scen_Organiser_v0.3.jar" with whatever your .jar file is named. Sharing the error message you see after you do that might allow me (or others) to figure out what is wrong.

You are not supposed to do anything with that. It is there for java developers to see his source code. I have not even looked at it though. Don't worry about it. And using 7zip manager will not get the program to run it will just show you the inner workings of the .jar file. Which is not likely to help you in any way.

Sorry about the mis-Id there ian.leslie. I changed the version to the one I have and successfully ran the code in the command prompt, both in the scenario and campaign directories. What does this tell you? Thank you, by the way, I do appreciate this!

Link to comment
Share on other sites

Ian.leslie,

In the campaign directory, several scenarios in the Scottish Corridor campaign show broken image links. The following messages showed up in the command window once the organizer finished running:

C:\Program Files (x86)\Battlefront\Combat Mission Battle for Normandy\Game Files

\Campaigns>java -jar CMBN_Scen_Organiser_v0.22.jar

Exception in thread "main" java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa

der.java:56)

Caused by: java.lang.NullPointerException

at CampaignReader.createHTMLOutput(CampaignReader.java:225)

at CampaignReader.writeHTMLOutputtoCurrentDirectory(CampaignReader.java:

821)

at CMBN_Scen_Org_Main.main(CMBN_Scen_Org_Main.java:61)

... 5 more

Link to comment
Share on other sites

Ian.leslie,

In the campaign directory, several scenarios in the Scottish Corridor campaign show broken image links.

I see that too. That may not be a serious problem. I suspect that the scenario does not have a picture. The scenario organizer should not create a broken link but it is harmless.

The following messages showed up in the command window once the organizer finished running:

<snip>

Caused by: java.lang.NullPointerException

at CampaignReader.createHTMLOutput(CampaignReader.java:225)

at CampaignReader.writeHTMLOutputtoCurrentDirectory(CampaignReader.java:

821)

at CMBN_Scen_Org_Main.main(CMBN_Scen_Org_Main.java:61)

... 5 more

OK that is telling me that it had trouble processing one of the campaigns. I would suggest that you move the Kampfgruppe Engel and Scottish Corridor campaign files out of the directory and try again. If you get the same error then I would remove all the campaigns from the directory try again and then add them back in one at a time to see which one it is having trouble processing.

Link to comment
Share on other sites

Is this tool to help people see what each scenario/campaign entails without having to start the game and look at each individual scenario and campaign?

if so that is great.

cheers

Yes that is exactly what it does. I find it very useful. I have given Mad Mike some feedback - more work for him:D and pointed out a few bugs. I hope he decides to do some more work on it.

Link to comment
Share on other sites

Yes that is exactly what it does. I find it very useful. I have given Mad Mike some feedback - more work for him:D and pointed out a few bugs. I hope he decides to do some more work on it.

I went and downloaded it anyway and yes it is very good and most helpful. 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...