Swatch Slot

I need to create a single Swatch Slot for my new walls (In Default). How do I do this?
56 Replies
Robb
Robb2d ago
Like the "Ficsit Foundation Swatch" and "Project Assembly Swatch"? I'm not sure, just asking for clarification I think there are a few open source mods that add custom search slots you could look at
Jean Michel
Jean MichelOP2d ago
I want to add a option here (White + White)
No description
No description
Robb
Robb2d ago
Have you tried creating a new subclass of FGSwatchGroup like those are? It might end up auto detected
Jean Michel
Jean MichelOP2d ago
I created one but I don't know how to use it
D4rk
D4rk2d ago
oof, gimme a few minutes to collect some screenshots and write something up. I did this for SS and it's kind of a pain in the ass. What I'm about to post is based on Kyrium's guide to adding swatches. His method is done in cpp, but I've adapted it for blueprints. I'm also not entirely sure that I did it correctly, although it does seem to work. https://ficsit.app/guide/8RQqqjxcaAGpcb The first thing you'll want to do is a header edit (yay!) Open FGSwatchGroup and change mGroupName to editdefaultsonly From this: UPROPERTY( VisibleDefaultsOnly ) FText mGroupName; To this: UPROPERTY( EditDefaultsOnly) FText mGroupName; Then rebuild the project, let me know when you've done that You will also need these access transformers BlueprintReadWrite=(Class="/Script/FactoryGame.FGSwatchGroup", Property="mGroupName") BlueprintReadWrite=(Class="/Script/FactoryGame.FGGameState", Property="mSwatchGroupDatum") BlueprintReadWrite=(Class="/Script/FactoryGame.FGBuildableSubsystem", Property="mColorSlots_Data") BlueprintReadWrite=(Class="/Script/FactoryGame.FGGameState", Property="mPlayerGlobalColorPresets") BlueprintReadWrite=(Class="/Script/FactoryGame.FGGameState", Property="mBuildingColorSlots_Data")
Jean Michel
Jean MichelOP2d ago
Yes, I see your Swatch
No description
Jean Michel
Jean MichelOP2d ago
How to do?
D4rk
D4rk2d ago
Open \YourSMLProject\Source\FactoryGame\Public\FGSwatchGroup.h And make the changes i posted above. Then rebuild the project in VS.
Jean Michel
Jean MichelOP2d ago
BlueprintReadWrite=(Class="/Script/FactoryGame.FGSwatchGroup", Property="mGroupName") BlueprintReadWrite=(Class="/Script/FactoryGame.FGGameState", Property="mSwatchGroupDatum") BlueprintReadWrite=(Class="/Script/FactoryGame.FGBuildableSubsystem", Property="mColorSlots_Data") BlueprintReadWrite=(Class="/Script/FactoryGame.FGGameState", Property="mPlayerGlobalColorPresets") BlueprintReadWrite=(Class="/Script/FactoryGame.FGGameState", Property="mBuildingColorSlots_Data")
Done
D4rk
D4rk2d ago
Next, Create 3 new Blueprints in this order: FGSwatchGroup
Only contains a name and you'll need the header edit I mentioned above or set it on the CDO FGFactoryCustomizationDescriptor_Swatch Give it a name and description and an ID. I use ID 30, so maybe use 31, It does need to be unique to all other swatches though. mCategory should be CC_Swatch and mSubCategory should be CSC_Swatch_Default Set menu priority to something high, I used 99.
FGCustomizationRecipe Set mProducedIn to BP_BuildGun Set mCustomizationDesc to the FGFactoryCustomizationDescriptor_Swatch class you created.
No description
No description
No description
D4rk
D4rk2d ago
You'll notice my mGroupName is greyed out because I don't currently have the header edit, but your's should be editable.
Jean Michel
Jean MichelOP2d ago
Damn, I upgraded VS to Version 17.14.21 (November 2025) and now I can't compile anymore. I'll have to reinstall it.
No description
D4rk
D4rk2d ago
This is the last bit, where you actually register your new classes and inject them in to the games systems. One of the structs is a variable because there is no make function for it.
No description
D4rk
D4rk2d ago
Note the that ArrayElement index should be the same ID you set up in the swatch descriptor
Jean Michel
Jean MichelOP2d ago
OK thanks, I'll try it when I've reinstalled VS
D4rk
D4rk2d ago
And you would run this code from begin play in a subsystem or from the life cyle event in a module (any phase)
AngryBeaver
AngryBeaver2d ago
Interesting. I gave up on doing this a long time ago because Kyriums cpp method seemed too prone to conflicts.
D4rk
D4rk2d ago
I think it still can be, especially with the ID.
AngryBeaver
AngryBeaver2d ago
Yeah I think adding/removing mods and other things will probably cause some surprise shuffling.
D4rk
D4rk2d ago
Yeah, I freely admit that I'm not sure it's done correctly, but it does seem to work so far and no one has complained about it afaik
Robb
Robb2d ago
I thought blueprint read write could override visible defaults only
D4rk
D4rk2d ago
I dont think so. I have an active AT for the property and it's still greyed out. Also, this: https://discord.com/channels/555424930502541343/601030071221878784/1293319735945199749
Robb
Robb2d ago
What about EditAnywhere?
Jean Michel
Jean MichelOP19h ago
I placed the code in the Game World module on ELifeCyclePhase. So I do have access to the swatches in the buildable, and when I build an element, it correctly displays the predefined colors. The only thing missing is the display of this swatch in the defaults (via X), why?
Robb
Robb19h ago
@D4rk @Jean Michel based on this: https://unreal-garden.com/docs/uproperty/#editanywhere I think EditAnywhere will override VisibleDefaultsOnly
Unreal🌱Garden
All UPROPERTY Specifiers
Sample code, screenshots and comments for all specifiers, including undocumented ones.
Robb
Robb19h ago
I haven't had an opportunity to test it myself yet
D4rk
D4rk18h ago
I'm not sure what you mean by this, which part isn't working? Good to know, but it requires a header edit either way
Jean Michel
Jean MichelOP18h ago
I was able to edit it. What would that change?
No description
D4rk
D4rk18h ago
That is the name as it will appear in the UI
Robb
Robb18h ago
for which part? I re-read your message and it appears the only header edit is to swap VisibleDefaultsOnly to EditDefaultsOnly. I am assuming that applying this access transformer https://docs.ficsit.app/satisfactory-modding/latest/Development/ModLoader/AccessTransformers.html#_editanywhere would override the old VisibleDefaultsOnly, and EditAnywhere is more permissive than the EditDefaultsOnly the original header edit swapped to
D4rk
D4rk18h ago
Unless I'm mistaken and it's the name in the descriptor. I used the exact same text for both.
Jean Michel
Jean MichelOP18h ago
I don't have the button like yours
No description
D4rk
D4rk18h ago
The AT does not override VisibleDefaultsOnly. so it doesn't matter if you change it to EditAnywhere or EditDefaultsOnly, both require a head edit. Did you do this part https://discord.com/channels/555424930502541343/1441027604894453892/1441143077871030324
Jean Michel
Jean MichelOP18h ago
Same name in desc
No description
Robb
Robb18h ago
@Mircea (Area Actions) can you confirm if this is intended access transformers behavior? I would expect that using an AT to add an incompatible but more permissive access transformer would replace the less permissive access transformer. especially because doing so reduces the number of access transformer variants that need to exist
Jean Michel
Jean MichelOP18h ago
Yes
No description
Mircea
Mircea18h ago
It's definitely not intended But I remember checking this case specifically
Robb
Robb18h ago
I phrased that question poorly, sorry. is adding conflicting but more permissive intended to override, silently fail, or loudly fail?
Mircea
Mircea18h ago
Wdym by conflicting? EditAnywhere vs EditDefaultsOnly, or EditAnywhere vs VisibleDefaultsOnly?
Mircea
Mircea18h ago
EditAnywhere explicitly clears everything VisibleDefaultsOnly sets
No description
No description
Mircea
Mircea18h ago
So it should definitely work
D4rk
D4rk18h ago
Hmm, I have the AT for the property and it is still greyed out. I cant edit it without the header edit
Robb
Robb18h ago
this is my source for considering them conflicting https://unreal-garden.com/docs/uproperty/#editanywhere, I wonder if there is an order of operations thing going on here
No description
Mircea
Mircea18h ago
UHT considers them incompatible But for us we just set the flags to what we want them to be Which means clearing any flags that might be set by those incomaptible modifiers, and setting the flags that our modifier would set
D4rk
D4rk18h ago
I missed something yesterday. The recipe you created needs to be added to a schematic and unlocked. You can auto unlock it with code or make the player unlock it in the HUB or awesome shop in the normal way.
No description
No description
Jean Michel
Jean MichelOP18h ago
Thanks, I test it
Jean Michel
Jean MichelOP18h ago
Fantastic! Thank you so much!
No description
Jean Michel
Jean MichelOP18h ago
@Mircea (Area Actions) @Robb (Busy) Should I reset the value to VisibleDefaultsOnly or leave it as is for the mod's release?
D4rk
D4rk18h ago
You can leave it, it makes no difference in the shipped mod. ATs are editor env only
Robb
Robb18h ago
access transformers and header edits are compile time only - it is not adjusting the game's behavior, it is basically just turning off the safeties that keep you from accessing it
D4rk
D4rk18h ago
What was decided though? Should the AT override VisibleDefaultsOnly or not, I didn't fully understand what Mircea said
Robb
Robb18h ago
although if you have the time, if you could undo your header edit and try using an EditAnywhere access transformer on it instead to see if it still works (make sure to revisit the blueprint trying to use it and compile/check for errors in it specifically), that would be nice I believe the AT is supposed to override it
Mircea
Mircea18h ago
They should and they do
Jean Michel
Jean MichelOP18h ago
OK, I'll try tomorrow. Many thanks to all three of you. All that's left for me to do now is build the hundred or so elements. Good night, or good day.
D4rk
D4rk18h ago
Sorry I made you jump through that hoop Jean, I'm a bit behind on the AT stuff and I didn't know the EditAnywhere AT existed. This is all you needed. BlueprintReadWrite=(Class="/Script/FactoryGame.FGSwatchGroup", Property="mGroupName") EditAnywhere=(Class="/Script/FactoryGame.FGSwatchGroup", Property="mGroupName")
Robb
Robb18h ago
it is one of the more recent ones

Did you find this page helpful?