Skip to content

Commit 5edf6f4

Browse files
budak7273mklierman
andcommitted
Add page by Sir Digby walking through the creation of custom Icon Libraries
Co-authored-by: Mark Lierman <[email protected]>
1 parent 0fc1d26 commit 5edf6f4

File tree

8 files changed

+172
-1
lines changed

8 files changed

+172
-1
lines changed

cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"doggos",
4040
"DOREPCONDITIONAL",
4141
"DOREPLIFETIME",
42+
"ESIT",
4243
"FACTORYGAME",
4344
"favorited",
4445
"Feyko",
@@ -53,6 +54,7 @@
5354
"furtue",
5455
"Headlift",
5556
"HKEY",
57+
"Holo",
5658
"hoverpack",
5759
"hypertube",
5860
"hypertubes",
Loading
Loading
Loading
Loading
Loading

modules/ROOT/nav.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
**** xref:Development/Satisfactory/AbstractInstance.adoc[Abstract Instances]
8383
**** xref:Development/Satisfactory/ConditionalPropertyReplication.adoc[Conditional Property Replication]
8484
**** xref:Development/Satisfactory/Savegame.adoc[SaveGame]
85+
**** xref:Development/Satisfactory/IconLibrary.adoc[Icon Libraries]
8586
**** xref:Development/Satisfactory/DedicatedServerAPIDocs.adoc[Vanilla Dedicated Server API]
8687
*** xref:Development/Satisfactory/ModsWithoutSML.adoc[Modding Without SML]
8788
*** Legacy
@@ -128,7 +129,7 @@
128129
** xref:CommunityResources/incredibuild.adoc[Incredibuild]
129130
** xref:CommunityResources/TrainSignalGuide.adoc[Train Signaling Guide]
130131
131-
// TODO unhide once translating section is ready
132+
// TODO un-hide once translating section is ready
132133
// * Translating Mods
133134
// ** xref:Translation/GetStartedTranslating.adoc[Get Started Translating]
134135
// ** xref:Translation/UsingTolgee.adoc[Using Tolgee]
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
= Icon Libraries
2+
3+
Extending the set of icons available for use in the game's sign, map stamps, and map icon system requires creating an Icon Library data asset.
4+
Adding new icons is a relatively straightforward process but there are some considerations to be made.
5+
6+
This page walks through creating an Icon Library, adding icons to it,
7+
and editing it as your mod evolves.
8+
9+
[IMPORTANT]
10+
====
11+
The game's icon library system is originally designed to be used with an editor tool that is not available to modders.
12+
As such, many of the warnings and mentioned in the headers (and field hover tooltips) are not relevant to modders.
13+
14+
Disregard the tooltips' warnings, but be sure to read the warnings and notes posted on this page.
15+
====
16+
17+
== Setup
18+
19+
Before getting started you will need to add some
20+
xref:Development/ModLoader/AccessTransformers.adoc[Access Transformers].
21+
The game's icon library system has a couple safeguards to avoid icon ID conflicts,
22+
but we must turn off these safeguards to add modded icons in our own libraries.
23+
24+
Add the following to your mod's `AccessTransformers.ini`:
25+
26+
[source,ini]
27+
----
28+
[AccessTransformers]
29+
30+
; Custom FGIconLibrary
31+
EditAnywhere=(Class="/Script/FactoryGame.IconData", Property="ID")
32+
EditAnywhere=(Class="/Script/FactoryGame.IconData", Property="IconType")
33+
EditAnywhere=(Class="/Script/FactoryGame.IconData", Property="ItemDescriptor")
34+
EditAnywhere=(Class="/Script/FactoryGame.IconData", Property="DisplayNameOverride")
35+
----
36+
37+
== Create the Icon Library Data Asset
38+
39+
A data asset needs to be created to hold all the information about the icons you are adding.
40+
Create a data asset using the Content Browser by right-clicking on empty space in your mod's Content folder, hovering over `Miscellaneous` and selecting `Data Asset`.
41+
42+
image:Satisfactory/IconLibrary/CreateDataAsset.png[Screenshot of creating a new Data Asset in the editor]
43+
44+
Then select `FGIconLibrary` as the Data Asset Class
45+
46+
image:Satisfactory/IconLibrary/SelectDataAssetClass_FGIconLibrary.png[Screenshot of selecting Data Asset class]
47+
48+
Place the asset wherever you'd like in your mod's files.
49+
The game's Icon Database Subsystem will automatically detect and load it.
50+
51+
== Importing Icon Images
52+
53+
You will need to import images to be used as icons if they aren't already part of your mod.
54+
To do this simply right-click on an empty space again and this time select `Import to /[YourModReference]`, then use the file browser to select your image(s).
55+
56+
image:Satisfactory/IconLibrary/ImportAsset.png[Screenshot of import asset context menu]
57+
58+
Some Texture settings can be set to match Vanilla icons.
59+
60+
In the `Level Of Detail` section:
61+
62+
* Mip Gen Settings = `FromTextureGroup``
63+
* Texture Group = `UI Streamable`
64+
65+
In the `Compression` section:
66+
67+
* Compression Settings = `Default (DX11/...)`
68+
69+
image:Satisfactory/IconLibrary/IconTextureSettings.png[Screenshot of icon Texture asset settings]
70+
71+
Everything else can be left as the default from when it was imported.
72+
73+
=== Image Considerations
74+
75+
There are a couple things to keep in mind for your images:
76+
77+
1. Images should be square. Signs will stretch images into a square so if you want it to show correctly make sure you crop it to a square before importing.
78+
2. PNGs with alpha backgrounds work best. Vanilla icons have alpha backgrounds, so to best match the vanilla style yours should have that as well.
79+
80+
== Filling out the Data Asset
81+
82+
Upon opening the data asset you will see several different arrays you can add icons to. No matter what type of icon you are adding you will want to use `M Icon Data`. If you add your icon in one of the other arrays it will not show in-game.
83+
84+
Add a new element to `M Icon Data`, it should look like this:
85+
86+
image:Satisfactory/IconLibrary/FreshIconDataArrayElement.png[Screenshot of newly created Icon Data array element]
87+
88+
[cols="1,4a"]
89+
|===
90+
| Field | Description of Function
91+
92+
| ID
93+
| Each of your icons requires a unique, non-negative ID. For ease of editing, start at 0 and use the same number as the array index.
94+
95+
[NOTE]
96+
====
97+
Icon IDs must be unique within the Data Asset, but not across Icon Libraries.
98+
If you have multiple Icon Library Data Assets it's safe to reuse IDs as long as it isn't within the same Library asset.
99+
====
100+
101+
| Texture
102+
| Required. The texture (or material instance) to use for the icon.
103+
104+
| Item Descriptor
105+
| Optional. If you want to duplicate the name of an item or building, select its descriptor here.
106+
107+
| Display Name Override
108+
| When checked, the `Item Descriptor` field will be ignored and `Icon Name` will be used instead.
109+
110+
| Icon Name
111+
| The user-facing icon name to use for the icon. Required, unless an `Item Descriptor` is provided.
112+
113+
114+
* When no `Item Descriptor` is provided, the field is used as the icon name.
115+
* When an `Item Descriptor` is provided, this field is only used as the icon name when `Display Name Override` is true, otherwise the value is ignored.
116+
117+
| Icon Type
118+
| Required. Controls the category the icon is sorted into in-game,
119+
and if it's treated as a map stamp icon.
120+
Set this to something other than `ESIT None`.
121+
122+
| Hidden
123+
| When checked, the icon will not be available for selection in-game.
124+
Use this if you want to remove an icon from the library instead of deleting its array entry.
125+
126+
| Search Only
127+
| When checked, this icon will only appear when searched for directly.
128+
129+
| Animated
130+
| see link:#AnimatedBackgrounds[Animated Backgrounds] for more information.
131+
132+
|===
133+
134+
== Adding and Removing Icons
135+
136+
To add new icons, simply add new array elements and ensure they have unique IDs.
137+
138+
[IMPORTANT]
139+
====
140+
When removing icons from your library, use the Hidden field instead of removing them!
141+
142+
Although it's possible to remove array entries, this is highly discouraged as it could result in you accidentally re-using an ID later.
143+
Re-using an ID will cause users' signs to unexpectedly change from the old icon to the new icon.
144+
Instead, it is recommended to simply leave the array entry in place and enable the `Hidden` boolean property.
145+
Clear the texture reference if necessary.
146+
====
147+
148+
== Finishing Up
149+
150+
To test your icon library, package the mod and build a sign to see if your icons are showing up.
151+
Check out Example Mod's `ExampleModIcons` if you're having trouble getting your icon library settings to work.
152+
153+
== Special Icon Types
154+
155+
This section provides some additional notes about specific Icon Type values.
156+
157+
[id="AnimatedBackgrounds"]
158+
=== Animated Backgrounds
159+
160+
It is possible to add new animated backgrounds.
161+
Look at `FactoryGame/Interface/UI/InGame/Signs/SignBackgrounds` for some examples of settings for animated backgrounds.
162+
163+
NOTE: Animated icons will only animate when used as a background, and all backgrounds are automatically made grayscale when selected in-game.
164+
165+
=== Map Stamps
166+
167+
Using Icon Type `ESIT_Map_Stamp` will result in the icon automatically appearing as a stamp option in the game's map UI.
168+

0 commit comments

Comments
 (0)