voxeltycoon-community / voxel-tycoon-open-library

Community-made open-source library of functions made for making mods for the game Voxel Tycoon
GNU Affero General Public License v3.0
3 stars 2 forks source link

Custom Asset Support #19

Open SlightlyAmazing opened 2 years ago

SlightlyAmazing commented 2 years ago

I have had a look at the code to import, place and remove a custom asset. There are not many places where it can be made easier. I have done what I can. You can see the intended functionality in this repo. I would be happy to write up a formal documentation for this, given I have done a fair bit of digging through the code, however we need to decide on how the formal documentation will be formed.

evertn commented 2 years ago

There is an idea about this specifically in the project. I've linked it with this PR.

We already concluded, like you mentioned, the game already supports the creation of custom assets. It just requires a lot of setting up, so we do think we should create documentation or a tutorial for this subject.

Since this is not part of one of the milestones and we still need to decide on how to form documentation, especially when this documentation is not gathered from XML-files. Even though it could never hurt to already write up some information, we can always adjust it, till we're happy to publish it.

SlightlyAmazing commented 2 years ago

Yes. I saw it on the project board. At first I thought it could be possible to simplify the experience by customising attribute access for certain classes, but unlike python its not possible in c# - or even if it is its more effort than its worth

evertn commented 2 years ago

I've been thinking. We also might be able to implement a system where you can register an AssetId in combination with what you want to use fore this asset.

For example, for a specific asset you might want to use a custom BuilderTool. It doesnt necessarily have to be a complete custom asset before you might want to use a custom BuilderTool. In this case you would be able to register the AssetId with the BuilderTool you want to use.

SlightlyAmazing commented 2 years ago

It would be possible, it would require a patch but it would be easy to do. It would also be possible to create a default builder tool and remover tool that would work for most - or all - buildings. In the near future I'll work on it.