Garry's Mod
TTT Randomat 2.0 for Custom Roles for TTT
Коментарів: 161
Krimson 23 груд. 2024 о 14:08 
Thanks - I get no errors in sandbox anymore.
Malivil  [автор] 21 груд. 2024 о 18:38 
Looks like I somehow missed that. Just uploaded a fixed version. Thanks!
Malivil  [автор] 21 груд. 2024 о 18:13 
Hmm, it shouldn't load anything outside TTT. I'll see what's going on, thanks for letting me know.
Krimson 21 груд. 2024 о 18:10 
I get dozens of errors a second with this mod enabled whenever I enter sandbox mode. It's fine otherwise. And none of my other mods really give me errors at all. This is the error message I keep getting

[TTT Randomat 2.0 for Custom Roles for TTT] lua/randomat2/cl_events/cl_poltergeists.lua:20: attempt to call method 'IsSpec' (a nil value)
1. v - lua/randomat2/cl_events/cl_poltergeists.lua:20
2. unknown - lua/includes/modules/hook.lua:96
MutantBison, PhD 7 квіт. 2024 о 15:02 
Ah okay, hard to keep track of which randomat mods add what, haha.

Thanks for the info, though! Will give it a try.
Malivil  [автор] 6 квіт. 2024 о 18:10 
That is not one of mine, but I think the fix is to go into the F1 settings menu and change the language dropdown there.
MutantBison, PhD 6 квіт. 2024 о 18:07 
One of the randomats has permanently changed one of my friends UI to French. It's the one that adds the French flag and sound to the screen.

Not sure what's going on there.
Malivil  [автор] 23 берез. 2024 о 18:25 
If the map has lots of props that's expected. It's moving every prop on the map multiple times
Cpt.Haxray 23 берез. 2024 о 18:20 
Server suffers massive lag with more than 8 players whenever the Fault Line Randomat triggers an Earthquake.
The Stig 1 серп. 2023 о 4:30 
Actually, my randomat mods do not require Custom Roles for TTT, but I will admit they haven't been as extensively tested as with it installed. I just played around with pack 1 now, and even the more complex randomat events from it were auto-triggering and working for me with no other mods installed.

All that should happen is the randomat events that require Custom Roles will simply be disabled, and others will trigger instead.
Enron2Big2Fail 7 трав. 2023 о 12:11 
Hmmmm, this is probably mostly teaching me I need to go through and sanitize my addon list.
Malivil  [автор] 7 трав. 2023 о 4:51 
Though looking through your addon collections I see you actually don't have this Randomat at all, you only have one of Stig's (It should still work) AND you actually don't have Custom Roles for TTT at all which may be the core issue, since this and Stig's Randomats require it.
Malivil  [автор] 7 трав. 2023 о 4:48 
Having trouble in what way? They aren't working?

The most likely cause is an error, so check your logs to see if something is happening.

If there is an error, it's mostly caused by a conflict with something else so make sure this is the ONLY Randomat version you have. Packs of events by people like The Stig, NoxxFlame, and Spaaz are OK but you shouldn't have other Randomats.
Enron2Big2Fail 6 трав. 2023 о 17:34 
I'm having trouble with the autorandomat trigger at round start (and the trigger random event button) any advice?
Tygron 14 берез. 2023 о 12:59 
Alright, i'll check that out ^_^
Malivil  [автор] 14 берез. 2023 о 4:45 
Tygron: If you know how to use GitHub you can submit that event as as Pull Request and I can work with you to get it how you want it before merging in =)
Tygron 13 берез. 2023 о 20:56 
So I made my own Randomat event by modifying and combining a couple of the built in ones. It hasn't been properly play tested yet but we did it manually to come up with it. Basically take the harpoon event, change the harpoon to the newton launcher and spawn barrels around the player (because some maps don't have objects on them or if they do very few. So every 60 seconds much like Gunpowder Treason, barrels spawn. I have it set so that can be turned off though but eh.

I originally came here to ask how would I change the barrels to the regular non exploding type, because as far as I can tell the call for that is built into the Randomat itself and I didn't want to go changing that for a few reasons. I tried to take that code, change it, and make it work within the event but that was a no go. We just feel the idea is to smash the opponent not blow them up. But I mean feel free to steal the idea, we call it "Dodgeball" :P
Malivil  [автор] 3 лют. 2023 о 7:39 
This one is specifically made for Custom Roles. I don't know how well it will work with vanilla TTT. You can try it and see, but I assume there will be a lot of errors.

There is a "Randomat 2.0" that this is based on that was for Town of Terror and that is based on the original "Randomat" which is for vanilla TTT. That will get you some events but it hasn't been updated in quite a while.
Bastianvvz 3 лют. 2023 о 7:29 
Hey Malivil, how are you? I have a question, I’m owner of TTT server, a long years ago i see events like this and i would like to add this to my server, but i dont have the roles addon (and i dont wanna add that, bc ppl is lazy to read…)
Can i add this addon to my server or its only to servers with custom roles?

Would appreciate your anws
Malivil  [автор] 13 серп. 2022 о 4:41 
Nohbdy: Glad you got it sorted =) Also, I do have my own version of a ULX module that supports this version if you'd like to use it.
Nohbdy 12 серп. 2022 о 20:24 
Cool Got it working. I found an the normal version in my addons and also killed my ULX command mod for randomat and one of those two did it
Nohbdy 12 серп. 2022 о 20:16 
hmmm i know i uninstalled that i wonder iif its still in my addons folder. ill mess with it thanks
Malivil  [автор] 12 серп. 2022 о 18:25 
Nohbdy: That probably means you have another version of the Randomat or Randomat 2.0 installed that needs to be removed.
Nohbdy 12 серп. 2022 о 18:10 
I'm Going insane. My Brute Force Tactics arent working. Please Help

[TTT Randomat 2.0 for Custom Roles for TTT] lua/randomat2/events/typeracer.lua:276: attempt to call method 'IsEventActive' (a nil value)
1. Condition - lua/randomat2/events/typeracer.lua:276
2. TriggerRandomEvent - lua/randomat2/randomat_base.lua:120
3. unknown - gamemodes/terrortown/entities/weapons/weapon_ttt_randomat.lua:100 (x5)

Thanks
Malivil  [автор] 22 квіт. 2022 о 18:49 
I tried to centralize the CR-specific logic but you would have to update the team checks and things like that.

There are also specific hooks that we added in CR for TTT that would either need to have their equivalent found in TTT2 or those events wouldn't work.

If you're willing to look into it, you can submit a pull request on GitHub (linked in the description) and I'd be happy to merge it in =)
SvveetMavis 22 квіт. 2022 о 16:49 
curious on how hard this would be to port to ttt2, ive yet to look at the lua yet so no clue how simular it is
CATSNACKz 26 січ. 2022 о 18:00 
Awesome thank you!
Malivil  [автор] 25 січ. 2022 о 4:52 
Ah, yes... I know why. Sorry about that, I'll fix it!
CATSNACKz 24 січ. 2022 о 22:24 
Timer Failed! [prep2begin][@gamemodes/terrortown/gamemode/init.lua (line 748)]

[TTT Randomat 2.0 for Custom Roles for TTT] lua/randomat2/randomat_base.lua:364: attempt to call method 'Enabled' (a boolean value)
1. CanEventRun - lua/randomat2/randomat_base.lua:364
2. GetRandomEvent - lua/randomat2/randomat_base.lua:447
3. TriggerRandomEvent - lua/randomat2/randomat_base.lua:471
4. unknown - lua/randomat2/randomat_base.lua:1038
5. unknown - lua/includes/modules/concommand.lua:54
CATSNACKz 24 січ. 2022 о 22:23 
randomat at start and trigger random event isnt working anymore. here's what looks like an error

[TTT Randomat 2.0 for Custom Roles for TTT] lua/randomat2/randomat_base.lua:364: attempt to call method 'Enabled' (a boolean value)
1. CanEventRun - lua/randomat2/randomat_base.lua:364
2. GetRandomEvent - lua/randomat2/randomat_base.lua:447
3. TriggerRandomEvent - lua/randomat2/randomat_base.lua:471
4. fn - lua/autorun/_randomat_loader.lua:62
5. RunHook - lua/ulib/shared/hook.lua:109
6. unknown - gamemodes/terrortown/gamemode/init.lua:1005
Malivil  [автор] 8 жовт. 2021 о 15:26 
Yes, The Stig and I work together to make sure his are compatible with mine
EnderSlayer366 8 жовт. 2021 о 15:20 
Does this work with the 100 randomat mods?
MutantBison, PhD 8 серп. 2021 о 15:00 
Ah, I gotcha. I wasn't sure how a lot of those others were added or if they were just missing from this version. Thanks for the info and the links, Malivil!
Malivil  [автор] 8 серп. 2021 о 4:31 
@LarryBoy101: That event was never in the base Randomat. You can get it either as a standalone, here: https://sp.zhabite.com/sharedfiles/filedetails/?id=2007014855
or in one of The Stig's Randomat packs, here: https://sp.zhabite.com/sharedfiles/filedetails/?id=2428342861
MutantBison, PhD 7 серп. 2021 о 23:35 
Does this version of the mod not have the randomat where every player gets converted to use the same skin? Because that was a fun one.
Malivil  [автор] 29 черв. 2021 о 6:52 
I have updated the dependencies of this to point to the new Custom Roles for TTT because it is the new standard Custom Roles for TTT version.
The Stig 26 трав. 2021 о 6:09 
Tested and it works, thanks for that
Malivil  [автор] 26 трав. 2021 о 4:35 
The Stig: That's a good point. It doesn't detect roles at all. For "Social Distancing", though, there is a delay before the damage kicks in so you sorta just have to dip in and then out and you're fine.

As for "Lonely Yogs", there is also a 2 second (configurable) delay so it will definitely be more difficult for a melee role but still doable (except for Vampires who won't be able to convert in time). I can add a check to not do Lonely Yogs if there's a Vampire just to be nice =)
The Stig 25 трав. 2021 о 20:32 
Does the "Lonely Yogs" and "Social Distancing" randomats detect if there is a melee role? i.e. a vampire, killer or zombie.

If not, would it be possible to add an option for those randomats to not trigger if someone is one of those roles?
Horolicht 17 трав. 2021 о 0:43 
@The Stig I will look into it :)
The Stig 16 трав. 2021 о 23:22 
@Horolicht Sorry if this comes off as too much of an advert for my own mod but I thought this might genuinely help you.

My randomat mod: https://sp.zhabite.com/sharedfiles/filedetails/?id=2428342861
adds a fixed version of the 'modelswap' randomat, it's called 'Who's Who?' (id: 'whoswho').
Try mine and Malivil's randomat mods together if you really miss that randomat event.
Horolicht 16 трав. 2021 о 14:45 
Yea I guessed it was because of the height changing events^^
Thanks again for all your work! You'll save me a lot of annoying swapping between models to get my original height back^^
Malivil  [автор] 16 трав. 2021 о 14:35 
Ah, yea. You're right. The reason why mine causes this issue and others don't is I run the "event end" code for every event at the start of each round to fix a bug where some events weren't ending properly if the map changed while an event was still running.

The "Random Size" event from "MORE EVENTS" probably has the same problem because it also resets the ViewOffsets to the defaults in the "event end" code.
Horolicht 16 трав. 2021 о 14:22 
Actually the original Randomat 2.0 had not this kind of issue. Who knows why xD
Anyway I tested your change and it DOES INDEED FIX IT, so thank you for the quick fix^^

I just needed to unsubscribe to the TTT Randomat 2.0 MORE EVENTS (https://sp.zhabite.com/sharedfiles/filedetails/?id=2068742309) to make it work.
Don't worry I also tested your Randomat by itself, to make sure what causes problems.

Still I am a bit sad, that the MORE EVENTS Randomat isn't working properly. The modelswap event seems to be a ton of fun, but it's causing some error, no matter how I combine it with other addons.

Anyway thank you for all your dedication :Yonah:
Malivil  [автор] 16 трав. 2021 о 13:49 
I just pushed a change that SHOULD fix it.

In addition to making sure it doesn't reset your view, please test the "Honey I shrunk the terrorists" event and make sure it still works for you
Malivil  [автор] 16 трав. 2021 о 13:25 
I think all of them would have the same problem because the problem event was not one that I added =)

Working on the fix now though
Horolicht 16 трав. 2021 о 13:20 
Thank you soo much for all your input^^
I would be sad to use another randomat, since yours is by far the most optimized for the custom roles.
Malivil  [автор] 16 трав. 2021 о 12:58 
I see why it's happening -- that addon sets the ViewOffset and ViewOffsetDucked of a player based on their model size. The "Honey, I shrunk the terrorists" uses the same properties to make players appear mini and it assumes that a player should be reset to the default offsets of "0".

I can make an update to save the previous offsets and use those values instead of the defaults. That should make it compatible again -- I'll work on that in a bit.
Horolicht 16 трав. 2021 о 9:47 
Hey I experienced some problem and perhaps you can do something about it.
The addon "Enhanced Camera" is not working properly because of the randomat. Means that the randomat seems to adjust the height of each player to the default height at the start of a new round. This takes away the height you originally had when playing with smaller/higher playermodels.
Swapping to a different model just to re-apply the playermodel I originally had solves the issue until the next round. Still can you perhaps look into the matter if you have time?
Malivil  [автор] 15 трав. 2021 о 4:17 
Oh yea, that would do it... That addon replaces any active explosion effect with a new particle effect, completely ignoring any damage it would have done. I'm guessing it wasn't made for TTT.

Good find =)