Author Topic: [DEPRECATED] Furniture modding system(Open source)  (Read 8450 times)

0 Members and 1 Guest are viewing this topic.

April 29, 2016, 06:07:20 PM
Read 8450 times

khornel

  • Dev
  • *****
  • Information
  • Member
  • Administrator
  • Posts: 369
    • View Profile
    • Software Inc
As of Alpha 8.10.13, this mod has been integrated into the game to allow for steam workshop support and will therefore no longer be updated.

REQUIRES Software Inc. Alpha 8.10.7+

This mod allows you to add your own furniture to Software Inc. using .obj meshes and xml files.
All XML files are loaded dynamically and Unity scripts and variables are created and modified using tag names and clever reflection and string conversion, which allows you to add and change pretty much anything about your furniture without needing to code anything. You could even create a mod with some scripts and easily add those scripts to your furniture using xml tags for custom functionality.

Repository:
https://github.com/khornel/Furniture-Inc.

Direct download:
https://github.com/khornel/Furniture-Inc./raw/master/Furniture%20Inc.dll

Note that all meshes should use this layout for UV mapping: (Custom textures are not supported in the "vanilla" mod)

(Glow = Emission, Shine = Smoothness)

Here's an overview of the Furniture and Upgradable components taken directly from Unity: All variables can be edited in the XML since it's completely dynamic.
« Last Edit: May 04, 2016, 07:53:23 AM by khornel »

April 30, 2016, 11:16:51 AM
Reply #1

khornel

  • Dev
  • *****
  • Information
  • Member
  • Administrator
  • Posts: 369
    • View Profile
    • Software Inc
The DLL has been updated with some error handling and logging in the options menu. If you used the DLL from yesterday you'll need to put your furniture in subfolders under the Furniture folder rather than directly in the Furniture folder.

April 30, 2016, 04:38:26 PM
Reply #2

Svamp

  • *
  • Information
  • Member
  • Posts: 34
    • View Profile
Pretty cool, even though i cant make a model even if my life depended on it. :P

A question though, would it be possible to reference to a model already in the vanilla game? Lets say i would want to create a Ancient PC and use the Old PC model.
Maybe a list of different furniture variables and names of models currently in game would be helpful for modders. :)
« Last Edit: April 30, 2016, 04:42:34 PM by Svamp »

April 30, 2016, 11:27:58 PM
Reply #3

khornel

  • Dev
  • *****
  • Information
  • Member
  • Administrator
  • Posts: 369
    • View Profile
    • Software Inc
Pretty cool, even though i cant make a model even if my life depended on it. :P

A question though, would it be possible to reference to a model already in the vanilla game? Lets say i would want to create a Ancient PC and use the Old PC model.
Maybe a list of different furniture variables and names of models currently in game would be helpful for modders. :)
The base attribute is there to inherit from existing furniture, but you have to add a mesh yourself as all meshes are stripped before copying.
Furniture are named exactly as they are in-game, since I didn't have the foresight to handle name collisions, so the mod does it manually.

May 01, 2016, 08:02:42 AM
Reply #4

brndn

  • *
  • Information
  • Newbie
  • Posts: 1
    • View Profile
Hey Khornel, i've followed the instructions and the mod is being recognised and the disclaimer window pops up. I click agree, I go to options and ensure the mod is active. When I load up a new game the example furniture is not there :/ i've put all the furniture files in "DDLMods\Furniture" and i've put the DLL in DLLMods.

Is there something im missing? It seems like the mod is working but not loading items properly?

If you could help out that'd be great, thanks! :)

May 01, 2016, 10:22:03 AM
Reply #5

Svamp

  • *
  • Information
  • Member
  • Posts: 34
    • View Profile
Hey Khornel, i've followed the instructions and the mod is being recognised and the disclaimer window pops up. I click agree, I go to options and ensure the mod is active. When I load up a new game the example furniture is not there :/ i've put all the furniture files in "DDLMods\Furniture" and i've put the DLL in DLLMods.

Is there something im missing? It seems like the mod is working but not loading items properly?

If you could help out that'd be great, thanks! :)

Put the furniture files in DLLMods\Furniture\Example and it will work.

May 01, 2016, 01:23:53 PM
Reply #6

khornel

  • Dev
  • *****
  • Information
  • Member
  • Administrator
  • Posts: 369
    • View Profile
    • Software Inc
Updated the mod to version 3 with some bug fixes.

Hey Khornel, i've followed the instructions and the mod is being recognised and the disclaimer window pops up. I click agree, I go to options and ensure the mod is active. When I load up a new game the example furniture is not there :/ i've put all the furniture files in "DDLMods\Furniture" and i've put the DLL in DLLMods.

Is there something im missing? It seems like the mod is working but not loading items properly?

If you could help out that'd be great, thanks! :)
I changed it so you have to put your files in a subfolder inside the Furniture folder, to avoid overwriting files if two furniture packages have files with the same filenames.

May 01, 2016, 07:03:58 PM
Reply #7

WeBer_Le_Pecheur

  • *
  • Information
  • Member
  • Posts: 11
    • View Profile
Hello,

I made a small model to test but I have a recurring problem I can not solve:

He tells me all the time: This place is already occupied.

(Click on pictures to enlarge)

I thought it was the boxcollider, but this remains unchanged.

You could help me ?
PS: This is my first model which uses collision values, I usually create models on minecraft.

May 01, 2016, 07:18:06 PM
Reply #8

Demannu

  • *
  • Information
  • Member
  • Posts: 34
    • View Profile
Hello,

I made a small model to test but I have a recurring problem I can not solve:

He tells me all the time: This place is already occupied.

(Click on pictures to enlarge)

I thought it was the boxcollider, but this remains unchanged.

You could help me ?
PS: This is my first model which uses collision values, I usually create models on minecraft.

I am also encountering this issue, I'm unsure if it has to do with the base object we're taking attributes from (Base="Table") at the top of the XML. The snap points are also an issue since they are mapping out a 2x2 object. So you'll need to custom define those as for your object. When he gets a free moment, hopefully he can put together a wiki or something with slightly more info

May 01, 2016, 07:35:58 PM
Reply #9

khornel

  • Dev
  • *****
  • Information
  • Member
  • Administrator
  • Posts: 369
    • View Profile
    • Software Inc
Hello,

I made a small model to test but I have a recurring problem I can not solve:

He tells me all the time: This place is already occupied.

(Click on pictures to enlarge)

I thought it was the boxcollider, but this remains unchanged.

You could help me ?
PS: This is my first model which uses collision values, I usually create models on minecraft.

I am also encountering this issue, I'm unsure if it has to do with the base object we're taking attributes from (Base="Table") at the top of the XML. The snap points are also an issue since they are mapping out a 2x2 object. So you'll need to custom define those as for your object. When he gets a free moment, hopefully he can put together a wiki or something with slightly more info
BuildBoundary, Height1 and Height2 is what controls building collision, if you have the furniture set as "WallFurn", like the TV, the building collision will depend on WallWidth, Height1 and Height2.

If you're not creating a table, you probably shouldn't use the "Table" as base. The Base attribute isn't required, it just copies all info from the furniture specified.

You don't have to use the snap points tag, if you leave it blank it will use the snappoints from the Base furniture or not have any snap points at all. You can also have an "InteractionPoints" tag to override how employees interact with furniture.

The source code is probably the best documentation for now. Check https://github.com/khornel/Furniture-Inc./blob/master/Furniture%20Inc/FurnitureLoader.cs from line 134.
« Last Edit: May 01, 2016, 07:38:45 PM by khornel »

May 01, 2016, 08:20:48 PM
Reply #10

khornel

  • Dev
  • *****
  • Information
  • Member
  • Administrator
  • Posts: 369
    • View Profile
    • Software Inc
Updated the mod and added some functions necessary to add custom computers.

Added component screenshot to OP.

May 01, 2016, 08:37:40 PM
Reply #11

WeBer_Le_Pecheur

  • *
  • Information
  • Member
  • Posts: 11
    • View Profile
Hello,

I made a small model to test but I have a recurring problem I can not solve:

He tells me all the time: This place is already occupied.

(Click on pictures to enlarge)

I thought it was the boxcollider, but this remains unchanged.

You could help me ?
PS: This is my first model which uses collision values, I usually create models on minecraft.

I am also encountering this issue, I'm unsure if it has to do with the base object we're taking attributes from (Base="Table") at the top of the XML. The snap points are also an issue since they are mapping out a 2x2 object. So you'll need to custom define those as for your object. When he gets a free moment, hopefully he can put together a wiki or something with slightly more info
BuildBoundary, Height1 and Height2 is what controls building collision, if you have the furniture set as "WallFurn", like the TV, the building collision will depend on WallWidth, Height1 and Height2.

If you're not creating a table, you probably shouldn't use the "Table" as base. The Base attribute isn't required, it just copies all info from the furniture specified.

You don't have to use the snap points tag, if you leave it blank it will use the snappoints from the Base furniture or not have any snap points at all. You can also have an "InteractionPoints" tag to override how employees interact with furniture.

The source code is probably the best documentation for now. Check https://github.com/khornel/Furniture-Inc./blob/master/Furniture%20Inc/FurnitureLoader.cs from line 134.

I used a painting base :)
http://pastebin.com/3SKZDD9M

So to my problem I have only change the "Build Boundary"?
I'll try it right away.
If you have an entry the console that allows reload the xml?
Because reboot the game every change is a bit boring ;)

PS: Thanks for screenshot but i use SketchUp ^^
« Last Edit: May 01, 2016, 08:40:46 PM by WeBer_Le_Pecheur »

May 01, 2016, 08:42:31 PM
Reply #12

khornel

  • Dev
  • *****
  • Information
  • Member
  • Administrator
  • Posts: 369
    • View Profile
    • Software Inc
I used a painting base :)
http://pastebin.com/3SKZDD9M

So to my problem I have only change the "Build Boundary"?
I'll try it right away.
If you have an entry the console that allows reload the xml?
Because reboot the game every change is a bit boring ;)

PS: Thanks for screenshot but i use SketchUp ^^
You should not define a build boundary for wall furniture, unless it's sticking out of the wall a fair bit.
« Last Edit: May 01, 2016, 08:46:03 PM by khornel »

May 01, 2016, 09:13:02 PM
Reply #13

khornel

  • Dev
  • *****
  • Information
  • Member
  • Administrator
  • Posts: 369
    • View Profile
    • Software Inc
Added FORCE_RELOAD_FURNITURE command to console in latest version