Author Topic: GAME_IS ~bgt~ issue  (Read 8289 times)

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
GAME_IS ~bgt~ issue
« on: October 20, 2009, 05:46:42 PM »
Due to this:
Quote
GAME_IS BGT added
What exactly does this check for? This is so I don't screw everyone that uses this up by removing the condition.
bgintro.mve
And the fact Mix-Mod disables startup movies (the annoying logo ones), the check isn't compatible with all mods.

Maybe you don't care, but personally I think a movie is a pretty poor choice to use for a platform check. It should use something that will always be there no matter what. Practically anything else -  a CRE, ITM, ARE etc. I use ar7200.are since GAME_IS doesn't work in all cases.

Also, is there a list somewhere of the resources checked by the various GAME_IS platform variants? I want to know which I can use and which might be suspect.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #1 on: October 20, 2009, 06:41:38 PM »
330-ish of src/tppe.ml:
Code: [Select]
      (* f x is FILE_EXISTS_IN_GAME x *)
      let tutu = if game_or_engine then f "_eregost.mve" else false in
      let  bgt = if game_or_engine then f "bgintro.mve"  else false in
      let  bg2 = f "xpbonus.2da"  in
      let  tob = f "xnewarea.2da" && f "areaflag.ids" in
      let iwd2 = f "subrace.ids"  in
      let  pst = f "baator.mve"   in
      let  bg1 = f "beregost.mve" in
      let tosc = f "durlag.mve"   in
      let iwd1 = f "avalanch.mve" in
      let  how = f "howdrag.mve"  in
      let tolm = f "ar9700.tis"   in
      let ttsc = f "_durlag.mve"  in
      let res = List.exists (fun this ->
          match String.uppercase this with
          | "BG2"
          | "SOA"        -> bg2 && not tutu && not tob
          | "TOB"        -> bg2 && not tutu &&     tob
          | "IWD2"       -> iwd2
          | "PST"        -> pst
          | "BG1"        -> bg1 && not tosc && not bg2
          | "TOTSC"      -> bg1 && tosc && not bg2
          | "IWD"
          | "IWD1"       -> iwd1 && not how && not tolm
          | "HOW"        -> iwd1 &&     how && not tolm
          | "TOTLM"      -> iwd1 &&     how &&     tolm
          | "TUTU"       -> tutu && not ttsc
          | "TUTU_TOTSC"
          | "TUTU+TOTSC" -> tutu &&     ttsc
          | "BGT"        -> bgt

Is ar7200 bgt-only or is it found on IWD/PST too?
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #2 on: October 21, 2009, 01:13:26 AM »
Is ar7200 bgt-only or is it found on IWD/PST too?
BGT only.

Those other movies are ok... if someone hasn't deleted or overwritten their movie biffs, which is perfectly possible to do and still have a functional game, unlike other types of resources like areas.

I suppose another argument against using movies is that they're some of the biggest game resources you can load.

I use the following:
tutu = fw0125.are
 bgt = ar7200.are
 bg2 = ar0083.are
 tob = ar6111.are
iwd2 = ar6050.are
 pst = ar0104a.are
 bg1 = ar0125.are
tosc = ar2003.are (& not iwd1)
iwd1 = ar2116.are
 how = ar9109.are
tolm = ar9715.are
ttsc = fw2003.are
ca (classic adventures) = tc1300.are

Those are all platform-unique AFAICT with the exception of totsc which unfortunately doesn't seem to have any uniquely-named areas that aren't in some other game. BG2 still needs the "not" checks to make sure it's not Tutu, BGT etc.

Now someone might say, "but someone could copy areas from one game to another." Sure, if they're stupid enough to do that without using a unique prefix. They could also do that with movies, and copying areas is a lot tougher because of all the related resources.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #3 on: October 21, 2009, 06:58:08 AM »
Cheers.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Ascension64

  • Planewalker
  • *****
  • Posts: 472
Re: GAME_IS issue
« Reply #4 on: December 06, 2009, 05:53:00 PM »
It appears that there has arisen a problem checking for movies with GAME_IS when a non-full install is performed.
The case involved here is BG1UB (http://forums.pocketplane.net/index.php/topic,26985.0.html).

Could you change GAME_IS so that it checks for resources that are distinguishable between game, yet guaranteed to be installed on minimal install situations?

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #5 on: December 06, 2009, 06:47:27 PM »
The current version (212) is using ar7200.are for BGT and ar0803.are for ToB.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Ascension64

  • Planewalker
  • *****
  • Posts: 472
Re: GAME_IS ~bgt~ issue
« Reply #6 on: December 09, 2009, 03:59:28 AM »
What is the current file checked for BG1:TotSC. The issue in the link above refers to an installation on that platform.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #7 on: December 09, 2009, 08:05:37 AM »
f x is a shortcut for FILE_EXISTS_IN_GAME. Rest should be self-explaining.

Code: [Select]
      let tutu = if game_or_engine then f "fw0125.are" else false in
      let  bgt = if game_or_engine then f "ar7200.are" else false in
      let   ca = if game_or_engine then f "tc1300.are" else false in
      let  bg2 = f "ar0803.are"   in
      let  tob = f "ar6111.are"   in
      let iwd2 = f "ar6050.are"   in
      let  pst = f "ar0104a.are"  in
      let  bg1 = f "ar0125.are"   in
      let tosc = f "ar2003.are"   in
      let iwd1 = f "ar2116.are"   in
      let  how = f "ar9109.are"   in
      let tolm = f "ar9715.are"   in
      let ttsc = f "fw2003.are"   in
<...>
          | "BG2"
          | "SOA"        -> bg2 && not tutu && not tob && not ca
          | "TOB"        -> bg2 && not tutu &&     tob && not ca
          | "IWD2"       -> iwd2
          | "PST"        -> pst
          | "BG1"        -> bg1 && not tosc && not bg2
          | "TOTSC"      -> bg1 &&     tosc && not bg2 && not iwd1
          | "IWD"
          | "IWD1"       -> iwd1 && not how && not tolm
          | "HOW"        -> iwd1 &&     how && not tolm
          | "TOTLM"      -> iwd1 &&     how &&     tolm
          | "TUTU"       -> tutu && not ttsc
          | "TUTU_TOTSC"
          | "TUTU+TOTSC" -> tutu &&     ttsc
          | "BGT"        -> bgt
          | "CA"         -> ca
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Ascension64

  • Planewalker
  • *****
  • Posts: 472
Re: GAME_IS ~bgt~ issue
« Reply #8 on: December 09, 2009, 05:25:54 PM »
OK, so all that needs to be done is to wait for 212.  ;)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #9 on: December 09, 2009, 05:31:19 PM »
...which was released a week ago (but not announced because devSin is lazy).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Ascension64

  • Planewalker
  • *****
  • Posts: 472
Re: GAME_IS ~bgt~ issue
« Reply #10 on: December 09, 2009, 05:32:39 PM »
It is always the gnomes' fault!  :P

Offline Ascension64

  • Planewalker
  • *****
  • Posts: 472
Re: GAME_IS ~bgt~ issue
« Reply #11 on: December 09, 2009, 07:15:02 PM »
Hmm,
GAME_IS ~bg1 totsc~ in WeiDU 212 does not properly detect a vanilla BG1 (no TotSC) nor a BG:TotSC game. Same goes when only one string is used for GAME_IS.
« Last Edit: December 09, 2009, 07:17:24 PM by Ascension64 »

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #12 on: December 09, 2009, 07:26:14 PM »
...which was released a week ago (but not announced because devSin is lazy).
... or because devSin is busy and doesn't have access to his Mac right now, cockmaster.

GAME_IS ~bg1 totsc~ in WeiDU 212 does not properly detect a vanilla BG1 (no TotSC) nor a BG:TotSC game. Same goes when only one string is used for GAME_IS.
And maybe if 212 didn't have new bugs, it would be a higher priority.

So suck it. And like it. And wait until this weekend. :P

temujin.

  • Guest
Re: GAME_IS ~bgt~ issue
« Reply #13 on: December 09, 2009, 08:31:15 PM »
Code: [Select]
          | "TUTU_TOTSC"
          | "TUTU+TOTSC" -> tutu &&     ttsc

is there any difference between these two?

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #14 on: December 09, 2009, 10:42:51 PM »
No, that code returns the same value for both; in TP2 syntax, the underscore is the professional (i.e., quote-less) variant, while the 'plus' is for the n00bs.

temujin.

  • Guest
Re: GAME_IS ~bgt~ issue
« Reply #15 on: December 09, 2009, 11:39:50 PM »
going by that train of thought, where are the 'professional' and 'noob' versions for BG1 +/- TotSC?

if we're going to have redundant stuff, where is "BG1_TOTSC" and "BG1+TOTSC"?  ;)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #16 on: December 10, 2009, 02:36:41 AM »
bg2 = ar0083.are
      let  bg2 = f "ar0803.are"   in

<insert head explosion sound>
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Ascension64

  • Planewalker
  • *****
  • Posts: 472
Re: GAME_IS ~bgt~ issue
« Reply #17 on: December 10, 2009, 02:55:43 AM »
Now here's a question: is it tosc or totsc? BG1UB currently seems to work on totsc without difficulty using WeiDU 211.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #18 on: December 10, 2009, 03:01:57 AM »
totsc (tosc should fail loudly). Fixed version is up in 20 minutes I can't upload.
« Last Edit: December 10, 2009, 03:16:47 AM by the bigg »
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Re: GAME_IS ~bgt~ issue
« Reply #19 on: December 10, 2009, 02:53:54 PM »
If we are going for support of  noob vs professional implemetations of weidu, I renew my plea for the ultimate simplicity in formation for new coders:

ACTION_IF_I_AM_INSTALLING_THIS_MODIFICATION_ON_A_COMPUTER_WITH_BALDURS_GATE_WITH_TALES_OF_THE_SWORD_COAST_3_CD_VERSION_INSTALLED  THEN BEGIN ~fu~ END ELSE

ACTION_IF_I_AM_INSTALLING_THIS_MODIFICATION_ON_A_COMPUTER_WITH_BALDURS_GATE_WITH_TALES_OF_THE_SWORD_COAST_5_CD_VERSION_INSTALLED  THEN BEGIN ~fu~ END ELSE

ACTION_IF_I_AM_INSTALLING_THIS_MODIFICATION_ON_A_COMPUTER_WITH_BALDURS_GATE_WITH_TALES_OF_THE_SWORD_COAST_3_CD_VERSION_WITH_PATCH_ERRONIOUSLY_INSTALLED  THEN BEGIN ~fu~ END ELSE

ACTION_IF_I_AM_INSTALLING_THIS_MODIFICATION_ON_A_COMPUTER_WITH_BALDURS_GATE_WITH_TALES_OF_THE_SWORD_COAST_5_CD_VERSION_WITHOUT_PATCH_INSTALLED THEN BEGIN ~fu~ END ELSE

FAIL ~fu~ END

:D


Offline Ascension64

  • Planewalker
  • *****
  • Posts: 472
Re: GAME_IS ~bgt~ issue
« Reply #20 on: December 10, 2009, 04:17:33 PM »
I vote for the implementation of the string ~fu~ as PRINT ~You are a n00b.~  :P

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Re: GAME_IS ~bgt~ issue
« Reply #21 on: December 10, 2009, 10:12:41 PM »
I just figured the high would replace it with " frequent use of carnal knowledge "!


Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #22 on: December 10, 2009, 10:50:02 PM »
totsc (tosc should fail loudly). Fixed version is up in 20 minutes I can't upload.
If you just want to skip ahead to 213, fix the version and upload an "official" source package and I'll do the Mac build in short order.

I won't be uploading a 212 with this dumb bug.

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: GAME_IS ~bgt~ issue
« Reply #23 on: December 11, 2009, 08:04:27 AM »
If you just want to skip ahead to 213, fix the version and upload an "official" source package and I'll do the Mac build in short order.

I won't be uploading a 212 with this dumb bug.
I should be uploading 213 before or around Christmas, so cool with me.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: