• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[HOW TO] Rename houses

Zisly

Intermediate OT User
Joined
Jun 9, 2008
Messages
7,338
Reaction score
120
I saw some thread where a guy was selling simple regexp so I decided to be a good guy and simply show you how you can do the thing the program does totally free and without having to download some file unless you want to. What you'll need is a editor that supports regexp, like notepad++ or a online website with regexp like this one.

If you use notepad++

  • Open the house file.
  • Press ctrl+h and check the "regular expression".
    Like so:


  • In the "Find what" field enter:
    Code:
    Unnamed House #(.*)
    In this little regexp we'll get the number after # saved so we can use it in the replacing part.
  • In the "Replace with" field enter whatever you want Unnamed House to be replaced with. Let's take
    Code:
    Thais #\1
    in this case. As we can't have all houses named the same, we are using the number we got out from "Unnamed House #" by adding \1.
  • Click "replace all" and you're done.

Using a online script

  • Go to Regular Expression Test Tool
  • In the "Enter regular expression here:" field, enter:
    Code:
    /Unnamed House #(.*?)/
    In this little regexp we'll get the number after # saved so we can use it in the replacing part.
  • In the "Enter your data here:" enter the data from your house file.
  • In the "Enter text to replace matches with here" enter whatever you want Unnamed House to be replaced with. Let's take
    Code:
    Thais #$1
    in this case. As we can't have all houses named the same, we are using the number we got out from "Unnamed House #" by adding $1.
  • Click "Run regular expression" and you're done.

I hope someone finds it useful. I will not really explain more about regexp as I'm not that good myself with it.
 
nice tut i knew this already but its good that someone posted it. It makes a bunch of tasks easier if you know advanced find and replace techniques.
 
Back
Top