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
50 user(s) are online (31 user(s) are browsing Forum)

Members: 0
Guests: 50

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

Current balance: -70€
(last updated 08/2019)

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 74 users playing Freelancer on 35 servers.
August. 25, 2019
The Starport Forum Index > All Posts (adoxa)

Bottom Bottom   Previous Topic   Next Topic

« 1 ... 121 122 123 (124)


Re: tradelane spawning, faction_weight spawning.
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1908
Offline
Quote:

Vital wrote:
1st, question about faction_weight: is this the parameter that controls the color of the zone on political map??


Don't worry about faction_weight, it's not used at all (the string "faction_weight" is not present in the exe or any of the DLLs).

Posted on: 2009/8/21 15:15
Top
Topic | Forum


Re: Infocard XML coding
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1908
Offline
I would have thought there'd be more info on XML/RDL, but a search for "underline" (since "tra" and "rdl" are too small) only seemed to yield this topic. Since I've just gone through it again for my patch, here's a complete description of the TRA tag.

<TRA
data="0xBGRA|<number>"
mask="0xBGRA|<number>"
def="0xBGRA|<number>"
color="default|gray|blue|green|aqua|red|fuchsia|yellow|white|#RGB|<number>|0x<hexnumber>"
font="default|<number>"
bold="default|true|false"
italic="default|true|false"
underline="default|true|false"
/>

RGB is, of course, the red/green/blue component of the color, as a two-digit hex number. A is the attribute, storing the font and bold/italic/underline settings: 1 = bold, 2 = italic, 4 = underline, remaining bits are the font number (see DATA\FONTS\rich_fonts.ini; the number used by FONT is one more than this). DATA contains the new value; MASK contains the bits that should be set from DATA; DEF contains the bits that should be made default. So if we take your "bold/red" example:

data="65281" (0x0000FF01) -> red + bold
mask="-31" (0xFFFFFFE1) -> all color bits and the bold bit are relevant, don't change anything else
def="30" (0x0000001E) -> use default font/italic/underline

For my patch, I've replaced all these with the smaller strings: <TRA color="#FF0000" bold="true"/>...<TRA color="default" bold="false"/>

The RGBs for the color names:

gray = #808080
blue = #4848E0
green = #3BBF1D
aqua = #87C3E0
red = #BF1D1D
fuchsia = #8800C2
yellow = #F5EA52
white = #FFFFFF

If you choose to use a number for the color, one is subtracted from it, for some reason.

BTW, the complete text of all the resource files (687k; .rc files; before I made use of COLOR and FONT) can be found on my site.

Posted on: 2009/8/20 15:28
Top
Topic | Forum


Re: House Name after System Name: Let's Solve this Basterd
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1908
Offline
Use the [Systems] section rather than the [Houses], which also enables you to put the territory before the system, if you'd prefer, or even rename the system altogether (well, in space, anyway).

Code:
[Systems]
format = %s System, Solarian Empire.
systems = <first_solar_system>, <second_solar_system>...
; or shorthand if they're consecutive:
<solar_system_ids> = Solarian Empire - %s System.

I should be able to make it use system nicknames, too (so instead of "196643-196648" you could use "Iw01-6", also demonstrating a simplified range), but I'll wait a bit and see if there's any other problems/suggestions...

Posted on: 2009/8/20 14:26
Top
Topic | Forum


Re: Model Questions
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1908
Offline
That's a little different to the one in Hostile Universe. Where's it from?

Attach file:



jpg  b5jumpgate.jpg (20.05 KB)
949_4a8bb3143e1cb.jpg 495X466 px

Posted on: 2009/8/19 9:09
Top
Topic | Forum


Re: House Name after System Name: Let's Solve this Basterd
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1908
Offline
Since it's small enough, I've attached the first version of my system name customizer. Copy territory.dll to your EXE directory and add it to DACOM.ini's [Libraries] section. Then copy territory.ini to the DATA directory and edit it to suit your needs. Look at the start of territory.cpp for what you can do. Note that the names are in UTF-8 format; I don't test for a failed conversion, so it'll probably duplicate the previous name, should that happen.

Edit: final version is available here.

Posted on: 2009/8/19 9:00
Top
Topic | Forum


Re: Model Questions
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1908
Offline
As it turns out, I just finished fixing b5jumpgate for Hostile Universe (also used by Evolutions 1.30 and others, I guess). Is that the one you mean? Fixed the location and orientation of the docking, added green lights at the front, red at the rear and added a proper .sur file. Now you can actually click anywhere on the gate to select it; it doesn't disappear when the center goes off screen; and you can collide with it.

Posted on: 2009/8/18 6:44
Top
Topic | Forum


Re: Fix - get_zone(xx) failed
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1908
Offline
Probably easiest just to post the whole thing. This is part of my upcoming patch, hence the name (JFLP = Jason's Freelancer Patch).

Code:
/*
  jflp.c - Patch Freelancer to remove some FLSpew warnings.

  Jason Hood, 31 May, 2009.

  This patch removes the following spew warnings:
  * couldnt find material 163618903
    Generated when a waypoint is selected.  I was unable to fix it, so now I
    just remove the warning.
  * get_zone(N) failed
    Generated when a job sector has no name, which is quite frequently.
  * Disconnecting equipment with FATE_UNKNOWN, using FATE_DISAPPEAR
    Generated when a wreck drops its weapons.  This is a bug in Freelancer.exe,
    since it doesn't detect the "fate_loot" type.
  * Used Hostile Pick Assistance
    Not sure exactly when this is generated (or even why), but it's something
    to do with targetting enemy fighters.

  2 June, 2009:
  * replace the line number of the "Deform::start_aim" notice with the
    timestamp of the event (in milliseconds; it also replaces the string with
    "(null)", in order to fit the new code).

  Build (VC 6):
    rc jflp.rc
    cl /nologo /Fepath\to\freelancer\exe\jflp.dll jflp.c /link /dll /subsystem:windows /machine:ix86 jflp.res
*/


#define WIN32_LEAN_AND_MEAN
#include <windows.h>


void Patch_Common( void )
{
  #define ADDR_VERS10 (0x62c1485 - 0x6260000 + common)
  #define ADDR_FATE10 (0x6293727 - 0x6260000 + common)
  #define ADDR_ZONE10 (0x633c26c - 0x6260000 + common)

  #define ADDR_VERS11 (0x62c14e5 - 0x6260000 + common)
  #define ADDR_FATE11 (0x6293487 - 0x6260000 + common)
  #define ADDR_ZONE11 (0x633c34c - 0x6260000 + common)

  DWORD dummy;

  PBYTE addr_fate, addr_zone;

  PBYTE common = (PBYTE)GetModuleHandle( "common.dll" );
  if (*(DWORD*)ADDR_VERS11 == 0x639F3CC)
  {
    addr_fate = ADDR_FATE11;
    addr_zone = ADDR_ZONE11;
  }
  else if (*(DWORD*)ADDR_VERS10 == 0x639F39C)
  {
    addr_fate = ADDR_FATE10;
    addr_zone = ADDR_ZONE10;
  }
  else
    return;

  // Change the fate test to below 3 is bad, below/equal 5 is good.
  VirtualProtect( addr_fate, 6, PAGE_EXECUTE_READWRITE, &dummy );
  memcpy( addr_fate, "\x72\x05\x83\xf8\x05\x76", 6 );

  // Skip the zone message altogether.
  VirtualProtect( addr_zone, 1, PAGE_EXECUTE_READWRITE, &dummy );
  *addr_zone = 0x28;
}


__declspec(naked)
void RendComp_Patch( void )
{
  __asm mov edx, [ebp]
  __asm cmp edx, 163618903
  __asm lea eax, [esp+28]
  __asm ret
}


void Patch_RendComp( void )
{
  #define ADDR_MATERIAL (0x6c318be - 0x6c20000 + rendcomp)

  DWORD dummy;

  PBYTE rendcomp = (PBYTE)GetModuleHandle( "rendcomp.dll" );
  if (*ADDR_MATERIAL == 0x8b)
  {
    // Add in a test for the ignored material.
    static BYTE code[] =
    {
      0xE8,0x00,0x00,0x00,0x00,  // call RendComp_Patch
      0x74,0x2D, // jz skip_log
      0x52
    };
    *(DWORD*)(code+1) = (PBYTE)RendComp_Patch - ADDR_MATERIAL - 5;
    VirtualProtect( ADDR_MATERIAL, sizeof(code), PAGE_EXECUTE_READWRITE, &dummy );
    memcpy( ADDR_MATERIAL, code, sizeof(code) );
  }
}


void Patch( void )
{
  #define ADDR_ASSIST (PBYTE)0x4ede00
  #define ADDR_DEFORM (PBYTE)0x452648

  DWORD dummy;

  if (*ADDR_ASSIST == 0x68)
  {
    // Skip the "Used Hostile Pick Assistance" message.
    VirtualProtect( ADDR_ASSIST, 2, PAGE_EXECUTE_READWRITE, &dummy );
    (ADDR_ASSIST)[0] = 0xeb;
    (ADDR_ASSIST)[1] = 0x26;

    VirtualProtect( ADDR_DEFORM, 10, PAGE_EXECUTE_READWRITE, &dummy );
    memcpy( ADDR_DEFORM, "\x6a\x00"             // push 0 ;"(null)"
 "\x8b\x76\x04"         // mov  esi, [esi+4]
 "\xff\x76\x08"         // push dword[esi+8]
 "\x90\x90", 10 );      // nop/nop
  }

  Patch_Common();
  Patch_RendComp();
}


BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{
  if (fdwReason == DLL_PROCESS_ATTACH)
    Patch();

  return TRUE;
}

Posted on: 2009/8/18 6:41
Top
Topic | Forum


Re: House Name after System Name: Let's Solve this Basterd
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1908
Offline
I asked if anyone wanted this on TLR a while ago and got no response. Since it went down, I've moved here (and DB; didn't really like ReactorForge), and obviously came across this post. The method I was thinking of using involved an ini file, specifying the ids of the system you wanted to display as a territory: string_id[-string_id] = faction_id; or as an explicit message: string_id = My New System, My New Territory. It would have been done as a DLL, added to DACOM.ini. No one replied, so I never wrote it.

Posted on: 2009/8/18 6:29
Top
Topic | Forum


Re: Fix - get_zone(xx) failed
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1908
Offline
I "fixed" it by patching Freelancer to remove the message altogether; the same for Used Hostile Pick Assistance and couldnt find material 163618903. However, Disconnecting equipment with FATE_UNKNOWN, using FATE_DISAPPEAR, I did actually manage to fix, since it was an actual bug - FL didn't recognise the FATE_LOOT type.

BTW, the zone number is the sector coordinate. If the zone is 42 for example, that's Sector 3E (or maybe it was 5C, it's been a while).

Posted on: 2009/8/16 3:22
Top
Topic | Forum



Top Top
« 1 ... 121 122 123 (124)



[Advanced Search]