Freelancer-related Programming

no description available
92 Topics 1.2k Posts
  • Librelancer 2022.02

    Locked
    108
  • [Clientside]Custom key commands

    Locked
    8
    0 Votes
    8 Posts
    8k Views

    A bit of a grave dig, but I was wondering if anybody knows the location of the function for handling the release of input.

    From what I can tell, any key defined inside of keymap.ini with a state of “keydown, keyup” will only fire an event in the above function for the initial keydown state. This is great for intercepting calls, but sometimes I want to supress the cancelation.

  • Compiling FLStat

    Locked
    4
    0 Votes
    4 Posts
    4k Views

    There are two issues: you can’t use [c]…[/c] for a relative path (because I made it stop at a dot, due to QuickFix using tabs before the comment); nor can you use [c][/c] for an absolute path (it always prefixes the full exe path). If it’s relative paths causing the problem edit 2F36A, 2E74 -> 2076. That will stop at a space or control character (meaning a space/tab between resource and comment is required). I’m afraid you’re out of luck if you want an absolute path.

  • Infocard XML coding

    Locked
    25
    0 Votes
    25 Posts
    32k Views

    It’s not invalid XML, but it is an invalid unsigned number. Recall that hex numbers have one subtracted, so the conversion to 0 produces a value of -1, which is white.

  • SUR File Format

    Locked
    9
    0 Votes
    9 Posts
    11k Views

    Old thread I know but amused me.

    From the timeframe and description at least one was Google’s bot they got stomped for sending out to gather “keywords and trending data”. Hackers captured it and made it malicious. Today there’s worse that does worse. It’s called “Chrome” 😞

  • Decompiling THN files

    Locked
    7
    0 Votes
    7 Posts
    6k Views

    Okay sorry. All looked the same. Got it. Thorny problem.

    Edit: And thank you much. Helped big time.

  • Standalone Riff/Wav Converter

    Locked
    9
    0 Votes
    9 Posts
    10k Views

    Now why can I convert the first file but not the second?

    EDIT: never mind fixed it

  • Crash at 0x635d32b (Common.dll), dump attached

    Locked
    10
    0 Votes
    10 Posts
    10k Views

    So I have conclusions (partial, anyway):

    CreatePhantom didn’t trigger any exception, so I don’t think the error originates from that.

    The root cause of the issue remains NaN positions and/or orientations. The way it happened this time around was a lot more tricky though, hence why it took me so long to find it. The rotation quaternion the client sent back after jumping was all NaNs because the rotation matrix was slightly denormalized, causing the conversion to fail. However, the quaternion was “sanitized” somewhere along the chain and became all zeros, so it didn’t get caught by the SPObjUpdate patch I added (it checks for NaNs only), but a zero quaternion is still an invalid rotation matrix, so when converting it back it became full of NaNs again and would crash the server on some occasions.

    I’ve tracked down and fixed the quaternion conversion (I can’t really help with rotation matrices becoming slightly denormalized, that’s just normal) on the client, but I’ve also added another check to SPObjUpdate in FLHook which requires the quaternion to be mostly normalized, so it’ll catch erroneous values like this in the future.

  • Launching game directly on a server?

    Locked
    12
    0 Votes
    12 Posts
    10k Views

    Oops. :oops: Now it’s updated.

  • Collision Model Prototype

    Locked
    3
    0 Votes
    3 Posts
    6k Views

    Still a work in progress, we’re knocking down elements of it as we can get to it. The collisions themselves still need a bit more work, but they’re far more consistent now and we can reliably determine who gets damaged and how much. Ramming is a legit strategy now.

  • PyFL - Python Freelancer Toolkit Framework

    Locked
    6
    0 Votes
    6 Posts
    8k Views

    Not a bad idea I’ll definitely have to include that when I finish off the utf module (reading is currently supported but not fully tested).
    Once thats finished off should be easy enough to write a function to cover that.
    TBH though the whole error checking features are more of a side effect, the ini manipulation is the true goal, as we plan to have it embedded and responding to events on the server, changing base affiliations, system encounters and similar stuff, then automatically pushing out updates

  • CObject* to IObjInspectImpl*?

    Locked
    13
    0 Votes
    13 Posts
    15k Views

    Kept having issues with it so I dug again and I finally found it: offset 0x5416c0 contains a function of the signature IObjRW* (uint id, uint zero). Call it with the id and zero in the second parameter to get the IObjRW (which can just be cast to IObjInspectImpl) or null if there’s nothing associated.

  • Crash on System Change

    Locked
    4
    0 Votes
    4 Posts
    7k Views

    Once the teleport has happened the game seems unable to recover. Since other teleports work fine, I have doubts it’s a timing issue.

    Also, the code is definitely in GetCenterOfMass, not in any of those other functions. Look at the offsets, BaseWatcher::set_pointer not 0x40e8 bytes long. The call stack I get works its way back up through various updating functions, starting in CShip::update.

    The only oddity is that if you go even before CShip::update, there are calls to readfile.dll. I’m not sure why file reads would happen there (maybe it’s loading the system and failing?) or why a file read would call the ship’s update function.

  • Roll causes noisy angular velocity?

    Locked
    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • PHP in freelancer

    Locked
    11
    0 Votes
    11 Posts
    10k Views

    Ouch!!! Better not stop in the middle, then. 🙂

  • Update rate fluctuation?

    Locked
    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • DSAM x64 v1.0

    Locked
    2
  • Freelancer Plugin Language

    Locked
    3
    0 Votes
    3 Posts
    6k Views

    Good to know, thanks! 🙂

  • DSAccountManager Version 1.4

    Locked
    41
    0 Votes
    41 Posts
    51k Views

    My modifications :

    SystemNick (XY01) more than 4 character +++ src\Player Edit UI\ChangeLocationWindow.cs --------------------------------- /// <summary>/// Save the new location ///</summary> /// <param name="sender"> /// <param name="e"> private void saveButton_Click(object sender, EventArgs e) { if (dataGridViewBase.SelectedRows.Count != 1) return; foreach (FLDataFile charFile in charFiles) { foreach (DataGridViewRow row in dataGridViewBase.SelectedRows) { GameDataSet.HashListRow dataRow = (GameDataSet.HashListRow)((DataRowView)row.DataBoundItem).Row; string baseNick = dataRow.ItemNickName; int underscore = baseNick.IndexOf("_", 0); string systemNick = baseNick.Substring(0, underscore); charFile.AddSetting("Player", "base", new object[] { baseNick }); charFile.AddSetting("Player", "last_base", new object[] { baseNick }); charFile.AddSetting("Player", "system", new object[] { systemNick }); break; } if (checkBox2.Checked) {
  • Playing a sound?

    Locked
    5
    0 Votes
    5 Posts
    8k Views

    Nice! Thanks a lot man.