Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 [2]

Author Topic: [0.95.1a] Planet Search  (Read 6548 times)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20039
    • View Profile
Re: [0.95a] Planet Search
« Reply #15 on: January 13, 2022, 10:57:30 AM »

Well done, this is good stuff :)

Just wanted to make a quick reply:

Yeah, it's a bit of grey area. Regarding the use of reflection, however, I would argue that restrictions as a security precaution is not a good idea in the first place, at least not in its current form.

This is based on the idea that an incomplete and easily bypassable security measure is worst than no security measure at all. It can lure users into a false sense of safety, when the fact is that running untrusted code from the Internet is fundamentally unsafe (unless it's in an industrial grade, battle-tested sandbox, like a modern browser).

I'm acutely aware of this, and the restrictions are not a security precaution (as you say, they're incomplete and basically entirely useless as that), and aren't presented to the player as such (or at all)! They're mainly there because it's fairly likely that your average modder could write file IO code that would mess up a user's system *by accident*. Even an otherwise excellent programmer could easily make a mistake like this if they don't have a properly careful mindset when writing, say, code that handles file deletion. So this is in place there to prevent half-baked attempts and signpost "don't do this" to someone with more experience that *could* bypass it. Someone malicious could find a way around pretty much no matter what, and this isn't concerned with that at all.

If there's some functionality that I could add to the API that would make life easier, btw, that'd be the best way to go - then I can put some effort into making sure that code is "safe" and more modders could benefit from being able to use it.

Edit:
Why this isn't in the base game is something I'll never understand.

Haha! Fair, fair. (The real reason: that bit of the UI is *old* at this point.)
« Last Edit: January 13, 2022, 11:00:03 AM by Alex »
Logged

Usinaru

  • Ensign
  • *
  • Posts: 10
    • View Profile
    • Email
Re: [0.95a] Planet Search
« Reply #16 on: January 14, 2022, 12:59:39 PM »

How is this not vanilla already? Thanks !!!
Logged

Jaghaimo

  • Admiral
  • *****
  • Posts: 531
    • View Profile
Re: [0.95a] Planet Search
« Reply #17 on: January 14, 2022, 01:56:13 PM »

Quote
If there's some functionality that I could add to the API that would make life easier, btw, that'd be the best way to go - then I can put some effort into making sure that code is "safe" and more modders could benefit from being able to use it.

Being able to (officially) mod base game UI would be a game-changer (ba-dum-ts)! It could be split into being able to modify existing vanilla UI, and being able to introduce new UI components. Probably the latter first, so that then existing UI can be rewritten using this new exposed API (thus automatically becoming modable).
Logged

Fuegoredux

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.95a] Planet Search
« Reply #18 on: January 19, 2022, 10:28:20 PM »

This is great! Save a huge amount of time looking through planets.

Two places that would benefit from a search feature is the codex and the ship simulator selection. Would these be a possibility in the future?
Logged

andylizi

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: [0.95a] Planet Search
« Reply #19 on: January 19, 2022, 11:25:05 PM »

Two places that would benefit from a search feature is the codex and the ship simulator selection. Would these be a possibility in the future?

Yeah, there're lots of places in the game that can benefit from a search function. Unfortunately I don't think my method is very… realistic, so to speak. If I were Alex, I could've implemented planet search the "correct" way literally within 10 minutes. But since I'm not him (last time I checked), I had had to spend days on this hacky mod chanting black magic. What's worse, it will almost certainly become obsolete at some time in the future.

All that to say, it'd be way more realistic to just ask Alex for these features, and I'm confident they'll be added to the base game eventually. I did this mod because I wanted that time to be now, and my first instinct as a programmer whenever a piece of software annoys me is to Fix It Myself™ (and maybe send a PR afterward). It was a nice challenge by itself, but doing it for everything is a bit much…

(It'd be really nice if I could name this mod "Search Everything" though……)
« Last Edit: January 19, 2022, 11:26:54 PM by andylizi »
Logged
Pages: 1 [2]