tetrahedral / CoISmallStorage

Small storage mod for Captain of Industry
MIT License
1 stars 0 forks source link

FYI - Changing the Models #1

Open JamieRCHI opened 1 year ago

JamieRCHI commented 1 year ago

Finally figured out how to compile and modify the mod to make things look the way I want them to. small_storages This picture shows a modified Loose Elevator 2 and a Micro Storage. And now to figure out how to fix the Icons in the menu.

Many of my problems were due to the miss-spelled items and errors in the readme.md file on the COI Official Modding github site.

Edit: I normally use Rhino 3d instead of Blender for creating my static assets and export to FBX. Note that the model inside of Rhino 3d needs to be rotated in the X axis so that it points up in the Y Direction with the bottom part centered at the origin. Also, I remove the surfaces where the ports will attach in the game, and I extended the bottom of the model down a bit to eliminate flickering in the game on the bottom edge. In the model for the Unit Elevator 2, I add to increase the height at the top to eliminate flickering on the top of the model in the game.

For anything with animation, I suppose I will have to import the FBX to Blender and edit it there. Not sure how to do that yet.

tetrahedral commented 1 year ago

That looks amazing!

JamieRCHI commented 1 year ago

I just figured out how to add the Icons. Edit: Had issues with the Icons not showing up properly in the menus. I can add details of how I fixed this if your interested.

In SmallStorage.Unity:

  1. Created a subdirectory in Assets: Assets/SmallStorage/ProductIcons and placed a 256x256 png of the desired icon there.
  2. In Unity, right-click the icon picture and select Texture 2d resource.
  3. On bottom right, edit AssetBundle to any existing or add New 'asdf'.
  4. Create the Assets as normal with right-click and select '[MaFi] build asset bundles'

In SmallStorage , BuildingData.cs

  1. Edit code to add .SetCustomIconPath as shown:
            .SetPrefabPath("Assets/SmallStorage/Prefabs/fluidmicro.prefab")
            .SetCustomIconPath("Assets/SmallStorage/ProductIcons/FluidMicro.png")
  2. And recompile to get new dll and pdb files.
JamieRCHI commented 1 year ago

small_storages__v100 0 3 1a

My new changes. Feel free to take anything you want from this. Release files: SmallStorage_release_v100.0.3.1.zip Source files: src.zip _docs.zip Models Source.zip

Played with this for awhile in my save game. No issues in game as far as I can tell. Note: Moved the docs and source model files out of the Unity solution. Unity kept adding the annoying .meta files to everything. Now I just copy the .fbx and .png files as needed to the proper locations in the .unity solution.

JamieRCHI commented 4 months ago

Wish I could get this working in the latest build of the game. The new elevators animations are nice, but take up 2 tiles instead of one in this mod. I prefer function over form.