Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Anubis-class Cruiser (12/20/24)

Pages: [1] 2

Author Topic: [0.96a] Portrait Changer v1.0.1  (Read 63329 times)

Ryxsen1421

  • Captain
  • ****
  • Posts: 420
    • View Profile
    • Twitter
[0.96a] Portrait Changer v1.0.1
« on: June 20, 2023, 01:42:48 PM »



Click here or the banner to download the mod!


The mod requires;
Lunalib



"Fancy a haircut, Starfarer?"

A stray faction far away from home in a place where they don't truly belong.

Change your own or other's look on the go with this wonderful quality of life mod. This allows you to alter Player, Officer and Administrator appearances but probably not any unique stuff that other mods have created. I initially commissioned this in order to have improved interaction between me and my viewers on Twitch streams. However, during the creation of this mod - we both agreed to simply distribute this mod freely to the community for everyone to use. So here we are!

Change Logs
Spoiler
V1.0.1
- Save Compatible, it fixes an issue where the players portrait will reset to its initial one when you reload a save/game. It may require the player to do this with Console Command mod;
1.Update the mod
2. Run this runcode with console commands. It will remove the Portrait changer intel.


Quote
runcode
import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.campaign.comm.IntelInfoPlugin;
import java.util.ArrayList;
import portrait_changer.PortraitChangerIntel;

 for (IntelInfoPlugin intel : new ArrayList<IntelInfoPlugin>(Global.getSector().getIntelManager().getIntel()))
        {
            if (intel instanceof PortraitChangerIntel)
            {
                Global.getSector().getIntelManager().removeIntel(intel);
            }
        }

3. Save after having the intel removed.
4. Reload save, which should re-add the updated version of the Portrait Changer Intel tab.

[close]

Possible Frequently Asked Questions;
Spoiler
1.How to use the mod?



-Simply go to Intel tab > Personal > Change Portrait and have fun.

2. Why aren't there any filters for example, Vanilla / Modiverse? .. and why is there a special UAF tab?
- After posting the mod publicly, I have discussed with him over the UAF discord regarding this matter. According to lukas04, he is unable to distinguish the two in the coding department, kinda inconvenient to put it simply. The UAF tab is simply there because I personally requested for it for my own convenience and anyone who have the UAF installed for the portraits. It will disappear if UAF is not installed.

3. Is it safe to add mid-game? or save compatible even?
- No idea honestly, do feel free to reply down below if you have tested. I will edit this FAQ later for everyone to see.

4. How do I add my own custom portrait?
- You can do that by;

a1. First, you must include your custom portrait into the graphics/portraits and copy its navigation link along with the portrait name.
a2. Secondly, go to data/world/factions and you may find player.faction file. Paste the copied link into the "portraits" section.

5. I'd like to commission a portrait from an artist, do you know anyone that can do it? Are you open as well? // WIP!

1. Serviced Hair
2. Quacken
3. Sumoga
4. MirageComedy
5. Nachtness
6. Gwyvern
7. Haon

[close]

All credits goes to,

Special thanks to Lukas04 for accepting my mod commission request and creating this.
« Last Edit: June 24, 2023, 05:37:23 AM by Ryxsen1421 »
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 627
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #1 on: June 20, 2023, 01:49:36 PM »

Glad to have made it for you!
Will be nice for myself aswell anyways, definitly ignored some otherwise good officers just because their portrait kinda sucked.
Logged

Kaysaar

  • Admiral
  • *****
  • Posts: 544
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #2 on: June 20, 2023, 02:24:32 PM »

Nice mod and literally Quality of Life Improvment i have been looking for ^^
Logged

Spacegoat

  • Ensign
  • *
  • Posts: 23
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #3 on: June 20, 2023, 04:27:50 PM »

Wonderful! This is super helpful. ^^
Logged

IroncladLion

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #4 on: June 20, 2023, 07:16:25 PM »

This is something that the community has wanted for years! Ever since I first started modding the game I wondered why there wasn't a simple utility to change portraits to your liking. Really great that it works for officers as well, 10/10 mod.

Great job putting this together Lukas, the UI is super clean and easy to use. And thanks Milky for funding it.

SpaceDrake

  • Admiral
  • *****
  • Posts: 551
  • Piloting space mecha for fun and profit(?)
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #5 on: June 21, 2023, 04:43:56 AM »

Well, alas for barbershop I suppose  :P

Still, very clean and happy to see more options for this functionality.
Logged

Artarion

  • Ensign
  • *
  • Posts: 32
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #6 on: June 21, 2023, 02:43:36 PM »

Nice mod, thanks. I've been using VIC mod, it has gene facility to change portraits of you,offs and admins. But for now it's not updated.
Logged

ArcticAvenger

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #7 on: June 22, 2023, 01:53:53 AM »

Thank you both for this MOD!
Logged

SpaceDrake

  • Admiral
  • *****
  • Posts: 551
  • Piloting space mecha for fun and profit(?)
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #8 on: June 23, 2023, 07:29:58 AM »

Ah, speaking of barbershop: you need to do the same thing with this mod that barbershop had to. Simply changing the portrait of the player character officer object isn't enough; you need to change it in the portraitName tag in characterData as well, which is what the "actual" player portrait is. You need to change it in descriptor.xml too. Otherwise, the save will simply revert the player portrait back to the one you selected at game start when you reboot the game client.

That's what's happening with the current version.
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 627
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #9 on: June 23, 2023, 07:42:56 AM »

Ah, speaking of barbershop: you need to do the same thing with this mod that barbershop had to. Simply changing the portrait of the player character officer object isn't enough; you need to change it in the portraitName tag in characterData as well, which is what the "actual" player portrait is. You need to change it in descriptor.xml too. Otherwise, the save will simply revert the player portrait back to the one you selected at game start when you reboot the game client.

That's what's happening with the current version.

Will fix this and send it to CY later, though i dont see why i would have to mess with descriptor.xml, since the CharacterData setPortraitName method seems to already change the entry in in the descripter file.
Logged

SpaceDrake

  • Admiral
  • *****
  • Posts: 551
  • Piloting space mecha for fun and profit(?)
    • View Profile
Re: [0.96] Portrait Changer V.1
« Reply #10 on: June 23, 2023, 07:48:42 AM »

Will fix this and send it to CY later, though i dont see why i would have to mess with descriptor.xml, since the CharacterData setPortraitName method seems to already change the entry in in the descripter file.

Well, making sure portraitName is set correctly should do it. It's just that from save-editing experience, if all three portrait entries across the two save files (there's two entries in campaign.xml and one in descriptor), then it'll ultimately break. And somehow, it is resetting right now - I've had it happen to me twice.

Oddly, it won't reset immediately (i.e. if you change player portrait, close the game then open it again, it'll be the changed portrait) but it will reset eventually. A flag somewhere isn't being stored right.
Logged

Sarcolemma

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: [0.96a] Portrait Changer v1.0.1
« Reply #11 on: July 10, 2023, 07:46:33 AM »

Thank you so much for this! Can't wait to theme my officers in my pirate run.
Logged

Kingofchebureki

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: [0.96a] Portrait Changer v1.0.1
« Reply #12 on: September 05, 2023, 08:37:36 PM »

I just downloaded Tahlan shipworks, and I frankly love the Legio portraits. But I can't find them using the portrait changer, do I have to add the files to the directory?
Logged

Texas Redhawk

  • Lieutenant
  • **
  • Posts: 63
    • View Profile
Re: [0.96a] Portrait Changer v1.0.1
« Reply #13 on: September 06, 2023, 04:15:13 AM »

I just downloaded Tahlan shipworks, and I frankly love the Legio portraits. But I can't find them using the portrait changer, do I have to add the files to the directory?

Yes, from the look of it Portrait Changer only lets you set to portraits that are listed in the Player faction file. Add the Legio portraits to the list and you should be good.

Possible Frequently Asked Questions;
Spoiler
4. How do I add my own custom portrait?
- You can do that by;

a1. First, you must include your custom portrait into the graphics/portraits and copy its navigation link along with the portrait name.
a2. Secondly, go to data/world/factions and you may find player.faction file. Paste the copied link into the "portraits" section.
[close]

Amatsukaze_DD

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: [0.96a] Portrait Changer v1.0.1
« Reply #14 on: September 30, 2023, 11:54:36 PM »

So, I loaded the mod up into an already-in progress save. Was able to change officer portraits no problem. Saved the game, backed out, added legio portraits to the directories, reloaded the save and the portrait changer is broken. Deleted the legio portraits out of the directory and deleted the lines of code in the faction file, reloaded the save and the portrait changer is still broken. re-added the legio portraits and started up a new save, and it works just fine. just to cross it off the checklist I also uninstalled and reinstalled the entire mod for kicks, still completely broken on the in-progress save.

Just thought you might find it helpful or interesting to know that it worked exactly once on an in-progress save before completely breaking.
Logged
Pages: [1] 2