Having issues with quick switch groups
I'm making a custom foundation type but I'm having issues incorporating in the existing foundations. It just appears in every group, and if I switch material it just disappears. I'm also having issues with the material (for now I just have the concrete type)
169 Replies
I put it in the swapgroup 5 hoping it would give it it's own group, while it seems to work, it doesn't really. If I put it in swapgroup 3, it shows up in a separate group when swapping materials but is in the same group in the grip metal material, which considering this wheel above makes sense since it appears to be in group 3
How can I put it in a different group as full foundations and half foundations? And make it switch material when clicking to switch material?
The parts that show up on the quick switch wheel are parts that all share the same Category and Subcategory in their descriptors and they are separated by the customizer buildable map they are assigned to. If your part is not assigned to a buildable map then it belongs to the "no filter" group, which is why it shows up in all materials.
Hmm, what's a buildable map exactly? Where is it referenced?
I probably didn't touch it then
FGFactoryCustomizationDescriptorMaterial->mBuildableMap
The games descriptors are in this folder
/FactoryGame/Buildable/-Shared/Customization/Materials/
You will need to add your parts to these maps via CDO if you want them to use the material
Like so. Note that the map entries have to be unique
BlueprintReadWrite=(Class="/Script/FactoryGame.FGFactoryCustomizationDescriptor_Material", Property="mBuildableMap")
I see, thanks, I'll take a look at this and let you know if it worked
I assume this should be in the buildable descriptor?
No, you would run that code from a mod module or subsystem. The CDO edit should only be done once and sometime early in loading. Use Module->EventOnLIfeCycle or Subsystem->BeginPlay
I'm not really familiar with those, where can I find this?
Is it in a specific blueprint or something else entirely?
Your mod should already have a
GameWorldModule
so you can put the code in there. You will also need the access transformer I posted to expose the property. (read the docs thoroughly)
https://docs.ficsit.app/satisfactory-modding/latest/Development/ModLoader/AccessTransformers.html
https://docs.ficsit.app/satisfactory-modding/latest/Development/ModLoader/ModModules.html
https://docs.ficsit.app/satisfactory-modding/latest/Development/ModLoader/Subsystems.htmlAccess Transformers :: Satisfactory Modding Documentation
UE-CSS 4.25.3 build 42 adds a new feature: the ability to make accessors for fields, add friend classes, and make properties BlueprintReadWr...
Mod Modules :: Satisfactory Modding Documentation
Mod Modules are a system provided by SML that allows for simple hooking into the engine life-cycle at key locations important for Satisfacto...
Subsystems :: Satisfactory Modding Documentation
If youāre looking for the subsystems that SML provides by default, check out the Registry page. Subsystems are actors that exist...
Ok thanks so much!
So if I understood correctly, the root game world module calls a subsystem each time a save is loaded which adds to the buildable map right?
No, you dont need a subystem at all. Do all of your CDO edits in the GameWorldModule and that should be all you need
Ooh ok
And do I need a BeginPlay or EventOnLifeCycle to start or since it's the root game module it's automatic?
GameWorldModule uses the latter
Modules are not actors and they don't have BeginPlay
Use OnLIfeCycleEvent
Alright thanks
What's that Target node called? I can't find it
That is a property that you have to expose with access transformers.
https://discord.com/channels/555424930502541343/1296535306123874376/1296551116997398599
Aaaah I see
And how do I know which buildable map it is targetting?
Oh nevermind that's the CDO getter
Hmm, might have broken some things
Clicking it crashes my game
what is the crash you get? it can give some hints about what went wrong
Something is null
seems like there is somehow a bad entry for the building in that collection now
add some logs to your code to make sure you aren't adding anything invalid to those arrays you are modifying
Hmmm could be that I switched my build_foundation asset from FGBuildableFoundation to FGBuildableFoundationLightweight. I haven't found a way to tell the latter one which mesh to take so I think that's the issue
But I don't know how to fix this
It is set to Holo_Foundation
If you're using lightweight classes, you need a data object in the builder
Oooh that's probably it. What is the difference between lightweight and non lightweight classes? I just copied one foundation from the base game without putting in much thought but I don't actually know the difference
I have this and it works
I'm going off of what Arch said
https://discord.com/channels/555424930502541343/601030071221878784/1291227817660649512
Upgrading from SML 3.7.0 to 3.8.x :: Satisfactory Modding Documenta...
The contents of this page will change frequently! Keep your eyes on the #modding-info-feed discord channel to be notified when updates are m...
Are you 100% sure that your parts are lightweights? The only way to know is to hit it with a trace and resolve the handle owner
Though this is NOT using the new lightweight buildable system, so I expect it to be not-great w.r.t. performance
I am 100% sure they're not, this is some mod I inherited š
It still crashes
Thanks I'll give that a read
Pretty sure that's the same error but posting it anyways
What did you change?
Added this and gave a foundation mesh with the ficsitset material
Remove the override material
Oh why? How can I tell it its material then?
The material you want to use has to be already assigned to the mesh
Ooooh got it
also, set NumCustomDataFLoats to 20 or you wont be able to customize it
Why 20 in particular? Does it mean anything?
It's how it works
Alright x)
It still crashes
It still has the "nullpeter" name though, maybe something else is the cause
Data floats are how the game sends information to the materials, like paint color or has power,
https://docs.ficsit.app/satisfactory-modding/latest/Development/Satisfactory/Paintable.html
Paintable Materials & Tintable Lights :: Satisfactory Modding Docum...
Making things paintable is not as difficult as it may seem. You can use the existing materials, or create your own implementation. Ma...
Revise the recipe and the descriptor, see if they reference the descriptor and the buildable respectively
Indeed one reference was missing somehow
It doesn't crash anymore and it seems to work for the ficsit set but the concrete set doesn't show up
Compare working to broken and figure out what is different
The only difference I found is in the schematic, the concrete variant is not in the Unlocks array. I already tried that before but it showed the concrete variant in the list of unlocked buildables when hovering over the Awesome shop schematic (the other foundations only show ficsit set)
I see thanks
This is what I mean
Not sure how it works, but I think there's some interdependencies between customizer schematics and foundation/wall schematics
I'm not sure either, compare your classes to what the game has set up?
The idea is that you can only unlock the Concrete Quarter Pipe (for example) if you've unlocked the Concrete Customizer Material and the Quarter Pipes Pack
It's probably implemented using groups of 3 schematics:
- sink shop schematic for the customizer material
- sink shop schematic for the foundation shape
- hidden schematic that depends on the first 2 schematics
The sink shop schematics are reused
That makes sense
I found that
Ah, it's shaped like a lattice
Mx (horizontal lines) are sink shop schematics for customizer materials
Fx (vertical lines) are sink shop schematics for foundation shapes
The points where two lines cross are hidden schematics that depend on the two lines that cross (one material schematic, one shape schematic)
Hmm and how do I add this hidden schematic?
Is this the CBG schematic?
Look at the existing schematics to see how they're implemented
I'm even more confused
Why is it only foundations and ramps?
Oh there are multiple, my bad
That looks like a hidden schematic, yes
Might have understood, gonna try some stuff
It's almost working, when the concrete customizer is already unlocked, my concrete foundation does show up, but when it's not unlocked yet and I unlock my foundations first, then the concrete type doesn't show up
I think it might only try to unlock the concrete foundation once at the beginning
That's what I put in my CBG
Oh, I need to add my CBG to the concrete customizer schematic I think
I suppose I have to add it the same way I did with the buildable map right?
I tried adding that
BlueprintReadWrite=(Class="/Script/FactoryGame.FGSchematic", Property="mSchematics")
but I'm not sure that's right š¤
I do have a M Schematics getter but I don't think I can specify ResourceSink_Customizer_Concrete_FoundationMaterial
to it, so I don't actually know what the array of schematics containsTried something like that
You should get the
M Schematics
variable from that CDO
And this should be done in something like a game world module or game instance moduleIsn't this what I have?
Yeah that's my root game world module
I can't tell from a partial screenshot
With a screenshot of the entire editor window, I can see the parent class in the top right corner
My bad that's a bit of a mess that's why
For future reference
Okay, you should save the CDOs to a variable so that they remain referenced. If you have many CDOs to edit, I'd suggest using an array
How would you do that?
Something like this (above is variable, below is array)
Ignore types and variable names, I used whatever I had in the blueprint š
Hmm what's the purpose of this exactly? It seems to work fine without it
It's to make sure the edited CDO remains in memory
Otherwise, it's possible for the CDO to be unloaded and then loaded again from disk, effectively undoing any CDO edits
Shouldn't it be unloaded only when a save is unloaded?
Since it's the Game world module
Also I can't find the Tool Modes nodes
Ignore types and variable names, I used whatever I had in the blueprint
ooooh
you will need to make your own array of type object
Ok ok
Got it
not necessarily, UE has a garbage collector, anything not being referenced could get collected
Ah I see
And the GC runs every 60 seconds or so by default, IIRC
Ok I think I finally managed to store the CDOs in variables, it took me way took long xD
Now about this, I don't think the access transformer is correct, I think the M Schematics I found is something else
Ah yes, it's probably
mUnlocks
Hmm, mUnlocks is an array of arrays, I tried getting FGUnlockSchematic part of the array with a getter but that returns a copy so I can't modify it
It returns a copy of a pointer, you can modify that
It seems to return me the wrong type
Shouldn't it be an FGUnlockSchematic?
No
A schematic can unlock a bunch of other things
What did you need to do this CDO edit for? I forget
For this
I need to add the hidden schematic I created to this array
The FGUnlock object needs to be casted to the type, I.E. FGUnlockRecipe, and you'll need to expose it's properties as well.
BlueprintReadWrite=(Class="/Script/FactoryGame.FGUnlockRecipe", Property="mRecipes")
Whichever type and property you are trying to set
Find the element that is a FGUnlockSchematic and then operate on it
Ok so something like that?
Yeah
Damn that would have been so much easier in C++
Not a fan of blueprints, I find them harder to work with
I find them faster to iterate with
I guess, maybe it's because I'm not used to blueprints
Which file should I have modified if I wanted to do that same thing in C++?
Well that made my schematic disappear it seems
Connecting that link in yellow makes my schematic disappear
Any ideas why it does that?
Sorry, I don't. You're doing stuff that I have never attempted. My advice would be to log as much as possible and see where things are going wrong.
Hmm, ok thanks anyways
Where do the logs show up? I don't see anyting in the output log and nothing in the logs files
>files_logs
Learn about where to find log files: https://docs.ficsit.app/satisfactory-modding/latest/faq.html#Files_Logs
Thanks
I'm going to sleep so if anyone has an idea to fix this, I'll gladly take it. I tried for a while but with 0 progress so far
After a bit of debugging, it seems the culprit is that red link
Maybe the mSchematics it targets is wrong and causes my schematic to disappear from the awesome shop somehow
But it looks like my schematic is correctly added to the array though
And it looks like it's the correct class as well
Found that in the logs, could that be the issue?
I don't think so, it show up in logs even when I remove the problematic link
So it seems my schematic is in the game world module event after adding the link that makes it disappear
So it is present, but it doesn't show up. Also if I load a save where I already unlocked my recipe, I can actually build the foundation, so it does exist
What can cause a schematic to not show up despite it begin in the root game world module?
I'm really stuck on this one, it's such a weird behaviour. I know you said you don't know how to help but do you guys know someone that I could ask that might know something?
Wait, I think I actually fixed it
I just swapped the link from Initialization to post initialization
Though I can't seem to be able to change the foundation material, is it some other stuff?
Change the foundation material?
Yeah like this
Using customizer
I think it needs to be set up accordingly, but I don't know the details
Check your recipe and make sure it has a replacement cost. Also verify that your builder map additions actually got added. I can't think of anything else that would prevent it from working.
Everything seems to be set so that's weird
It seems I can modify the material but only on the same material; like if the foundation is the default material I can only customize it with the ficsit set, not the concrete one
Same goes for the concrete variant
Can you show what the material customization recipe is set to, for your foundations?
That's the recipe for the concrete foundation
And for the default foundation the material customization is the default material
Sounds like your builer map additions are backward. Try swapping them.
I found this interesting
Recipes
The top row is all default materials and the bottom row is all concrete materials
swap the add nodes and try it
You have to add all the entries
concrete build ---> ficsit recipe, asphalt build ---> ficsit recipe, metal build ---> ficsit recipe
Oooooh
That actually makes a lot of sense
Damn that blueprint will be massive
Is there a way to make functions in blueprints?
Yes, also you should probably use loops
That seems so tideous with blueprints, is there a way to do that in C++? I guess so but I have yet to setup C++ for this project so I'm not sure how to get started
Is it possible to replace that whole thing with C++?
Then you'd have to find a way to reference the blueprint assets from C++
Which is a pain anyway
Ah
One sec, let me try something
I don't think it is required that you add them to every buildermap to make them work in one of them. The problem has something to do with the classes you are adding.
Look over the source for Beavers Christmas Booster
https://github.com/DavidHGillen/Satisfactory-AB_XMASBooster
GitHub
GitHub - DavidHGillen/Satisfactory-AB_XMASBooster: The Satisfactory...
The Satisfactory mod AB_XMASBooster. Contribute to DavidHGillen/Satisfactory-AB_XMASBooster development by creating an account on GitHub.
Hmm what do you mean exactly?
What classes are being added to these buildermaps?
For now, to the default material buildmap I'm only adding the concrete foundation build with the default material foundation recipe
and for the concrete material buildmap, the default material foundation build with the concrete foundation recipe
But I thought I had to do that for every material like Rex said in this message
For now I only have concrete and default so that's why I only add one thing to each buildmaps
What are the full names for these
At the top:
Build_Quarter_Foundation_Concrete_4m
Recipe_Quarter_Foundation_4m
At the bottom:
Build_Quarter_Foundation_4m
Recipe_Quarter_Foundation_Concrete_4m
And both of those recipes have the correct material recipe assigned?
This
https://discord.com/channels/555424930502541343/1296535306123874376/1297231723972792444
Yeah but it works now I think
I was just wondering why you said it wasn't required to add them for every material
You only need to add them to the buildermaps you want to use. For example, if you dont have a grip metal variant, you dont have to add something in that map to make it work with the other maps.
That's all I meant
Oooh ok I misunderstood
Is there something on the documentations for this? Like to go from a blueprint to C++?
C++ Modding :: Satisfactory Modding Documentation
Utilizing Cā+ā+ code in your mod allows access to a much wider variety of game systems and features. Furthermore, Cā+ā+ code is often compil...
Thanks I'll take a look at that
Well thank you everyone for your patience and help, I got it working now!
Now I understand so much more than at the beginning of this thread, this was really helpful
Sorry, never got around to doing that
No worries I'll figure it out
My idea was to make a function which takes a list of your custom recipes and automatically sets up the material customization stuff
There's too many typos for this to be anything other than a giant hand made list
I'm confused, I would only need the custom assets to have something in common to know they're the same shape
yeah and the naming isn't consistent, typo free, or organized enough for the list to be much other than just a giant list of edge cases.
Unless you were to do what Ben has been hoping to do and assign ShapeIDs to each individual item so that you can do a bi directional lookup without the need for the dual maps there's no good way to automate a simplification
I mean custom assets, i.e. the ones made by Spokloo
Vanilla assets can do whatever they want
Right but the problem is the work of greating the multiple maps necesary to go in every direction right?
so what the vanilla assets did matters
That's what I want to automate
And I'm pretty sure I can do that, let me try
and I'm telling you it's not organized enough to automate without just making a giant list
It only needs to be a list of your custom assets, grouped by shape
Specifically, I'd reference recipes and resolve stuff through properties
and then how does that know what it applies to on the vanilla assets?
Ah, gotcha
I was thinking about new shapes, not new materials. That's what this thread is about after all
ah that might be my bad for not reading the hundreds of messages but my new material was brought up
For new materials, it might be easier: you'd only need to match the custom material recipe to the same-shape recipe for e.g. ficsit material
So you'd have a map
yeah both me and D4rk would love a betetr system of doing material replacements and Ben was working on one
I'm not familiar enough with the code base to understand all that but I think I'm gonna stick with what I have for now, maybe I'll change that in the future once I understand better