Jump to content


pro5's Content

There have been 58 items by pro5 (Search limited from 30-March 23)


By content type

See this member's


Sort by                Order  

#567017 BiG World Setup (an attempt to update the program)

Posted by pro5 on 21 February 2014 - 02:58 PM in Mega Mod Help

Been trying out a BWS install with custom mod selection to test a few things. Excellent job with it, by the way. :new_thumbs:

A few things noted in the process:

- Two mods (Region of Terror and something else I forget) installed with parse warnings because of missing entries in GTIMES.IDS and SHOUTIDS.IDS. Copying these files from BWP Fixpack's _IDS_ref folder into override prior to installation fixes that, I'm not sure why this wasn't done automatically by the program.

- BPBalancer does not recognize Drizzt Saga v3 as installed, because it's expecting a different component number than what is installed by BWS.
All Drizzt Saga components in BPBalancer should have their REQUIRE_PREDICATE checks changed to this:
REQUIRE_PREDICATE MOD_IS_INSTALLED ~SETUP-DRIZZTSAGA.TP2~ ~0~ OR MOD_IS_INSTALLED ~SETUP-DRIZZTSAGA.TP2~ ~1~ ~Drizztsaga is not installed~

- Another problem with BPBalancer/DrizztSaga: WEREWOGR.cre not found.
One of the Balancer's lib .tph files (drizztsaga_action_macro_creatures.tph) is looking for WEREWOGR.cre and WOLFWEGR.cre, among other things, to reduce their kill XP award. The first one is not found - I changed the CRE reference to use Flysoup's personal prefix (F_WERWGR) in v3, in order to avoid potential conflicts.

- Problem with BGTMusic install order
For some reason, BWS installs BGTMusic late in the install order, right before GUI mods, LolFixer, Widescreen, etc. It should instead be installed right after BGT, which is where the current BWP installpack batch file correctly has it. Otherwise, any BGT NPC and quest mods which want to reference BGT music have no way of knowing what SONGLIST.2DA entries they should use (as those BG1 song entries don't yet exist in the songlist when they're installed).



#566275 Notes, Oddities and Possible Bugs in My BWP Game (Spoilers)

Posted by pro5 on 19 January 2014 - 11:13 AM in Mega Mod Help

Usage1 can be either the amount of available charges for the 1st extended header (for items with charges), or number of items in a stack (for stackable items). It's similar to how the CLUAConsole:CreateItem() command works - using CLUAConsole:CreateItem("wand02",10,0,0) should create you Wand of Fear with 10 charges, while CLUAConsole:CreateItem("misc07",10,0,0) will create a stack of 10 gold pieces.




#567268 Notes, Oddities and Possible Bugs in My BWP Game (Spoilers)

Posted by pro5 on 09 March 2014 - 04:02 AM in Mega Mod Help

My opinion is that BGT should import those mandatory BG2 NPCs (Jaheira, Minsc, Imoen, Viconia and Edwin) to BG2 side even if they are not in party during transition.
Then you'll get a level 1-2 Jaheira in BG2 if you kicked her out for good in BGT after reaching Nashkel, for example.
What i meant that if BGT imports Jaheira despite her NOT being in party you don't get that BG2 cre-file in GAM-file at save file. Then you get automatically get right cre-file when Jaheira comes back.
This might be a BGT bug then, caused by how MoveGlobalObject works. I'll do some tests on this later, but sounds like it's picking up the first script name it finds in GAM (which is the BGT version of Jaheira), instead of using the last one added with MakeGlobal() in AR0602 script.

Or it could be that the MakeGlobal() in your case failed to fire for some reason. There's no SetInterrupt(FALSE) preceding it, so it's possible Jaheira was interrupted by another script action without performing MakeGlobal().



#567264 Notes, Oddities and Possible Bugs in My BWP Game (Spoilers)

Posted by pro5 on 09 March 2014 - 12:38 AM in Mega Mod Help

You get wrong Jaheira (BG1 one not BG2 one).
Sounds like it's the other way around? You get the BG2 one (JAHEIR7-12 are all BG2 versions of Jaheira), which is by design, as BGT doesn't import BG2 joinables who weren't in player's party.
 
Problem with Jaheira when she's returning from Harpers (before Galvarey). You get wrong Jaheira (BG1 one not BG2 one). So all local variables, experience and so on are gone (causes stuttering because she tries to initiate some? dialogue).
 
This problem happens if you don't have Jaheira in party when transition from BG1 to BG2. Script at AR0602.BCS adds JAHEIR7.CRE, JAHEIR8.CRE, JAHEIR11.CRE or JAHEIR12.CRE (depending on CHARNAMEs level) to GAM-file.

I don't know how this can be fixed. Maybe importing Jaheira from BG1 even if she's not in party or deleting BG1 Jaheira from GAM-file.
If anything should be fixed it's the script block that causes the stuttering, because it shouldn't be happening and indicates an error in the script. Obviously there aren't any vanilla BG2 scripts that check BGT local variables. If it's some mod that depends on those Jaheira locals from BGT and causes the stutter, then it also should take care to take into account how BGT handles Jaheira's import.

I'd check Jaheira's scripts to locate the offending block.



#567024 1pp ~ high quality music for SoA/ToB || Tutu/ToSC || IWD || PS:T

Posted by pro5 on 22 February 2014 - 11:05 AM in 1PP

I was interested to try this mod, but it needed some serious work to adapt to BGT properly. I've made it an automatic install that will use the resources from both TotSC and BGII music packages, and install them in BGT. Fixed a few minor problems along the way. Not fully tested, so please use at your own risk for now.

Copy-paste from the small readme included in the archive:

This package contains an automated BGT-compatible weidu installer for the 1PP: High Quality Music mods (TotSC/BGII). It will add audio from both BG1 and BG2 1PP packages into the game and optionally patch all areas to make full use of added music.

Usage:
- Download the 1pp_hq_music_ToSC_110 audio package
- Download the 1pp_hq_music_II_130 audio package
- Extract both packages above into the BGT folder, but do NOT install them (you can safely delete their .exe installers)
- Extract the attached package into the same folder, and run setup-1pp_hq_music_BGT.exe to install


Note 1: For area patching, BGTMusic mod must installed - specifically the component "Full Baldur's Gate/Shadows of Amn/Throne of Bhaal Music"

Note 2: 1PP HQ music should be installed after all mods that add new ACM audio into the game, which means most NPC and quest mods (see the original readme in BGII package for more details on the conversion process and potential pitfalls)


Most notable changes from v1.30 of 1pp_hq_music_BGII (which was used as basis for making this package):
  • Full BGT support, including patching of BGT areas to enable new music tracks
  • New songs are added using ADD_MUSIC, instead of using fixed songlist.2da IDs (some of those are already occupied in BGT)
  • Existing song IDs for BGT areas are dynamically extracted from current songlist.2da, instead of using fixed values (this generally won't work with BGT very well)
  • Automated installation: the installer will patch the exe, back up the music folder, upsample any acm tracks in music folder that need upsampling to 44.1kHz, install all necessary files from appropriate 1PP HQ Music packages, and, optionally, patch the areas. Upon uninstallation, backed up music folder is restored, reversing the upscaling.
  • Split patch/don't patch areas choice into subcomponents for ease of automatic installs via BWP/BWS
  • Fixed various problems in several .mus files: CRED.MUS, BD1.mus, BL1.mus, DREAM2.MUS, BM2.MUS, BP1.MUS, MB.MUS, VB.MUS
  • Area patching is no longer done using fj_are_structure - it was setting every omitted parameter field in the songlist structure to default values, effectively removing ambients from patched areas
  • Added a tiny component to allow restoring BG2 main menu theme at/after BGT transition

Attached Files




#567255 1pp ~ high quality music for SoA/ToB || Tutu/ToSC || IWD || PS:T

Posted by pro5 on 08 March 2014 - 12:35 AM in 1PP

This is awesome! As Erephine work is amazing!

 

 

So can we hope to see this implemented in the BigWorldProject and BigWorldSetup?

 

Well that's up to the BWP/BWS guys, my job is done unless bugs are reported. They might be waiting to test it in action to make sure it works before adding into the official install mix, which is not a bad idea. I haven't time to do a full test playthrough with it unfortunately as I'm working on another project.




#570032 1pp ~ high quality music for SoA/ToB || Tutu/ToSC || IWD || PS:T

Posted by pro5 on 26 June 2014 - 07:30 AM in 1PP

okay "fixed" the problem, and the problem is the converter that comes with the BGT version deletes custom acm's from the music folder from any mod that adds them. :| using the one inside the iwd pack and it converts everything properly. 

 

Hi Deaderinred, I've tried installing latest CtB followed by HQ Music for BGT (posted by me in this thread), but was unable to reproduce files getting permanently deleted as you describe. Can you confirm that you were using the BGT version from this post and following the installation instructions from the new readme (note that you now only need to run the setup-1pp_hq_music_BGT.exe, it should handle everything automatically)?

 

To clarify, the new converter does move mod-added ACM files out of the music folder into temporary folder for conversion, but is then supposed to return the upscaled version back to the music folder after each file is processed. If that doesn't happen, it's a problem I'd like to try and fix - but I'm going to need a bit more information to figure out what's going wrong in your case and how to replicate the situation.




#571044 1pp ~ high quality music for SoA/ToB || Tutu/ToSC || IWD || PS:T

Posted by pro5 on 05 August 2014 - 12:45 PM in 1PP

HQ Music for BGT moves all files added by mods from the music folder to .\1pp_hq_music_BGT\convert\backup and leaves over only empty folders in the music folder.
...
The files inside the folders above should also get converted!

 

They definitely should, the problem so far has been that I can't reproduce the situation on my end when they disappear without being converted. For instance, I have a working BWS mega-install with some of the mods from your list (Jarl's BGT Adventure Pack, RoT, Amber), and with 1PP_HQ_MUSIC_BGT installed finely on top. All the music files were converted and returned to their respective subfolders within the music folder during installation. Unfortunately, I can't begin fixing the problem until I understand what goes wrong. By the sound of it, I'm guessing either the converter crashes sometime after it moves each ACM file for processing and before moving the new file back, or it fails to move the file back (permissions problem?).

 

I'll do more research on this the next time I get a free weekend, but for now consider me puzzled with why this might be happening; sorry for the trouble.




#567084 BP 181 bugs?

Posted by pro5 on 25 February 2014 - 06:52 AM in Big Picture

So, on a whim, I assigned Firebeard the vanilla script equivalents of the BP scripts--mage6 and wtasight. Did you try this test? I had the same results as with the BP scripts. Firebeard still attacked. So, obviously there's something going on, but BP is innocent I say. I don't see anything in his CRE file to cause this either. Not sure what exactly to expect, but if you installed just bp and bgt like I did, and BP is not to blame, nor the vanilla game, what's left? tob-ex and bgt. I don't recall ever seeing this in the early days of bgt, before there was a tob-ex, so tob-ex is my suspect.
I didn't try it, but I'm trying it now and I also tried uninstalling BP. I hate to say it, but in either case (changing script to mage6 and uninstalling) , Firebeard doesn't attack on my end. To be sure, I tried several times, because I noticed earlier there's a certain randomness to the result (in one case during my earlier tests, he didn't attack me; although in the next attempt in exact same install, he did).

The vanilla MAGE6 script only has 80 lines and every block starts with See(NearestEnemyOf(Myself)) condition... are you certain yours is the same when he's assaulting you with it? I don't think BGT includes anything from TobEx, as Ascension64 specifically did not want it to depend on the latter. It doesn't even include the exe patch to remove songlist limit - that one was outsourced into BGTMusic.

I'll understand if you don't want to waste more time on debugging this, but it'd be nice to have a bit more clarity as to what causes this.



#567064 BP 181 bugs?

Posted by pro5 on 24 February 2014 - 02:04 PM in Big Picture

Was able to reproduce it again on a clean install with this WeiDU log:
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #0 #0 // BG2 Fixpack - Core Fixes: v10
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #0 #1000 // BG2 Fixpack - Game Text Update -> GTU Light (by Wisp): v10
~SETUP-BGT.TP2~ #0 #0 // Baldur's Gate Trilogy - Core: 1.18 (28 Apr 13)
~SETUP-BGTMUSIC.TP2~ #0 #2 // Baldur's Gate Trilogy - Music -> Full Baldur's Gate/Shadows of Amn/Throne of Bhaal Music (WARNING: patches BGMain.exe)
~BP/SETUP-BP.TP2~ #0 #0 // Big Picture, core component (required for most subcomponents): v181-b4611
~BP/SETUP-BP.TP2~ #0 #10 // Patching all the existing innate spells, setting level to one.....: v181-b4611
~BP/SETUP-BP.TP2~ #0 #500 // Generic Mages: v181-b4611
~BP/SETUP-BP.TP2~ #0 #150 // Generic Creature & Script Processing: v181-b4611

In case it matters for script targeting, I always used the same choices in character generation (and I always started a new game for each test): male, human, fighter.



#567090 BP 181 bugs?

Posted by pro5 on 25 February 2014 - 11:43 AM in Big Picture

Um, are you sure you're not overreacting on this, Horred?

When I tested the behavior of the empty execution blocks earlier (after you clarified that they should stop current script but move on to the next one in script stack), I confirmed that they are in fact working as you describe. Just not in the first AI round, when they fall through. I'll do more testing in the next few days to be sure, but if this is correct - it's hardly an insurmountable problem, OnCreation() triggers should help.

Also, I have to ask, is it possible it always worked like this and the "fire shield" and other buffs firing (which you admitted happened), for instance, was caused by it? After all, Firebeard is only casting offensive spells first because he doesn't have buffs like Ghost Armor memorized, otherwise the script would prioritize them...



#567093 BP 181 bugs?

Posted by pro5 on 25 February 2014 - 12:33 PM in Big Picture

We eliminated all but one theory: the new GoG.com installation broke this function. The original vanilla scripts never use it, so maybe they totally overlooked its usefulness when recompiling the engine.
I'm pretty sure my ToB copy is not GoG, it's a backup I created ages ago from some ancient CD version.

For your WeiDU code, this should do the trick
<<<<<<<< ...\p5-inlined\src.baf
IF
  OR(2)
	!Allegiance(Myself,EVILCUTOFF)
	!Detect([GOODCUTOFF])
THEN
  RESPONSE #100
END
>>>>>>>>

<<<<<<<< ...\p5-inlined\dest.baf
IF
    OR(2)
        !Allegiance(Myself,EVILCUTOFF)
        !Detect([GOODCUTOFF])
    Global("TOB_SUXX","LOCALS",0)
THEN
    RESPONSE #100
        SetGlobal("TOB_SUXX","LOCALS",1)
END

IF
    OR(2)
        !Allegiance(Myself,EVILCUTOFF)
        !Detect([GOODCUTOFF])
    Global("TOB_SUXX","LOCALS",1)
THEN
    RESPONSE #100
END
>>>>>>>>

SILENT
COPY_EXISTING_REGEXP GLOB ~BP.*\.bcs~ ~override~
	R_B_B ~...\p5-inlined\src.baf~ ~...\p5-inlined\dest.baf~
BUT_ONLY
VERBOSE
This won't catch other shutoff blocks, obviously, so you might need to repeat this for every one of them.



#567062 BP 181 bugs?

Posted by pro5 on 24 February 2014 - 12:41 PM in Big Picture

When I finish my second job of the day, after this job--if I'm not comatose, I'll dust off my copy and fire up BGT and give this a try. Forgive my skepticism but I need to see it for myself. It's very odd that a script that has been stable for 11 years suddenly acts up, when nobody has touched it.
I understand. I'll try this on a new install on my side just in case to see if maybe my "clean" BGT installation is fubared somehow.



#567100 BP 181 bugs?

Posted by pro5 on 25 February 2014 - 08:32 PM in Big Picture

Now that you mention it... all we had to do was look in the IESDP under Continue(). :)
Use of continue in a script block will cause the parser to treater subsequent empty response blocks as though they contained a Continue() command - this parsing can be stopped by including a NoAction() in the empty response block.
Good to know EE fixes that.
 
However, @pro5 I greatly appreciate your diligence in reporting, your support and your code offer.
No problem, glad it all worked out in the end.



#567057 BP 181 bugs?

Posted by pro5 on 24 February 2014 - 10:16 AM in Big Picture


Note that it's not just "buffs" - the consequences depend on the script and the creature, and in this case, Firebeard could cast for instance Melf's Acid Arrow. Which at level 1 in Candlekeep could, well, kill you. Not to mention such things are immersion-breaking.

Erhm, if that's so then who ever coded the MAA's casting script was unconsciously cheating, after all it's target needs first of all be visible to the caster--- as the LastSeenBy() by itself should never be used as the target ... but with an inner function, such as LastSeenBy(Myself) ---during the targeting phase. 
 



Targeting blocks are there, but they have Continue(), so the casting phase happens in the same first round. At least that's my guess without picking the script apart line by line.



#567035 BP 181 bugs?

Posted by pro5 on 23 February 2014 - 09:09 AM in Big Picture

After starting a new BGT game, I was a bit surprised to have Firebeard Elvenhair start casting hostile spells (in various attempts it was either horror, melf's acid arrow, or magic missile) at me right after first entering Candlekeep Inn. He remained neutral (blue circle) and did not cast more spells after the first one.

I tracked the problem down to BPMAGE6 script the old man had assigned.

This script block (used in most BP scripts, apparently) should be preventing the above from happening - in theory. Hostile actions follow it, so they won't get a chance to execute if this block fires:
IF
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
END
However, for some reason it doesn't work on the first round after entering the area. The engine seems to treat such empty block as one with Continue() and Firebead happily proceeds to blast LastSeenBy(hisass) with all his sorcerous might.

I added NoAction() into the block and this appears to have fixed the problem:
IF
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
    NoAction()
END

At first I thought this was a result of some other mod messing with BP scripts (I was running large BWS install), but then I was able to reproduce this on a cleaner BGT + BP only install, so I'm reporting the problem.

The total amount of BP scripts with exact same script block is over a hundred.



#567055 BP 181 bugs?

Posted by pro5 on 24 February 2014 - 08:44 AM in Big Picture

Thanks, and I'm glad it solved your immediate problem. There's a larger problem with doing this on a grand scale however. The action NoAction() causes all script actions to end for that parsing round. So, no scripts after this, in the entire 5 slots available for creatures, will fire either. This in turn can break far more serious things, than cause something simple like casting a buff spell. To fix this exclusively would require special scripting for Firebeard, not a generic fix that would break dozens of other situations. Honestly, it's just a buff that happens to be visible. For the harm it causes (next to none), I'm not really sure it's worth the time and effort it would take to fix this on a grand scale. It would be easier to add an exclusion for Firebeard, let him keep his vanilla scripts, and be done with it.
Ok, I didn't actually know that empty execution blocks allows lower scripts to fire. Or I did know, but completely forgot - one of those. :P

But I still think there's a better solution than to fix this on an exclusion basis (which would likely miss something somewhere and also wouldn't cover any mod-introduced NPCs unless you're volunteering to add hundreds of compatibility checks into your TP2). I can confirm that this also works:
IF
  OnCreation()
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
    NoAction()
END

IF
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100    
END
Like I originally thought, the problem only happens in the first AI round after entering the area. Additional OnCreation() check prevents it from happening in that particular round. Personally, I'll take the risk of some script not firing at once after entering over risk of getting a fireball or something nastier in my face for no reason. But maybe that's just me. :)

Note that it's not just "buffs" - the consequences depend on the script and the creature, and in this case, Firebeard could cast for instance Melf's Acid Arrow. Which at level 1 in Candlekeep could, well, kill you. Not to mention such things are immersion-breaking.



#567059 BP 181 bugs?

Posted by pro5 on 24 February 2014 - 11:02 AM in Big Picture

Horred, when I say 'for no reason' it means just that. I enter the tavern, he starts casting. There's no fire-shield or any other kind of buff, he's casting offensive spells (usually Horror, sometimes Magic Missile or MAA depending on what the RandomNum triggers roll).

The shutoff block I'm changing is at line 439. The spells being cast (Horror, Magic Missile, MAA) are after it, at lines 1259, 1295, and 1313.

Weidu.log is this:
Spoiler

Attached Images

  • Baldr001.jpg
  • Baldr002.jpg



#566562 [MOD in the works] Liella, the saucy bard companion

Posted by pro5 on 29 January 2014 - 08:40 PM in IE Modding Discussion

Sounds interesting, I'll be watching your progress. :)

I hope you reconsider this part though:
The current plan is to not even release the mod for playing at all if there is no voice-acting present

I for one actually prefer not to have any voicing in mods I use - it's difficult to match the performance and quality of vanilla characters in modding projects and nearly always it stands out as something that does not belong in the game.



#566888 [MOD in the works] Liella, the saucy bard companion

Posted by pro5 on 15 February 2014 - 03:06 AM in IE Modding Discussion

I think you need to PM Kaeloree for a forum here.




#564983 [RELEASE] BAM Batcher

Posted by pro5 on 05 December 2013 - 12:09 PM in IE Modding Tools

Tinkered with it a bit more today, I think this should do it:

 

 

//! Convert BAMs to BMPs /////////////////////////////////////////////////////
BEGIN ~Convert BAMs to BMPs~
SUBCOMPONENT ~BAM Batcher~
NO_LOG_RECORD

//COPY_EXISTING_REGEXP GLOB ~mspi.+\.bam~ ~bambatch/bam~
COPY - ~bambatch/bam~ ~bambatch/bam~
  READ_ASCII 0x0 sg (4) //Signature
  PATCH_IF (~%sg%~ STRING_EQUAL_CASE ~BAMC~ = 1) BEGIN
    READ_LONG 0x8 dl //Uncompressed data length
    DECOMPRESS_REPLACE_FILE 0xc (SOURCE_SIZE - 0xc) dl
    sz = dl
  END ELSE BEGIN
    sz = SOURCE_SIZE
  END
  SPRINT bn ~%SOURCE_RES%~
  PATCH_PRINT ~Converting %SOURCE_FILE% to bitmaps ...~
  READ_SHORT 0x8 fc //Frame count
  READ_LONG 0x10 pf //Palette offset
  READ_ASCII pf pt (1024)
  READ_ASCII (pf + 3) nl (1) //Null
  READ_LONG 0xc fn //Frame entry offset
  FOR (f1 = 0; f1 < fc; f1 += 1) BEGIN //Frame loop
    SET BadFrameSkip = 0
    SPRINT xl ~~ //End of line
    READ_SHORT (f1 * 0xc + fn) fw //Frame width
    df = (fw / 4) * 4
    PATCH_IF df < fw BEGIN
      lz = df + 4 //Line size
      df = lz - fw //Byte difference
      FOR (g1 = 0; g1 < df; g1 += 1) BEGIN
        SPRINT xl ~%xl%%nl%~
      END
    END ELSE BEGIN
      lz = fw
      df = 0
    END
    READ_SHORT (f1 * 0xc + fn + 2) fh //Frame height
    READ_LONG (f1 * 0xc + fn + 8) fd //Frame data offset   
    cp = NOT ((fd & 0b10000000000000000000000000000000) >> 31) //Compression
    fd = (fd & 0b01111111111111111111111111111111)    
    PATCH_IF cp = 0 BEGIN
      ds = (fw * fh) //Data size     
      PATCH_IF (%ds% > 1) BEGIN     
          PATCH_PRINT ~Converting frame %f1% (uncompressed): reading datasize %ds% from offset %fd% ...~
        READ_ASCII fd fm (ds)       
      END  // PATCH_IF (%ds% > 1)
      ELSE BEGIN
        SET BadFrameSkip = 1
      END
     
    END ELSE BEGIN
      PATCH_IF f1 < (fc - 1) BEGIN
        READ_LONG ((f1 + 1) * 0xc + fn + 8) nf //Next frame data offset
        nf = (nf & 0b01111111111111111111111111111111)
        ds = (nf - fd)
      END ELSE BEGIN
        ds = (sz - fd)
      END     
      PATCH_IF (%ds% > 1) BEGIN     
          PATCH_PRINT ~Converting frame %f1% (compressed): reading datasize %ds% from offset %fd% ...~
          tx = 0 //Transparency index cleared
          SPRINT fm ~~ //Clear frame data
          cc = 0 //Column count
          FOR (f2 = 0; f2 < ds; f2 += 1) BEGIN //Crawl through frame data
            PATCH_IF tx = 0 BEGIN //If transparency set to 0 (1st byte or non-transparent reached)
              READ_BYTE (fd + f2) bt //1st byte hex value
              READ_ASCII (fd + f2) bx (1) //1st byte ASCII value
              PATCH_IF (bt = 0) AND (f2 < (ds - 1)) BEGIN //If byte is transparent and not last pixel
                READ_BYTE (fd + f2 + 1) bv //Next byte
                FOR (f3 = 0; f3 < (bv + 1); f3 += 1) BEGIN //Augment transparent pixels
                  SPRINT fm ~%fm%%bx%~ //Add byte ASCII value
                  cc += 1 //Column counter
                  PATCH_IF (cc = fw) AND (df > 0) BEGIN //If column is frame width and there's a difference
                    SPRINT fm ~%fm%%xl%~ //Pad line with extra BMP nulls
                    cc = 0 //Reset column counter
                  END
                END
                tx = 1 //Transparency set
              END ELSE BEGIN //If not transparent or last pixel
                SPRINT fm ~%fm%%bx%~ //Add byte ASCII value
                cc += 1 //Increase column counter
                PATCH_IF (cc = fw) AND (df > 0) BEGIN //If column is frame width and there's a difference
                  SPRINT fm ~%fm%%xl%~ //Pad line with extra BMP nulls
                  cc = 0 //Reset column counter
                END
              END
            END ELSE BEGIN //If transparency is not 0
              tx = 0 //Set to 0
            END
          END         
      END  // PATCH_IF (%ds% > 1)
      ELSE BEGIN
          SET BadFrameSkip = 1
      END
     
    END  // ELSE (PATCH_IF cp = 0)


    PATCH_IF %BadFrameSkip% = 0 BEGIN   
        SPRINT fk ~~
        INNER_PATCH ~%fm%~ BEGIN
          FOR (g2 = fh; g2 > 0; g2 -= 1) BEGIN //Reverse rows for BMP
            PATCH_IF cp = 0 BEGIN //If compressed
              READ_ASCII ((g2 - 1) * fw) fl (fw) //Read frame width
              SPRINT fk ~%fk%%fl%%xl%~ //Pad with extra nulls
            END ELSE BEGIN
              READ_ASCII ((g2 - 1) * lz) fl (lz) //Read padded line width
              SPRINT fk ~%fk%%fl%~
            END
          END
        END
        fz = (0x436 + (lz * fh))
        INNER_ACTION BEGIN
          COPY ~bambatch/header.bmp~ ~bambatch/bmp/%bn%%f1%.bmp~
            WRITE_LONG 0x2 fz //File size
            WRITE_LONG 0x12 fw //Width
            WRITE_LONG 0x16 fh //Height
            WRITE_LONG 0x22 (lz * fh) //Image size
            WRITE_ASCIIE 0x36 ~%pt%~ //Color table
            READ_LONG 0x36 p0
            PATCH_IF p0 = 0x9797 BEGIN
              WRITE_LONG 0x36 0xff00 //Fix cyan transparency to green
            END
            //Uncomment line below to write a brown background (similar to in-game look)
            //WRITE_LONG 0x36 0x352e21
            READ_LONG 0x3a p1
            PATCH_IF p1 = 0xff6597 BEGIN
              WRITE_LONG 0x3a 0x080808 //Fix pink shadow to dark grey
            END
            INSERT_BYTES 0x436 (lz * fh)
            WRITE_ASCIIE 0x436 ~%fk%~ //Raster data
          BUT_ONLY
        END       
    END  //  PATCH_IF %BadFrameSkip% = 0
    ELSE BEGIN
        PATCH_PRINT ~Skipping frame %f1% - invalid frame size.~
    END

    
  END  // FOR
BUT_ONLY

 

Basically, just added skipping any frame with frame size 1 x 1 or less - those "pixel" frames are really useless for editing, and if anyone needs to reinsert them later into modified animation bams it should be easy to just clone any one of them with weidu.  Rakshasa animation, as it happens, contains tons of those, so this greatly speeds up conversion process too. The loop index variable still goes up for skipped frames, so for example if out of 100 frames 14-65 were skipped, you'll get *0.bmp through *13.bmp and *66.bmp through *100.bmp in the output folder.

 

Attached Files




#565281 [RELEASE] BAM Batcher

Posted by pro5 on 17 December 2013 - 07:39 AM in IE Modding Tools

(And erm, yeah, if you are doing advanced BAM manipulation for stuff like animations, drop me a PM... might be able to hook you up...)

Done. :)  Been away from BG and IE games and modding, but the stir EE raised has brought me back home, at least for now.




#564956 [RELEASE] BAM Batcher

Posted by pro5 on 04 December 2013 - 01:11 PM in IE Modding Tools

Hey Miloch. I'm hitting an error when trying to convert standard rakshasa animations (MRAK*.BAM) to bmp. It successfully converts first 14 frames but on the 15th this happens:

 

Converting frame 15 (compressed): reading datasize -21067 from offset 23429 ...
ERROR: illegal 44-byte read from offset 3080 of 0-byte file INNER_PATCH "%fm%"
ERROR: [MRAKG1.BAM] -> [bambatch/bam/MRAKG1.BAM] Patching Failed (COPY) (Failure("INNER_PATCH \"%fm%\": read out of bounds"))
Stopping installation because of error.

 

Looks like the patching goes on even if the calculated frame size was invalid.




#564514 P5Tweaks

Posted by pro5 on 22 November 2013 - 10:48 AM in Miscellaneous Released Mods

Updated original post with current version, readme and download link.

 

Big thank you to Miloch for maintaining the mod and (apparently) fixing my mistakes. My apologies for this.:)




#566955 Support for non-ANSI systems

Posted by pro5 on 18 February 2014 - 12:36 PM in Infinity Animations

I've modified Erephine's file renaming utility to automatically mass-rename files from the old scheme to new one (¢A¢E1A1.BAM --> +A+E1A1.BAM, etc.).
 
This means hopefully there will be no need to reupload those GB-sized content archives or worry about files previously installed by mods like Aurora's Shoes, it's enough to add a couple lines like this:
 
AT_NOW ~infinityanimations\batch\renamer.exe "infinityanimations\content\"~ 
AT_NOW ~infinityanimations\batch\renamer.exe "override\"~
 
to the TP2.

Attached Files