Jump to content


Photo

Creepin's various WeiDU questions of varying silliness

0x10e

  • Please log in to reply
98 replies to this topic

#1 Creepin

Creepin
  • Administrator
  • 1435 posts

Posted 16 July 2017 - 02:04 PM

I have been digging through other's tp2s learning bits here and there because, literally, I have no idea what a decent tp2 should consist of, and I stumbled upon a thing I can't figure out myself. Below are two examples:

COPY ~grimuar/items/DH01book.itm~ ~Override~
	SAY NAME1 #7150
	SAY NAME2 @3
	SAY UNIDENTIFIED_DESC #17278
	SAY DESC @2
	SAY 0x10e @23

 

COPY ~MyMod/SomeFolder/potn52.itm~  ~override/potn52.itm~
  SAY NAME ~Potion~
  SAY NAME2 ~Potion of Extra Healing~
  SAY UNIDENTIFIED_DESC ~Potions are typically found in ceramic, crystal, glass,
    or metal flasks or vials.  Flasks or other containers generally contain
    enough fluid to provide one person with one complete dose to achieve the
    effects of the potion.~
  SAY DESC ~When wholly consumed, this potion restores 27 hit points to the
    person. The effect is instantaneous and the potion is destroyed in the
    process.~
  SAY 0xde ~Gulp!~ [GULP]

Here, NAME1, NAME2, UNIDENTIFIED_DESC and DESC are explained in WeiDU manual, which makes it quite understandable (apart from the fact that WeiDU manual uses IDENTIFIED_DESC, not DESC, guess that's a shortcut they never cared a bit to document, oh well).
But what are 0x10e and 0xde? In truth, this question is somewhat rhetoric as I could guess the effects of these instructions from context or through testing. My actual question is somewhat twofold:
- what is the best way to learn about nameless offset one might encounter? In this example my first hunch was to check .itm file format description in IESDP, but there was no offsets having "10e" or "de", neither NI's "raw" itm file wiever helped?
- what is the best way to learn what offset should I use for the certain ends not listed in WeiDU manual? In this example, say I want a string to be displayed upon my one-use item activated - what sheet, list or catalogue I should use to find out I need to patch exactly 0x10e offset (or 0xde - they seem to do the same thing)?
I mean, how it should be done by the book? Surely not by digging through other tp2s, otherwise how the first ever prehistoric coder could have known what a 0x10e is, right?


Edited by Creepin, 19 July 2017 - 02:34 PM.

The Old Gold - v0.1 WIP (mod for BGT/BWP/BWS)


#2 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Member
  • 1486 posts

Posted 16 July 2017 - 04:22 PM

Most likely, those are effects that need strings (such as a 139 or 267) that are not normally in the tlk file, hence why they can't be set until install time. Another example from Tweaks:

COPY ~cdtweaks/itm/cdkat2.itm~ ~override~ // Katana +2
  SAY NAME1 @109011
  SAY NAME2 @109013
  SAY IDENTIFIED_DESC @109014
  SAY UNIDENTIFIED_DESC @109012
  SAY 0x19e @109015 // wisdom modification
  SAY 0x1fe @109021 // strength modification
  SAY 0x25e @109020 // intelligence modification
  SAY 0x2be @109019 // hit point modification
  SAY 0x31e @109017 // dexterity modification
  SAY 0x37e @109016 // constitution modification
  SAY 0x3de @109018 // charisma modification


Those last six seven SAYs are for effects that need strings, in this case, a series of 139 opcodes. Since it's being copied from a known file that ships with the mod, I don't need to do any looping--I know exactly where the offsets are, and they're not going to change because another mod is installed.


Edited by CamDawg, 16 July 2017 - 04:23 PM.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#3 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Member
  • 1486 posts

Posted 16 July 2017 - 04:28 PM

As for the broader question:

 

- what is the best way to learn what offset should I use for the certain ends not listed in WeiDU manual? In this example, say I want a string to be displayed upon my one-use item activated - what sheet, list or catalogue I should use to find out I need to patch exactly 0x10e offset (or 0xde - they seem to do the same thing)?
I mean, how it should be done by the book? Surely not by digging through other tp2s, otherwise how the first ever prehistoric coder could have known what a 0x10e is, right?


At this point, there are so many item/spell/creature macros ready to go out of the box that you should rarely--if ever--have to do the double FOR loops of yore. Lean heavily on the ALTER/CLONE/ADD effect/header macros and you'll end up with more maintainable code anyway.


Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#4 Creepin

Creepin
  • Administrator
  • 1435 posts

Posted 17 July 2017 - 01:16 AM

Most likely, those are effects that need strings (such as a 139 or 267) that are not normally in the tlk file
Thank you very much, that should be it! Do I get it right that first I had to assign some mock up string for my effect, say 11111 for convenience, and then open my item in hex editor, take note at which offset that 11111 starts, and target this offset in tp2? Should I look for 11111 or for its hexadecimal counterpart?
I don't need to do any looping
you should rarely--if ever--have to do the double FOR loops of yore.
I'm afraid I have no idea what was that looping that I don't have to do anymore :) Any hint on where should I look for what is it?

The Old Gold - v0.1 WIP (mod for BGT/BWP/BWS)


#5 Gwendolyne

Gwendolyne
  • Staff
  • 319 posts

Posted 17 July 2017 - 04:24 AM

Let's say you want the opcode #139 with refstring @10000 (from your tra file).

 

COPY ~mymod/myitem.itm~ ~override~

    LPF ALTER_EFFECT INT_VAR match_opcode = 139 parameter1 = RESOLVE_STR_REF (@10000) END

BUT_ONLY

This way, you don't need to know the offset to be patched: WeiDU will look through all the item effects ("looping"), then modify parameter1 when it finds opcode #139.


Edited by Gwendolyne, 17 July 2017 - 04:27 AM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.

#6 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4595 posts

Posted 17 July 2017 - 04:49 AM

In this example my first hunch was to check .itm file format description in IESDP, but there was no offsets having "10e" or "de", neither NI's "raw" itm file wiever helped?

You are very much on the nose there, those are the hexadecimal offsets the features(usually a string reference) are at. You can view most the hexadecimal numbers in NI, when you open the item in the "Edit" view, and have the option enabled in the Options-> "Show Hex Offsets".

You won't mostly do a thing with them as shown in the Gwendolyne's reply, you can dynamically add/delete_and_alter the item and so have no need to actually figure what offset those are at.... as doing so requires things alike:

-reading other offsets to figure where the offset you want to read is at, after copying the file, this example is from my .spl modifying mod:

    READ_LONG  0x64 "abil_off"
    READ_SHORT 0x68 "abil_num"
    READ_LONG  0x6a "fx_off"
    READ_SHORT 0x70 "fx_num"
    PATCH_IF ("%spl_type%" = "2") BEGIN
        SET ~loops~ = 0
        SET ~delta~ = 0
        WHILE (~loops~ < ~abil_num~) BEGIN
          READ_SHORT (abil_off + 0x1e + (0x28 * loops)) ~abil_fx_num~
          READ_SHORT (abil_off + 0x20 + (0x28 * loops)) ~abil_fx_idx~
          SET ~abil_fx_idx~ = (abil_fx_idx + delta)
          WRITE_SHORT (~abil_off~ + 0x20 + (0x28 * loops)) ~abil_fx_idx~

 

-adding insertion bits to insert the effect you wanted:

          INSERT_BYTES  (~fx_off~ +        ((~abil_fx_idx~) * 0x30)) 0x30		// New effect
            WRITE_SHORT (~fx_off~ +        ((~abil_fx_idx~) * 0x30)) 261		// Restore Lost Spell
            WRITE_BYTE (~fx_off~ + 0x02 + ((~abil_fx_idx~) * 0x30)) 1			// Target Self
            WRITE_LONG (~fx_off~ + 0x04 + ((~abil_fx_idx~) * 0x30)) ~spell_level~	// Parameter 1 (Restored Spell Level)
            WRITE_BYTE (~fx_off~ + 0x08 + ((~abil_fx_idx~) * 0x30)) 1			// Parameter 2 (Cleric / Druid)
            WRITE_BYTE (~fx_off~ + 0x0c + ((~abil_fx_idx~) * 0x30)) 4   		// Delayed
            PATCH_IF (~spell_level~ = 1) BEGIN
              WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer1 + 6)	// User-defined values
            END
            PATCH_IF (~spell_level~ = 2) BEGIN
              WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer2 + 6)	// User-defined values
            END
            PATCH_IF (~spell_level~ = 3) BEGIN
              WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer3 + 6)	// User-defined values
            END
            PATCH_IF (~spell_level~ = 4) BEGIN
              WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer4 + 6)	// User-defined values
            END
            PATCH_IF (~spell_level~ = 5) BEGIN
              WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer5 + 6)	// User-defined values
            END
            PATCH_IF (~spell_level~ = 6) BEGIN
              WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer6 + 6)	// User-defined values
            END
            PATCH_IF (~spell_level~ = 7 OR ~spell_level~ = 8) BEGIN
              WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer7 + 6)	// User-defined values
            END
            WRITE_BYTE (fx_off + 0x12 + ((abil_fx_idx) * 0x30)) 100			// Probability
            WRITE_BYTE (fx_off + 0x0d + ((abil_fx_idx) * 0x30)) 3			// Dispel/Bypass
          SET ~delta1~ = 1
          SET ~delta~ = (delta + delta1)
          WRITE_SHORT (abil_off + 0x1e + (0x28 * loops)) (abil_fx_num + delta1)

 

-and then wrapping it up with BS, all in the same loop:

          SET ~loops~ = (loops + 1)
        END
      END
    END
  BUT_ONLY
END
END

 

 

 

 

While you can do the same with a few less rows and with more ease:

    READ_SHORT 0x1c "spl_type"
    READ_LONG  0x34 ~spell_level~
      PATCH_IF (~spell_level~ = 1) BEGIN
      LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 1 parameter2 = 1 timing = 4 duration = ~timer1 +6~ resist_dispel = 2 probability1 = 100 END
      PATCH_IF (~spell_level~ = 2) BEGIN
      LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 2 parameter2 = 1 timing = 4 duration = ~timer2 +6~ resist_dispel = 2 probability1 = 100 END
      PATCH_IF (~spell_level~ = 3) BEGIN
      LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 3 parameter2 = 1 timing = 4 duration = ~timer3 +6~ resist_dispel = 2 probability1 = 100 END
      PATCH_IF (~spell_level~ = 4) BEGIN
      LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 4 parameter2 = 1 timing = 4 duration = ~timer4 +6~ resist_dispel = 2 probability1 = 100 END
      PATCH_IF (~spell_level~ = 5) BEGIN
      LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 5 parameter2 = 1 timing = 4 duration = ~timer5 +6~ resist_dispel = 2 probability1 = 100 END
      PATCH_IF (~spell_level~ = 6) BEGIN
      LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 6 parameter2 = 1 timing = 4 duration = ~timer6 +6~ resist_dispel = 2 probability1 = 100 END
      PATCH_IF (~spell_level~ = 7 OR ~spell_level~ = 8) BEGIN
      LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 7 parameter2 = 1 timing = 4 duration = ~timer7 +6~ resist_dispel = 2 probability1 = 100 END

Edited by The Imp, 17 July 2017 - 07:38 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#7 Creepin

Creepin
  • Administrator
  • 1435 posts

Posted 17 July 2017 - 05:22 AM

LPF ALTER_EFFECT INT_VAR match_opcode = 139 parameter1 = RESOLVE_STR_REF (@10000) END

Thank you Gwendolyne! That looks damn convenient, perhaps I will have to take a bite at these horrendously difficult and incomprehensible macroses after all :D

and have the option enabled in the Options-> "Show Hex Offsets"
you can dynamically add/delete_and_alter the item and so have no need to actually figure what offset those are at.... as doing so requires things like, for example adding an effect:

Thank you Jarno, that "Show Hex Offsets" tip should do the trick, will check that out after work! Luckily, I don't need to patch an effect to a preexisting item (yep, topic name is misleading, sorry 'bout that), I was merely interested in technics to add a custom text string to completely new item with all effects conveniently added via NI, but I'm sure this would come in handy should I need to actually patch an item :)


Edited by Creepin, 17 July 2017 - 06:56 AM.

The Old Gold - v0.1 WIP (mod for BGT/BWP/BWS)


#8 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Member
  • 1486 posts

Posted 17 July 2017 - 04:41 PM

Most likely, those are effects that need strings (such as a 139 or 267) that are not normally in the tlk file

Thank you very much, that should be it! Do I get it right that first I had to assign some mock up string for my effect, say 11111 for convenience, and then open my item in hex editor, take note at which offset that 11111 starts, and target this offset in tp2? Should I look for 11111 or for its hexadecimal counterpart?

 

Yes, exactly. Gwendolyne's suggestion also works.

 

I don't need to do any looping

you should rarely--if ever--have to do the double FOR loops of yore.

I'm afraid I have no idea what was that looping that I don't have to do anymore :) Any hint on where should I look for what is it?
 

 

 

Jarno's post is a good example of the double loop you used to have to do--you start a loop to look through an item's (or spell's) abilities, and then a second loop within each ability to check the effects attached to each ability. The macros now do this for you without the pain.

 

It's not a bad thing to learn because you'll learn some basic programming tricks and more about IE file structures. However, from a practical standpoint unless you're going for something heavily on the technical side (as opposed to content) you're probably never going to need it.


Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#9 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4595 posts

Posted 17 July 2017 - 06:00 PM

It's not a bad thing to learn because you'll learn some basic programming tricks and more about IE file structures. However, from a practical standpoint unless you're going for something heavily on the technical side (as opposed to content) you're probably never going to need it.
Hmm, has there ever been an effort to make an auto-insertion utility to a text tool that can automatically guesstimate what the writer tries to set up/type and have it correctly spelled and so forth, based on weidu ?

Edited by The Imp, 17 July 2017 - 06:01 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#10 Miloch

Miloch

    Barbarian

  • Modder
  • 6508 posts

Posted 17 July 2017 - 06:36 PM

Hmm, has there ever been an effort to make an auto-insertion utility to a text tool that can automatically guesstimate what the writer tries to set up/type and have it correctly spelled and so forth, based on weidu ?

If a tool could guesstimate what someone's trying to say, I might be able to figure out what you're asking for... some sort of WeiDU spellcheck utility?


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#11 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Member
  • 1486 posts

Posted 17 July 2017 - 08:11 PM

I think the closest you're going to get are the various WeiDU text highlighters. If I'm writing code and various actions and variables aren't turning colors (see below), I know I've got typos to fix. I suppose you could combine that with some kind of autocorrect, but I'm not sure how much value you'd actually get from it.

 

context.jpg


Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#12 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4595 posts

Posted 18 July 2017 - 03:06 AM

. some sort of WeiDU spellcheck utility?
Well, yes, but it could go as far as guess what's tried to be said in advance... say you write:
SAY NA ... and the tool would provide options to click for inserts... like *ME1 *ME2 and all that could go so far as to offer a lot of options that themselves would then have further option like *ME1 ~~ and ME1 @ ... that's just a simple thing, but it will be able to expand a lot with things like LPF options as those have a lot defined features.

Say the user types in: "LPF "... and the tool inserts "~#~ END" and then you go edit the # with any number of the vanilla weidu functions with #'s in them... and so forth, so the user knows what's HAS to be edited while allowing other things too in the mean time.
PATCH_I will probably have at least *F (#) BEGIN # END and so forth.
So it's a "function completer" orwhat ever.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#13 Creepin

Creepin
  • Administrator
  • 1435 posts

Posted 18 July 2017 - 12:51 PM

I want to make copies of 44 vanilla files with a slightly changed name pattern, namely two letters in each of that file names replaced ("ax" => "te" in the following example). I tried to do it via COPY_EXISTING_REGEXP by using following code:

COPY_EXISTING_REGEXP ~wq.\ax.+\.bam~ ~wq.\te.+\.bam~

I believe regexps works as intended (at least debug shows that WeiDU was able to correctly pick first file of that 44 before getting an error), but WeiDU can't write resulting file to Override, apparently it treats ~wq.\te.+\.bam~ as the path, not as the file name, and fails at creating this path. Here are the snippets of debug:

...

ERROR: COPY ~WQLAXA1.BAM~ ~wq.\te..\.bam/WQLAXA1.BAM~ FAILED: cannot open target
...

Problem Unix.Unix_error(20, "mkdir", "wq./te../.bam") on wq./te../.bam: util.ml

Considering that WeiDU manual defines COPY_EXISTING_REGEXP's target as DirOrFile I expected it will understand that the target is a file, not a path, but I was wrong. Also by carefully reading definition of COPY_EXISTING_REGEXP one could assume that regexps are only allowed in source, but not in target: "fromFileRegexp toDirOrFile".

So, could regexps be processed in a target? If yes, what would be correct syntax? If no, what is the simplest way to grab bunch of files with regexps and make renamed copies of such?


Edited by Creepin, 18 July 2017 - 12:59 PM.

The Old Gold - v0.1 WIP (mod for BGT/BWP/BWS)


#14 Argent77

Argent77
  • Staff
  • 970 posts

Posted 18 July 2017 - 01:36 PM

ACTION_BASH_FOR would fit the bill since it allows you to process an arbitrary number of WeiDU actions before executing the final copy operation. However, it works only on existing files.

You can work around this limitation by copying the required game resources into the override folder first though:
// the source filename pattern
OUTER_TEXT_SPRINT pattern ~WQ.AX.+\.BAM~

// make sure that files are present in override folder
COPY_EXISTING_REGEXP ~%pattern%~ ~override~

// renaming files: ACTION_BASH_FOR scans the override folder for files matching the 
//                 regex expression defined in "pattern".
ACTION_BASH_FOR ~override~ ~%pattern%~ BEGIN
  // This block applies a textual replace operation to the file name 
  // and stores the result in "DEST_NAME".
  OUTER_PATCH_SAVE DEST_NAME ~%BASH_FOR_RES%~ BEGIN
    REPLACE_TEXTUALLY CASE_INSENSITIVE ~\(WQ.\)AX\(.*\)~ ~\1TE\2~
  END

  // MOVE is used to rename a file:
  //   ~source file path~      ~ file path          / new name  . file extension~
  MOVE ~%BASH_FOR_FILESPEC%~   ~%BASH_FOR_DIRECTORY%/%DEST_NAME%.%BASH_FOR_EXT%~
END
 
It's not pretty, but it should do the job.

Edited by Argent77, 19 July 2017 - 02:39 AM.


#15 -kjeron-

-kjeron-
  • Guest

Posted 18 July 2017 - 06:44 PM

COPY_EXISTING_REGEXP ~\(wq.\)AX\(.+.bam\)~ ~override\\\1TE\2~

 



#16 Creepin

Creepin
  • Administrator
  • 1435 posts

Posted 18 July 2017 - 10:45 PM

@Argent77
Thank you for that code, it worked perfectly! Sadly I kind of hate to use the code I don't understand, takes all the fun from modding, so I'll had to try to understand what the hell this witchery is first :) Hope there's an appropriate tutorial somewhere around or else I'm stuck with WeiDU manual.

@kjeron
Thank you, that line looked so promising, but sadly don't work. Well not that it don't work at all, but it don't do what I hoped for: it creates "override\1TE\2" folder and then dumps all 44 files therein with original (unchanged) names.

Edited by Creepin, 19 July 2017 - 12:48 AM.

The Old Gold - v0.1 WIP (mod for BGT/BWP/BWS)


#17 -kjeron-

-kjeron-
  • Guest

Posted 19 July 2017 - 12:39 AM

That is odd.  For me, that code duplicates every matching BAM file, replacing the "AX" with "TE" in the filename.

I end up with 44 files in the override folder, named as such:

WQLTEA1.BAM

WQLTEA3.BAM

WQLTEA5.BAM

etc...



#18 Creepin

Creepin
  • Administrator
  • 1435 posts

Posted 19 July 2017 - 12:49 AM

Thanks for testing, I'll re-test this evening too!

The Old Gold - v0.1 WIP (mod for BGT/BWP/BWS)


#19 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 4595 posts

Posted 19 July 2017 - 12:57 AM

Yep, the \1 and \2 's look odd in the regexp'es as when they are used to rename files ... but there's a lot of similar things done to scripts, it might help if the folder names were used in the usual manner... so not \ , but instead the normal / .. not to say that I know exactly how that works either.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#20 Argent77

Argent77
  • Staff
  • 970 posts

Posted 19 July 2017 - 02:40 AM

Kjeron's solution would be the better choice. Unfortunately it appears to be platform-dependent. I could run it fine on Windows 7, but failed with an error on my WinXP VM. I don't know how or if it works on macOS or Linux.

The code of my own solution isn't too hard to understand. I have added more comments to the code in my previous post which makes it hopefully a bit more understandable.