Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Skill Changes, Part 2 (07/15/21)

Author Topic: [0.95a] WhichMod 1.1  (Read 6327 times)

theDragn

  • Commander
  • ***
  • Posts: 137
    • View Profile
[0.95a] WhichMod 1.1
« on: July 25, 2021, 04:10:45 PM »

Have you ever posted "which mod is this ship from?" Well, have I got the mod for you!
WhichMod


This mod adds the mod title to the descriptions of all weapons, ships, and fighters added by mods.

Example (from High Tech Expansion):


Also has the option to use abbreviations instead of the full mod name, and will let you choose the abbreviations. Look in the settings file for more information.


Spoiler
1.1: fixed an issue where it could add the mod title multiple times if you saved and loaded. No clue what was causing that, since descriptions aren't saved, but it's fixed anyway.
RIP to the old janky python script.
[close]
« Last Edit: July 26, 2021, 10:55:53 AM by theDragn »
Logged

Cyan Leader

  • Admiral
  • *****
  • Posts: 640
    • View Profile
Re: [0.95a] WhichMod 1.0
« Reply #1 on: July 25, 2021, 06:38:21 PM »

Thanks!
Logged

IonDragonX

  • Captain
  • ****
  • Posts: 497
    • View Profile
Re: [0.95a] WhichMod 1.0
« Reply #2 on: July 25, 2021, 07:26:30 PM »

:o Is this For REAL?! Is it my Birthday?! Is it Christmas??!  ;D

Tecrys

  • Admiral
  • *****
  • Posts: 548
  • repair that space elevator!
    • View Profile
Re: [0.95a] WhichMod 1.0
« Reply #3 on: July 25, 2021, 10:34:08 PM »

Congrats to the new WhichMod version! I had a go at it and it works like a charm. The weird external thing it was before always put me off and I never tried it, but this is great!
I see this quickly becoming one of those mods everyone installs without thinking like console commands or commissioned crew.

Thanks for your hard work, you did a great job on this
Logged
Adopt a mod! (Or parts of it) I'd be happy if Biomancy Genetic Engineering found a new patron or if my little monsters appear in some form or another in someone's mod.
https://fractalsoftworks.com/forum/index.php?topic=7682.0

theDragn

  • Commander
  • ***
  • Posts: 137
    • View Profile
Re: [0.95a] WhichMod 1.0
« Reply #4 on: July 25, 2021, 11:17:52 PM »

:o Is this For REAL?! Is it my Birthday?! Is it Christmas??!  ;D

Yes, I don't know, and no.

Thanks for your hard work, you did a great job on this

Ironically this was extremely easy to make- once DR told me about the API method I needed it took me about five hours of work to make and test it. Regardless, thanks for the praise!

Klokinator

  • Ensign
  • *
  • Posts: 34
    • View Profile
Re: [0.95a] WhichMod 1.0
« Reply #5 on: July 25, 2021, 11:48:46 PM »

Possibly one of the most important mods to me, since the number of times someone has asked "wHaT mOD is tHAt fROm??" and I'm like, "Uhhhhhh...."

Now they won't even need to ask most of the time, since the mod name will be right there in my screenshots, and if it isn't, I'll be able to find out easily!
Logged

Jaghaimo

  • Commander
  • ***
  • Posts: 243
    • View Profile
Re: [0.95a] WhichMod 1.0
« Reply #6 on: July 26, 2021, 01:52:01 AM »

Could you add conversion lists to ship descriptions? Some mods (e.g. Roider Union, THI) allows you to convert one hull into another - keeping track of which is convertible and to what is a pain.

For hullA that can be created from hullB or hullC I would expect:
  • hullA entry to have: Converted from hullB, hullC.
  • hullB, hullC entry to have: Converts to hullA.
Logged
Stellar Networks - collection of useful intel boards
Starpocalypse - fortresses and regulations

theDragn

  • Commander
  • ***
  • Posts: 137
    • View Profile
Re: [0.95a] WhichMod 1.0
« Reply #7 on: July 26, 2021, 02:43:18 AM »

Could you add conversion lists to ship descriptions?

There's no internal way for a mod to check which hulls can be converted into other hulls, so I'd need support from other modders to do that (they'd probably have to include a .json file somewhere for whichmod to read). I'll have an example config next patch for other authors to copy, but it might be a week or two.

Nick XR

  • Admiral
  • *****
  • Posts: 511
    • View Profile
Re: [0.95a] WhichMod 1.0
« Reply #8 on: July 26, 2021, 09:40:53 AM »

This is amazing, and so useful!   Nice work getting it functioning inside the normal modding framework.

Looking at the code, do you need to ensure that this mod is loaded after all other mods? 

theDragn

  • Commander
  • ***
  • Posts: 137
    • View Profile
Re: [0.95a] WhichMod 1.1
« Reply #9 on: July 26, 2021, 10:23:29 AM »

This is amazing, and so useful!   Nice work getting it functioning inside the normal modding framework.

Looking at the code, do you need to ensure that this mod is loaded after all other mods?

Nope. onApplicationLoad() is called after all the data from each mod has been loaded. Unless someone's mod is changing descriptions with hardcoded strings on load, order isn't important.

Also did a quick little patch to 1.1, because apparently loading a game would add on the mod title each time, resulting in multiple mod titles. Looks like onApplicationLoad() gets called when you load a game too.
« Last Edit: July 26, 2021, 10:54:57 AM by theDragn »
Logged

Fhiach

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.95a] WhichMod 1.1
« Reply #10 on: August 10, 2021, 10:01:49 AM »

Oh my god yes!