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

Members: 0
Guests: 83

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

Current balance: 55€
(last updated 04/2021)

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

Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 36 users playing Freelancer on 42 servers.
September. 21, 2023
The Starport Forum Index > All Posts (Ruppetthemuppet)

Bottom Bottom   Previous Topic   Next Topic

(1) 2 3 4 ... 12 »


Re: Zero to Hero
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Quote:

Alucard wrote:

What am I missing?


You need to delete your restart.fl file in your save directory! This is regenerated on launch when it's not there, but is basically a cache of the new player loadout.

On Limit Breaking, I've moved away from patches in a hex editor, but if you don't want to compile code for offsets, Hexplorer is a very good option that lets you edit simple data types as well (you'll need to change the default fonts though!

For editing values as listed in Limit Breaking, you'll need to edit the data type! In Hexplorer this is under View\Simple Data Types, but ymmv with other editors.

Also make sure you're using the new Limit Breaking List! It's got a lot more in it than the one hooked onto the current TSP forum and will eventually replace it: https://wiki.the-starport.net/FL%20Binaries/limit-breaking/

If you have a ton of modding questions, you should totally drop by the Galactic Community Discord, you'll usually get answers a lot quicker for small stuff than on this forum!


Posted on: 5/22 6:32
Top
Topic | Forum


Re: Zero to Hero
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Quote:

Alucard wrote:

Using ResHacker, what parts do I change to change mod version?


For the displayed + server versions, you'll probably want to change FILEVERSION, PRODUCTVERSION, FileVersion and ProductVersion in all instances. I think the game specifically reads FILEVERSION when looking at what it can/can't connect to, but I generally adjust all of these to be safe!

Also I'd avoid using the SDK to build a mod on as if I recall correctly, 1.3 has a few bugs! These days a JFLP-patched install comes fairly close to perfect in terms of fixing vanilla ini issues.

Posted on: 5/20 7:02
Top
Topic | Forum


Re: Adding arbitrary new gun classes
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Thanks for the pointers, but we're trying to do something entirely different! The way weapon classes are set up in the mod we're working on unfortunately requires more than the 20 or so that Freelancer provides.

The idea here would be to allow users of the plugin to arbitrarily add another set of class 1-10 hard-points, so you'd have hp_gun_special_1-10, hp_turret_special_1-10, and then your own hp_gun_new_1-10, all named and defined appropriately via an ini file!

Posted on: 5/14 14:45
Top
Topic | Forum


Adding arbitrary new gun classes
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Hi folks,

I've been working with Laz to try and create a plugin that adds arbitrary gun/turret classes to ships and equipment, we were able to get one class working through coincidence (hp_type of 67) but have hit a bit of a roadblock.

I know something similar has been done before using Adoxa's engclass plugin. I've attached Laz's cliff notes that explain our specific problem below, as he's not able to currently post to TSP! Does anyone have any pointers for us?

Quote:

- engclass allows shows how to add classes to internal equipment
- The original intention was to modify this plugin to extend the amount of classes for other equipment types (weapons, turrets, shields)
- During the inventory/dealer hooks get_hp_type is called which is modified by engclass to return the new number.
- The issue exists that in normal usage get_hp_type for, say, weapons, returns the number 4. I have looked extensively into how it works, but cannot decipher why it returns the number 4, or what the implications of this are.
- There are clearly other parts of the code that are used to calculate whether guns are mountable what class they actually are, but I have been unable to locate or figure out what needs to be changed to make this work.
- If get_hp_type is modified to return the new number, then it will crash when the base game goes to call it on the weapon during opening the equipment dealer. - The equipment index, ids bindings, level index, mount description index, and mount list were all updated dynamically, so the issue doesn't exist there.
- We wrote assembly at offset 0x9659E to allow us to correctly read new gun hardpoint values. We effectively checked if the string was in our list of custom new class names, otherwise let the original code handle it.

Posted on: 5/14 11:51
Top
Topic | Forum


Re: Trying to understand how NPC spawning works?
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Quote:

@Ruppetthemuppet: I currently cannot display the 101 list, is this correct?


My bad! I broke the list up into pages by category a few days ago, and in doing so broke the existing link. Here's the new one:

https://wiki.the-starport.net/FL%20Binaries/limit-breaking/

Unfortunately the wiki search module isn't as good as I'd hoped, so I may end up recombining it or at least consider new/clearer categories for the offsets here.

Posted on: 5/13 10:34
Top
Topic | Forum


Re: Dev's Limit Breaking 101 Techniques
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Solved this! The offsets were the correct ones, but were being overridden by an FLHook plugin (that rightly shouldn't have been touching them, given it's purpose!) Many thanks for the help.

Posted on: 5/12 13:16
Top
Topic | Forum


Re: Dev's Limit Breaking 101 Techniques
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Well this is very strange, these offsets don't seem to change the MP behaviour at all for me! It's 100% the scanner. If I move out of range and back, the NPCs persist at least out to 12-14k. Could there be another value (not scanner range, that's set to 10,000!) that's capping this?

Posted on: 5/5 15:43
Top
Topic | Forum


Re: Dev's Limit Breaking 101 Techniques
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
When I say scanner range, I mean the range at which the player can see NPCs, not the other way around! I've adjusted a few offsets, but it unfortunately appears to be capped in multiplayer and I've not had any luck raising it past that point.

Posted on: 5/4 18:22
Top
Topic | Forum


Re: Dev's Limit Breaking 101 Techniques
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Another request! it appears that player scanner range for NPCs in MP is capped around 6500m, does anyone know where this value might be changed? It doesn't appear to be in limit breaking, but I feel like I've seen this one floating about before.

Posted on: 5/4 12:12
Top
Topic | Forum


Re: Dev's Limit Breaking 101 Techniques
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Quote:

adoxa wrote:
DCC1 is the armour class_type and/or 139AFC from 00 BA 29 to 10 A7 27 to consider it attached (might not work).


This partially works! The hardpoint restriction is enforced when the armour is mounted, which is most of what I wanted. However: the equipment model itself is unfortunately not mounted on the HP. I'll check around a bit and double-check I've not stuffed up implementing the model itself.

Posted on: 5/3 15:46
Top
Topic | Forum


Re: Dev's Limit Breaking 101 Techniques
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Just a quick request! Have found an offset adjacent to 139B74: use thruster hp_type for cloaking device.

Changing 40 17 2D at 139AF0 to C0 DE 26 in common.dll allows me to mount armour equipment on the thruster hp_type, but doesn't actually mount the model on the hardpoint! As a result I can mount an infinite number of armour modules on the hardpoint.

It appears there's an extra check involved for equipment marked as internal here, does anyone know if there's an offset that would allow me to mount the armour externally and avoid this issue?

Posted on: 5/3 12:54
Top
Topic | Forum


Re: Trying to understand how NPC spawning works?
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Absolutely incredible work adoxa, thankyou for this! I've added the SpacePop offset to the Limit Breaking page. Presumably the formula is similar for relief_time only that it occurs during encounters rather than between them?

Posted on: 5/2 6:59
Top
Topic | Forum


Re: Trying to understand how NPC spawning works?
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Quote:

Beagle wrote:
density
repop_time
max_battle_size
relief_time
density_restriction
encounter = <encounter file>, <level number>, <chance to spawn?>


So based on discussions in the #modding channel of the community discord (Many thanks to Skotty and Treewyrm):

repop_time is basically when pop count is incremented, adding available population to spawn
relief_time is a guaranteed (of sorts) time for next spawn
max_battle_size is the ship count for battles. It's unclear whether or not this battle has to involve the player or not.
density_restriction isn't used correctly in vanilla zones and only keys off make_class values set in the encounter. It also limits by ships, not encounters (unlike density)

UPDATE: I've done some fairly extensive testing of these with a stopwatch and a single encounter, and it appears that `repop_time` and `relief_time` are not even remotely consistent. Is there a random value added to these before they are used?

ANOTHER UPDATE: More stopwatch testing and some discussion: Is it possible repop_time and relief_time are minimums where the further past the listed time you get, the more likely a spawn is to occur? This fits observed behavior, but seems difficult to verify without more rummaging around in the assembly.

Skotty has also clued me in on ship_by_npc_arch, which rather than grabbing a ship from a class group, lets you swipe a nickname from npcships.ini! The ship in question must have the corresponding d-class for the zone however, otherwise the game will crash!

I've also stumbled across the additional behaviors: goto_guide, dock_guide and patrol_guide. presumably these are used when NPCs are docking/moving between waypoints/etc?

Posted on: 4/14 13:34
Top
Topic | Forum


Re: Trying to understand how NPC spawning works?
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Wiki updated, planning to do a bit of testing this morning.

Digging through IDA, I've come across a few keys that look like they belong in encounters, but I've never seen before. A little testing seems to suggest that they are not used (Although they might be read?). Has anyone come across these before?

Code:
longevity
feeling_to_group
feeling_to_formation
explicit_group


Interestingly, arrival isn't always a mandatory key! I ran a few zone encounters that didn't include it, and NPCs spawned/behaved normally. I assume there's some default that's chosen when the value isn't defined (Probably all?)

Posted on: 4/14 7:35
Top
Topic | Forum


Re: Trying to understand how NPC spawning works?
Quite a regular
Joined:
2008/2/14 21:37
From İstanbul, Turkey
Group:
Registered Users
Wiki editors
$$$ Supporters $$$
Posts: 176
Offline
Quote:

adoxa wrote:
Prefix with - to disable (thus all, -tradelane will enable all, then disable tradelane). Looking at the disassembly it doesn't seem to be used, but I'd have to run through the debugger to be sure.


Do you mean that the - value isn't used? I've observed some weird behavior with patrol paths where crashes can occur if cruise isn't used for arrival. It would be neat to do some testing here (and I intend to!)

It's great to know that pop_type is just flat-out unused, I can rule it out as a factor in my testing. I'll update the wiki on that one!

Posted on: 4/12 11:54
Top
Topic | Forum



Top Top
(1) 2 3 4 ... 12 »



[Advanced Search]