layingback opened this issue on Sep 16, 2003 ยท 11 posts
layingback posted Fri, 07 November 2003 at 10:54 AM
OK REPOST - Nothing changed here... Except I've put back in the characters which 'Rosity's old code removed :-O (Using square brackets instead of angle ones. Why no "No HTML code" option?)
Posting here so as not to fill up main Poser Forum with long How To messages. But if you don't understand what we're talking about please go to the link provided, read up and come back. We think this development is BIG if you use Injected figures like V3, etc, and so...
OK, after you've re-read my disclaimer in the post linked above, here's what I did to make these edits to my copy of Victoria 3. I repeat I'm not suggesting or encouraging anyone to do the same...
First go to www.vim.org and download a copy of the incredibly fast Vim (Vi Improved). Yes, Vi is a pain to learn, but there's a Gui, which helps hide much of the complexity, and it's surely the fastest way to edit multi-megabyte files. And it's scriptable, which is kinda important when there are over 400 files to edit... Then install it.
Now create the script file containing the 2 lines below, and save it in the root directory of your C: drive under the name c:fiiscript.txt. You can do this is Vim, but Notepad would work just as well. Note that there needs to be exactly 1 [Return] character at the end of each line - no more, no less. And yes that path looks funny, but it's because Vi being originally a Unix app doesn't like spaces in filenames and requires them to be preceded (escaped) by , which is rather confusing to us, but Vim will understand it just fine.
The contents of c:fiiscript.txt:
:args C:Program FilesCurious LabsPoser4Runtimelibraries!DAZVictoria 3BodyDeltasInjDeltas*.pz2[Return]
:argdo :g/valueOpDeltaAdd/ + | :s/ 1//g | + | :s/:1//ge | update[Return]
Note that if you've installed Vicky 3 in Poser 5, or you've installed Poser somewhere different, or if you've got a MetaCreations version, or a non-English version, you'll need to edit that path on line 1 to match your set up.
{If anyone is interested the first line tells Vim to find all files in that folder which match the wildcard name, and the second line instructs it to look for and change the patterns we need to fix and save it back to the hard drive if it finds anything to change.]
OK, here we go... NO - WAIT! Make a backup copy of your Deltas folders first! Using Windows Explorer locate each of the Delta folders with the path above as a roadmap, Copy the entire Deltas folder and save it as a "Copy of Deltas" folder. (Left click on Deltas folder icon in right pane of Window Explorer, Ctrl-C, right click on white space in right pane and select Paste, Win Explorer will generate the "Copy of..." name for you.) Now give it the once over to make sure the copy worked, and now youre safe(r) to proceed.
Start Vim in usual way (gVim from the Start Menu for Gui Vim). Type the following:
:so c:fiiscript.txt[Return]
followed by a (BTW, you only need to type :so c:fiis[Tab] and Vim will type the rest of the filename for you. If you didn't put the file in C: or VimVimfiles you'll have to update Vim's path environment to enable it to find it - Good luck! ;-)
As soon as you type the [Return] Vim will start processing the Inj files in Deltas folder. After it's filled a screen full of progress messages it will display -- More --, simply press the [Spacebar] to continue. Repeat. Repeat. Repeat. (Yes I could have run it in silent mode, but figured Id rather be aware of what is happening. Gives your hard drive a break too ;-)
The script is a bit heavy-handed in that it writes the file for each valueOpDeltaAdd group it changes, rather than once per file, but I figured the slightly longer run times were a good trade off for a short script file (Oh for a real shell in Windoze). A few Inj files do not have any valueOpDeltaAdd's in them and you'll see that they are not saved. Also you'll notice some on the Inj files don't have EOL and some are in Unix line-endings, but it's all good (enough ;-).
When it finally stops, simply close Vim and take a look at your files. Every file that's been updated will also have its previous version saved with a tilde (~) on the end, which you can clear out later when everything has tested out AOK (Display as List in Win Explorer and sort by Type column). The edited files should no longer have the " 1" and ":1" entries following the valueOpDeltaAdd lines. If they dont they are now Figure Independent Injection files!
Now, go back to c:fiiscript.txt, and edit the "...Body..." entry in the path to "...Head..." and repeat for that folder. Don't forget to make a backup copy of this new Deltas folder, NOW! if you havent already.
Finally you'll need to repeat for MalePak and/or any other 3rd Party folders under !DAZ that need fixing - sorry - updating.
Now you should be set, your V3 will no longer demand to be the first figure loaded in a scene.
This all worked under Windoze 2K, but should work under any Windoze version, and as everything tricky happens inside Vim, should work under MacOS/OSX too with the right copy of Vim, but Ive no way of knowing for sure.
lb