Pocket Plane Group Logo Flirt Pack Logo
Welcome, Guest. Please login or register.
September 02, 2010, 03:52:53 PM

Login with username, password and session length
Search:     Advanced search
A new Tutu mod hits the scene!  Go check out The Lure of the Sirine's Call!
132813 Posts in 13492 Topics by 3972 Members
Latest Member: nikjensen
* Home Help Search Login Register RSS feed
+  Pocket Plane Group
|-+  Friends and Neighbors
| |-+  Weimer Republic (WeiDU.org)
| | |-+  WeiDU (Moderators: weimer, the bigg)
| | | |-+  lol
« previous next »
Pages: [1] 2 Go Down Reply Print
Author Topic: lol  (Read 2118 times)
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


lol
« on: December 05, 2009, 07:46:39 PM »
Reply with quote

Code:
MOVE ~source~ ~destination_with_%variables%~

With that (and a couple  of extra tweaks), gen_biff now can biff 26K files (http://pastebin.com/f134f2341) in eight minutes... On a 5400 hard disk:
Code:
WeiDU Timings
<...>
stuff not covered elsewhere     11.380
MOVE                           110.918
BIFF                           337.897
TOTAL                          480.549

(suitably enough, Winamp is playing this as I type this).
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Azazello
The Anti-Spammer
Planewalker
*****
Offline Offline

Gender: Male
Posts: 347


« Reply #1 on: December 06, 2009, 06:45:54 AM »
Reply with quote

Code:
MOVE ~source~ ~destination_with_%variables%~

With that (and a couple  of extra tweaks), gen_biff now can biff 26K files (http://pastebin.com/f134f2341) in eight minutes... On a 5400 hard disk:
Code:
WeiDU Timings
<...>
stuff not covered elsewhere     11.380
MOVE                           110.918
BIFF                           337.897
TOTAL                          480.549

(suitably enough, Winamp is playing this as I type this).

Yay?
Logged

Another PERFECT example of why "How To Ask Questions The Smart Way" is required reading.
================================================================
|> a directory of Mega-Installation Guides <|
================================================================
"Expecting the world to treat you fairly because you are a good person is like expecting a bull not to charge you because you are a vegetarian."
cmorgan
Planewalker
*****
Offline Offline

Gender: Male
Posts: 1296

Searcher of Bugs


« Reply #2 on: December 06, 2009, 10:44:57 AM »
Reply with quote

Great taste in music, man!

Good breakthrough!
Logged
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #3 on: January 08, 2010, 04:39:39 PM »
Reply with quote

The readme says about MOVE:
Quote
Safety notes: when uninstalling, MOVE is restored first, then all generic actions are restored, then AT_*!UNINSTALL is handled. As such, do your AT_NOW, then do your COPY, then do your MOVEs
As discussed elsewhere, we want to move buggy files out of the override before COPYing over proper ones. The main reason we can't just overwrite the old ones is because they don't all have the same names as the one's we're copying. We do this by batch files now but I'm considering recoding it to use MOVE. Is this going to cause issues at uninstall?
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #4 on: January 08, 2010, 04:52:29 PM »
Reply with quote

Can't you just write a sample tp2 and try it out?  Tongue

If there is no filename collision this is a non-issue; if there is a collision, the file is completely deleted from the override. I don't know the specifics of your mod, but on a general basis it's an issue.
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #5 on: January 08, 2010, 05:05:40 PM »
Reply with quote

Can't you just write a sample tp2 and try it out?  Tongue
My goal was to get some sort of answer (or informed opinion at least) before coding something that may or may not be useful. Mainly because I spent loads of time writing the batch files to begin with but would prefer to dump those if feasible. The collision thing I'm not sure of. Certainly, before Infinity Animations, several mods may have overwritten these BAMs but after it we would hope not (since it should be installed near the end).
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #6 on: January 08, 2010, 06:57:00 PM »
Reply with quote

The problem is if a mods installed before IA have filename collisions with IA, not with those installed after.

Code:
BACKUP ~test/backup~
AUTHOR ~tb~

BEGIN ~0~
<<<<<<<< .../newfoobar
old
>>>>>>>>

COPY ~.../newfoobar~ ~test/prod/foobar~


BEGIN ~1~

MOVE ~test/prod/foobar~ ~test/prod/oldfoobar~
<<<<<<<< .../newfoobar
new
>>>>>>>>

COPY ~.../newfoobar~ ~test/prod/foobar~

Install 0 and 1, uninstall 1 (simulate the case where a mod installed before IA collides with IA). Correct uninstall behavior would be to have foobar contain "old". However, the file is removed.

UNINSTALL_MOVE_AFTER_COPY tp2 flag incoming. This is the predicted end result.
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #7 on: January 10, 2010, 06:30:39 PM »
Reply with quote

UNINSTALL_MOVE_AFTER_COPY tp2 flag incoming.
Serious or a joke? Either way, sounds like I should stick with the batch files until something like that exists.
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #8 on: January 10, 2010, 07:06:52 PM »
Reply with quote

It's going in.
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #9 on: March 13, 2010, 07:54:33 PM »
Reply with quote

Apparently some folks and memory-resident programs have been whinging about the MOVE command. Personally, I think it's antivirus (typically Avast to be specific), since it almost always goes away when disabling it. Moreover, this is rarely reproduceable in the same way, in that it hangs up on *different* files with some vague, bogus error message (such as "error copying somefile.bam" or "Patching failed (COPY)"). But some folks claim otherwise, in some very specific situations (such as if RoT and Aurora are installed). Since I'm not familiar with the code, is it at all possible a trifling code change such as specifying a destination file rather than folder would make a difference, as claimed here?
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #10 on: March 14, 2010, 08:10:39 AM »
Reply with quote

Yes, you need to specify the full destination (including the filename). I thought nobody would use it, so I coded it in the quickest possible way (and obviously the underlying OCaml library is the usual piece of shit and doesn't add the filename if given a directory). 214 will allow you to specify just the destination folder.
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #11 on: March 30, 2010, 12:50:31 AM »
Reply with quote

214 will allow you to specify just the destination folder.
What about just the source folder too? I'm thinking maybe MOVE ~mymod/bams~ override might be a less space-intensive (but possibly more bug-prone) way of transferring several GB of animations to the game than COPYing the same. Maybe it does this already, dunno.

As for UNINSTALL_ORDER (for which apparently I'm to provide documentation), this strikes me as a bit wack:
Quote
ALL operations must be specified (if any isn't, a warning is printed). Please note that this means your mod might start printing warnings three years down the line if a new uninstall action is coded
Why not just let it take something like UNINSTALL_ORDER COPY MOVE etc, where "etc" is the remaining arguments in the default order, whatever those happen to be at the time.
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #12 on: March 30, 2010, 06:58:18 AM »
Reply with quote

What about just the source folder too? I'm thinking maybe MOVE ~mymod/bams~ override might be a less space-intensive (but possibly more bug-prone) way of transferring several GB of animations to the game than COPYing the same. Maybe it does this already, dunno.
Sure.

Quote
As for UNINSTALL_ORDER (for which apparently I'm to provide documentation)
Those who request actions that are complex to use or understand are supposed to write a mod using them and then provide a tutorial. This is both because I'm the usual lazy bum, and because I'd end up writing a lot of useless details and not enough information (see: READ_2DA_ENTRY_FORMER).

Quote
Why not just let it take something like UNINSTALL_ORDER COPY MOVE etc, where "etc" is the remaining arguments in the default order, whatever those happen to be at the time.
The warning is printed, but otherwise it's performing according to the behavior you suggest (unmentioned uninstall actions are performed after the explicitly sorted ones). And (potential) uninstall problems is something I'd really want to jump out.
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #13 on: March 31, 2010, 04:43:00 AM »
Reply with quote

I'm guessing this is the right syntax?
Code:
UNINSTALL_ORDER ~STRSET~ ~COPY~ ~MOVE~ ~AT~
It fails with other variants, like without the quotes or putting all the arguments in one pair of quotes. If so, I'd say just put such an example of changing the default syntax in with the existing documentation, not a tutorial with a more detailed explanation, because the chances of a sane modder wanting to use it are fairly nil.

Workaround for MOVE ~mymod/bams~ ~override~ in the meantime seems to be:
Code:
ACTION_BASH_FOR ~mymods/bams~ ~^.+\..+$~ BEGIN
  MOVE ~%BASH_FOR_FILESPEC%~ ~override~
END
Small glitch seems to be the files get moved (and restored on uninstall) as uppercase regardless of the original casing, or is that a function of the BASH_FOR_FILESPEC variable being uppercase?

And before I test with some stupid amount of data, will this in theory need a MOVE_LARGE for massive files the same way COPY_LARGE is otherwise required?
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #14 on: March 31, 2010, 07:11:16 AM »
Reply with quote

It fails with other variants, like without the quotes or putting all the arguments in one pair of quotes. If so, I'd say just put such an example of changing the default syntax in with the existing documentation, not a tutorial with a more detailed explanation, because the chances of a sane modder wanting to use it are fairly nil.
Quotes are needed because MOVE etc. are reserved keywords, and the effort to allow either strings or keywords is much greater than the usefulness (imagine allowing to use 'if' as a variable name in C++ or what have you).

Quote
Small glitch seems to be the files get moved (and restored on uninstall) as uppercase regardless of the original casing, or is that a function of the BASH_FOR_FILESPEC variable being uppercase?
It's BASH_FOR_FILEPSEC which is automatically uppercased. I'm not sure if it is by design or by accident, but I can convert it to standard case (and probably should).

Quote
And before I test with some stupid amount of data, will this in theory need a MOVE_LARGE for massive files the same way COPY_LARGE is otherwise required?
No.
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #15 on: April 01, 2010, 07:39:44 AM »
Reply with quote

Done MOVE someDir someOtherDir. Do you need to be able to overwrite files with MOVE or not? I'd rather have it fail the installation, since this would break uninstallation, but if you need it I can leave it in.
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #16 on: April 01, 2010, 10:19:27 AM »
Reply with quote

Do you need to be able to overwrite files with MOVE or not? I'd rather have it fail the installation, since this would break uninstallation, but if you need it I can leave it in.
Well, right now I'm generally MOVEing files from the override to the mod's backup folder if they already exist, then MOVE the new mod files to the override. But that seems a bit sloppy - can't WeiDU do that automatically?
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #17 on: April 01, 2010, 10:48:31 AM »
Reply with quote

That still wouldn't produce valid uninstalling (as MOVEs are uninstalled in the same order they're performed, not in reverse order). The best solution would be to have MOVE fall back to COPY.
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #18 on: April 02, 2010, 02:28:20 AM »
Reply with quote

That still wouldn't produce valid uninstalling (as MOVEs are uninstalled in the same order they're performed, not in reverse order). The best solution would be to have MOVE fall back to COPY.
Eh, ok. COPY overwrites anyway, but it also backs up overwritten files, right? Why can't it be done in reverse order - OCaml limitation?
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #19 on: April 05, 2010, 05:52:42 AM »
Reply with quote

Why can't it be done in reverse order - OCaml limitation?
Laziness, and potential memory limitations (OCaml uses brain-dead French algorithms that surrender when facing lists of over 60k elements).
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #20 on: April 05, 2010, 12:27:27 PM »
Reply with quote

I'm probably phasing out my use of MOVE anyway, since it's pretty useless if someone's biffed the files.

(Don't suppose I could talk you into EDIT_BIFF/EDIT_KEY commands along the same lines as EDIT_SAV_FILE? Zzzz)
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #21 on: April 05, 2010, 12:36:49 PM »
Reply with quote

biff files can be too big to be freely edited with WeiDU (> 16MB), as do files contained in them, so I can't do something as generic as EDIT_SAV_FILE. On the other hand, if you can give detailed specifications I can try to work something out.
« Last Edit: April 05, 2010, 12:42:47 PM by the bigg » Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #22 on: April 05, 2010, 12:43:27 PM »
Reply with quote

For the current purpose, I'd just want to delete certain files (BAMs mainly) from biffs and update them and the .key accordingly. I'm handling it now by dumping blank or duped BAMs to the override, but I'm not sure how well that's gonna work.
Logged

the bigg
The Avatar of Fighter / Thieves
Moderator
Planewalker
*****
Offline Offline

Gender: Male
Posts: 3370


« Reply #23 on: April 05, 2010, 12:49:18 PM »
Reply with quote

How about
Code:
DISABLE_FROM_KEY ~file1.ext~ ~file2.ext~ ...
DISABLE_FROM_KEY_REGEXP ~^file[0-9]*\.ext$~ ...

They'd remain in the bif, but unreferenced from the chitin, thus functionally non-existent (deleting them from the bifs wouldn't result in reduced disk consumption, since I'd have to create a copy of the bif for backup purpose).
Logged

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - Some mods that I won't mention in public
Soundset and portrait packs: Alyx Vance (from Half-Life 2) - Jane "The Soldier" Doe (from Team Fortress 2)
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Contributions: See the PPG Modlist  Smiley
Miloch
Barbarian
Planewalker
*****
Offline Offline

Gender: Male
Posts: 667



« Reply #24 on: April 05, 2010, 02:14:53 PM »
Reply with quote

Sure, I suppose that'd work. I'm guessing it could be coded such that it'll skip any files that aren't in the .key, or would you have to pass it a FILE_EXISTS_IN_GAME check?
Logged

Pages: [1] 2 Go Up Reply Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Valid XHTML 1.0! Valid CSS!