ArcanePariah / Night-of-the-Dead

9 stars 14 forks source link

All random also ar+nr as lobby option #233

Closed NiktosNOTD closed 6 years ago

NiktosNOTD commented 6 years ago

Additions: 1.AllRandom triggers, catches occurences of -ar -allrand in chat by player 1/2 - on hit sets 'noRandoms' variable to 3 which is later used for determining all-random mode is activated. 2.AllRandomSelectionUI - function similiar to ClassSelection ui responsible for creating/hooking up the menu for picking classes but with a twist of being just random button. 3.Template which function above uses to look good/ same style as normal class selection ui. 4.Lobby atribute allowing you to pick "Class Selection" with availaible options being: -Standard (which is default) -No Random -All Random

Modifications: 1.NoRandoms trigger - now disables also AllRandom trigger if it runs successfully. 2.NOTDInitialize trigger - at end added check for lobby atribute being set to 'no random'/'all random', which on true runs respective triggers to automatically enable the modes. 3.StorylineSelection trigger - if all random is set it runs function which creates AllRandomSelectionUI instead of standard char selection ui. 4.FinaliseStorylineAndMode trigger - if all random is set it runs function which creates AllRandomSelectionUI instead of standard char selection ui.

Both commands check for existence of newbies and don't run if anyone is below 500xp same as other commands. Lobby atribute is set same way as navy cross - so locked for public lobbies, also minimizing potential problems. -allrand command to work needs to be either set in lobby or used before selecting storyline, it check that requirement by testing visibility of storyselection dialog for player1. In case of being used too late it informs user why it failed.

That's how all random class selection looks. image