Bulk playfield editing

Discussion in 'Planets & Playfields' started by PopeKael, Feb 15, 2022.

  1. PopeKael

    PopeKael Ensign

    Joined:
    Aug 29, 2017
    Messages:
    8
    Likes Received:
    3
    I hope this question is in the right forum location.

    I've been away from EGS for about a year playing other games but I've come back again to run my multiplayer server again for our group of friends. I'm in the process of testing EAH but the main question here is how can I bulk edit the playfields or is there a tool to simplify it?

    During the EAH testing phase, I have simply taken a copy of the Default Multiplayer scenario, renamed it, tweaked the game options yaml to our preferred settings and launched the game.

    The last time I ran my server, I meticulously hand-edited every playfield yaml to focus on things like resources, asteroids, asteroid spawns on low resources, POI regen times, PvP probability and a host of other settings. As you can imagine, this is highly prone to making mistakes and I had a lot.

    Once I sort out my EAH issues, I'll wipe the current game and get cracking on a custom version of the default multiplayer with our preferred settings but I'd like to simplify it to avoid all those mistakes I made before. So the basic question is, is there a tool out there that can do these bulk edits of the playfields.

    An example would be: All playfield templates > find "Key: RegenAfter" for all POI's and replace the default 720 minutes with 4320 > this will change the regen time for all POI's from 12 hours to 3 days. It is highly tedious to do this with Notepad++

    Any advice will be highly appreciated :)
     
    #1
  2. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,413
    Likes Received:
    12,016
    You can do this with Notepad++'s replace in files function.
    Just do a search for Value: 720 and replace it with Value: 4320.
    It is highly unlikely there are any other "Value: 720" anywhere else in the playfield files.
     
    #2
    Last edited: Feb 15, 2022
  3. PopeKael

    PopeKael Ensign

    Joined:
    Aug 29, 2017
    Messages:
    8
    Likes Received:
    3
    Yes, this is how I was doing it but it is tedious as there are other items that can get affected by the value change.
     
    #3
  4. Kassonnade

    Kassonnade Rear Admiral

    Joined:
    May 13, 2017
    Messages:
    2,816
    Likes Received:
    4,111
    We can do some pretty complex macros with Notepad++. Here for your specific case, this is what I did :

    -Open the "find" tool, select the whole "Key: RegenAfter" line from end to start, including the leading spaces and copy it;
    -Paste this in the search field (Make sure the search tool is set to search down, not up) ;
    -Select the "Value: " string with the leading spaces but without the actual value (720) and copy it ;
    -Place your cursor above these lines to start recording the macro (ex. at the end of the line before the Key:RegenAfter line) ;
    -Start recording the macro ;
    -Click on the "find next" button in the find tool, which will highlight the whole "Key: RegenAfter" line ;
    -Place your cursor at the start of the next line (the "Value" line), press SHIFT + END to select the whole line, then delete it
    -Now paste the "Value: " with leading spaces that you copied previously and add the value you wanted (with a space before it) ;
    -Stop recording the macro and give it a name.


    You can then "run the macro multiple times" and run it for the whole file.
    ---------------------------------------------------------------------------------------

    When making complex macros just plan your sequence and you should be able to make some pretty amazing stuff easily. You can make similar multi-step macros for .ecf modding, knowing some lines always come "after" the item name or block name strings. You can simply search specific strings consecutively to get to the one you want to change, then delete the whole line and type a new one with the correct changes. Note that using "home" to get at start of a line can require to press more than once because it will make the cursor stop at specific indents some times.
     
    #4
    Last edited: Feb 16, 2022
    PopeKael likes this.

Share This Page