Is the base game not enough? Forge Industry was designed with modding support in mind. このガイドでは, we’ll take a look at the modding toolkit and how you can create your own mod.
はじめる
The purpose of this guide is to help you understand how the Forge Industry Modding Toolkit works and to guide you through creating your first mod.
In this guide we will be using Unity and the Forge Industry Modding Toolkit. So make sure you have both Unity installed and the toolkit downloaded. This guide has been written using Unity 2021.3.25f1.
While any other version of Unity should work just fine, it has not been tested, so we can’t guarantee you’ll get the same results.
今のところ, you can find the mod tools in the Forge Industry installation folder as “Forge Industry Mod Tools.unitypackage”.
This .unitypackage will be uploaded to a standalone site at a later date.
Project Setup
まず最初に. We need to create a new Unity project, which will essentially become our mod and contain all of its components.
So we’ll just open Unity and create a new project. For the template we will use the “3D (URP)” template. You can find it in the “コア” タブ. また, we will use 2021.3.25f1 for this example.
その後, just enter a name, and where you want to save the project files. In this guide we’ll be creating a new building that is a Train, so we’ll name the mod “Train Mod”, and give it a location that I can easily access.
Preparing the workspace
Now that we’ve got Unity open and loaded with a new project, we need to do a bit more setup before we are ready to start creating the mod.
まず最初に, we’ll be removing all files that Unity created for us, such as the camera and lights, as we don’t need them going forward.
Now open the folder of the toolkit you downloaded, and drag the Forge Industry Mod Tools. Unity package file into your Unity Assets. この段階では, Unity might prompt you and ask if you want to Import the project or switch to it. 先に進んでクリックしてください “輸入”.
次, Unity will ask you what you want to import. を押します。 “全て” ボタン, そしてクリックしてください “輸入”. If you happen to spot any unchecked boxes even after clicking the “全て” ボタン, feel free to ignore them. Everything will work just fine.
Now the toolkit is ready to use. We have just 1 more step before we can create the actual mod.
Preparing the objects and sprites
Add all your sprites and models to your Unity assets.
The first thing we’re going to do is turn the models into usable prefabs for our mod.
Since this is outside the scope of our mod, and to keep this guide short, we won’t go into detail on how to create prefabs in Unity.
しかし, our toolkit does require certain settings and rules to be followed when creating them.
Each square in the game is a 10 による 10 meter object in your 3D modeling software (we use Blender).
If you did not create your own model, but downloaded one from the Internet. Then you may have to play around with the scaling to make it look right in the game.
In your transform properties for the top object in your model, set the scale to “2” on all axes.
その後, you’ll also need to make some adjustments to your sprites. They won’t work as they are.
幸運, it’s only a small change.
Make sure all your sprites are max 256×256, and set their texture type to not “Sprite (2D and UI)”.
You’re now done with the setup!
Time to create your mod.
Making the mod – 建物
Since we’re going to make a train mod, we need to add a new building to represent the train.
To add new elements to the mod, right-click on your assets panel, 選択する “作成する”, それから “BiteMeGames”, それから “Modbuilding”. We’ll get to most of the other items later in this tutorial.
The new scriptable object created will contain all the settings related to our building.
We’ll change both the name and localized name to “電車”, and the localized description to “A simple train”.
In the Game Models list, we can define the models that will be linked to our building. A building can have multiple models, an example of this can be seen in-game with decorative buildings such as trees.
そこに, we’re going to add a new entry that will link our new prefab and icon to the building. So go ahead and click the “+” アイコン, and then point the Icon to your Sprite, and the Model to your Prefab.
パラメーター
- Gold cost: defines how much our building will cost to place in-game, so we’ll set it to 200 for demo purposes.
- Width, 身長: Defines how many squares in the X and Y direction our building will use in the game. この場合, our train is 2 による 1 since there are 2 wagons of each 1 square grid.
- Workers Required: how many workers are needed for the building to be operational? As a train can be controlled by 1 人, we just need 1.
- Usable In Routes: defines whether the building can be used in our Routes.
- Placeable On Road and Walkable On Road: Controls if the building can be placed on Roads, もしそうなら, if workers can walk on said Road.
- Is Decor: Says if the building is Decor or if it has a function.
- Is Connectable Decor: Controls if this decorative building has multiple variants that snap to each other. An example of this is the decorative flower perk in the game.
- Show In Building Bar: Defines if the building can be shown in the bottom building bar under the building tab.
- Can Be Removed and Can Be Renamed: Controls if the building can be removed or renamed respectively.
- Heat Source Required: Defines if the building required a heat source to run (such as coal).
- Animator: Allows you to link an animator to your building to give it an in-game animation that is respected by the game speed setting.
We have skipped over the Building Type Id because this field needs a bit more explanation. This field is the unique identifier of your building across all mods. This value should be globally unique for this building type. So you can choose your own id and have a fun number, but we recommend just generating a random long and putting it in there.
You might also want to keep a separate document to keep track of which id belongs to which building/road/item in your mod. Especially if you create a larger mod. You will still need to remember this number though, as you will need it later to tell you what building your item recipe belongs to. Some IDs are reserved for internal use, so they will be taken. しかし, you will still need them to link to our existing in-game objects. You can find these IDs in this section of the guide.
Those are the main settings for our building. But now we need to tell the building what inputs it can accept. We can do that via the “Accepted Inputs” リスト. 無視する “Available Recipes” 今のところ, we’ll come back to that later.
Material Item Type Ids is a list where you can define what material types are accepted for a certain item. Here we’re gonna say that we accept Coal as an input, signified by the 40000000003 Id. As shown in the list mentioned earlier, all Ids in the 4xxxxxxxxxxx range, specify Specific items without materials in the base game.
Since we’re referencing something from the base game and not a mod item, we have to check the “From Base Game” チェックマーク. “Count” is ignored here, but is shown since this object is reused throughout multiple mod components. そして “Is Multiple Optional” is also ignored here, we’ll come back to that later.
Now that we’ve got the building, we can start creating our own items for it to create. You can find out how to do that in the next section.
Setting the positions of workers
You might have noticed that workers don’t appear in your buildings where you might want them and felt an immense wave of disappointment after all the hard work you already put into making your amazing new building.
しかし恐れることはありません! We can easily remedy this.
Go back into your mod project, and open the prefab.
Now just add an empty object for each worker location, and move it to where you want it in your building.
Open your new empty object, and set its Tag to “WorkerLocation”. Do this for each one.
Making the mod – リソース
Now that we have the Mod Building, we need items that it can create. That’s what we’re going to be creating next.
Go through the same Right Click Assets -> Create -> BiteMeGames motion that we did earlier for the building, but this time select “ModResource” その代わり. Just as we did with the building, we’ll walk you through each setting here.
明らかに, we want to give the item a name, we can do that with the “名前” 分野. この場合, I want to turn Coal into Ashes eventually, so I’ll create a new “灰” アイテム.
- ItemTypeId: used to define an item that has a material that is not “なし”. Whereas as you’ll remember from earlier, “Specific Item Type” is used to define an item without any materials. Since we don’t have any materials, we’re gonna enter a new randomly generated Id into the “Specific Item Type Id” 分野. Note that we still have to enter 50000000000 に “Item Type Id” 分野, which signifies “なし” for the Item Type. また, refer to the part above and the Id list if you’re confused about these numbers.
- 組み合わせた: A checkbox that tells our game wheter to look at the Item Type + 材料 (when checked), or the Specific Item Type (when not checked).
- Difficulty To Create: Says how easy your item is to create, this is used in the supply & demand price calculations.
- Rarity Tier For Specific Item: Specifies how Rare your item is, this is used in the supply & demand price calculations.
- Is Possible Heat Source: Specifies if your item qualifies as a Heat Source. If you check this box, you must also specify how many Ticks of heat the item provides in the Provides Heat For Ticks field.
- Craftable: Specifies if the item is Craftable. If this is disabled, then the item can only be generated by the Generates section in the Modbuilding.
- Has Components: Marks the item as a finished/complex item. This means that the game will add all resources used to create the item as components, and this will influence the item’s sell price.
Now we specify how this item can be created. You’ll notice Mod Recipes is empty by default. Go ahead and add a new entry.
Start by entering the “Building Type Id”. Go ahead and enter the building id from earlier, to say this recipe can only be used by that building. Leaving this empty will make the recipe not work at all.
“Ticks to Complete Item” says how many in game ticks it should take to transform the input to the output. In this case I want Coal to be burned instantly so I’ll set this to 0.
- Heat Source Required: Will define if this recipe requires a Heat Source to be made. Only possible if the building allows heat sources.
- Output Quantity: The amount that is created. 例えば. ために 1 coal, we will get 4 ashes.
- Override Material: This is a special field. When disabled, the building will try to find an input item of the Material Type as one of the Materials in the output item. Ashes don’t have any material, so we will enable this box, which tells the game to ignore material matching checks. When this is enabled, you can specify the Material Item Type Id that the created item should have. Which is None in our case.
In the Mod Requirements, we choose what is required to create our item. We can choose what Material Item Type Ids we want to allow, and the same settings as we talked about previously. With a few exceptions.
ここ, Count is not ignored and will define how many items we need to create x amount (x is defined by the Output Quantity) of our new item.
Is Multiple Optional is a more advanced setting that we’re going to ignore for now. Leave this unchecked.
Items have the ability to show a different icon based on the price, to mode visually signify their value over others of their kind.
We’ve only got 1 アイコン, so I’m just going to set the Minimum Price に 0 and the Sprite to the Sprite of our Ashes.
そしてそれとともに, we have our new item configured!
Before the building knows that this is a recipe it can use, しかし, we have to go back to our ModBuilding, and add the Recipe to our “Available Recipes”. ここ, since the item is not from the base game, we leave that unchecked and link the “Mod Resource” に “灰 (Mod Resource Definition)
信じられないかもしれませんが, that should be all!
If you’ve followed this tutorial, you should now have a working mod.
そうでない場合, retrace all your steps and go through the guide again, or create a post on the community forum, where we’ll further help you out.
In the final part, we will show you how to export your mod to use it in the game.
Exporting your mod
Exporting the mod is the easiest part. はい, even easier than creating the project!
All we have to do is press “ツール” -> “ModTool” -> “Export Mod” in the top bar.
Now we just have to enter a “MOD名”, “著者”, “バージョン”, and a simple “説明”. These are values that will be shown in-game.
のために “Platforms”, leave that on “すべて”. And set the “コンテンツ” に “資産, コード”.
Then just set your Output Directory. (ヒント: you can directly set the output directory to the Mods folder of Forge Industry for quick testing).
And press “Export Mod”.
If you didn’t directly export your mod to the Mods folder in Forge Industry, move it there manually.
Now start the game, open the Mods menu, enable the mod, create a new world, and enjoy your new creation!
Mod Object Ids
Road Type IDs
- Brick Road – 100000000000
- Paved Road – 100000000001
- Dirt Road – 100000000002
- Wooden Road – 100000000003
- Rail Road – 100000000004
- Delete Road – 100000000005
Building Type IDs
- Refinement Station – 200000000000
- Forge Station – 200000000001
- Woodsaw – 200000000002
- Alloy Station – 200000000003
- Fastener Station – 200000000004
- Storage Crate – 200000000005
- Jewelry Station – 200000000006
- 作業台 – 200000000007
- 市場 – 200000000008
- Recreation Area – 200000000009
- 装飾 – 200000000010
- 私の – 200000000011
- Fletcher Station – 200000000012
- 武器庫 – 200000000013
- 港 – 200000000014
- Notice Board – 200000000015
- Lumberyard – 200000000016
- Recycling Station – 200000000017
- Harbor Abandoned – 200000000018
- Architect Atelier – 200000000019
- Architect Atelier Abandoned – 200000000020
- Bazaar – 200000000021
- Bazaar Abandoned – 200000000022
- Gondola – 200000000023
- Gondola Abandoned – 200000000024
- 鉄道駅 – 200000000025
- 採石場 – 200000000026
- 窯 – 200000000027
- Material Foundry – 200000000028
Material Type IDs
- なし – 300000000000
- オーク – 300000000001
- Birch – 300000000002
- 杉 – 300000000003
- Mahogany – 300000000004
- 鉄 – 300000000005
- 銅 – 300000000006
- 銀 – 300000000007
- 金 – 300000000008
- 錫 – 300000000009
- 白金 – 300000000010
- チタン – 300000000011
- ブロンズ – 300000000012
- 鋼鉄 – 300000000013
- ローズゴールド – 300000000014
- Silver Wood – 300000000015
- Cinder Heart – 300000000016
- Aracia – 300000000017
- Skystone – 300000000018
- Kiaxorite – 300000000019
- タングステン – 300000000020
- Durasteel – 300000000021
- Celestial Bronze – 300000000022
- Acacia – 300000000023
- Emberbark – 300000000024
Specific Item Type IDs
- なし – 400000000000
- 金貨 – 400000000001
- 石 – 400000000002
- 石炭 – 400000000003
- レザー – 400000000004
- 弦 – 400000000005
- No Item – 400000000006
- Wild Card Any Ore – 400000000007
- Wild Card Any Ingot – 400000000008
- Wild Card Any Material – 400000000009
- Wild Card Any Heat Source – 400000000010
- Wild Card Any Finished Item – 400000000011
- Wild Card Any Valid Item – 400000000012
- Failed Alloy – 400000000013
- 長い剣 – 400000000014
- 短い剣 – 400000000015
- ファルシオン – 400000000016
- 太刀魚 – 400000000017
- クレイモア – 400000000018
- レイピア – 400000000019
- ブロードソード – 400000000020
- シミター – 400000000021
- ツヴァイハンダー – 400000000022
- サーベル – 400000000023
- タンカード – 400000000024
- 大理石 – 400000000025
- 粘土 – 400000000026
- 木炭 – 400000000027
- Broadhead Arrow – 400000000028
- Splayed Arrow – 400000000029
- Single Barb Arrow – 400000000030
- Whistle Head Arrow – 400000000031
- Shortbow – 400000000032
- ロングボウ – 400000000033
- 弓を反論します – 400000000034
- クロスボウ – 400000000035
- Heavy Crossbow – 400000000036
- ハンドクロスボウ – 400000000037
- ダイヤモンド – 400000000038
- ルビー – 400000000039
- アメジスト – 400000000040
- エメラルド – 400000000041
- Fire Opal – 400000000042
- Monazite – 400000000043
- Onyx – 400000000044
- パール – 400000000045
- ペリドット – 400000000046
- サファイア – 400000000047
- Skymox – 400000000048
- トパーズ – 400000000049
- パッド付きアーマー – 400000000050
- War Bow – 400000000051
- ユミ – 400000000052
- リピータ – 400000000053
- Coke – 400000000054
- Jian – 400000000055
- カタナ – 400000000056
- Hand Axe – 400000000057
- Logger Axe – 400000000058
- Splitter Axe – 400000000059
- バトルアックス – 400000000060
- War Axe – 400000000061
- クラブ – 400000000062
- Flail – 400000000063
- メース – 400000000064
- ウォーハンマー – 400000000065
- Fleshpounder – 400000000066
- Nunchucks – 400000000067
- Ice Pick – 400000000068
- Simple Dagger – 400000000069
- Sword Breaker – 400000000070
- Narrow Dagger – 400000000071
- 両方 – 400000000072
- サイ – 400000000073
- Horse Shoe – 400000000074
- Chandelier – 400000000075
- ブーメラン – 400000000076
- ハンマー – 400000000077
- つるはし – 400000000078
- Nasal Helmet – 400000000079
- グレートヘルム – 400000000080
- Kettle Hat – 400000000081
- Spangen Helm – 400000000082
- Orcish Helmet – 400000000083
- Cuirass – 400000000084
- Chainmail – 400000000085
- Breastplate – 400000000086
- Scale Armor – 400000000087
- Small Buckler – 400000000088
- Tower Shield – 400000000089
- Heater Shield – 400000000090
- Nguni Shield – 400000000091
- 槍 – 400000000092
- 剣 – 400000000093
- ハルバード – 400000000094
- ポレアックス – 400000000095
- 指輪 – 400000000096
- Pendant – 400000000097
- Diadem – 400000000098
Item Type IDs
- なし – 500000000000
- Axe Head – 500000000001
- ボール – 500000000002
- バー – 500000000003
- Barb Head – 500000000004
- Battle Axe Head – 500000000005
- ボルト – 500000000006
- Broad Head – 500000000007
- Broadsword Blade – 500000000008
- Butcher Blade – 500000000009
- 鎖 – 500000000010
- Chokuto Blade – 500000000011
- Claymore Blade – 500000000012
- Crossguard – 500000000013
- Cutlass Blade – 500000000014
- Dagger Blade – 500000000015
- Dual Axe Head – 500000000016
- Eastern Guard – 500000000017
- Falchion Blade – 500000000018
- Glaive Blade – 500000000019
- グリップ – 500000000020
- Halberd Head – 500000000021
- ハンドガード – 500000000022
- Ingot – 500000000023
- Jewelry Chain – 500000000024
- Jian Blade – 500000000025
- Katana Blade – 500000000026
- Katar Blade – 500000000027
- Katar Handle – 500000000028
- Kukri Blade – 500000000029
- Lath – 500000000030
- ログ – 500000000031
- Longsword Blade – 500000000032
- Mace Head – 500000000033
- Machete Blade – 500000000034
- 爪 – 500000000035
- Narrow Dagger Blade – 500000000036
- Odachi Blade – 500000000037
- 鉱石 – 500000000038
- Parring Crossguard – 500000000039
- 板 – 500000000040
- Pole Axe Head – 500000000041
- Pommel – 500000000042
- Rapier Blade – 500000000043
- Rivet – 500000000044
- ロッド – 500000000045
- Saber Blade – 500000000046
- Sai Blade – 500000000047
- Sai Grip – 500000000048
- Scabbard – 500000000049
- Scimitar Blade – 500000000050
- Staff – 500000000051
- シート – 500000000052
- Shortsword Blade – 500000000053
- Spear Head – 500000000054
- Splayed Head – 500000000055
- Splitting Axe Head – 500000000056
- Stirrup – 500000000057
- Swordbreaker Blade – 500000000058
- トリガー – 500000000059
- Wakazashi Blade – 500000000060
- Warhammer Head – 500000000061
- Whistle Head – 500000000062
- Wrapped Grip – 500000000063
- Wrapped Katar Handle – 500000000064
- Zweihander Blade – 500000000065
- Claymore Crossguard – 500000000066
- Zweihander Crossguard – 500000000067
- Limb – 500000000068
- Heavy Lath – 500000000069
- ストック – 500000000070
- Broadhead – 500000000071
- Single Barb Head – 500000000072
- Scraps – 500000000073
- 指輪 – 500000000074
- Sword Breaker Blade – 500000000075
- Tanto Blade – 500000000076
- Pendant – 500000000077
- Diadem – 500000000078
- Hammer Head – 500000000079
- 宝石 – 500000000080
- Shaft – 500000000081
これが今日私たちがこの目的で共有するすべてです Forge Industry ガイド. このガイドは元々、次の者によって作成および執筆されました。 OpTic Applejack. このガイドを更新できなかった場合, これに従って最新のアップデートを見つけることができます リンク.