Profile image

how to remove drag and mass from entire aircraft (ft. regex)

110k hpgbproductions  5.6 years ago

Relatively simple way to optimize simulation. There's probably a shorter version of the same method but this is easier.
Required: Notepad++ or something else with regex substitution (change Search Mode to "Regular Expression"). Android users can connect their phone to a PC.
Note: Always backup your aircraft first, or perform the changes in a copy.

{Edit1904230733} Changed the quantifier from * (unlimited greedy) to *? (unlimited lazy)

1. Dump old XML tags
Substitute calculateDrag=".*?" with nothing. Substitute massScale=".*?" with nothing.

2. Actual stuff
Substitute Part id="([0-9]+)" with Part id="\1" massScale="0" calculateDrag="false". (You can optionally precede both Part ... with "<" for safety)

3. Profit
Enjoy your new plane with zero mass and drag. (Be sure to give mass back to parts that need it)

  • Log in to leave a comment
  • Profile image

    @IDNSatyaSlebew yes

    1.5 years ago
  • Profile image
    15.7k SiBangsatYa

    Can health also edited entirely?

    +1 1.5 years ago
  • Profile image
    Dev WNP78

    @AstleyIndustries it wouldn't cause an issue if there were no other attributes after calculateDrag, which I don't think there usually is, but it's good to be airtight...

    5.6 years ago
  • Profile image
    18.2k exosuit

    Adding the multi part edit similar to the one on FineTuner would be great
    .
    But I don't know if that's possible

    +4 5.6 years ago
  • Profile image
    24.4k NoGoCars

    @AstleyIndustries oOf

    5.6 years ago
  • Profile image

    @CrashFighter05 overload only does one part at a time, gonna have a bad time editing 400 parts

    +3 5.6 years ago
  • Profile image

    @WNP78 thanks for catching this lol (somehow didn't get that problem when i did it though)

    5.6 years ago
  • Profile image
    Dev WNP78

    You might want to make the calculateDrag=".*" lazy matching (calculateDrag=".*?") so that it doesn't delete things after it. For instance, calculateDrag=".*" would match all of calculateDrag="false" health="200", including the health tag, since the wildcard includes as much as possible.

    5.6 years ago
  • Profile image

    Or just use this It's much easier.

    5.6 years ago
  • Profile image
    24.4k NoGoCars

    or you could use overload.

    +1 5.6 years ago