Jump to content


Photo

BPv181_4611 BUT_ONLY error


  • Please log in to reply
3 replies to this topic

#1 shadowlich

shadowlich
  • Member
  • 102 posts

Posted 21 December 2015 - 12:59 PM

Don't know if it is a Weidu error or a code error, whatever here it is in BPv181_4611/BP/lib/bp_main.tph/line 4943:
 
=======================================================
//Implement Fixpack troll code if not installed
ACTION_IF NOT MOD_IS_INSTALLED setup-bg2fixpack.tp2 0 BEGIN // when bg2fixpack is missing
  // restore Nith's attack script, pt 1: false() out stuff that'll break
  COPY_EXISTING ~drshnl01.bcs~ ~override~
    DECOMPILE_BCS_TO_BAF
      REPLACE_TEXTUALLY ~HPLT(Myself,10)~ ~False()~
    COMPILE_BAF_TO_BCS
  
  // new troll scripts to transform to dead versions at low HP
  COPY_EXISTING ~troll01.bcs~ ~override/drshnl11.bcs~ // create these .bcs
                ~troll01.bcs~ ~override/kptrol23.bcs~
                ~troll01.bcs~ ~override/pptroll2.bcs~
                ~troll01.bcs~ ~override/sutroll2.bcs~
                ~troll01.bcs~ ~override/torgal2.bcs~
    DECOMPILE_BCS_TO_BAF
      REPLACE_TEXTUALLY ~ChangeAnimationNoEffect("TROLL02")~ ~ChangeAnimationNoEffect("%DEST_RES%")~
    COMPILE_BAF_TO_BCS
  BUT_ONLY // but only if they changed (otherwise do not create them)
  
  // duplicates functionality, but needed for ub compatibility
  EXTEND_TOP ~drshnl01.bcs~ ~override/drshnl11.bcs~ // then use them here
=======================================================
 
But BUT_ONLY don't detect that they are new files that should be flagged as CHANGED, and so they are never create then an install error  is raised...
 
I commented the BUT_ONLY and everything is working.
Again I don't know if Weidu.BUT_ONLY is supposed to works like this or if the code is bugged (next bloc of code processes with troll02.bcs, but without BUT_ONLY as expected...)
 
 


#2 The Imp

The Imp

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

  • Member
  • 5155 posts

Posted 21 December 2015 - 07:53 PM

DECOMPILE_BCS_TO_BAF
...  
COMPILE_BAF_TO_BCS
Well, I can say that the code is ancient. UI would like to see the use of:

DECOMPILE_AND_PATCH
...
END

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.


#3 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 22 December 2015 - 08:04 AM

Ignore... I'm dumb :P The errant END was the end of the DEFINE block :lol:

 

Anyway, does the Imp's suggestion work?

 

DECOMPILE_AND_PATCH BEGIN
...
END

 

Otherwise, you might wanna get Wisp's attention in these forums :)


Edited by Lollorian, 22 December 2015 - 08:08 AM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#4 Mike1072

Mike1072
  • Modder
  • 539 posts

Posted 22 December 2015 - 04:34 PM

Presumably WeiDU is working as intended and that file simply doesn't contain ChangeAnimationNoEffect("TROLL02").

You can throw a DECOMPILE_AND_PATCH in there, but that won't change the logic.

Generally, you don't want to use BUT_ONLY when you are copying to a new filename, because it means it's possible that the new file won't be created (if the patch results in no changes). You could get rid of the BUT_ONLY to ensure these files will always be created.

However, the author probably expected that this file would contain ChangeAnimationNoEffect("TROLL02"), and it may be the case that something different should be done when it doesn't contain that line. So, does it contain the line, and if not, why not?

Edited by Mike1072, 22 December 2015 - 04:37 PM.