Log in

View Full Version : [REQ] help getting things moving.


Arclight
02-13-09, 02:58 AM
Ahoy,

A while back I slapped together a basic mod that added a colored filter to the obs scope. Basic in that it just replaces a single file. A limitation to that approach is that you can only use 1 color at a time; switching color requires quitting the game and switching to a different version of the mod. Ideally, you would be able to switch on the fly to adapt to different lighting conditions.

Hitman mentioned using movable overlays, which would be a brilliant solution. I've been giving it a go, but I'm stumbling around in the dark:

1. Does the file used for the filter need to have any special properties (specific size or something)?
2. I can't make sense of the "Menu_1024_768.ini";

[G2B I150]
Name=Filter_green
Type=1030;Static bmp ; I imagine this is important but don't know what type-setting to use
ItemID=0x2B140003 ; just needs to be unique?
ParentID=0x2B000000 ; wouldn't know what the parent is to this overlay
Pos=0,0,0,0 ; why 4, especially on 2D screen?
Zone=0 0 541 265 0 1 0x32000000 0.5 0 0x3200000f 0 0 0 0 ;not a clue
Color=0xFFFFFFFF
Materials=1 ; number of resources/files?
Display=2;Linear ;?
Mat 0=data/menu/gui/layout/Filter_green.dds
MatFlags=0x9 ;?
TexFmt=0x0 ;?

3. Another problem is getting the overlay on top of everything else, so you don't accidentally hide it behind the mask.



Any help with this would be greatly appreciated. If I bang my head against the wall any more it might result in brain damage... I somehow doubt that would help. :88) ;)

peabody
02-13-09, 12:15 PM
Ahoy,

A while back I slapped together a basic mod that added a colored filter to the obs scope. Basic in that it just replaces a single file. A limitation to that approach is that you can only use 1 color at a time; switching color requires quitting the game and switching to a different version of the mod. Ideally, you would be able to switch on the fly to adapt to different lighting conditions.

Hitman mentioned using movable overlays, which would be a brilliant solution. I've been giving it a go, but I'm stumbling around in the dark:

1. Does the file used for the filter need to have any special properties (specific size or something)?
2. I can't make sense of the "Menu_1024_768.ini";

[G2B I150]
Name=Filter_green
Type=1030;Static bmp ; I imagine this is important but don't know what type-setting to use
ItemID=0x2B140003 ; just needs to be unique?
ParentID=0x2B000000 ; wouldn't know what the parent is to this overlay
Pos=0,0,0,0 ; why 4, especially on 2D screen?
Zone=0 0 541 265 0 1 0x32000000 0.5 0 0x3200000f 0 0 0 0 ;not a clue
Color=0xFFFFFFFF
Materials=1 ; number of resources/files?
Display=2;Linear ;?
Mat 0=data/menu/gui/layout/Filter_green.dds
MatFlags=0x9 ;?
TexFmt=0x0 ;?

3. Another problem is getting the overlay on top of everything else, so you don't accidentally hide it behind the mask.



Any help with this would be greatly appreciated. If I bang my head against the wall any more it might result in brain damage... I somehow doubt that would help. :88) ;)
There is an article in here about the file that explains a lot of this info. Right off the top of my head I can't remember the name of the thread. One example is the Parent ID, just do a "find" in the file for that number and in this case you will find it is the ID of the Obs. Periscope. If I remeber right the zone has to do with the placement and the four numbers are the upper left and lower right coordinates. Problem is that sometimes the numbers are not from the edge of the screen but in relation to another object.

Just found it "Deconstructing the menu_1024_768.ini file items"

Link:
http://www.subsim.com/radioroom/showthread.php?t=111832&highlight=Deconstructing+menu_1024_768.ini+file+it ems

That should answer most of the questions and get you going in the right direction.

Peabody

Arclight
02-13-09, 03:01 PM
Ah, excellent. Thanks a lot, much appreciated. :up:

I'm sure I'll have more questions, but this should keep me busy for a while. :)

Arclight
02-26-09, 06:08 PM
It was brought to my attention that the current mod screws up the German obs. scope. A fix for stock 1.5 is released and I'm working on the rest. This matter raised a question:

Did the U-boats have a similar device (selectable colored filters as part of a ray-filter assembly)?

If anyone has an answer to this question or can point me in the right direction, it would be greatly appreciated. :)