FLHook Development

no description available
192 Topics 1.5k Posts
  • ReqModifyItem

    Locked
    2
    0 Votes
    2 Posts
    5k Views

    Mystery solved completely randomly, turns out Tractor Beams and Armors will trigger it so it looks like this function is for internal equipment.

  • Adding new entries into the flserver window

    Locked
    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • PlayerData

    Locked
    4
    0 Votes
    4 Posts
    7k Views

    [c]bool[/c]'s are bytes, which get padded to align the next member (i.e. [c]struct { bool b; int i;} [/c] is typically stored as [c]struct { bool b; char pad[3]; int i;}[/c]. Likewise, 0x3ca is just padding after the short.

    0x34c (uiShipArchID) is actually [c]bool cheated[/c], I think; 0x320 (iCyclicRedundancyCheck) is actually iWorth (when you land on a base, to detect cheating when you exit).

    0x324 is a copy of uiShipArchetype (cheat detection).

    0x344 seems to be a count of how many times the character has been saved (per login).

    0x3c0 is initialized to 0, but does not seem to be used.

    0x3c4 is [c]float difficulty[/c] (initialized to 1; restricted to 0 to 2).

    0x3d0 seems to be your player number (i.e. the one-based [c]Players[/c] index).

    0x3dc is some kind of trade request counter.

    0x3e8 is the id of the ship that was created.

    0x3f4 is the id of the base you entered (this is the one that is tested for some Req functions); 0x410 is the base just exited.

    0x414 is the unsaved but loaded [c]starting_ring[/c], whatever that is.

  • HkCb_GeneralDmg not called on shield damage?

    Locked
    7
    0 Votes
    7 Posts
    8k Views

    After a bit of integration work, it seems to be working exactly as expected! All shield hits now trigger HkCb_GeneralDmg and I’ve committed the changes to the SVN for anyone who’d like to have that functionality as well. As usual, adoxa, you save me 🙂

    Now all I need to figure out is the damage’s source so I can trace back the munition archetype.

    EDIT: From what I can tell, it would appear that the damage has already been applied by the time 6CEA740 or its equivalent hull function are called, so in order to find the projectile that did the damage I’d probably need to trace back the munitions earlier. Player beam hits (I only really care about beams) can be traced using MunitionCollision events, but NPC beam hits are harder (I’m guessing they’d be found somewhere in PhySys::GenerateCollisions(CBeam*)) and matching the beams with the GeneralDmg call would be quite tricky.

  • Crash in dacom…

    Locked
    4
    0 Votes
    4 Posts
    7k Views

    OK, thanks, i will look for an error in our formation definitions. Thanks for the hints. If not i need to get deeper into debugging and set breakpoints at some addresses. Maybe i could track which of the formations is corrupt.

  • FTL issue

    Locked
    12
    0 Votes
    12 Posts
    12k Views

    Very thanks your information HeIIoween, now I finaly know how to use them all.

  • 0 Votes
    1 Posts
    5k Views
    No one has replied
  • 0 Votes
    3 Posts
    5k Views

    You are totally right. And problem fixed, I’m happy now 😄

    Thank you!

  • Ship Spawning

    Locked
    47
    0 Votes
    47 Posts
    48k Views

    You can reach the CEquipTraverser* at offset 0xE4 of a CShip* pointer. From there iterating on the cargo/equipment is easy.

  • Cloaking in SP

    Locked
    6
    0 Votes
    6 Posts
    16k Views

    Happy New Year All,
    When StarLancer was out, I seem to remember cloaks. So the fact that FreeLancer is a continuation of that story, the entire Sirius systems should know of cloaks. Liberty had experimented with the technology.
    I support cloaking technology, but also believe it has limitations and weaknesses. For example, the Klingon or Romulan ships can’t fire while cloaked. Also, there exist ways to detect cloaked ships.
    Anyway, I have heard Adoxa specifically say he won’t work on it. His comment in this article does make me wonder about the FreeLancer coding. Does the games support it? Or is it just cut-scene gibberish to bolster a weak storyline? If the game does not support cloaking is some type of scanner interference possible?
    My approach to playing FreeLancer is essentially purist, in that I see the way ships progress through the game play. Start with weak ships and work your way up. That requires a better degree of skill. This is why even in my own little mod I use to play, I just teak a few things that don’t make much sense. My initial example is that I give Trent a fully equipped Starflier. I keep the games locks on gates and jump holes, but they are visible on the map. My thinking is why have a guy fight for you and disadvantage them from the start. Obviously a good pilot can make due, but it makes no sense. Imagine flying an F-16 with just machine guns. Another thing I do is place the entire universe in the map. Here on earth, I can buy a map to anywhere long before I go there. An the very best argument is that Trent has flown Bretonia and why should he go exploring?
    Anyway, cloaks don’t exist so I make do with skill, just as if my cloak were damaged. But it is a curiosity.

    Again, Happy New Year,
    Pascal05

  • HkCb_CrashProc6F671A0?

    Locked
    3
    0 Votes
    3 Posts
    7k Views

    I am having a lot of entries that are coming from

    // Hook for crash at 0xEB4B5 (confirmed) FARPROC fpHook = (FARPROC) HkCb_CrashProc6F8B330Naked; ReadProcMem ((char*) hModContentAC + 0x11C970, &fpCrashProc6F8B330Old, 4); WriteProcMem ((char*) hModContentAC + 0x11C970, &fpHook, 4); WriteProcMem ((char*) hModContentAC + 0x11CA00, &fpHook, 4);

    Any idea about what that is about and what the argument refers to? Not sure if its critical, but get the log message a lot and could not narrow it down yet.

  • FLHook default rights for new players

    Locked
    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • PlayerData iOnlineID

    Locked
    16
    0 Votes
    16 Posts
    15k Views

    Well that’s a special case 😄

  • 0 Votes
    6 Posts
    6k Views

    BaseEnter fits perfectly well. Sure its also called when the player logs in at a base, but hey then he is docked. Eventually the LastBaseID in the PlayerData struct is 0 when he logged in? Didnt have tested this now, but eventually you can use this to differ if he enters a base after he has undocked and docked again or enters a base after he logged in.

    Other than this you just have to use a workaround as FF suggested.

  • DAMAGEOBJECT IClient method wrong?

    Locked
    8
    0 Votes
    8 Posts
    8k Views

    Trick. For the Server I used the imports, sorting them by name, combining with an existing list I had made ages ago (when I first did the disassembly), then sorting back by address. For the Client I searched for where it created the packet definition, combined them into a single line, added the strings from PacketDump.cpp, then resorted.

  • 0 Votes
    3 Posts
    7k Views

    starworld wrote:
    Use Microsoft Visual C++ 2008 Redistributable Package (x86) :
    http://www.microsoft.com/en-US/download/details.aspx?id=29

    Finally TSP’s back.

    I refreshed many time during these days to post a thanks.

    Yes, the 2008 Redistributable Package is work. The server is up and everybody is happy about it.

    Thank you starworld.

  • Obtaining the sourcecode

    Locked
    6
    0 Votes
    6 Posts
    6k Views

    Alright, thanks. And what about the anticheat modifications?

  • Serious Crash at 0x6EF54E0

    Locked
    5
    0 Votes
    5 Posts
    7k Views

    We’ve finally figured it out. It happens when a permutation is defined in an encounter INI but doesn’t actually exist (say, you have 10 blocks but 11 permutations).

  • FLHook SVN discussion

    Locked
    22
    0 Votes
    22 Posts
    23k Views

    A function will preserve all registers except for eax (and esp, eip obviously) so I dont understand what the problem is with edi?

  • 0 Votes
    2 Posts
    5k Views

    Just looking at the server disassembly, I can tell you the parameters are base nickname, player number and base test (if (test) if (base_arg != player[iBaseID]) return;). It’s only explicitly called once in server.dll, at IServerImpl::DisConnect, where test is false. It’s not explicitly called in freelancer.exe, common.dll or content.dll (according to my listings) but there may still be virtual calls (need to debug to test that).