TarSetDataMaker Version 1.0 - Readme Tutorial for Program use The Program is used to Set Target objects Data for Tardata.dat. The file(s) created by the are named "edit.dax" (.dax for short).. It does not edit Tardata or place the data in Tardata.That must be done by another Program included in the package. This Program is dedicated to Moggy, whose fine efforts and outstanding contributions to EAW and our community are deeply appreciated. -S! Before starting.. If you are not expert with Tardata.dat editing matters, or even if so, Please read Moggy's definative "techtardata.htm" webpage as you will find it indispensible.You must read the page and more as I will not explain all related issues and terminology.The level of the use of the program and guide here assumes you are familiar with most related matters.Also, since the issues can be confusing at times you will definately need his webpage to refer to.I still need it every time..!! Program Settings / Saves / Folder Structure When the program runs it creates 2 folders if they do not pre-exist.The "editz" folder and within that the "saves" folder. During editing, a data file always named "edit.dax" will be created in the "editz" folder.All data the program makes is placed there line by line as the editing process continues. The program creates a fresh new "edit.dax" there each times it is started. The only Exception to this rule is when using"Special Edit Mode" in which case the program will Append all data to the existing edit.dax in the same folder as the program's executable. During startup also any pre-existing "edit.dax" file present in the "editz" folder will be moved to the "saves" folder and renamed with a unique string of numbers. (The string is to quote the source, "a machine readable/computable code for a file time.It is basically the DOS 16 bit date and the DOS 16 bit time in a 32 bit integer.This number may be compared to other file times to compare ages of files"). The "Special Edit Mode" function is automatically set only by the presence of an "edit.dax" in the same folder as the program .exe .The file must be named exactly "edit.dax".Be sure to Remove the .dax from the .exe folder when done if you do not wish to use "Special Edit Mode".Frankly, it is not necessary to to use it much, as .dax's can be appended by other tool methods.Still, it is available. Note that a .dax can only be 255 lines long as created or to be run by the program.It will not run otherwise.(Also note: a Tardata "block" can only use up to 255 objects). Program Bugs Unfortunately this brings to mention the "impassable program bug" that the program has.I developed the program with intention of making edits up to 255 lines, however it has a bug that you must be aware of.It will only edit @ 47 lines at a time and then crashes.It is called a "nesting error".I can't fix it, as I would have to redesign the program subroutines / loops to do so.So Please,do not ask! The Program will warn you with a message on reaching Line 45 You should be able to complete the next line safely.You are recommended to quit after 45 lines.If you exceed that you are on your own!I also recommend taking some screenshots before then to be sure you remember what you have produced in this edit.dax Also : Do Not use "Cancel" button at any time or the program exits without warning! The program has some other "bugs", and some shortcomings that I attempt to compensate for with added program features.Another big one is that on Screen 2 if you minimize the window to an icon and then restore it, then screen lines, text displays and target icons will vanish.You can however refresh the lines with the "Home" Key, but only during the mousing select phase.Sorry, but any target icons except the last will not be recoverable!Nor the text until you make another edit.The issue is due to the minimzation / restore not the Screenlines.The "Home" Key will refresh Screenlines without destroying the icons, normally. I made the "Screenshot" feature so you can save pictures to compensate for this and the fact that you cannot display loaded data from an "edit.dax". Also; there is a bug that often makes the first target icon on a tile draw larger than normal.You can "fix" it by minimizing the window to a taskbar icon then restore it, and use the "Home" Key to refresh the screenlines.Then the icon will show the proper size.Ideally, this is the only time you should minimize the window to avoid the other display losses as noted above.The error also may occassionaly occur at other less convenient times.Unfortunately there is no good remedy for that.However, it does not always occur. I tried to fix this error, but lost 2 days work with no remedy.So it just has to be tolerated! I'm sort of annoyed and a little embarassed by some of the "Bugs" , shortcomings and quirks of the program, but I believe its usefulness outweights these.Once you are aware of the issues and get used to it, it is a good little program.And it will save hundreds of hours for people I am sure, so thus I must release it. Again, be sure no "edit.dax" is in the .exe folder except to use "Special Edit Mode". The edit.dax format : Shown below pic of XVI32 Hex editor is an edit.dax of only 1 single line of data that is to say, only 1 edit has been made This would be the data created for a single object for Tardata. The data consists of 10 bytes (what I call a "Line" of data).The first 8 bytes as underlined in red are X,Y data. The First 4 bytes of which, as highlighted above with the X in green is the "X" coordinate data.The next 4 bytes highlighted above with the Y in yellow is the "Y" coordinate data. The next to last byte as highlighted with blue is the "Tmod #" which is for the object type. The last byte emphasized with black is for the object orientation, that is; the direction the object faces. Unlike the usual Tardata coding only 1 byte is used for orientation, not 2.It will be the larger byte (byte 25 of a Tardata line).So just remember when you code this to enter ony a number between 0 and 255 decimal! - To read more see the TSetAdd program readme) I'm sure at this point you are wondering, "Where is the TCode?" ...Well, I hope you are... lol! The answer is the TCode is not present or edited by this program.It is to be set by the other program at the time the .dax is set into Tardata.I agonized over this decision, but ultimately since my idea is to create data sets that can be placed into any base, or Tardata, the setting of a TCode byte here would hinder the Re-use of Data. ....Well, onward.. Of the X,Y bytes the bytes hightlighted by Purple are the superior bytes (note: I'll call them the "f" bytes later, even though they may contain other than F, etc. numbers).If you view Moggy's page you will see the rather large pic of the grid and the prominent marked (mostly "ff" , etc.) graphics will give you an idea of why I refer to these bytes as the "f" bytes. Next, marked on my pic is 2 black triangular marks.The bytes above these are "the more significant of the lesser bytes".They are edited by the Program on every mouse (you will grasp later) selection.The other 00 byte to left of these are what I would call the "small data".They are only edited if you make a specific selection to enter the data.They are rarely needed comparatively, as they produce very small movements. "Re-use of Data" .. Keep this in mind ..In making edit.dax smaller is better.. because the .dax can be appended later.The more individual small "sets" you make the less editing you will do later, as you can Re-use the Data in the future.It gives you more flexibility. Program Use and Interface Monitor / Desktop Resolution The program is made only to be run at 800 x 600 monitor / desktop resolution.You Must Only use this as otherwise the data will be wrong.The mouse selector programming is only calibrated for this size! Shown below is the first Window you will see when you run the program is called "Screen 1".It will open filling an 800 x 600 screen completely.It must not be resized as this will cause errorsin the data.Do not use the maximize either.It can be minimized to a Windows taskbar icon and then restored, but even this has its quirks as I will explain later. Screen 1 uses a Background pic of the .bmp format.I made this pic by taking a screenshot in EAW while running EAW at 800 x 600.I set some aircraft factories at the extreme edges of the reliable grid covered by Tardata.They are seen at sides and also the center.This area is explained by Moggy's page. It is from (0000)F8FF to (FFFF)0700 Square.(Also you see an airfield I left in EAW.)The .bmp then I cut to 600 x 600 which works for the Winbatch coding that the Screen 1 uses.Winbatch code streches it the rest of the way.The reason I don't use a bigger one is due to this fact that Winbatch code has some strange quirks and bigger does not help. The Screen 1 you will notice is rectangular where in reality for EAW it would be square.This is just something you have to get used to.The squares lines represented and the data that the program coded coordinate system uses, use these as squares.To the program and data, it is the same width and height so do not worry.The Lines shown mark the Superior or so-called "F" bytes squares.The Red lines also mark the size of one tile. You can make your own background for this Screen 1.But first you should know that you will not be spending much time here.It is really for your visual and mental orientation. As you will notice there is a text display; "Press Button 1-16 to select tile".Also you see Tile 1 to Tile 16 Marked over the Background image.And 16 Buttons on the right numbered 1 - 16.The 16 buttons are for switching to the same number tile.A "tile" as I will refer to is an area of 1/16 of the entire possible editing area. The reason is that the area covered by Tardata for a base (block) X,Y data bytes cover an area of the width and height of 4 x4 tiles, or 16 total. One thing you must grasp later is that the area covered in your Tardata for your Base (i.e. the whole Target area) will only be aligned to an exact lineup with EAW World terrain tiles if you center the location coded in Targets.dat (Not Tardata!) to the upper left corner of the tile that it centers on.In other words the EAW World coordinates must coincide with the exact place a tile begins in the EAW world.(I will refer later to this matter as "centering the target" even though it is not really centered on the tile.The reason it is "centering" is that a target object placed at the approximate center of the grid @ "0000 0000 0000 0000" (actually .. at the upper left of tile area 11 for our purposes) will then be at the center of the target area.. another way of understanding this is: coordinates of the upper left of Screen 1 would align with a terrain tile .. not just visually , but also in data coordinates of the EAW World. Or to say; If you "center" the Target, in Targets.dat then Tardata coordinates will coincide with the EAW Terrain, (thus EAW.tm ;). O.K. if confused do not worry.. or strain yourself here.It is not something you have to deal with at this point and I'll tell how to solve that all later ;). Let us continue briefing on practical program use..One thing to ease your mind is; think of this program interface as just a visual reference. The data is not affected by the background image at all.The screen lines are also part of the program and not the background image.As is the "Tile 1" etc, text.Each screen line here on Screen 1 represents a Superior bytes data Grid Square.So the very first square is F8FF (the superior bytes X data) by F8FF (the large bytes Y data).The red lines mark an area equal to the Width of 1 Tile in EAW World coordinates. Anyway.. as I said you will not spend time here.The only practical function other than your orientation the Screen 1 does is the availability of the 16 buttons.You must select one of them to continue... ..also..Screen 1 will display here a text warning, "Note; Edit.dax Present - Special Editing Mode!!".If an edit.dax is present in the program .exe folder.Which means "Special Edit Mode" will be used. What is done by selecting a Tile button is to elect to edit within an area of the target area grid squares.There are 256 (16 x 16) of these.Each Tile area contains 16 (4 x4) of these. On to Screen 2 "Screen 2" (as I call it..) is really the Main Program editing Window.It replaces Screen 1.All editing hereafter will take place from Screen 2.You will not see Screen 1 again.It only shows at Launch of the Program. Below is the Window.I am rather proud of it as its accuracy exceeded all my expectations.You will know what I mean later, and also why tile alignment eases much of the burden and time for EAW Tardata data editing :) Here you see again a background .bmp image, named "tile1.bmp".It is just a standard EAW tile that was saved as a .bmp and resized to 512 x 512.I found this resizing to produce good accuracy. For each tile area there is also a background image.They are named "tilex.bmp" where x is for the appropriate tile area available; 1 through 16.You can replace these backgrounds with tile images of your own, resized of course, as occurs in EAW at the base location for exact edits (if "centered", i.e. aligned). Here you see there are lines also.They are also drawn by the program.They are not part of the background image. Each of the Red lines here mark a large (a.ka. superior or "f" ) grid area squares.As you see there are no labels for these (Screen 1 had none either).Because really by using this program and having a copy of Moggy's "techtardata.htm" page available as well as editing for a while you will find your way around datawise.Also I did not wish to clutter the screen and there is a programming limitation of how much can be shown at once.What you are looking at is where you will be editing.If you "center the target" later, and use specific background tiles for what your EAW base target area uses you will find the accuracy of editing most comforting. For best results on your important bases I highly recommend it.You will find that using this method you do not need to go back and forth to in EAW to check your edits.You can see where on the Terrain objects will be located.It is a great time-saver.Place a whole edit.dax full of objects.Then go into the game and look.You can always fine-tune later by redoing it or even by hex edit for small details. The other method of using backgrounds is to not center the target but make 16 EAW screenshot cuts of your EAW base target area instead.Or even just a picture you wish to use.This I never did.I prefer "centering", and recommend it.So otherwise. you will have to explore how any other method works on your own.For simple edits you can even use just any background and keep your mental image in mind.But you should use an image. The program can run with no background image, but usually produces errors! ...Back to the editing.. You can see the tile you are on displayed in lower left corner.Also shown is the small screen lines.These are grid divisions which represent "the more significant of the lesser bytes".These are the grid box locations that when the mouse is placed over later (and the BackSpace Key is pressed, during that mousing phase) the lesser data location will be marked. Also the text display of the program also shows 5 possible keyboard key selections.The program is waiting for a selection.For program operation there are basically two phases that the program proceeds with from here.One is this one, in which it waits for any 5 Key selections: Del; Undo Line [Delete] Key , which voids the previous edit . PrtSc; Screenshot [Print] Key, which makes a screenshot. Pg UP; Edit X [Page Up] Key, which is used for fine tuning lesser bytes data from the previous Line edit. Pg DN; Edit Y [Page Down] Key , which does similar for Y lesser bytes.And lastly, BackSpace; Edit Mode [BackSpace] Key , which is used to enter the next editing phase. You can use Del , PrtSc , Pg UP and Pg DN and the program will execute those functions then return to wait still at this phase for any other Key Press.In other words it is a programming loop. Only once the BackSpace Key is pressed the program moves to the next phase. The first thing shown then is a box Yes or No options to either to stay on the current tile or not If you elect to stay on the current tile or not you will move on to the next phase. (Also you can use Esc key to exit at this point) The difference of what happens is if you elected "Yes" to stay on the current tile the program moves directly into the next editing phase with no screen refresh.At that point you will see new text displays showing the new 5 Keys options available. But if you elect "No" then the Screen will refresh and buttons for new tile selection will be drawn, similar to Screen 1.You will need to Press a tile button to go to that tile.Then the program will reset the same loop and be waiting again for the already described 5 Key functions. (In other words.. think of this as replacing Screen 1 for all practical purposes as far as using buttons to select the tile to go to) Above is shown the new buttons on Screen 2 - You Must Press a Button to go to a Tile.Otherwise the program stays at this screen.No other functions are available, including Exit! Below is shown the new Screen 2 at the second phase As you can, see no Tile buttons show during this main editing phase.The current Tile is displayed and the new Key selections.As well as "Line to edit" which is the present line of data you are creating. Here is the so-called "second" or "mousing" phase.The program waits in a loop for the new 5 Keys to be pressed.The Keys are as follows: Esc; Exit [Escape] Key , to Exit the Program. Home; Refresh [Home] Key , to refresh the screen lines. Pg UP; Tmod [Page UP] Key , to Set the Tmod # (Object Type ). Pg DN; Rotation [Page Down] Key , to Set the Direction the Object faces. BackSpace; Mouse [BackSpace] Key , to set the object at the current Mouse X,Y position. Similar to the previous loop, you can use Home , Pg UP , and Pg DN Keys to perform the desired functions and still continue to wait at this phase for another Key press.The Esc Key directly exits the program. The BackSpace Key performs the all-important editing function of placing the object at the current mouse X,Y position.(You do not use the Mouse button - only the BackSpace Key ) It is Important to note that the function settings; Pg UP; Tmod and Pg DN; Rotation will set values that will continue until you change them.That is to say; you could set 45 lines of AAA (Tmod # 18 which is the default) with an Orientation of "00" (for North, the default) without changing these values once set. So you must remember this: If you wish to change the values you must reset them during each line edit! At this point I must elaborate again on some of the limitations / quirks of the program. One is the window minimization issue as mentioned previous.The other is the difference between staying on a tile while editing vs. moving to another.The difference other than of course the data placement is only by staying on the same tile will you be able to continuously see the target display icons.Because when you jump to another tile there is no way to display them.The same is true also should you minimize the screen.You will lose all the icons (except the last, usually). Editing Details ; Coordinates, Icons, etc. Once the BackSpace is pressed the the second or "mousing" phase is complete a small red box will be displayed at the approximate location.Also Text for the Decimal # of the Tmod The box is supposed to be the size of the small boxes made of the fine grid lines.You see the actual edits made by mouse selection should be understood as follows: The coordinates selected are for the boxes, not the line intersections.Each box represents a coordinate.These are hard-coded in the programming.They do change per the mouse movement within the small boxes. It will only be centered if you made the mouse selection exactly in the center of a square.It pays to do so unless you wish to fine tune the mouse X,Y later and wish to position the visual display for the object to be where you will fine tune.You cannot move the icon later. The Red lines on Screen 2 represent divisions of the so-called Superior data or "f" bytes.These are the same as the lines on Screen 1.The darker black lines here on Screen 2 are only for visual reference.They would be equivalent of 1/4 markers , or "40" ,"80" , "C0" in hexidecimal.The small lines (including the dark lines) divide each area.Or more specifically the boxes do, as far as using the mouse.Within each area of the Red there are 16 small boxes.Each of these as said represents a coordinate.The coordinate is supposed to be 1/16 of "the more significant of the lesser bytes" data, or 1/16 of 256 (hexidecimal FF). (Actually I divided these actually each as a decimal value in multiples of 15 starting at 15 as a compromise, due to limits in the way I programmed the mousing loops - so its a little off technically, but none-the-less each division is 16th of the area) If its confusing, just know that as I said each box codes for 1 of 16 data values for the byte in question which governs this.This would be again, as said, the byte of "the more significant of the lesser bytes" which is shown on the pic of the edit.dax with the triangular black mark underneath. So when you select a small box a standard value for the coordinate is set.Both the X and Y data are set by the using the BackSpace when the mouse is positioned at a box. It does not matter exactly where within that small box you pick, except that the visual icon will be affected. More on Editing Features Now this brings me to the matter of the previous phase or loop Key selections, namely: Pg UP; Edit Xand Pg DN; Edit Y. They edit this same data, including the "small" byte of the "lesser bytes" for X and Y you use those Keys. Let me just note here that the "small" bytes are not ever edited by the mouse selection - they will always be "00" unless you chose to edit the data later by the Key functions. Here is a pic of the box that opens when you use Pg UP; Edit X.The X data is in the reverse order as it would be seen in the file.That is just a quirk I left in the program.The data shown here is F (hexidecimal 0F) which is the "the more significant of the lesser bytes", and 00 which is the "small" byte.These bytes always show as 00 since they are hard-coded by the program, unless you change them here.You can change these 2 bytes to any hexidecimal values.Same is true for "Y" Function (not shown). Since after you make an edit pick with the mouse the program will reset to the previous phase again; in that next phase is when you have a chance to make a change to the data.After that you cannot change it.Unless of course you chose to use Del; Undo which voids the previous edit. It may be important you know how that works.It actually it just resets the "linecounter" the program uses back by one line.So that the next line of data will overwrite it.That means that the data for that line still exists until the next edit overwrites it.So if you Esc (Exit) on the next phase your edit.dax will still contain the line.You have to be aware of that.Also if the program crashes or exits for any reason before another edit is made. So to avoid errors; Do Not use Del on the last line and then Esc.. Also avoid multiple Undo's as for each line you will have to overwrite with a new one. Wrapping it Up.. Here is a screenshot of some target objects I set during an edit. The program's built in screenshot feature works well!It makes a .bmp.And the picture will include the whole editing window.It will name the picture "screenshot(xxx)" and will be in the same folder as the .exe.The name string (xxx) being a combination of the Tile you are on (x..) followed by the Line of edit (..x).So in this case I was on Tile 1 and the line of edit was 11.Thus the pic was named "screenshot111.bmp". About Centering To read how to adjust this matter read the included file "tda1.txt" or inserted below. Reminder about Program / Desktop / Taskbar / XP Once again just be sure the program window covers your 800 x 600Desktop completely without adjustment.This should work easily and be the case on Windows 9x.The program also works in XP (and probaly Win2000) but there you must be sure you have set your Windows desktop taskbar to "autohide". For Win9x if you have any problem you can also do this or check that you don't have any desktop software running that "keeps applications from stealing focus" or similar functions. Well, that's it!??... I think..lol .. except: You get a icon that draws too big on the first edit. Just minimize the screen to a taskbar icon, then restore it and refresh it ..It is a strange "stack" error and I can't avoid it.I tried fixing it a dozen times!!also: Included: Tmod List Also included is this file atmoslist.txt Maybe by my description and such a long readme you might have the impression it is complex and difficult to use this program.But actually it is very simple. However it was not so simple for me to make!It seemed to fight my every move and every single area, not matter how simple caused a problem!Thus, I'm sorry, but I will not rewrite the program! I will release the Winbatch source code and anyone who wishes is welcome to use it to make whatever fixes they like.Once understanding the program functions you could probaly redo it in some other code better.And you are welcome too!Just please rename the result so as to avoid confusion. Thanks.. and GL ! RAF_Roy 7 to 9 , 2004 To RAF_Roy's Site