R2Northstar / NorthstarLauncher

Launcher used to modify Titanfall 2 to allow mods to be loaded
MIT License
278 stars 127 forks source link

Remove `ns_startup_args*.txt` functionality #507

Open F1F7Y opened 1 year ago

F1F7Y commented 1 year ago

Why

  1. We need to hook GetCommandLineA to support these .txt files, but before doing so we already read the commandline meaning some args dont work in the .txt.
  2. Current way of strstr ing GetCommandLineA can lead to false positives with arguments that start with the same prefix.

What

tier0.dll exports CommandLine() with which we can check the command line. We already have this mapped out and use in some cases so this is just improving code consistency.

How

  1. Do some sort of warning before removing functionality Print warning, discord announcement ?
  2. Add support in mod-managers Add support to directly passing arguments to the process when creating it
  3. Remove functionality in a minor verison increase Patch versions mainly serve for small fixes and small features, this is a pretty big change in behavior
  4. Possibly have some sort of warning that checks if the file exists after this is implemented
F1F7Y commented 1 year ago

@GeckoEidechse @BigSpice @0neGal

Jan200101 commented 8 months ago

I think enough time has passed and we should finally do this.

0neGal commented 8 months ago

The only problem I have with this, is it's now more difficult to have a mod manager be able to change the launch options. As, unless it's launching the .exe's directly, it wont really be able to change the launch options very easily. Say if you're launching through Steam.

Unless I'm mistaken, and there's some easy way to do this?

Jan200101 commented 8 months ago

Unless I'm mistaken, and there's some easy way to do this?

See how FlightCore does it

0neGal commented 8 months ago

See how FlightCore does it

According to this, FlightCore simply doesn't support changing launch arguments. Unless thats outdated?

Jan200101 commented 8 months ago

According to this, FlightCore simply doesn't support changing launch arguments. Unless thats outdated?

https://github.com/R2NorthstarTools/FlightCore/blob/5714309211d389c453c19bb77755855de33655fd/src-tauri/src/northstar/mod.rs#L260

0neGal commented 8 months ago

Ah, I stand corrected, I wasn't aware you could add launch arguments to steam://run URIs

GeckoEidechse commented 1 month ago

bump

GeckoEidechse commented 1 month ago

Actually maybe we should do this together with a few other breaking changes that are coming up like with MAD (#757) and a potential mod folder restructure via #746