Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
fox
Beginner


Joined: 31 May 2022
Posts: 11

PostPosted: Thu Nov 10, 2022 8:16 pm   

Summarizing multiple lines
 
Scenario in one round of combat:

Code:
The big bad mob dodges your attack!
The big bad mob dodges your attack!
Your pierce mauls the big bad mob!
Your pierce lacerates the big bad mob!
The big bad mob misses you.
The big bad mob's punch grazes you!
The big bad mob's kick hits you!


I'd like to summarize this to something like:

Code:
The big bad mob [dodges, dodges] your attack!
Your pierce [mauls, lacerates] the big bad mob!
The big bad mob misses you.
The bid bad mob's [punch, kick] [grazes, hits] you!


I've read up a bit on multi-state triggers and I'm not sure that's the full solution. Is there some combination with #GAG I can use here? I'm trying to wrap my head around handling ways to reduce spam during combat, but still get the full picture of what's happening.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4578
Location: Pensacola, FL, USA

PostPosted: Thu Nov 10, 2022 9:18 pm   
 
Multi-state triggers can do this, but that would be a headache and a half.
If your goal is just to reduce spam, have you considered diverting the combat spam to another window?

Code:
#EVENT onCombat {
  #CAP Combat
  #GAG
  }


Then just have the triggers for the individual lines of spam do a '#RAISE onCombat'
_________________
Discord: Shalimar#3679
Reply with quote
fox
Beginner


Joined: 31 May 2022
Posts: 11

PostPosted: Fri Nov 11, 2022 2:16 pm   
 
to "just have the triggers for individual lines" would you just use some general regex and evolve the regex whenever you come across new combat text? or am i missing the idea behind the triggers what would raise the event?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4578
Location: Pensacola, FL, USA

PostPosted: Fri Nov 11, 2022 2:41 pm   
 
You can evolve the pattern or even make use of variables in the pattern itself.
I would likely have several triggers with wildcards to represent the variable bits.

damageLevels=grazes|hits|mauls|lacerates

#TR {dodge{s|} * attack!} {#RAISE onCombat}
#TR {Your pierce {@damageLevels} the *!} {#RAISE onCombat}
#TR {'s {punch|kick} {@damageLevels} you!} {#RAISE onCombat}
_________________
Discord: Shalimar#3679
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net