Jump to content

Question to copy regexp


jastey

Recommended Posts

I have a folder with PVRZ files ready for BG:EE which replaces an existing area tis (Lure of Sirine's Call, AR3600.tis Lighthouse Area). I want to use them in EET, where the area code is BG3600.

 

How do I copy my 40+x day- and night-area pvrz files into a new name scheme in one go?

 

I was hoping it would be something like

 

[COPY_REGEXP] ~sirinescall/extended_lighthouse/Lighthouse_ee/A3600.*~ ~override/B3600.*~

 

with [COPY_REGEXP] being something that does the trick.

Link to comment

You can use ACTION_BASH_FOR to process selected files.

Example:

ACTION_BASH_FOR ~sirinescall/extended_lighthouse/Lighthouse_ee~ ~A3600.*\.PVRZ~ BEGIN
  OUTER_PATCH_SAVE dest_file "%BASH_FOR_FILE%" BEGIN
    REPLACE_TEXTUALLY ~A\(3600.*\.PVRZ\)~ ~B\1~
  END
  COPY ~%BASH_FOR_FILESPEC%~ ~override/%dest_file%~
END
Link to comment

 

Thank you!

EDIT: Unfotunately, I came to a limit in file size with my planned PVRZ + tis approach. Your answer will be helpful nontheless.

COPY_LARGE?

 

I tried that already, too, but it didn't make the error message go away. Thank you nontheless for the idea!

Link to comment

 

 

Thank you!

EDIT: Unfotunately, I came to a limit in file size with my planned PVRZ + tis approach. Your answer will be helpful nontheless.

COPY_LARGE?

I tried that already, too, but it didn't make the error message go away. Thank you nontheless for the idea!

How exactly ?

Cause the COPY_LARGE has the more restrictions than the COPY, and that is that you can't modify the file(bytewise).

And you probably want to do it like:

ACTION_BASH_FOR ~sirinescall/extended_lighthouse/Lighthouse_ee/small~ ~A3600.*\.PVRZ~ BEGIN
  OUTER_PATCH_SAVE dest_file "%BASH_FOR_FILE%" BEGIN
    REPLACE_TEXTUALLY ~A\(3600.*\.PVRZ\)~ ~B\1~
  END
  COPY ~%BASH_FOR_FILESPEC%~ ~override/%dest_file%~
END

ACTION_IF GAME_IS ~bgee~ BEGIN
COPY_LARGE ~sirinescall/extended_lighthouse/Lighthouse_ee/largefiles/ar1.PVRZ~ ~override/ar1.PVRZ~
           ~sirinescall/extended_lighthouse/Lighthouse_ee/largefiles/ar2.PVRZ~ ~override/ar2.PVRZ~
...
END

ACTION_IF GAME_IS ~eet~ BEGIN
COPY_LARGE ~sirinescall/extended_lighthouse/Lighthouse_ee/largefiles/ar1.PVRZ~ ~override/bg1.PVRZ~
           ~sirinescall/extended_lighthouse/Lighthouse_ee/largefiles/ar2.PVRZ~ ~override/bg2.PVRZ~
...
END
Edited by Jarno Mikkola
Link to comment

The PVRZ weren't the problem. It's the unpacked, vanilla BGII tis that is too large, therefore I can't copy&rename it - as I need to do if it should work for BGT and Tutu both.

 

The problem doesn't arise for custom areas because there is no namechange, but Lure of Sirine's Call replaces the tis of an existing game area (Lighthouse area) which has different file names in different games.

 

And in the end. the area crashed for Tutu anyway, so I guess the problem kind of 'solved' itself.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...