Tool: OtsFp9Tools.exe

Post new mods and scenarios here.

Moderator: MOD_Flashpoint

Post Reply
harry_vdk
Posts: 338
Joined: Tue Jun 10, 2014 11:41 am
Location: Drachten

Tool: OtsFp9Tools.exe

Post by harry_vdk »

Hi,

For my Dutch maps I have create a small tool named:OtsFp9Tools.exe.

Its written in C# and located within this github repository.

Within this repository is also a short file description of the .fp9 fileformat made by Robert Crandall.

The Dutch maps are 7 hexdraw maps 67x64 hexes from left to the right with 21 columns overlap and 46 unique columns.

With this tool I can copy every overlap to the next map.


First map:
otsfp9tools /filename="NL 37b 1985.png" /import="NL 37f 1985.png" /offsetcol=46

Second map:
otsfp9tools /filename="NL 37f 1985.png" /import="NL 37b 1985.png" /offsetcol=-46
otsfp9tools /filename="NL 37f 1985.png" /import="NL 38b 1985.png" /offsetcol=46

Third map:
otsfp9tools /filename="NL 38b 1985.png" /import="NL 37f 1985.png" /offsetcol=-46
otsfp9tools /filename="NL 38b 1985.png" /import="NL 38f 1985.png" /offsetcol=46
......

......
Last map:
otsfp9tools /filename="NL 40f 1985.png" /import="NL 40b 1985.png" /offsetcol=-46

There are more options right now not used with this purpose (and not full tested).
/filename=<base filename>");
/import=<import filename>");

[/OffsetCol=<int>]
[/OffsetRow=<int>]

[/RangeMinCol=<int>]
[/RangeMinRow=<int>]
[/RangeMaxCol=<int>]
[/RangeMaxRow=<int>]

[/NewMaxCol=<int>]
[/NewMaxRow=<int>]


Updated to version 1.03:
- Use .jpg as default mapfile extension.
- Add 2 options useful with qgis
/CreateElevation and /CreateHexContours

User avatar
Plodder
Posts: 974
Joined: Mon Jul 28, 2003 3:56 pm
Location: New Zealand

RE: Tool: OtsFp9Tools.exe

Post by Plodder »

Nice! This will come in handy if/when I decide to extend the Berlin map.
Gen. Montgomery: "Your men don't salute much."
Gen. Freyberg: "Well, if you wave at them they'll usually wave back."
harry_vdk
Posts: 338
Joined: Tue Jun 10, 2014 11:41 am
Location: Drachten

RE: Tool: OtsFp9Tools.exe

Post by harry_vdk »

Add a special draw option used for drawing mapvalues:
/drawmapvalues
[/drawfilename=<optional filename>]

Sample:
otsfp9tools /filename="CA 1 Red Storm.fp9" /drawfilename="CA 1 Red Storm.jpg" /drawmapvalues

produce this:



Image
Attachments
CA1RedStorm.jpg
CA1RedStorm.jpg (201.04 KiB) Viewed 408 times
User avatar
WildCatNL
Posts: 818
Joined: Fri Mar 27, 2009 5:21 pm
Location: Eindhoven, the Netherlands

RE: Tool: OtsFp9Tools.exe

Post by WildCatNL »

Cool!

William
William
On Target Simulations LLC
harry_vdk
Posts: 338
Joined: Tue Jun 10, 2014 11:41 am
Location: Drachten

RE: Tool: OtsFp9Tools.exe

Post by harry_vdk »

Hi,

I have done one option on my bucketlist.

/ExtractMap=<extract to filename>
/StartCol=<int>
/StartRow=<int>
/NrOfCols=<int>, default=46
/NrOfRows=<int>, default=30

Its extract a .png and .fp9
User avatar
CapnDarwin
Posts: 9512
Joined: Sat Feb 12, 2005 3:34 pm
Location: Newark, OH
Contact:

RE: Tool: OtsFp9Tools.exe

Post by CapnDarwin »

Harry, awesome work! Thanks for sharing the tool.
OTS is looking forward to Southern Storm getting released!

Cap'n Darwin aka Jim Snyder
On Target Simulations LTD
harry_vdk
Posts: 338
Joined: Tue Jun 10, 2014 11:41 am
Location: Drachten

RE: Tool: OtsFp9Tools.exe

Post by harry_vdk »

Add the Hexsize Obstacle ID to the /drawmapvalues option.



Image
Attachments
CA1RedStorm.jpg
CA1RedStorm.jpg (258 KiB) Viewed 408 times
harry_vdk
Posts: 338
Joined: Tue Jun 10, 2014 11:41 am
Location: Drachten

RE: Tool: OtsFp9Tools.exe

Post by harry_vdk »

Add option /CreateElevation

Example:
/filename="CA 1 Red Storm.fp9" /createelevation

Create a new file named "CA 1 Red Storm.elevation.png"

This useful after the creation of a elevation layer witin qgis and scan the .fp9 file and use the levels within the .fp9.


Image
Attachments
CA1RedS..levation.jpg
CA1RedS..levation.jpg (270.59 KiB) Viewed 408 times
harry_vdk
Posts: 338
Joined: Tue Jun 10, 2014 11:41 am
Location: Drachten

RE: Tool: OtsFp9Tools.exe

Post by harry_vdk »

Add option /CreateHexContours

Example:
/filename="CA 1 Red Storm.fp9" /createhexcontours

Create a new file named "CA 1 Red Storm.hexcontours.png"

Similar with /CreateElevation, but its create only the hexcontours on a transparent image and intended as a layer on top of the grid layer as a indication for the levels.


Image
Attachments
CA1RedS..contours.jpg
CA1RedS..contours.jpg (423.67 KiB) Viewed 408 times
mb4329
Posts: 71
Joined: Mon Jan 15, 2007 10:57 pm

RE: Tool: OtsFp9Tools.exe

Post by mb4329 »

Hi Harry,

This is a really great tool. I used it a bit this evening and have a couple of questions.

I am running it from the command prompt, but I am wondering if there is a better way to run it?

Also, I used the /createelevation option which worked well and wondered it there is a command to suppress the display of the row and column numbers on the filename.elevation.png?

Regards,
Merrick
kipanderson
Posts: 380
Joined: Mon Aug 27, 2001 8:00 am
Location: U.K.

RE: Tool: OtsFp9Tools.exe

Post by kipanderson »

Harry,

thanks...extraordinarily clever stuff and look forward to using it.

Thanks.
All the best,
Kip.
harry_vdk
Posts: 338
Joined: Tue Jun 10, 2014 11:41 am
Location: Drachten

RE: Tool: OtsFp9Tools.exe

Post by harry_vdk »

ORIGINAL: mb4329

Hi Harry,

This is a really great tool. I used it a bit this evening and have a couple of questions.

I am running it from the command prompt, but I am wondering if there is a better way to run it?

Also, I used the /createelevation option which worked well and wondered it there is a command to suppress the display of the row and column numbers on the filename.elevation.png?

Regards,
Merrick
Merrick,

I have split /createelevation and add /drawhexnumbers as a separate parameter.

I have create this tool for batch processing and repeated usage without a user interface. I running this only from batch/script files.
mb4329
Posts: 71
Joined: Mon Jan 15, 2007 10:57 pm

RE: Tool: OtsFp9Tools.exe

Post by mb4329 »

Hi Harry,

Thanks for the tweak. It works great.

Merrick
Post Reply

Return to “Mods and Scenarios”