Titan Quest - Anniversary Edition > Modifications

Scripts to modify masses of .dbrs

(1/3) > >>

WNG:
Hi, I came up with a new idea for a mod, but accomplishing it will require to modify tons of .dbrs, and I figured it would be nice to have a "script" to run that would modify the the files I need and their parameters in the background, only I've never done it or know if it's even possible.

Anyone can enlighten me?

soa:
It depends on what you need to change in the dbrs.

I know you can use scripts to open mass files, get their content into like an Excel file where you can cut the data in two colums : parameter name and value.
Then you can adjust values of a single parameter for many files : for instance, size of monsters : +20% (or use any formula you want). Then reimport these changes into the actual dbrs automatically.
But I don't know how to make these scripts. I only know that Mostal used this a lot for his Lilith mod (think his script was in PHP, but any language would do).

If what you need is a little simpler, I may help. I do a lot of search and replace in mass files for Soulvizier (with Notepad++). Only thing is I never need to adjust values automatically like +33% to health, -5 for armor, etc.

WNG:
Well, I would definetly appreciate some guidance, since right now I'm quite lost.

Tried to open .dbrs in Excel, I can split the field name and the value into two columns, though I only found how to edit one at a time still. Opening several at once puts them on different pages and since it doesn't recognize the .dbr extension gives a warning message everytime I try to open one, making the whole thing extra more tedious.

Then I tried a simple script in form of a .bat file that changes the extension of all my .dbr to .xlsx, a format that Excel is supposed to read. Now it won't recognize it at all -.-


nargil66:
Have you tried Text Crawler? It can search/replace in multiple files at once. Dont know if that's what you need.

soa:
Text Crawler or Notepad++ can open multiple dbrs at once.
You can replace multiple values at the same time, and using regular expressions can help a lot.

If you intend to modify several files at once, I think Excel is useful only if you have a script that open all files in the same page and after modifications, puts data back to dbrs. Excel allows you to use formulas on values, which (I think) is not possible with text editors such as Notepad ++ or Text Crawler.

If you have an example of what you are trying to do, maybe we could see how to help.

Navigation

[0] Message Index

[#] Next page

Go to full version