Jump to content
Sign in to follow this  
bardosy

makeStringtable utility

Recommended Posts

makeStringtable utility for Armed Assault and Operation Flashpoint

Description: If you are a mission designer for ArmA/OFP, you usually make sqs/sqf files. And these files you use TitleText and sideChat commands for text. It's very easy when you're designing a mission, but later - when mission done - you must collect the texts into a stringtable.csv

This utility make this work.

1., Sweep your mission folder for sqs/sqf files

2., and get the TitleText and sideChat commands

3., extract your text from these commands

4., change this text with localize "STR_xx" and append a new line to the stringtable.csv

This is a consol aplication (no windows/frontend).

Usage:

makestringtable workfolder

The parameter is a folder path, where your sqs and sqf files are.

E.g:

makestringtable c:\Arma\missions\mymission

or

makestringtable "c:\Documents and settings\Name\Arma\missions\mymission"

Last Update: 2007.05.11

DOWNLOAD (v1.021)

Share this post


Link to post
Share on other sites

i usualy have all my scripts in subcatalog called scripts, only init.sqs and description.ext i have in main mission dir. Also in scripts i have another subdirs. So i have to run it for all dirs ?

Share this post


Link to post
Share on other sites

Great suggestion HqPL!

I will implement it into the next version.

Thx!

Share this post


Link to post
Share on other sites

Nice idea, bardosy.

Some feedback after evaluation:

- The program requires Java Runtime Environment. You should mention this in the documentation and in the forum post you make.

- Change the program so that it doesn't write files that need not to be modified. Currently it seems to write all files it processes, even if there is nothing to modify. This is definitely not good as it changes the "Modified" date of the files for no reason (the program also inserts a newline into the end of files that didn't have a newline at the end already). Writing the files shouldn't happen as there is no need for your program to do anything other than reading for a file that doesn't have localizable strings in it.

- At least one file that this program should, but does not process is mission.sqm which can also include a lot of localizable strings. Be sure to make the program go through all files where localizable strings might have been put.

- The program does not process all script statements that can output text to the screen (as you mentioned, only titleText and sideChat are supported). This is a major drawback and should definitely be fixed.

Anyways, nice idea. I see this kind of program can be very useful, but you would first need to change it to cover all files where localizable strings might have been put, and also change it to process also the rest of the string output commands in addition to titleText and sideChat.

Baddo

Share this post


Link to post
Share on other sites
Quote[/b] ]The program requires Java Runtime Environment. You should mention this in the documentation and in the forum post you make.

I coded this utility in Java, but I compile it as an exe. Are you sure you tried this version or an old one from OFPEC? Because the ofpec community suggest me to compile as normal exe...

Quote[/b] ]Change the program so that it doesn't write files that need not to be modified.

Ok. I'll fix it!!!

Quote[/b] ]At least one file that this program should, but does not process is mission.sqm

I didn't want do that, because I avoide to leave texts in my mission.sqm, but it's good idea. I'll do it!

Quote[/b] ]The program does not process all script statements that can output text to the screen

Please help me to collect these statements! I implemented into my code the Hint and HintC additionally, but I don't know what else you (or other mission makers) used in the scripts...

Thank you for this feedback and ideas!

Share this post


Link to post
Share on other sites

You might also want to add support for strings in Description.ext - such as dialog texts. It would be a whole lot more work, but then the script would be complete.

Share this post


Link to post
Share on other sites

Hi bardosy

Well I actually came to the conclusion that your program requires JRE after trying the program on Linux/Wine (no JRE installed) and I got an error message: "Java Runtime Environment not found." After that I tested your program on Windows XP which has JRE installed, and the program worked.

Now I confirmed that your program requires JRE on Windows XP by removing the Java Runtime Environment from Windows XP and tried your program again, and I get an error message, exactly the same that I got on Linux/Wine: "Java Runtime Environment not found." So, to sum it up: if I don't have JRE installed, your program won't run. When I installed JRE, your program runs.

I noticed you have used program jar2Exe to create the executable file. From a quick read from http://www.regexlab.com/en/jar2exe/support.htm, it seems that the conversion made by jar2Exe does not remove the requirement of a JRE:

Quote[/b] ]When generated Exe runs, JRE is needed.

I agree that it is ideologically better not to require people to install all kinds of runtime environments for small tools, but I also think that this is nothing big you should worry about. I just wished you would mention the JRE requirement to people who download the program so that there will be no negative surprises when trying to run the program.

So to something else then. In my opinion this program can be useful to many people but only if it processes all files that can have localizable strings and it processes all string output statements. Otherwise the program is only useful if you follow some strict rules. This is understandable as you wrote this program initially for your own needs and didn't have to worry about what others are doing, until now.

smile_o.gif

As a general rule, the program should look into every possible place where the localize command can be used.

For starters, at least these string commands should be processed, as I think they are quite common:

hint

hintC

hintCadet

titleText

cutText

groupChat

sideChat

vehicleChat

That would be a good start if you can cover those.

Then there is the commands that can be used for dialogs. Now looking at this, I think it is not a small task to cover all the possible places where localizable strings can be...

Also notice the comment about description.ext.

Best Regards,

Baddo.

Share this post


Link to post
Share on other sites

NEW version (v1.02) avaliable!

* modify only script files with string commands (Baddo's idea)

* utility run without java runtime environment

* search for the following string commands:

hint

hintC

hintCadet

titleText

cutText

groupChat

sideChat

vehicleChat

* not working with subfolders YET.

Share this post


Link to post
Share on other sites

Sorry notworthy.gif, I failed with compile java code to standalone exe... sad_o.gif

So I made exe with Jar2Exe again, but - as Baddo said - it require JRE...

New version: 1.021

Share this post


Link to post
Share on other sites

Bardosy I think it is not a problem if your program requires JRE. Don't worry about it too much

smile_o.gif

It's much more important to make the program cover more of the places where localizable strings can be used.

You have made good improvements already, keep up the good work!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×