Jump to content


Photo

COPY_EXISTING_REGEXP...


  • Please log in to reply
7 replies to this topic

#1 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 05 September 2003 - 07:39 AM

Is this possible? I want to apply a patch to all items installed previously in my tp2.

However, it appears that COPY_EXISTING_REGEXP will only search for files listed in chitin.key. Therefore to apply my patch I'd have to add the same lines of code for every item, irritating (and inefficient is this particular case).

This doesn't apply to COPY_EXISTING which will happily find my override only files.

So:

Feature Request:

Add chitin.key unlisted file support for COPY_EXISTING_REGEXP.

Another uses would be to patch files from other mods, also something I want to do.

Unless, of course, I'm doing something wrong and it *does* work. :)

#2 weimer

weimer
  • Member
  • 1569 posts

Posted 05 September 2003 - 01:13 PM

I'm not sure exactly what you're asking. Can you be more specific?

Note that you can say:

COPY ~override/A~ ~override/A~
~override/B~ ~override/B~
SAY whatever whatever

... and have the "patch" applied to both A and B.

#3 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 05 September 2003 - 02:03 PM

I'll try to explain better with an example:

One of the things I'm try to do is give uniform unidentified descriptions across my items using a tp2 I knocked up for personal use on the unmodded game.

I create items with an identified name and description, but no unidentified name and description and then --automate. I get something like this:

COPY ~mymod/itm/myitem1.itm~ ~override/myitem1.itm~
SAY NAME2 @101
SAY IDENTIFIED_DESC @102
COPY ~mymod/itm/myitem2.itm~ ~override/myitem2.itm~
SAY NAME2 @103
SAY IDENTIFIED_DESC @104
.
.
.
.and so on

To apply my identified descriptions I want to use this code (which does work, I've checked):

COPY_EXISTING_REGEXP ~myitem.*itm~ ~override~
READ_BYTE "0x31" "proficiency"
SAY NAME1 @201
SAY UNIDENTIFIED_DESC @202
IF_EVAL ("%proficiency%" = "89") // Bastard Sword
COPY_EXISTING_REGEXP ~myitem.*itm~ ~override~
READ_BYTE "0x31" "proficiency"
SAY NAME1 @204
SAY UNIDENTIFIED_DESC @204
IF_EVAL ("%proficiency%" = "90") // Long Sword
.
.
.
.and so it goes on

However because my new items are not listed in chitin.key (they are only in the override) COPY_EXISTING_REGEXP doesn't find them and the install fails. I want COPY_EXISTING_REGEXP to be able to find files that are only in the override and not in the chitin.key; COPY_EXISTING can already do this.

Any better?

#4 HardenCoonor

HardenCoonor
  • Member
  • 47 posts

Posted 30 October 2003 - 01:10 AM

Now i found it. I'd like to support the request. I guess it is better to do it here and not in another thread with a less specific topic.

#5 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 30 October 2003 - 03:17 AM

Ditto!

Ever forward, my darling wind...


#6 weimer

weimer
  • Member
  • 1569 posts

Posted 19 November 2003 - 04:27 PM

COPY_EXISTING_REGEXP can now take the GLOB modifier, see the WeiDU 141 readme. I'm not sure if this is exactly what you wanted.

#7 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 21 November 2003 - 12:05 AM

COPY_EXISTING_REGEXP can now take the GLOB modifier, see the WeiDU 141 readme. I'm not sure if this is exactly what you wanted.

It is exactly what I needed! :)
Thanx!!!

Ever forward, my darling wind...


#8 HardenCoonor

HardenCoonor
  • Member
  • 47 posts

Posted 23 November 2003 - 06:13 AM

@weimer: Thanks. GLOB is perfect.