I have about 25 files all are written with code that I need to edit to a particular format. Instead of editing all the files which would probably take me about a month to do; I would like to know if there is a way to create a program or an import/export plugin for notepad, to automatically change this code. I prefer a "drag and drop into a window" program that converts and saves in a location set in a .ini file.
For example: (this is only part of a original file)
ÿÿÿÿ classname cell TargetName Outside1 SkyboxOnly 0
DynamicMusic dyn Music 1stfloor
AmbientSound citynight Multilevels 0 NoiseLevel 0 Atmosphere 0 LightLevel 0 UseFlashlight 1
origin -503 54 -174 cell_index 1 ÿÿÿÿ
now here is what it looks like after editing(keep in mind that this is only a snippet of the code and the code that I am editing is very long, and is very tedious work)Each block(by block I mean the square thingy in the code) in the above code has different hex values throught the code, and must be edited using hex values, not just creating strings to replace the text. In addition, every file has different values after things like "AmbientSound".
{
"classname" "cell"
"TargetName" "Outside1"
"SkyboxOnly" "0"
"DynamicMusic" "dyn"
"Music" "1stfloor"
"AmbientSound" "citynight"
"Multilevels" "0"
"NoiseLevel" "0"
"Atmosphere" "0"
"LightLevel" "0"
"UseFlashlight" "1"
"origin" "-503 54 -174"
"cell_index" "1"
}
I have predetermined most of the hex values that need to be replace with new code to create the finished code. This list of predetermined hex values is very long, and in some instances like removing double spaces, the code must be run twice. (similar to what a program would do)
Here is an Example of editing the code using the find/replace tool in my hex program.
(to remove the double spacing within the hex code we all know that the hex will look like this)
change 2020 to 20
my hex program then alerts me that "there are 2431 instances of this, would you like to replace all?" of course I selected yes.
I am including a test file to be converted. If anyone could set up a program or an import/export plugin for notepad I would appreciated it. The source files for a program that you create does not have to contain all the hex values that need to be replaced, just a few so I can get an idea of where to start inputting the remaining instances of hex values to be replaced. for example just the above mentioned find/replace I did.
The test file you can download here...
http://www.mariachimaestro.com/Swat3/Last_Resort_Stuff/codeproject_test_file.txt
Also if you are creating a program name it scn2map.exe
Copy-Cat