blakdragan7 / vscci

Vintage Story Content Creator Integration
0 stars 0 forks source link

[Small-Suggestion] Config file for who can see events notifications in-game #3

Closed Fireztonez closed 3 years ago

Fireztonez commented 3 years ago

A smaller suggestion this time for a little update of your mod. I think it would be nice to have a config file to set who can see the Twitch-Event on the server and a config for personalize the message in-chat for each events.

I can imagine a simple json file like:

[
    {
        "events": "follow",
        "enabled": false
    },
    {
        "events": "subscribe",
        "enabled": true,
        "sendto": "@everyone",
        "message": "Hey, $name just subscribe to Fireztonez!!"
    },
    {
        "events": "host",
        "enabled": true,
        "sendto": "fireztonez",
        "message": "$name just host the channel with $viewers viewers!!"
    }
] 

For sure this is just an example, you can ajust like you want and change everithing you want. I used $name and $viewers, who is variables to show the specific information from the event and the "@everyone" for say the message should be send to everybody, on the second example I send to a specific person with the pseudo "fireztonez".

A config like that give again a lot of control to Content Creator, to do what they want exactly!

blakdragan7 commented 3 years ago

hmm interesting idea. I kind of hate the idea of config files so if I were to do this I would want to make an in game gui for it. I may do this in the future though. Good Idea !

Fireztonez commented 3 years ago

The big problem with in-game config, it is impossible to copy from one server to another or share your config with other people. And in somes case it is easier to just edit a file than messing with in-game GUI and even more if you use the text fields system integrated into the game at present, which does not even allow the selection of text... For some complex configs as I have seen very often on minecraft with CCI, to be able to copy paste the configurations it is a most. Honestly the configuration files are in my opinion a most. Yes it is more complex for beginners to change, but it is more than important not to forget advanced users or those wishing very specific and complex options (Where very often graphical interfaces quickly become a source of creativity).

Sincerely if you prefer not to have any user-accessible configuration files, it suddenly cuts me the desire to use your mod... :-/

blakdragan7 commented 3 years ago

You misunderstand. I am of course going to add config files (I have to make save files after all). I just personally hate them, so I want to also give the option of an in game GUI as well. So there will (hopefully) be both :) Also, I did not know about the lack of text selection for the text editor in game ... that is pretty shitty.

blakdragan7 commented 3 years ago

a super basic version of this is done as of 49feebf463cc33e35a2758339c0e850f012c7e1e, just a simple white list containing who is allowed to request the server to broadcast messages from events. It is up on the DB page already as version 0.0.3

Fireztonez commented 3 years ago

Ok perfect I will look that version when I have time. Yeah for sure you have to save thing somewhere and I think it is better to have a readable file like a JSON file or something like that anyway...

I understand your point for the in-game config and for fast configuration or little change in-game config can be faster and easier too...

Fireztonez commented 3 years ago

I just look the link you include in your last message for the latest revision, right now you set your mod like needed on client side, is it needed to have installed on every client, even the one who doesn't have right for any Twitch Integration?

For sure it is needed on client if you have to make integration, but for other clients I don't imagine this is not needed, so it is possibly better to set "requiredOnClient": false,, to let client without the mod to connect on the server.

blakdragan7 commented 3 years ago

Yes I tried that and it stopped the mod from being loaded on client side at all. Like no matter what. So I'm not sure if I did something wrong but somehow settings it to false just makes it not load for me.

blakdragan7 commented 3 years ago

This is now not relevant since there is a scripting language built in which allows this. (it saves to a config file that I will eventually make loadable)