Hello folks,
Since I haven't published anything for about a month now, I though it would be great to give you an update about the Mod Support! I'm really excited about it! So let's talk about the technical challenges implied by this feature!
Steam API
Sadly, there was no
working Godot Engine library that supports the Steam Workshop.
So I
forked the most used and
implemented the steam workshop.
Feel free to use it, but since it needs a 64 bits supports, you might want to use the
custom version of Godot Engine I made. Since Godot Engine is free and open source, everybody has access to its source code, which is really convenient!
GDScript integration
What is GDScript?
Now the Steam API is exposed to GDScript, I started implementing the Steam Workshop in
City Game Studio.

I spent several weeks designing a
state machine that returns human readable error messages.
func get_error_description(error_code):
if error_code == E_RESULT_OK:
return 'Success.'
if error_code == E_RESULT_FAIL:
return 'Generic failure.'
if error_code == E_RESULT_NOCONNECTION:
return 'Your Steam client doesn\'t have a connection to the back-end.'
if error_code == E_RESULT_INVALIDPASSWORD:
return 'Password/ticket is invalid.'
if error_code == E_RESULT_LOGGEDINELSEWHERE:
return 'The user is logged in elsewhere.'
[...]
So far
City Game Studio can
create,
update,
delete,
validate and
download mods.
Since I'm a solo developer I went deeper and I added a Mod API version to City Game Studio. The version number is automatically added when you create a new Mod. In case a mod uses an older version of the Mod API, it will be automatically disabled to avoid data corruption or crashes.
It means that City Game Studio downloads/validates a mod when you create/update one, but also when ou enable one. I think it is more convenient that way, because you won't have to deal with mods compatibility.
Is it ready yet?
Not yet but soon. So far I have integrated 4 of the 10 schemas.
[table][tr]
[th]Schema[/th]
[th]State[/th]
[/tr][tr]
[td]Rename/Add platform[/td]
[td]DONE[/td]
[/tr][tr]
[td]Rename/Add manufacturer[/td]
[td]DONE[/td]
[/tr][tr]
[td]Rename/Add competitor[/td]
[td]DONE[/td]
[/tr][tr]
[td]Add theme[/td]
[td]DONE[/td]
[/tr][tr]
[td]Add InApp-Purchase[/td]
[td]TO DO[/td]
[/tr][tr]
[td]Add marketing campaign[/td]
[td]TO DO[/td]
[/tr][tr]
[td]Add furniture[/td]
[td]TO DO[/td]
[/tr][tr]
[td]Add custom difficulty[/td]
[td]TO DO[/td]
[/tr][tr]
[td]Add feature to the digital store[/td]
[td]TO DO[/td]
[/tr][tr]
[td]Add feature to the game engine[/td]
[td]TO DO[/td]
[/tr][/table]
How do I make a mod?
It is not yet implemented A page of https://www.city-game-studio.com/ will be dedicated to that.
Let's take an example. You want to rename a platform. So you open the website, go to the Mod creator, and click on
Rename platform.
Then you select the platform, enter its new name (you can also change the manufacturer). Once done, you download a zip file. Then you launch
City Game Studio, click on
Mod, select the zip file and you are good to go.
Note:
Zip file contains clear text, so if you want to create mod manually you will be able to do so.
Closing words
I'm thrilled about the Mod support, and I think you will be able to make mods manually by the end of October. I wish I could release it sooner, I'm sorry about that delay.
Indeed I had several mandatory appointments that I couldn't skip, plus I wanted to release
Sneak In on Steam just after the
Steam Game Festival
Thank you for your time
Regards
Binogure
[ 2020-10-20 16:58:32 CET ] [ Original post ]