Author Topic: tintin++ config file with combat code and other tweeks  (Read 8132 times)

nauta

  • Posts: 2071
Re: tintin++ config file with combat code and other tweeks
« Reply #25 on: November 29, 2016, 11:47:31 AM »
Hi,

Any regular expression gurus out there want to help me with a small project?  I'm trying to implement the bolded opponent thing client-side, and I've probably not had enough coffee.

Here's what I want:
Quote
The vicious, sexy, and tall muscular man chops at you.

(Among other things.)

So, I thought I'd try this:
Code: [Select]
#action {{%*} chops at you.} {
  #substitute {%1} {<170>%1};
}

But for some reason this doesn't work as expected.  It bright whites the entire line.

Any thoughts?  Here's the reference:

http://tintin.sourceforge.net/manual/action.php
Your mulish noble mindbender with a secret base warded against apparitions of psychically projected ankheg janitors.

nauta

  • Posts: 2071
Re: tintin++ config file with combat code and other tweeks
« Reply #26 on: November 29, 2016, 11:54:49 AM »
Hehe, figured it out.

Code: [Select]
#action {%* attacks you.} {
  #substitute {%1} {<170>%1<099>};
}

Thanks coffee!
Your mulish noble mindbender with a secret base warded against apparitions of psychically projected ankheg janitors.

nauta

  • Posts: 2071
Re: tintin++ config file with combat code and other tweeks
« Reply #27 on: November 30, 2016, 09:53:59 PM »
It's a WIP, but the following is an outline for getting the brighted opponent during combat -- I'll update as I go along.  This was more a Proof-of-Concept for me, but it works!  (I'm missing some attack types.)

Code: [Select]
#substitute {%1 {attacks you.}} {
  <150>%1<099> %2
}

#substitute {%1 {reels from the blow.}} {
  <150>%1<099> %2
}

#substitute {%1 {lunges at you}%3} {
 <150>%1<099> %2%3
}

#substitute {%1 {swiftly dodges your}%3} {
 <150>%1<099> %2%3
}

#substitute {%1 {parries your}%3} {
 <150>%1<099> %2%3
}

#substitute {%1 {slides away from your mount}%3} {
 <150>%1<099> %2%3
}

#substitute {%1 {lightly|solidly} {gores|claws|pecks|hits|chops|slashes|pierces} {at you|your|you}%5} {
 <150>%1<099> %2 %3 %4%5
}

#substitute {%1 {gores|claws|pecks|hits|chops|slashes|pierces} {at you|your|you}%4} {
 <150>%1<099> %2 %3%4
}

#substitute {{You} {viciously|lightly|solidly} {nick|slash|chop|hit|pierce} %4{'s} %6} {
  %1 %2 %3 <150>%4<099>%5 %6
}

#substitute {{You} {nick|slash|chop|hit|pierce} %3{'s} %5} {
 %1 %2 <150>%3<099>%4 %5
}

#substitute {{You} {viciously|lightly|solidly} {nick|slash|chop|hit|pierce} %4 {very|on}} {
 %1 %2 %3 <150>%4<099> %5
}

#substitute {{You} {nick|slash|chop|hit|pierce} %3 {very|on}} {
 %1 %2 <150>%3<099> %4
}

#substitute {{You inflict a grievous wound on} %2{'s} %4} {
  %1 <150>%2<099>%3 %4
}

#substitute {{You land a solid chop to} %2{'s} %4} {
  %1 <150>%2<099>%3 %4
}

#substitute {{You wound} %2 {on} %4} {
  %1 <150>%2<099> %3 %4


#substitute {{You charge at} %2} {
  %1 <150>%2<099>
}

#substitute {{You attack} %2} {
  %1 <150>%2<099>
}

#substitute {{You deftly parry} %2{'s attack.}} {
  %1 <150>%2<099>%3
}
Your mulish noble mindbender with a secret base warded against apparitions of psychically projected ankheg janitors.

nauta

  • Posts: 2071
Re: tintin++ config file with combat code and other tweeks
« Reply #28 on: January 12, 2017, 09:11:27 AM »
Here's an updated version that has worked for me over the last few weeks.  It seeks to emulate the 'old' behavior of color highlighting certain bits of text during combat (notably: who your opponent is).

Code: [Select]
#substitute {%1 {attacks you.}} {
  <150>%1<099> %2
}

#substitute {%1 {lightly|solidly|brutally|viciously} {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} {at you|your|you}%5} {
 <150>%1<099> %2 <170>%3<099> %4%5
}

#substitute {%1 {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} {your|you}%4} {
 <150>%1<099> <170>%2<099> %3%4
}

#substitute {%1 {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} %3{'s|, barely} %5} {
 <150>%1<099> <170>%2<099> <150>%3<099>%4 %5
}

#substitute {%1 {lightly|solidly|brutally|viciously} {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} %4 on %6} {
 <150>%1<099> <170>%2 %3<099> <150>%4<099> on %6
}

#substitute {%1 {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} %3 on %5} {
 <150>%1<099> <170>%2<099> <150>%3<099> on %5
}

#substitute {{You} {lightly|solidly|brutally|viciously} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} %4{'s} %6} {
  %1 %2 %3 <150>%4<099>%5 %6
}

#substitute {{You} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} %3{'s} %5} {
 %1 %2 <150>%3<099>%4 %5
}

#substitute {{You} {lightly|solidly|brutally|viciously} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} %4 {very|on}} {
 %1 %2 %3 <150>%4<099> %5
}

#substitute {{You} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} %3{, barely| very| on}} {
  %1 %2 <150>%3<099>%4
}

#substitute {{You inflict a grievous wound on} %2{'s} %4} {
  %1 <150>%2<099>%3 %4
}

#substitute {{You wound} %2 {on} %4} {
  %1 <150>%2<099> %3 %4
}

#substitute {{You do unspeakable damage to} %2{'s} %4} {
  %1 <150>%2<099>%3 %4

}
#substitute {{You land a solid} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} {to} %4{'s} %6} {
  %1 %2 %3 <150>%4<099>%5 %6
}
« Last Edit: January 12, 2017, 09:32:22 AM by nauta »
Your mulish noble mindbender with a secret base warded against apparitions of psychically projected ankheg janitors.

Miradus

  • Posts: 1370
Re: tintin++ config file with combat code and other tweeks
« Reply #29 on: January 12, 2017, 11:42:09 AM »
Nice. With some modifications it also helps me figure out what's going on when I'm fighting alongside someone else. Are they taking big hits, etc?

Miradus

  • Posts: 1370
Re: tintin++ config file with combat code and other tweeks
« Reply #30 on: January 13, 2017, 01:15:23 PM »

Okay, your choice of colors are getting on my nerves. Bright magenta. Really? :)

How do I change the colors?

nauta

  • Posts: 2071
Re: tintin++ config file with combat code and other tweeks
« Reply #31 on: January 13, 2017, 01:20:48 PM »
Your mulish noble mindbender with a secret base warded against apparitions of psychically projected ankheg janitors.

Miradus

  • Posts: 1370
Re: tintin++ config file with combat code and other tweeks
« Reply #32 on: January 13, 2017, 01:37:02 PM »


My eyes!

Okay, thanks for the chart. I'll go find something less freakin' fabulous to change it to.

Harmless

  • Posts: 2595
Re: tintin++ config file with combat code and other tweeks
« Reply #33 on: January 16, 2017, 10:18:51 AM »
This is awesome! Thanks, nauta!
Useful tips: Commands |  |Storytelling:  1  2

nauta

  • Posts: 2071
Re: tintin++ config file with combat code and other tweeks
« Reply #34 on: January 20, 2017, 10:49:44 AM »
Thanks.  It's by no means perfect.  One flaw is that the #substitute matches are a tit bit too inclusive, so they'll grab, for example,
Code: [Select]
[b]You[/b] peck [b]the tressy-tressed tressed tress[/b] on the cheek.
Your mulish noble mindbender with a secret base warded against apparitions of psychically projected ankheg janitors.