ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Dec 01, 2020 11:02 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Jun 16, 2020 1:32 pm 
Offline

Joined: Tue Jun 16, 2020 1:12 pm
Posts: 2
Hello Guys,

I am working on a little project to make TomE4 viable for Twitch Plays. In twitch plays, the chat controls the game and tries to beat it collaboratively. With much help of a kind programmer (see https://github.com/christ0pher/twitch-p ... controller for his bot), I managed to make my own Bot Version which can make all my keyboard inputs (triggered by the chat votes) in TomE. Now basically, the chat can play Tome4 with my bot and it works fine. But I need some little changes to the game. At the moment, viewers cant mess around with access to all parts of the game too much. Because at the moment, viewers can close the game and exit to windows etc. I wrote a script to restart the game automatically if it closes.. But you see the point.. They could even change the resolution of the game or remove addons etc. Now, I am hoping to create an addon which solves this problems.

What do I need:

Most important:
1) Hide the Menu (when you press "escape" ingame) or at least core options like "Exit game, video settings, etc." Unbinding the "Escape" button does not solve this problem, because viewers / players need to hit esc to close windows etc.

2) On death: Remove the option to go back to main menu

Nice to have, but not core:
On death: Restart the game with new (random) character automatically


There are several additional tweaks which would make my project smoother. But the first two are most important.. However, I am pretty new to lua modding. I tried to find the lua files I need to modify.. I found a "GameMenu.lua" in engines/engine/dialogs and I tried to overwrite this with the "overloading" function (I just removed some parts which sounded like Menu options in this lua file ^^). But this does not work at all.. I am totally stuck :D Maybe someone of you has an idea where to look for the files. Or - even better has a simple solution for at least some of my problems. I would be really happy about it! :)

Greetings
Yoku


Top
 Profile  
 
PostPosted: Sat Jun 20, 2020 7:52 pm 
Offline
Yeek

Joined: Tue Feb 21, 2017 3:53 am
Posts: 14
This sounds really neat! So I took thirty minutes or so and threw together a quick addon that should hopefully accomplish what you need. I've just trimmed the main and death dialog boxes so that they look something like thisand this. Disregard the "Resurrect by cheating" message, that's due to me testing the addon in developer mode and won't show up in your games. Note that Alt-F4 will still take you back to the main menu, so you may need to manually intercept that specific command from your Twitch bot. Since I wanted to leave some way of actually accessing the settings and modifying the boot screen requires a separate addon, I left the main main menu untouched.

I wasn't sure if you wanted the "Restart the same character" dialogue still present, so I left it in. It's trivial to remove if you need it gone. Note that this menu will also have alternative revive options like Blood of Life and Re-assembly; they shouldn't be removed by this addon if your character has them available.

At the moment, there's not a neat way in the game's code to "restart the game as a random character." That might be worth an addon in and of itself, but will require more than thirty minutes tinkering with dialogue options. Haven't spent much time looking at the character creation process.

You can get it here:
https://te4.org/games/addons/tome/twitch_menu_tweak

If you have other requests or this doesn't quite hit the mark, hit me up on the ToME Discord. I'm almost always there.


Top
 Profile  
 
PostPosted: Tue Jun 23, 2020 8:32 am 
Offline

Joined: Tue Jun 16, 2020 1:12 pm
Posts: 2
This looks awesome!
Thank you so much for working on it! I also managed to somehow "break" the main menu, but your mod is way more elegant and viewers still have acess to interesting options like achivements. Alt +F4 is great because viewers can't hit key combinations at the moment (which is a bit problematic due to the big skill bars). I will test your mod as soon as possible :)

I assumed that random creating / restart is not that easy. Maybe you have an idea how to change the creating screen? As far as i could see its the "birther.lua" file. I managed to disable the "cancel" button. But I got stuck at disabling all critical buttons / options. For example people should not be able to delete pre-defined characters, or start the tutorial. Maybe even the "explorer" game mode should not be visible. My way of "modding" means to break code :D I have no clue of real coding.. Thats why I run into many "lua errors" when just breaking code of some buttons. Basically, it only worked for the "cancel" button in the birther.
Again, thanks alot for your effort! I think we / the viewers will have alot fun with playing TomE :)

Greetings,
Yoku


Top
 Profile  
 
PostPosted: Wed Jun 24, 2020 4:38 am 
Offline
Yeek

Joined: Tue Feb 21, 2017 3:53 am
Posts: 14
Enjoy your exceedingly ominous dialogue box. The illusion of choice is real.

Image

https://te4.org/games/addons/tome/random-restart

This was actually way easier than I expected. It probably also exists somewhere as an addon, but never hurts to do it again I suppose.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group