Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
40 user(s) are online (23 user(s) are browsing Forum)

Members: 0
Guests: 40

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +30€

Current balance: -190€
(last updated 04/2017)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 51 users playing Freelancer on 38 servers.
July. 28, 2017

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post

(1) 2 »


About HUD edit
Just can't stay away
Joined:
2008/5/26 14:24
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 457
Offline
First please look this attachment picture:

I know the picture use the PS to make, but I mean where I can find the HUD position of file? and I can edit it then make the HUD change its position?

Thanks for you help.

Attach file:



jpg  1.jpg (27.35 KB)
203_550afdfd86aef.jpg 337X212 px

Posted on: 2015/3/19 16:47
Open in new window

The mod is only me working on it.
Top
Re: About HUD edit
Just can't stay away
Joined:
2010/8/9 17:45
Group:
Registered Users
FLServer Admins
Posts: 303
Offline
To be honest:
I would give anything if someone would offer a graphic-engine-conversion for Freelancer like this !!! And if this would be possible to do, without the need to change the whole configuration-structure of the game as it is... That would be a dream come true !!!

But... back to your question.
To change positions of hud-elements I use hudshift.dll and jflp.
In stock Freelancer the file "hud.ini" in DATA/INTERFACE-folder refers to these elements but... whatever you do... it will never look like THIS !


Greetings

J.R.

Posted on: 2015/3/19 20:48

Edited by J.R. on 2015/3/19 20:55:04
Edited by J.R. on 2015/3/19 21:15:16
ENIGMA V.4 ATG HOMEPAGE/FORUM
Top
Re: About HUD edit
Just can't stay away
Joined:
2008/5/26 14:24
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 457
Offline
Hi J.R., thanks for your reply.

I was check the hud.ini but I can't find any about to change the ContactList, Status, etc of positions in the file, maybe need hack?

And I remember has someone was change the HUD appearance, it is about the wireframe in some 3db or cmp files, but I can't find it to edit.

Posted on: 2015/3/20 0:54
Open in new window

The mod is only me working on it.
Top
Re: About HUD edit
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1763
Offline
The positions are hardcoded, use HUD Shift to change them.

Posted on: 2015/3/20 5:21
Top
Re: About HUD edit
Just can't stay away
Joined:
2008/5/26 14:24
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 457
Offline
Quote:

adoxa wrote:
The positions are hardcoded, use HUD Shift to change them.


Thanks Adoxa, you mean just change the HudShift.ini of position?

And I remember the HudShift.dll will auto change the HudShift.ini, no need to setup, am I right?

About the HUD appearance, does have a way to change it? need hack or just edit some 3db or cmp?

Posted on: 2015/3/20 9:24
Open in new window

The mod is only me working on it.
Top
Re: About HUD edit
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3435
Offline
All the HUD is model-based, but you're very limited in what you can move around or change because buttons won't be moved. HUDShift can move some bits, but you won't get the ability to move every single button.

You won't be able to do that curved UI effect.

Posted on: 2015/3/20 16:36
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: About HUD edit
Home away from home
Joined:
2009/7/30 4:40
From P.R.C
Group:
Registered Users
Senior Members
Posts: 843
Offline
Quote:

JONG wrote:

About the HUD appearance, does have a way to change it? need hack or just edit some 3db or cmp?


Yep, you need to change 3db and cmp to change the transparency (Oc node in Material library -> *mat name* -> Oc).

And if you want to change UI text, you need hack a little bit of Freelancer.exe. Again, thanks to @adoxa: http://the-starport.net/freelancer/fo ... t_id=23562#forumpost23562

!!!!!!!!!! OFF TOPIC ALERT !!!!!!!!!!!

@FriendlyFire, please check:
http://the-starport.net/freelancer/fo ... ewtopic.php?topic_id=5761
(I tried many ways to reach you, your email the expert one says invalid, and I sent you message with Hangout but no response, seems you abandoned it ..)

@JONG, please check your site Inbox.

Posted on: 2015/3/21 12:36
Open in new window
Sorry for my poor english...
Top
Re: About HUD edit
Just can't stay away
Joined:
2008/5/26 14:24
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 457
Offline
@FriendlyFire

Thanks for your reply, maybe I need to give up to edit the HUD.

@NeXoSE

Thanks, I was reply you. ^_^

Posted on: 2015/3/21 19:19
Open in new window

The mod is only me working on it.
Top
Re: About HUD edit
Home away from home
Joined:
2009/7/30 4:40
From P.R.C
Group:
Registered Users
Senior Members
Posts: 843
Offline
Quote:

JONG wrote:
@NeXoSE

Thanks, I was reply you. ^_^


That's weird, I didn't see any reply since 2015/3/6 15:45:45.

I just make sure you are notified so we don't have suspicions between us here.

Posted on: 2015/3/22 5:19
Open in new window
Sorry for my poor english...
Top
Re: About HUD edit
Just can't stay away
Joined:
2008/5/26 14:24
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 457
Offline
That's real weird, I was answer that in my inbox for you.

Never mind, you are alway my friends. ^o^

Posted on: 2015/3/22 6:04
Open in new window

The mod is only me working on it.
Top
Re: About HUD edit
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1763
Offline
Quote:
And I remember the HudShift.dll will auto change the HudShift.ini, no need to setup, am I right?

HudShift.ini is initially configured to move elements back to the edges of a wide screen, attempting to automatically determine how it should shift.

Posted on: 2015/3/22 6:59
Top
Re: About HUD edit

Joined:
2011/11/22 17:43
Group:
Registered Users
Posts: 49
Offline
Quote:

FriendlyFire wrote:
All the HUD is model-based, but you're very limited in what you can move around or change because buttons won't be moved. HUDShift can move some bits, but you won't get the ability to move every single button.

You won't be able to do that curved UI effect.
I definitely had a control over navmap's plane. This is seems to be the same. But i did in memory, may be now really just enough to re-model hud's 3db: rotate/scale in 3dsmax and export(without reset xform), just a theory. As for controls, same approach? And a little bit of hacks for positions as mentioned. And to take care about mouse calculations in case fl performs its in flattened 2d (fatality lol).

Posted on: 2015/3/22 12:11
Top
Re: About HUD edit

Joined:
2011/11/22 17:43
Group:
Registered Users
Posts: 49
Offline
I have no clue how to rotate text. May be need to choose another renderer's proc(DALib.dll), but better check its released source(if has not been changed). Whatever float I change in Label(i don't remember the name) struct it neither scales nor rotates. Finally those buttons are "montage" very specific, you need to load them as true-3db and render them by proper proc to be able to adjust 3d positions with keeping original "montage" behavior(long story).
Open in new window


Danger next. I swa fwtow implemented circle-menu by mouse-wheel, idk whether it's overlay or native so leaving tldr obsolete test code to those who'd like to try to do custom controls(i keep hopes for a hud framework ). The only rule is any 3db file must have a proper VMeshLibrary node (as fl beta's ones). If it doesn't exist Freelancer looks into interface-generic.vms.

Code:
  
var
  CustomXYZ : array [0..2] of Single = (-0.21,-0.37,0);
  CustomBND : array [0..2] of Single = (0.014,0.014,0);
  Custom3DB : PAnsiChar = 'HUD_custom.3db';              
  CustomTXT : PAnsiChar = 'CustomExperimental';
  CustomBTN : Pointer;

const
  //actually there're some bits, however freelancer often uses "test al,al jnz" so nobody cares
  UI_CONTROL_VISIBLE     = $0B;
  UI_CONTROL_INVISIBLE  = $08;

//Constructing (Hook somewhere in one of hud creation procs like sub_4DA930 ("Status HUD" related))
  push    0
  push    0
  push    $5FF              //name?/hint? resid(?)
  push    0
  push    0
  push    1
  push    0
  lea     edx,CustomBND
  push    edx
  push    0
  lea     eax,CustomXYZ
  push    eax
  push    0
  push    $5CED30        //"ui_select_item"
  push    0
  push    Custom3DB
  push    CustomTXT
  mov     ecx,esi          //parent??? keep in mind we're in sub_4DA930,todo: check what is esi 
  call     sub_5A0C90   //"ButtonControl"
  mov     [CustomBTN],eax
  mov     byte ptr [eax+$6C],UI_CONTROL_VISIBLE

//Rendering (Hook 0x4E793D with JMP in sub_4E7890(in-space hud renderer?))
  mov     esi,[CustomBTN]
  mov     eax,[esi]
  mov     ecx,esi
  call    dword ptr [eax+$08]
  mov     edx,[esi]
  mov     ecx,esi
  call    dword ptr [edx+$34]
  //origin code included
  mov     eax,[edi]
  mov     ecx,edi
  pop     edi
  pop     esi
  jmp     dword ptr [eax+$9C] 

//Clicking (Hook 0x59D212 with JMP in sub_59D140 (global hud click loop?))
  mov     edx,[eax]
  lea     ecx,[esp+$10]
  push    ecx
  mov     ecx,eax
  cmp     [CustomBTN],ecx
  jne     @@default
  //your action...
  push    $59D220
  ret

@@default:
  call    dword ptr [edx+$4C]
  mov     bl,al
  push    $59D220
  ret


Simple parallel in-game stuff rendering (3db/cmp), however need to sort the code out first one day. It might not work. There're a lot of *Renderers* and methods.
Code:
var  
  Model : T3db;

//Initializing
  lea       ecx,Model
  call        sub_420D40 
  mov       ecx,$3F800000
  mov       [edx+$20],ecx
  mov       [edx+$1C],ecx
  mov       [edx+$18],ecx
  mov       [edx+$14],ecx
  mov       [edx+$24],ecx
  mov       [edx],$5D2EFC
  mov       [edx+$10],$FFFFFFFF

//Loading
  push      1
  push      0
  push      FileName
  lea       ecx,Model
  call      sub_59EC80

//Rendering
  lea      edx,Model
  mov       edx,[edx+$04]          //$FFFFFFFF = not loaded, won't be rendered
  mov       eax,ds:[email protected]@@3PAUIRenderer2@@A ; IRenderer2 * DALib::Renderer
  mov       eax,[eax]
  mov       ecx,[eax]
  push      0
  push      0
  push      $300          //?
  push      $3F800000 //?
  push      edx
  push      esi             //Parent?/Handle?
  push      eax
  call       dword ptr [ecx+$1C]

//Freeing
  lea         ecx,Model   //mov?
  call        sub_59EEE0
  lea         ecx,Model   //mov?
  call        sub_59EF20


Types:
Code:
  { 3db bounds ? }
  P3dbData = ^T3dbData;
  T3dbData = record   //80 bytes
    tbl1 : Pointer;   //engbase.dll off_66295D0
    sqzx : Single;
    u1   : Single;
    u2   : Single;
    u3   : Single;
    sqzy : Single;
    u4   : Single;
    u5   : Single;
    u6   : Single;
    u7   : Single;
    posx : Single;
    posy : Single;
    posz : Single;
    u8   : Single;
    u9   : Single;
    u10  : Single;
    u11  : Single;
    u12  : Single;
    u13  : UINT;
    u14  : UINT;      //0x88000000 ?
  end;

  P3dbInfo = ^T3dbInfo;
  T3dbInfo = record   // 64 bytes
    u1       : UINT;  //0x180A0000 ?
    filename : PAnsiChar;
    u3       : UINT;
    u4       : UINT;
    hash     : UINT;  //filepath hash (like "Interface\NeuroNet\...\file.3db")
    u5       : UINT;  //reference/created count ? (probability ~90% lol just bcoz debugged & saw)
    u6       : array [0..7] of UINT;
    u7       : UINT;
    u8       : UINT;  //0x88000000 ?
  end;

  P3dbRec = ^T3dbRec;
  T3dbRec = record  //248 bytes
    u1       : UINT;                       //2
    _3dbdata : P3dbData;                   //critical
    _3dbinfo : P3dbInfo;
    u2       : array [0..6] of Single;
    p2       : Pointer;
    u3       : array [0..41] of Single;
    u5       : UINT;                       //1
    u6       : array [0..5] of Single;
    u7       : array [0..1] of Byte;
  end;

  P3db = ^T3db;
  T3db = record     //40 bytes
    tbl1     : Pointer;  //freelancer.exe off_5D2EFC -> sub_48DD20 (freememory or something)
    _3dbrec  : P3dbRec;  //$FFFFFFFF -> not present
    u1       : UINT;     //0
    u2       : UINT;     //0
    u3       : UINT;     //$FFFFFFFF -> not present ?
    u4       : Single;
    u5       : Single;
    u6       : Single;
    u7       : Single;
    u8       : Single;
  end;


The site got rid of me while I was writing and i see it's possible to post without logging in again, but i could not daamn

Posted on: 2015/10/2 22:20
Top
Re: About HUD edit
Just can't stay away
Joined:
2008/5/25 23:28
Group:
Registered Users
Posts: 203
Offline
If you ever get this fully working WhiskasTM, I'd love to use it when I get around to working on the HUD.

Posted on: 2015/10/2 23:10
Top
Re: About HUD edit

Joined:
2011/11/22 17:43
Group:
Registered Users
Posts: 49
Offline
Zyos, it'll be need to be coded anyway(what controls should do). Not me I think, someone else.

Now, crashing(3db). Someone gets a float value rather than a pointer at it. At least it's working in navmap rendering proc(i cut the code out there).

Buttons are fine, created in "Status HUD" context, left one activates cruise, right one turns off lights(except for docking ones), vice versa. On minimizing hud both disappears for a moment. Nothing updates on loading games, leaving bases, changing ships etc. Just a concept.
Open in new window





Attach file:


zip EnvCustomHud.zip Size: 33.30 KB; Hits: 133

Posted on: 2015/10/3 15:25
Top
(1) 2 »