A) A 3do file is a binary file that is used by papy sims to define 3d objects in their games. the 3do file contains information like 3d polygons 3d points 3d lines 3d collision detection planes other 3do objects aditional misc information
A) The 3do file constists of a basic header containing identifier characters (like a magic number) plus a size of file integer. the rest of the file then consists of similar sub sections with headers and then the data. most 3do objects consist of a) Header b) A XYZ section holding 3d points c) A string section holding filename/keys (hash table entries!) d) A 3do tree structure optionally e) A handles section (hastable) a hash table of offsets into the 3do tree f) A planes section (used for clipping,collision) and detecting if a polygon is facing you or not g) A normal sections (possibly to help speed car drawing)
A) Firstly the best thing to do is to work on a 3do file rather than a .dat file, but before we can start we need to get to the 3do files to be able to edit them. ok so first before we go any futher use the windows explorer to look at the cars67/lotus directory you might want to make a copy of the lotus.dat into a safe place. now open the gpl editor and select File->open now change the selector to open .dat files now goto the cars67/lotus directory and select lotus.dat when it askes you do you want to read the .3do file say yes! now you'll see a white screen with nothing on don't worry about that its normal when editing a car. now to unpack all the files select edit->Unpack All after 2 or 3 seconds they should all be unpack and you can fine them in the cars67/lotus/temp directory now close the .dat file and now open the .pck file in the lotus/temp directory again selecting yes at the shall I load the 3do file now now open the tree and open the 3do files part find the lotus.3do and double click on it, this should open a openGL view of the car.... ish! well what it is actually showing is the cockpit alone, the car is there in the 3do world but papyrus put it at a different offset. ok so now we want to make a simple change to the car say perhaps change the position of a single point. firslty open the MIRP section you see lots of sections like patch, poilt etc... this are pointers into the tree at the specific points they all mean something for instance poldt mean the oil temperate on the cockpit panel, but more about that lot later.... ok so lets find the section labeled "car" click on the + beside it and then you'll see the top of a tree (Flavor 13 for the lotus) now select this node and then right to get a menu up select Set Top of Drawing tree this does nothing until you then click in the main window (I'd better fix that one!) but when you do the object jumps to a 3d view of the car. (in the last release (0.2.2) it was just a nose cone but the rest is there don't worry about that just yet!) ok so zoom in you should be able to see the basic shape. I find it easier to view it in wireframe sometimes but its upto you. don't forget the mouse btn1 moves the window around and ctrl can be use with the mouse button one to move it around another axis. now for the new but I've added in the functionality to allow editing of point by pressing SHIFT and clicking with the left mouse button. this turns it into a blue square. (not to be confused with the blue square that represent sub objects!, more on that later) now double clikcing on the blue square will bring up the point editor for that point and away you go and move the point around. now to save the file my perfered way is to return to the tree and select the lotus.3do (yellow can) now right click and select "Save Selected File As" now save this to what ever you want. you may well find that you change does not appear in the game and this is to do with the structure of the tree of the cars it have these node (Flavour) that state which model is draw at which distance from the car you have to find these nodes and use the Set Top Draw Location to view the car at another point. they are not hard to find just keep selecting nodes down the tree until another node is found, I'll put some support in soon to help make navigating these tree easier but for now there should be enough to get people started. to get to the View Distance part for the main car body follow the following node offsets (for the lotus) 11ad4 -> (T-25) -> 11a88 -> dde0 -> ddd0 ->dd8c the six nodes contain in the dd8c t-17 (dec) are the different body styles for different distances use the Set Draw Location (right mouse menu!) to select the different ones by default the GPLEditor only ever draw the last in the t-17 node but this is not the correct thing to do hence the missing engine. maybe in a later version.
This is kinda complicated but as time progresses I'm sure we can new ways to do this that are easier, through writing this document alone I found things that can be improved and this has helped shape development. Adding a polygon consists of adding a node to the tree and were we add this nodes is dependent on what gets draw at a particular time. I was pretty lucky with the lotus becuase I found an empty node in the car section that could be used to put polygons into but I think what I need to do is to allow extra children to be added anywhere but that is for later. ok so what did I do, well firstly I found an Empty Node -1 within the tree these occuar every now and again. I found one in the main body which is how I was able to add the wings firstly locate the node then what I did was to select the node and then right click and select Inset->Replace Node this simply removes the old node and replaces it with a new one I did this and replace it with a Node 0x4 which is simply a multi child parent it asks how many children I wanted so I said 6 3 for the front wing 3 for the rear wing now this creats 6 "Empty Node -1" children and for each node I simply did a "Replace Node" with a 0x81b which is a Flat polygon, hence I have no polygon texture at the moment (but this we will do next!) now each polygon is empty and comes with default vertices of 0,1,2,3 you want to be able to add new points for the wing so that you don't upset any of the rest of the car structure I did this by adding a new point button into the toolbar I added 24 new point 4 for each polygon I made a rough guess first then moved the points later. before doing the acurate position I went back to the polygons and colored them and updated the verticies I colored the 20,20,20,255 to make them a little grey rather than black and the points I'd added started at 810 so I change the verticies by double clicking in the list of verticies to 810 811 812 813 for the first one 814 815... etc for the next and so on now I could see my polygons I used the mouse left button with the SHIFT button to move them around. I'm experimenting with the middle mouse button and the CONTROL button to do on screen moving but its not very intuative at the moment. after I'd made all these changes I save the file out as lotus.3do in the cars/lotus directory and ran the game. actually I save it out alot becuase sometimes the tree collapses and you loose your place but I didn't want to loose my work. The collapsing is an annoying feature and I'll attempt to improve this soon. If the tree does not sometimes update with your data simply save the file out close it and reopen it again I'll look more at this when I can.
Some people have asked me what objects can they edit, well at the moment you should be able to edit all N2 3do including track,cars and trackside objects but in GPL you are currently limited to a few cars and most of the track side objects becuase of on going development and some information that is still being gathered it is currently not possilbe to edit any GPL cars other than lotus and ferrari any track.3do file in time I'll add the ability to edit these.
ok this is opening a window to show the 2D view file if there was one I currently don't draw anything in here yet! its left over from when we only viewed tracks to open the car from the dat or pck file you must open the tree and then open the 3do files box then select the 3do you would like to view probably lotus.3do to open this double click on in the tree. having done this you'll probably want to read the next question
ok this is becuase the car is made up of a number of different parts a cockpit object and a car object and by default the cockpit object comes up center screen to get the car intop the view open the lotus.3do tree and select the MIRP section this is the 3do flavours itself in a tree structure. now find the section that says car now open this an select the first node right click now and select "Set Top Draw Location" this should now change the view to viewing the car use the zoom button to get closer and the mouse button 1 with/without the control button to move the car around in 3D space. the mouse button1 with shift can be used to select points and the middle mouse button with control can be use to move them around but this is just experimental
My assumption is no its simply a graphic thing, unless GPL is an incredible simulation in that it determines its handling form the shape of the grapics... (highly unlikey!)
Firstly as said in many other Papy editing source you'll need to unpack the dat files this can either be done using the PACK/UNPACK utility that can be found on most web sites or you can use the GPL Editor directly to read these files in. the GPL Editor prefers you to unpack these files preferably with winMip or GPLEditor that way both utilities generate a .pck file which acts much like a project file or makefile. this is just a simple text file that can be edited with notepad to add in other file if you so desire but from this file the GPLEditor can automatically build a .dat file in the correct loction. becuase the file is small it also means that it can read the file very quickly. So the prefered sequence of events is to A) open the .dat file from within the GPLEditor B) select edit->unpackAll C) close the .dat file D) open the .pck file in the Temp directory E) now when you want to rebuild the .dat file simply hit the build icon in the toolbar.
Well I've mentioned before but I'd better make myself clear, when the cars are loaded the 3do tree consists of more than one object and GPL uses the handles section to define those entry points in the 3do tree that can be seen. for example the steering wheel has an entry point as does the cockpit and the car itself. currently I only draw from the top of the tree and in most 3do objects this means draw everything but in the cars it seems to be more like draw the cockpit only. this aside we can draw the car by opening up he MIRP section and then opening up the car bit and then selecting the right menu option of Set top draw location. I may add some code soon to allow you to choose which section you can view.