Page 5 of 21

Re: Modding Tutorials

Posted: Sat Jul 22, 2017 6:39 pm
by AlexanderSig
TheLacus wrote:What you can do even now is to set a component, Plane for example, as the parent and all the Plane.xxx as their children.
I've just made a PR which allows an empty prefab to be the parent, so this will be a possibility, too. Just pay attention to the origin.

Good work with the chair :)
Sorry how do you set a parent within a prefab? Google only gives me answers in the form of C# code and I have no idea where to begin :(

Every time I make a prefab with more than one component then every single model in the game disappears.
Image

Re: Modding Tutorials

Posted: Sat Jul 22, 2017 7:40 pm
by TheLacus
You can do it from the hierarchy window.
Drag the prefab in the scene view, change the parenting and the drag it again in the project window.
Let me know if you need additional help.

Re: Modding Tutorials

Posted: Sat Jul 22, 2017 8:26 pm
by AlexanderSig
TheLacus wrote:You can do it from the hierarchy window.
Drag the prefab in the scene view, change the parenting and the drag it again in the project window.
Let me know if you need additional help.
Thanks again. I think I did the parenting thing right but it still ends up breaking the game. I also tried removing the particle fx and light components but same result

Image

Re: Modding Tutorials

Posted: Sat Jul 22, 2017 8:50 pm
by TheLacus
Drag lamp.002 out of 210_29 in the hierarchy window.
Then drag lamp.002 from the hierarchy to the project window and rename it 210_29.

Re: Modding Tutorials

Posted: Sun Jul 23, 2017 12:04 am
by AlexanderSig
TheLacus wrote:Drag lamp.002 out of 210_29 in the hierarchy window.
Then drag lamp.002 from the hierarchy to the project window and rename it 210_29.
Thank youuu!

Animated fire, transparent glass, everything's working great now!

Image

Re: Modding Tutorials

Posted: Sun Jul 23, 2017 12:32 am
by Interkarma
Whoah!

And if someone is up to the scripting, it would be very possible to turn off fire particles during the day and enable at evening. This would look cool as hell.

Re: Modding Tutorials

Posted: Sun Jul 23, 2017 8:51 pm
by TheLacus
I agree with both your statements. The lamp is great and toggling the fire would be nice too. This also reminded me that windows emission color needs to be addressed for imported buildings, so I took the opportunity to do both.
daynight.png
daynight.png (14.51 KiB) Viewed 16405 times
The last two fields allow modders to set optional emission maps and override default colors.

Re: Modding Tutorials

Posted: Sun Jul 23, 2017 8:53 pm
by Interkarma
That's a good change!

Re: Modding Tutorials

Posted: Mon Feb 26, 2018 5:39 pm
by Hazelnut
Hi, I've had a quick read through these modding tutorials but I'm not clear if/how existing DFU classes could be extended so that behaviour can be overridden. Is this possible? What I'm thinking is intercepting calls and adding new behaviour. Pretty sure any events can be reacted to, but I wondered if mods could hook in anywhere?

Re: Modding Tutorials

Posted: Mon Feb 26, 2018 10:53 pm
by Interkarma
Not everything has mod hooks or mod capability. My thoughts have always been to add these incrementally over time or in response to sensible requests for a certain capability.

I don't think it's a good engineering exercise to try and make absolutely every class mod-capable. Not even high-end commercial games do that. Mod capability usually runs along the lines of asset injection and script execution back to exposed hooks in game. There are also limitations of the MCS compiler such that most game classes simply could not be implemented outside of normal AOT builds.

Anyone that wants to make huge sweeping changes to the core game are probably better off starting with a fork of the code. But I'm all for adding sensible hooks for mods to inject or override behaviours where reasonable.