You are on page 1of 16

On Modmaking

1. Stat Configuration

1.1、Create MyMods Folder


1.1.1. Locate your game directory(e.g.: E:/steam/steamapps/common/Settlement Survival)

1.1.2. Open folder: Settlement Survival_Data and create a new folder. Rename it as MyMODs.

*Stat Configuration Mods will mainly affect the contents of Folder:StreaminAssets, where the Models. Music and

zipConfig files are placed in.

1.1.3. Enter MyMODS folder and create a new folder, rename it as mod1, mod files shall be
placed in this folder.

1.2. Input AMODConfig Info


1.2.1. Enter Folder:mod1, create a new file as AMODConfig.xml (A new .txt re-extensioned
as .xml is okay.)
1.2.2. Copy-paste the basic info below into AMODConfig.xml (Using of .xml editors, like Visual
Studio Code, is recommended.)
<?xml version="1.0"?>
<UGCItemInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--mod name-->
<Title>xxx</Title>
<!--mod readme about changes-->
<Des>xxxxxxx</Des>
<!--Author of the mod-->
<Auther>xxxx</Auther>
<!--Language info, change it not-->
<Lang>schinese</Lang>
<!--Steam Changelog-->
<ChangeNote>xxxxxxxxxx</ChangeNote>
<!--Auto-generated key by steam upon upload, DO NOT fill this..-->
<SteamKey_Str></SteamKey_Str>
</UGCItemInfo>

1.2.3. An instance of AMODConfig.xml for successfully uploaded mods.

*Contents on the tip of the pointers are auto-generated after a successful upload.
1.3. Create showcase image
1.3.1. Place the cover image in Folder: mod1, rename it as PreviewIcon.png, size it as 200*120.

1.4. Edit Configuration files


1.4.1. Enter folder: mod1 and create a new folder, name it as zipConfig, to place edited
configuration files.

1.4.2. Locate the directory of game configuration files (e.g.


E:/steam/steamapps/common/Settlement Survival/Settlement
Survival_Data/StreamingAssets/zipConfig)

1.4.3. Copy-Paste the .xml requires editing to .../mod1/zipConfig


1.4.4. Edit the copy of .xml in 1.4.3.
 If ArrayOfBuildingConfig is the opening tag, you may delete the items that would not be
edited, leaving edited or new items to remain.
(Taking the building table as an example, all configurations from<BuildingConfig>to the
next</BuildingConfig>are called items with unique IDs)
 If ArrayOfBuildingConfig is not the opening tag, you shall not delete any part of the chart
and copy-paste it as a whole. Only changes can be made.

1.4.5. Launch the game with your edits completed, summon mod panel in the main menu, tick
the mod you created, dismiss it to start loading mod configurations, you may test it in the game
environment once the loading is complete.

1.4.6. Summon mod panel in the main menu of the game, click release to upload the mod. (VPN
required for certain Nations and districts.)

1.4.7. Possible troubleshoots for failed Mod uploading


//k_EResultOK - Successful.
//k_EResultFail - General failure.
//k_EResultInvalidParam - Invalid app ID or item consumer ID mismatch,or ISteamUGC not
enabled for app ID provided by Steam Workshop’s app administrator configuration page.
//Preview file size under 16 bits.
//k_EResultAccessDenied - User does not possess the certification of the app ID provided.
//k_EResultFileNotFound - Unable to aquire Workshop info for the item, or unable to read
preview file.
//k_EResultLockingFailed - Unable to aquire UGC locks.
//k_EResultFileNotFound - Invalid provided folder content.
//k_EResultLimitExceeded - Preview image oversized(must be under 1MB), no enough steam could
space for user.
//m_bUserNeedsToAcceptWorkshopLegalAgreement bool Is the acceptation of Steam Workshop
Terms of Service required for users? See the terms for more info.

2.Reconfiguration of resources
2.1 Install Unity Client
2.1.1. Download Unity ver.2019.4.22 from Unity official
website(https://unity.cn/releases/full/2019)(changing of art assets requires version
correspondence of Unity client.)

2.1.2. Sign up as a personal user after download and installation.


2.1.3. Locate ModResBuildProject in your game directory, unzip it to anywhere other than the
steam directory itself (the protection mechanism of steam would cause unexpected outcoming
if unzipping and copy-pasting is performed directly in the directory.)
(e.g.:E:/steam/steamapps/common/Settlement Survival/Settlement Survival_Data)

2.1.4. UnityHub→Add→Choose the unzipped ModResBuildProject resource folder. If Error:


invalid project path emerges, Check subdirectory in the directory to find following folders:
2.2 Environment Configuration
2.2.1 Open project ModResBuildProject, search TestScene in Project panel, double click to jump
to the test scene.

2.2.2. Double click to open Project→Assets→ BuildConfig


2.2.3. Edit the contents circled by the red box, change the directory to folder: mod1’s directory.

2.3. Shortcut resource configuration


2.3.1. Place resources in Project→Arts, make sure all file names and folder names are written in
English, models(.FBX), images (.png) and sound(.WAV) are available for this method.
2.3.2 Select model file, Inspector→Materials→Change Location to: Use Extemal Materials
(Legacy)→click apply button in the lower right, a folder named as Materials will be created by
Unity to contain materials. (Which means that, the models must be packed with its own
materials and mappings, check up for resources or guides if there is none.)

2.3.3. Drag model file to Hierarchy→tank prefab, the model will be displayed in the scene
window. Delete prefab_housing’s model and thus only the new models will remain.
(Menu→Window→General→Scene to open scene window if its not shown. )

2.3.4. If no mapping is shown for models in the scene, Hierarchy→click model file→inspector to
find corresponding materials→dropdown arrow in the lower left→material panel,drag material
resources to the Box on the left of “Base Map” under Surface Inputs dropdown.
2.3.5. (optional) Models placed under Hierarchy→CellSize vantage share the size of a 4*4 block
area in the game environment. You can use it as a reference for size adjustment. Select the new
model file placed under tank prefab, then adjust its size in Inspector→Transform→Scale. (Unity
uses meter as the standard unit, and each in-game block measures 2.5m)

2.3.6 Rename Tank prefab (anything as long as its all-ENG and no special characters.), then drag
the newly-named prefab to anywhere under Assets/AUpdateRes/Model/Building. Double click
the newly-named prefab, if its shown under the scene panel, then it’s all right.(Mappings may
take time to be displayed.)
2.3.7. Pack the resources when all edit is finished. Project Panel→AUpdateARes→right click on
the blank area, select Settlement Survival BuildCMD/BuildAllRes to start packing, you can
check it in folder: mod1.
2.3.8. Adjust the configuration files in accordance of the models to change, then the changed
game is ready to be launched for testing.

E.g.: Copy-paste Building.xml to mod1/zipConfig, change the model directory in


Building.xml→<Building model>→<ModelList>.

2.4 Standard resource reconfiguration


2.4.1. Import resources(see shortcut version 2.3.1.)

2.4.2. Readjust model file’s Location to :Use Extemal Materials (Legacy), click apply to save
the changes, a new folder: Materials would be created automatically.(see shortcut version 2.3.2.)

2.4.3. Locate Folder: Materials under Project Panel, select all materials and right click, click
Settlement Survival BuildCMD/CastHDRToBuild_Mat to convert original materials in to game-
required materials. Attention: Original materials will disappear.

2.4.4.Converted materials will be placed in Assets/ AUpdateRes/ MatBuild. These materials will
be numbered from number 4, in an increasing order. materials sharing numbers belongs to a
same model. (We recommend material sharing between multi models, which would be a good
way to reduce performance occupation.)
2.4.5. Drag model files under tank prefab, mchange prefab name then drag it to
Project/Assets/AupdateRes/MatBuild. (See shortcut 2.3.3~2.3.6)

2.4.6. (Optional) 3 prefabs is needed to achieve a building progress with phased effects for
structures. You can differ them with the extension of p1,p2,p3. If there aren’t 3 models, Ctrl+D to
duplicate two for this.
(zipConfig config files do not such extensions.)

2.4.7. (Optional) To achieve “color change upon selection”effect, you need 3 new material
orbs: selBuild4、selType4、workBuild4
 To add new orbs: select snmat4Normal orb→Crtl+D*3→Change names
 Select the orbs, summon select Color area under Inspector panel to summon color panel,
input color codes in Hexadecimal: 53EDF8 for selBuild4, 94CBEC for selType4, 3EE08D for
workBuild4.

2.4.8. (Optional) If there’s other custom materials to be changes, you need to keep its original
name and replace it with target material, directory: Project/Assets/AUpdateRes/Mat.

2.4.9. Pack up the resources (see shortcut ver. 2.3.7.)

2.5. Add images and music


2.5.1. Place image/music resource to the directory shown in the image below, then adjust
corresponding .xmls, if you want to replace something, Do remember to keep the original
resource name.
2.5.2. If the image resource you are introducing includes Alpha channel, select the image, then
adjust (material Type) to Sprite(2D and UI) in the Inspector panel, then click apply to save the
changes.

2.5.3. Pack up the resources (see shortcut ver. 2.3.7.)


Extra: About resource processing commands.
BuildAllRes :Pack all resources, the command is necessary to generate version code for first time
maneuvers.
BuildSelectRes: Only pack selected resources.
ShowResVerson: Show current version code, this command is used for update comparisons.
CastHDRToBuild_mat Convert selected hdl/lit type of material into the 4 kinds of structure
materials.

Scene object commands: Convert to structure’s 4 status monitors to observe the effect of stats
in advance.
Settlement Survival Test/SwitchToNormal
Settlement Survival Test/SwitchToTrans
Settlement Survival Test/SwitchToBronken1
Settlement Survival Test/SwitchToBronken2

Naming Standards: Packed resources are positioned in the directory input in BuildConfig placed
under Project’s Aupdatere. All slashes, capitals and extensions will be automatically removed,
turned into lower cases, and ignored.
Thus, there SHALL NOT be resources with same names and different extensions, for the
latter would be invalid for identification.

You might also like