Author Topic: STRING_CONTAINS_REGEXP and traify  (Read 1094 times)

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
STRING_CONTAINS_REGEXP and traify
« on: September 22, 2009, 06:39:44 AM »
I suppose we'd have to resort to more hackery to do something like PATCH_IF (~%amount%~ STRING_CONTAINS_REGEXP ~@123\|500~ = 0) BEGIN, where @123 = [Ff]ive hundred, traified for language variations. Right now, we have a bunch of these amounts (and I mean a bunch) spelled out in the code rather than .tra files.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: STRING_CONTAINS_REGEXP and traify
« Reply #1 on: September 22, 2009, 06:49:27 AM »
@122 = ~[Ff]our hundred~
@123 = ~[Ff]ive hundred~

SPRINT ~AT400~ @122
SPRINT ~AT500~ @123
<...>
PATCH_IF (~%amount%~ STRING_CONTAINS_REGEXP ~%AT500%\|500~ = 0)

and use your favorite scripting language to create that wall of SPRINTs.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: