Author Topic: [SH3RME] - Silent Hunter III Radio Messages Editor  (Read 3311 times)

Offline REV_BL!TZKR!EG

  • ...somewhere...below...
  • REViSi0N
  • one of the leaders
  • Posts: 1.999
  • ELiTE Skill Level:
    75%
  • TECH ADMiN
    • Links!!

Offline REV_BL!TZKR!EG

  • ...somewhere...below...
  • REViSi0N
  • one of the leaders
  • Posts: 1.999
  • ELiTE Skill Level:
    75%
  • TECH ADMiN
    • Links!!
= CHANGE-LOG =
« Reply #1 on: 20191111, 16:14:48 »
20191004 My friend Anvar came around the corner he would need a tool and asked me to write it for him. At first I was reluctant to create
                yet another tool and get nothing back from the community. But then I found out I need it too for something else...
20191008 Negotiations and ideas about what it shall do and what name to use. SH3RME reflects it best.
20191009 Commencing the code. DataFormat is:
   Structure RMsg
    STdate.i ; YYYYMMDD 8dg date for START of transmission
                  ; 1 byte $09
    STtime.i ; HHDD 4dg time for START of transmission
                  ; 1 byte $09
    ENdate.i ; YYYYMMDD 8dg date for END of transmission
                  ; 1 byte $09
    ENtime.i ; HHDD 4dg time for END of transmission
                ; 1 byte $09
    TypeMT.b ; 1 byte ( 0 = transmit once , 1 = transmit until received )
                  ; 1 byte $09
    Probab.b ; 1 byte for Probability (%), default= 100
                  ; 1 byte $09
    Interv.b ; 1 byte for Retransmision Interval (minutes)
                  ; 1 byte $09
                   ; OPTIONAL: @FROM@
                   ; OPTIONAL: ^TO^
    Msgtxt.s ; Message content CRLFs are converted to "|"
  EndStructure
20191010 MAiN-Screen (split with preview) and buttons.
20191011 EDiT-Screen and buttons.
20191012 'Right-Click-Context-Menu" on MAiN-Screen
20191013 FIRST ALPHA TEST VERSION: V0.0.0.1a
                 Added code to repair what German modders have bugged with the format (that can cause CTDs!)
                 Added code to repair special characters and "German Umlaute".
                 Added code to fixe wrong spelling to "U-Boot" and many more, like BdU, FdU, etc........
                 The control-characters work now!
                 Preview and the line break works now, too!
                 Added code so it adds "From:", "To:" for ENGLISH (EN), "Von:", "An:" for GERMAN (GE) files.
                 Done: create new line and correction checks code.
20191015 SECOND ALPHA TEST VERSION: V0.0.0.2a
                 Removed code addline().
                 Rewrote module_editline().
                 ENUx-STUx routines removed.
                 Fixed YLoc.
                 Fixed Height-calculation.
                 Fix: Don't preselect line 0(reported by GE/REV).
                 Fix: Sort by leading date= YYYYMMDD(reported by GE/REV).
20191016 THIRD ALPHA TEST VERSION: V0.0.0.3a
                 Fixed Editline() + replace entry.
                 Fixed Preview_Display bug.
                 Added function "Minimize to tray".
20191017 FOURTH ALPHA TEST VERSION: V0.0.0.4a
                 Complete recode of datecheck(). Unix-dates do not work here!
20191029 FIFTH ALPHA TEST VERSION: V0.0.0.5a
                 added code that replaces ^...^ with ^ ^(reported by GE/REV).
                 added code that replaces @...@ with @ @(reported by GE/REV).
                 1 default font is hard-coded so it always works.
                 User can now put own .TTF font into folder SH3RME_fonts.
20191030 SIXTH ALPHA TEST VERSION: V0.0.0.6a
                 added code that shows active font.
20191111 SEVENTH ALPHA TEST VERSION: V0.0.0.7a
                 save-and-backup code activated.
                 removed Panforte Pro font.
                 added Propaganda font.
20191128 EIGTH ALPHA TEST VERSION: V0.0.0.8a
                 added COLLco/version check/sync code.
                 added Anvar's beloved first line again.
                 fixed the file-variable.


2do UNTIL V1
Intro

more correction checks code
check date entry and verify the date is valid, otherwise alert when a date is BEFORE 19390801 OR AFTER 19450509

2do LATER = AFTER V1 is out
program new code that reads which font from menu.ini and use TGA+OFF to display
program new code for compatibility towards SH4 and SH5 - DONATIONS REQUIRED
program new code for FIND/SEARCH functions?
« Last Edit: 20200610, 15:21:44 by REV_BL!TZKR!EG »

Offline REV_BL!TZKR!EG

  • ...somewhere...below...
  • REViSi0N
  • one of the leaders
  • Posts: 1.999
  • ELiTE Skill Level:
    75%
  • TECH ADMiN
    • Links!!
= SCREENSHOTS =
« Reply #2 on: 20191111, 16:18:07 »
- Screen 1: - path-selection - lets you select which installation you want to use for editing.
- Screen 2: - file-selection - lets you select which file in that installation you want to edit.
- Screen 3: - where editing starts. On the image you can see the context-menu that you get by RIGHT-single-clicking.

BUTTONS:

[PATH]: lets you reselect the path of your installation that you wish to work on; the ingame-GFX will be loaded from that path-structure, it will be cropped and placed on the right of the screen.

[FiLE]: lets you reselect the file that you wish to work on; the selected file will be loaded and read into memory: skipping the 1st line, filtering empty lines and commented lines (#...) and the result data will be displayed in a list-box on the left.

[SAVE]: lets you save the whole file. It will create a backup as in pattern date15$_filename and will allow you to say YES or NO to overwrite the existing file.

[FONT]: lets you pick a .TTF-font for the display on the right from the .TTF-fonts the program finds in the fonts-subfolder.

[DONATE]: lets you show some respect and appreciation. I do not ask for money for myself or for the time I spend, but some respect and that the server-costs of my group are paid.

FUNCTIONS:

LEFT-DOUBLECLICK lets you edit the selected entry
RIGHT-single-click lets you choose self-explaining functions from a popup-context-menu

- Screen 4: - EDITOR-SCREEN WITH PREVIEW ON THE RIGHT

FUNCTIONS:
The EDITOR-WINDOW is now integrated LEFT/BOTTOM - and if you want you can still move it where you want or need it.

BUTTONS IN EDITOR-SCREEN:

[REMOVE]: lets you remove the currently selected and shown entry-line and returns you from the editor back to the main-screen.

[SAVE]: lets you save what you have just changed and returns you from the editor back to the main-screen.
After every ADD or EDIT the list gets sorted.

[CANCEL]: lets you abandon what you have just changed and returns you from the editor back to the main-screen.

Offline REV_BL!TZKR!EG

  • ...somewhere...below...
  • REViSi0N
  • one of the leaders
  • Posts: 1.999
  • ELiTE Skill Level:
    75%
  • TECH ADMiN
    • Links!!
How to add an own font and use it
« Reply #3 on: 20191111, 16:18:46 »
  • Code that uses the ingame fonts is in the works. But that takes a bit more time. So be patient
  • Until then you can use TTF-fonts. Here is how to do it PROPERLY.
  • IMPORTANT: You can not just put in ANYTHING. Use your brain!
  • a) it must be a TTF-font, you can not just take any file and rename it to filename.ttf - that does not make it a TTF-font!
  • b) you must keep the format: the filename of the .ttf-file must match EXACTLY the font name. Doubleclick to see the exact font name!
  • [FONT]: lets you pick a .TTF-font for the display on the right from the .TTF-fonts the program finds in the fonts-subfolder.
  • The program code displays all .TTF files in the fonts folder and lets you choose from those.
  • The program registers the font in your Windows, then loads it - ... callfunction RegisterFont("SH3RME_fonts\"+File)
  • Again: If you do not match the names PROPERLY, the fontreg() can NOT work.
  • You are going to see the newly displayed font when you again edit a line -> reselect a text to display after selecting a font!


Hm, maybe I continue this sooner that I thought... I have just found my source-code

STtime= hhmm
EDtime= hhmm

a= parsedate(%mm%dd,a$)
-1 = error
parsedate(%mm%dd%hh%ii)   <<<< !!! *ii* !!!

check right,4

check left,4

if val(left,4) = FIRST YEAR (1939)
if val(pd)<18316800 (ux for ____08010000)

if val(left,4) = LAST YEAR (1945)
if val(pd)>13046340 (ux for ____05312359)
« Last Edit: 20210914, 11:46:08 by REV_BL!TZKR!EG »

Offline REV_Grey Eminence

  • REViSi0N
  • one of the leaders
  • Posts: 448
  • ELiTE Skill Level:
    0%
  • |REViSi0N| - what else?
Re: [SH3RME] - Silent Hunter III Radio Messages Editor
« Reply #4 on: 20220301, 19:49:55 »
Blitz, you should really add this tool of yours to SH3MOD.

Offline REV_BL!TZKR!EG

  • ...somewhere...below...
  • REViSi0N
  • one of the leaders
  • Posts: 1.999
  • ELiTE Skill Level:
    75%
  • TECH ADMiN
    • Links!!
Re: [SH3RME] - Silent Hunter III Radio Messages Editor
« Reply #5 on: 20230414, 10:05:21 »
Blitz, you should really add this tool of yours to SH3MOD.
Honestly? I do not think the community appreciates this work and so I have not looked at the code for more than 3 years now. There is simply no motivation for me at all to waste so much unpaid time for nothing.
» HONOR, AMISTAD Y RESPETO! Es mejor morir de pie que vivir toda una vida de rodillas! «

⚡️ Home of S3A - S3F - S3G - DEFTS3 -