osh
New Member
Posts: 44
|
Post by osh on Aug 6, 2014 5:31:19 GMT -5
Some of you maybe remember, that 5 year ago I've tried to removing flashing lights from moths and especially hangar lamp. But although removing lamps of moths is possible, I have other question. Is it possible to stop the rotating of these lamps (in hangar and on moths)?
|
|
|
Post by duncan on Aug 6, 2014 14:53:41 GMT -5
Hi - at least for moths this is possible by modifying th ART file. Below some notes on the ART file format
Duncan oct2013
ART file format based on MOTH2.ART
In this file the filenames of the 6 LOD models of the moth are referenced as well as the anchor points for helper models (rotating lamps, gear) and at which LOD level they should still be drawn. Drawing and motion of helper models depends on anchors specified in SHP file for at least the gear.
Header address length value tentative function 00 4 0x15 version number 04 24 0x00 - 28 4 0x708 file size 32 4 0x40 (=64) offset to main model 'niam' 36 4 0x00 - 40 6x4 unknown
First data structure 64 4 'niam' ascii identifier 68 4 0xb0 (=176) address of next data structure 72 5x4 0x00 - 92 14 'Moth2a.shp' filename top LOD model 106 14 'Moth2i.shp' filename next LOD model 120 14 'Moth2ax.shp' filename next LOD model 134 14 'Moth2ay.shp' filename next LOD model 148 14 'Moth2s.shp' filename next LOD model 162 14 'Moth2ss.shp' filename next LOD model
Next data structures 176 4 '1pml' ascii identifier 'Lamp 1' 180 4 0x00 address connected model 184 4 0x124 address next data (2pml) 188 4 0x0c (=12) ?'behaviour' - rotation 192 3x4 signed long X,Y,Z coordinate 204 14 'lamp1.shp' filename helper model 218 14 'lamp1.shp' filename helper model 232 14 'lamp1.shp' filename helper model 246 14 'lamp1.shp' filename helper model 260 14 0x00 not used for this LOD level 274 14 0x00 not used for this LOD level 288 4 0x00 -
'2pml' 'yabr' '0rgl' - connected data='1rgl' - next data='yabl' '1rgl' '3rgl' '4rgl' '5rgl' 'yabl' - behaviour 0x08 '0rgr' - behaviour 0x0c '1rgr' - behaviour 0x10 '3rgr' - behaviour 0x00 '4rgr' - behaviour 0x0c '5rgr' - behaviour 0x0c
file ends
Note 0rgr connects to 1rgr connects to 3rgr connects to 4rgr connects to 5rgr end link yabl pairs with rgr and yabr with rgl
Tweaking notes (on docked moth with gear folded out): change coordinate yabl - only hatch of gear compartment moves change coordinate 0rgr - moves entire gear, other xrgr coords must be relative change 0C->08 on 5rgr - forward toe of gear disapeared change 0C->08 on 0rgr - upper leg folded up in gear compartment, rest sticks out change 10->08 on 1rgr - lower leg sticks to side not down
it seems that 08->0C->10 are 90 degree rotations note the change on 0rgr seemed to have rotated over 2 axis
1RGL and 2RGL anchor points in SHP mesh needed for functional gear
|
|
osh
New Member
Posts: 44
|
Post by osh on Dec 4, 2014 3:35:06 GMT -5
Message from 17.08.2014: Well... Stopping rotation on moths (changing 0c into another value) gives weird effects - lamp stops rotating, but is very bright from another angle of view. And I can't find in hardwarW.exe, which byte is responsible for this wild hangar lamp flashing. I've modified files lamp3a.shp and lamp3b.shp so, that lamp is invisible, but this flashing is still visible... I've found many files with .RMP extension and L (L7A.RMP, L7B.RMP and so on) but when I remove it from Hardwar.RES, nothing has happened...
EDIT:
I DID IT!!! I found a byte which is responsible for this <CENSORED> flashing! It is located at offset 2ADAC in file HardwarW.exe. Changing value from 0c into 00 causes complete disappearing the hangar lamp (in fact, I think, the lamp is moving down out of the hangar, because changing 0c into another values cause changing its vertical position). Now my goal is stop flashing on moth's lamps. I can completely disable, but this is not a good idea, because moths are practically invisible from long distance. I want only to stop flashing, and force it to glow permanent (something like monorail's lamp). Any idea?
|
|
|
Post by duncan on Dec 4, 2014 14:21:28 GMT -5
Message from 17.08.2014: Well... Stopping rotation on moths (changing 0c into another value) gives weird effects - lamp stops rotating, but is very bright from another angle of view. And I can't find in hardwarW.exe, which byte is responsible for this wild hangar lamp flashing. I've modified files lamp3a.shp and lamp3b.shp so, that lamp is invisible, but this flashing is still visible... I've found many files with .RMP extension and L (L7A.RMP, L7B.RMP and so on) but when I remove it from Hardwar.RES, nothing has happened... EDIT: I DID IT!!! I found a byte which is responsible for this <CENSORED> flashing! It is located at offset 2ADAC in file HardwarW.exe. Changing value from 0c into 00 causes complete disappearing the hangar lamp (in fact, I think, the lamp is moving down out of the hangar, because changing 0c into another values cause changing its vertical position). Now my goal is stop flashing on moth's lamps. I can completely disable, but this is not a good idea, because moths are practically invisible from long distance. I want only to stop flashing, and force it to glow permanent (something like monorail's lamp). Any idea? Cool stuff. The moths have an ART file associated to them with data on lamps and gears in six LOD levels. Here are Above some of my notes when I looked into it a year ago. So if you open an ART file in hexeditor and find the 1pml or 2pml data structure, and change the 0C in the 3rd byte after, it may affect rotation (or it may not, just speculation) ---edit oh I get it, that didnt work. Another idea. The monorail lamp is a material, so maybe you can stick it to the surface of the lamp in lamp1.shp and lamp2.shp. Maybe it needs that material then added to MOTHS.MAT or maybe anothoer shiny material already is present in moths.mat Not sure if that will lead you anywhere.
|
|
|
Post by duncan on Dec 4, 2014 14:42:02 GMT -5
btw how did you finally find the responsible byte in hardwarw.exe? thats quite amazing.
|
|
osh
New Member
Posts: 44
|
Post by osh on Dec 30, 2014 18:48:31 GMT -5
I DID IT!!! I've found a bytes which are responsible for flashing moth's lamp (green and red)! For stopping red lamp flashing: Offset 3BD92 Change value 44 to 09 For stopping green lamp flashing: Offset 3BEC1 Change value 44 to 09 And two important things: First, you have to modify all Mothx.ART (except MothA.art, which is for Alien Moth responsible) files: in offsets BC and 130 you have to change value 0C to 00. Second: for permanently lamp's glowing from each side it is necessary to create "empty" lamp's objects. 1. Extract Hardwar.res with ResEdit. 2. Set desktop depth to 16-bit. 3. Launch Refmax editor, choose Shape Editor. 4. Choose Object, then Load and choose Lamp1.shp 5. Then choose Scale, in field Rescale type 900, OK, and repeat. 6. Click Polygons, and then Delete 7. Go into upper right corner, click V 8. In the Window "View Setup" you have to choose 5 positions from left column. First click Left, and then OK. You should now see left view of lamp. If the option Delete is in red, then click on each part of the lamp and delete it. The same procedure you have to do with positions Front, Right, Bottom, Top and Rear. Delete each part, and after deleting click save. Enter. The same you have to do with Lamp2.shp. 9. Pack all extracted files with ResEdit and create new hardwar.res file. 10. That's all, both lamps will glow permanently now.
|
|
|
Post by techno on Dec 30, 2014 20:10:06 GMT -5
Nice work osh!one question,can you adapt this to put the stars that flicker in the sky back how they were pre uim?
-Techno-
|
|
osh
New Member
Posts: 44
|
Post by osh on Dec 31, 2014 3:44:10 GMT -5
Hmm, hard to say techno. I'm not a programmer and all these changes were found by MUCH luck, and a little logical thinking. Lamps have an IDs (for example hangar's lamp have ID PMAL) which can be found in HardwarW.exe file. Only this made possible to stop this flashing, it took me 5 months to found it. Maybe stars have a IDs too, but I have to check this... but I repeat: I'm not a programmer, I can't using special programs like OllyDbg and founding byte which is responsible for star is almost impossible...
|
|
|
Post by Captain Zedo on Dec 31, 2014 8:24:44 GMT -5
Amazing! I know it had to have taken some hard work to find that lamp's code.
|
|
osh
New Member
Posts: 44
|
Post by osh on Jan 1, 2015 11:31:38 GMT -5
Now I can play Hardwar without dizziness. After 8 years.
|
|
|
Post by techno on Jan 1, 2015 16:04:27 GMT -5
I think the stars are "spr" files from what I remember
|
|
|
Post by Pilot on Jan 10, 2015 2:13:54 GMT -5
I never had noticed the stars flickering, hmm too much fog? Or was I to busy checking every single radar tick, I'll let the deceased ais' judge. |=_=]
|
|