[ISO] Good Mass Search & Replacer Program

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Need a good in-line, multiple file, text search and replace program.

I could write one up myself, but the time it'd take to work it up and test it would seriously cut into the production schedule, which is already WAY behind.

It needs to be able to search through multiple files, subdirectories, replace strings in files matching a mask. It must be able to "insert" and shuffle text if the replace string is of different size than the search string.

Preferably freeware, of course. ^_^

==== Why I need this (begin ramble):

There's just a sh*t load of things wrong with the scripts that need a massive search and replace of so many files that even Editplus can't open them all at once.

For instance, the "doing olympix" bug we have, seems to be the result of inconsistencies with variable declarations across scripts, sometimes standard vars used by the base AI are declared as constants by the higher scripts, sometimes they are not. Sometimes they are designed to define themselves pre-load. Sometimes they are not. It doesn't help that the rules as to which var types override which seem to be broken and unpredictable, but add this total inconsistency to that, and really strange stuff happens.

The temporary solution is to transfer all the variables used by the base monster scripts to post-load variables unique and local to that base script. Then monitor the old vars for changes every second or so. This is likely going to result in massive lag, especially under the older AI. (Newer AI scripts are more uniform, so they don't seem to need this as badly.)

Permanent solution would be to S&H through ALL the monster scripts, and make sure all those variables are post-load variables that the base script can alter without making everything go to hell.

There are many similar problems to this in the scripts, where the only solution I can think of are epic-scale search and replace. There are a great number of bugs I've put off fixing just due to the impracticality of editing hundreds of files individually, or even by folder.

========= [/ramble]
 

Shurik3n

New Adventurer
MSC Developer
RiP
Joined
Aug 15, 2006
Messages
1,357
Reaction score
0
Age
34
There some share ware here that you might want to try out, they come with free evaluations so you can perhaps use them just for this and throw it away.
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
I didn't read the whole ramble, but basically do you just want something like the Exp Generator, but to replace the text instead/as well? I can put that together if you want, I'll need to know more about exactly what's to be done, but it should be pretty easy.
 
  • Thread starter
  • Admin
  • #5

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
http://www.abacre.com/afr/

That one did the trick!

It woulda been a bit complicated, as I actually had to do a search and replace on 47 different variables over 680 different scripts. That one had a fairly good batch file converter, that let me import data from an excell spread sheet (just punch said vars into a cvs and go).

It seems to have resolved a lot more problems than I thought it would. A lot of our issues with MSC are a result of these variable type conficts- as it actually causes memory to "shift" - some vars become other vars.

What usually causes "olypmix" is "CAN_ATTACK" or "CAN_HUNT" vars getting replaced with other, totally random vars. These were not the only vars this was happening with - a lot of the "odd" behavior you see is from less extreme variable conflicts. So this helped TONS.

Plus I finally got rid of all those old debug spam messages - so now I can make all new ones. ;)

I've added a bunch of debugging features to the system that any client can use to help us diagnose various bugs (can pull any var from any monster or any player, and so on.) I shall give more info on that on a need-to-know basis, but we should be able to get more accurate debugging info from our server admins as a result.
 

Shurik3n

New Adventurer
MSC Developer
RiP
Joined
Aug 15, 2006
Messages
1,357
Reaction score
0
Age
34
Horray for somewhat late releases that make up for it by being thoroughly ownage.
 
Top