MantisBT - Zandronum
View Issue Details
0002575Zandronum[All Projects] Suggestionpublic2016-01-12 07:022016-01-12 07:02
Catastrophe 
 
normalfeatureN/A
newopen 
MicrosoftWindowsXP/Vista/7
2.0 
 
0002575: Possibly add new script type(s) that can override result sequences, countdowns, etc.
Hello, I think modders should have the ability to override what happens during countdowns, resultSequences, etc. The main benefit of this is to be able to make our own win screens, delay how long until the next round starts to show statistics, and so on... While it's awesome that we can detect what gameState we are currently in thanks to getGameModeState(), it doesn't really allow us to have custom countdowns, result sequences, etc.

I'd like for there to be a one-of-a-kind "constant" ACS script that allows us to override result sequences, and another one-of-a-kind script that would allow us to override countdowns. The engine change needed would be to refer to those one-of-a-kind ACS scripts for countdowns and result sequences instead of whatever is hardcoded currently. In other words, introduce a script-type specific to Zandronum where someone will translate current hard-coded countdowns, result sequences, etc, into ACS, and then allow mods to override them if they wish.

An example where this feature can be applied is in my mod. I have a feature that allows the entire server to "vote" on which map to switch to after several rounds have been played via ACS:'http://i.imgur.com/j9OEFAp.png [^]'

While this voting feature is functional, there are key things I'd like to improve upon which I'm currently limited by the engine. For instance, I can't exactly run the script after someone wins the round because the countdown afterwards is too short, and the countdown message is too big. I'd like to override it so there is no countdown message and it lasts much longer.

Other useful things that could come out of this is showing ELO increase/decrease in CTF games much more easily if someone creates it, not have the announcer countdown if it breaks immersion (like WDI), and maybe even extend this to frag messages and flag captures to change the text if it doesn't fit the theme (Yes we have gameEvents, but it doesn't really let us change the text).
-=Countdown script override example=-

Inside Zandronum.pk3
script COUNTDOWN
{
 setfont("bigfont");
 hudmessagebold("Prepare to fight!");
 setfont("smallfont");
 for(int i = getcvar("sv_lmscountdowntime"); i > 0; i--)
 {
   hudmessagebold("Match starts in: ", d:i);
   if(i <= 3) do announcer sounds;
   delay(35);
 }
 //Once the script ends it immediately starts the round.
}

Inside myMod.pk3
script COUNTDOWN
{
  acs_execute(666, 0); //Execute any script you want
  while(exampleGlobalVar == 0)
  {
    delay(35);
  }
  //Will automatically start the round once it reaches this point.
  //Note that no countdown message will be displayed since we didn't put one.
}
The map should enter the next gameState once COUNTDOWN ends. If players disconnect during a countdown or result sequence that's in an infinite loop, then just cancel the script and go to the waiting for players game state.
No tags attached.
Issue History
2016-01-12 07:02CatastropheNew Issue

There are no notes attached to this issue.