Author Topic: [bug?] GAME_IS and ENGINE_IS can contradict themselves  (Read 4192 times)

Offline K4thos

  • Planewalker
  • *****
  • Posts: 110
[bug?] GAME_IS and ENGINE_IS can contradict themselves
« on: December 21, 2014, 09:26:29 AM »
I've noticed unexpected GAME_IS and ENGINE_IS behavior with the 237 weidu (not sure if it was true in earlier versions).
Code: [Select]
ACTION_IF ENGINE_IS ~bgee~ BEGIN
PRINT ~engine is bgee~
END
ACTION_IF ENGINE_IS ~bg2ee~ BEGIN
PRINT ~engine is bg2ee~
END
ACTION_IF GAME_IS ~bgee~ BEGIN
PRINT ~game is bgee~
END
ACTION_IF GAME_IS ~bg2ee~ BEGIN
PRINT ~game is bg2ee~
END
Above mentioned code will print all these messages if weidu finds files that are used as flags for these commands. Shouldn't wiedu stop recognizing the engine and game as BG:EE if it finds a file flag for BG2:EE? How the engine can be BG:EE and BG2:EE at the same time?

Also the changelog states that GAME_IS can now recognize 'eet' as a parameter, but this code:
Code: [Select]
ACTION_IF GAME_IS ~eet~ BEGIN
PRINT ~game is eet~
END
does not show up if 'EET.flag' file is located inside override directory.

If you are going to fix these issues (or maybe the first thing is intended -  if yes, why?) I'd like to request one more thing. It will be hard to convince all modders to add EET as a parameter for their mods, but at the same time EET is compatible with many mods released for BG2:EE. It would be great if weidu could return true for GAME_IS ~bg2ee~ even if it finds 'EET.flag' file. This way EET argument could still be used in mods that needs it (GAME_IS ~eet~ END ELSE GAME_IS ~bg2ee~), but BG2:EE mods without it could be still installed (maybe with an additional warning, but it is not necessary if it’s too much work). If such implementation would be available I could just contact mod authors that does indeed need some code changes to be compatible instead of ALL of those who use GAME_IS command. An example of a mod that wouldn't need any update to work correctly is BP-BGT Worldmap.

In other words I'd like to suggest following hierarchy: EET >= BG2:EE > BG:EE

Thanks in advance.
« Last Edit: December 21, 2014, 11:33:10 AM by K4thos »

Offline CrevsDaak

  • big kid lil' orc
  • Planewalker
  • *****
  • Posts: 48
  • Gender: Male
  • duuuh graah
Re: [bug?] GAME_IS and ENGINE_IS can contradict themselves
« Reply #1 on: December 21, 2014, 10:29:13 AM »
I think you can workaround this by using
Code: [Select]
ACTION_IF GAME_IS bgee && GAME_IS bg2ee BEGIN
  PRINT "Game is EET"
END
to detect EET, and to avoid detection of both use !GAME_IS bg(2)ee.
Not ideal but at least could solve the problem with the bp-bgt_worldmap with a REPLACE_TEXTUALLY on it's .tp2.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: [bug?] GAME_IS and ENGINE_IS can contradict themselves
« Reply #2 on: December 21, 2014, 02:37:28 PM »
How the engine can be BG:EE and BG2:EE at the same time?
Oversight. Will fix.

Quote
Also the changelog states that GAME_IS can now recognize 'eet' as a parameter, but this code:
Code: [Select]
ACTION_IF GAME_IS ~eet~ BEGIN
PRINT ~game is eet~
END
does not show up if 'EET.flag' file is located inside override directory.
Works for me. Bear in mind 0-byte files do not exist.

Quote
It would be great if weidu could return true for GAME_IS ~bg2ee~ even if it finds 'EET.flag' file.
No. Depending on the context, you may have more success talking them into using GAME_INCLUDES.
Edit: Okay, I'll temper my reply a bit. I don't want to do it, but it is probably not a coincidence that BGT is the only one that isn't mutually exclusive with everything else.


Don't use your mod to alter the tp2/mod folder of other mods. Not unless you want to become the least popular person around.
« Last Edit: December 21, 2014, 03:03:29 PM by Wisp »

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: [bug?] GAME_IS and ENGINE_IS can contradict themselves
« Reply #3 on: December 21, 2014, 02:46:20 PM »
Would someone be so kind and explain what "EET" stands for. Searching for it gives a lot of threads with "greetings", "teeth" and "sweet" in it, and I can't find other info than e.g. "EET added to GAME_IS" in the weidu change log.

Offline Cahir

  • Planewalker
  • *****
  • Posts: 102
  • Gender: Male
Re: [bug?] GAME_IS and ENGINE_IS can contradict themselves
« Reply #4 on: December 21, 2014, 02:54:31 PM »
Jastey, probably Enhanced Edition Trilogy, which as I understand will be something like BGT for vanilla. Just a guess, though.

Offline The Imp

  • Planewalker
  • *****
  • Posts: 288
  • Gender: Male
Re: [bug?] GAME_IS and ENGINE_IS can contradict themselves
« Reply #5 on: December 21, 2014, 03:13:06 PM »
Would someone be so kind and explain what "EET" stands for. Searching for it gives a lot of threads with "greetings", "teeth" and "sweet" in it, and I can't find other info than e.g. "EET added to GAME_IS" in the weidu change log.
You are asking this again ? I already answered this, here.
PS, look at the three period("full stop") marker there, specifically the third one, it's nearly an invisible link to the original posters projects page in github. Did I say too much ? :the imp throws a wrench to anyone that even tries to open their mouth:
« Last Edit: December 21, 2014, 04:17:44 PM by The Imp »

Offline K4thos

  • Planewalker
  • *****
  • Posts: 110
Re: [bug?] GAME_IS and ENGINE_IS can contradict themselves
« Reply #6 on: December 21, 2014, 05:05:50 PM »
Quote
Oversight. Will fix.
thanks.

Quote
Works for me. Bear in mind 0-byte files do not exist.
I've used a 0-byte file for test, so this is indeed not a problem.

Quote
No. Depending on the context, you may have more success talking them into using GAME_INCLUDES.
Edit: Okay, I'll temper my reply a bit. I don't want to do it, but it is probably not a coincidence that BGT is the only one that isn't mutually exclusive with everything else.
I understand your reasoning. Exceptions for rules are usually not a good implementation.

Quote
Don't use your mod to alter the tp2/mod folder of other mods. Not unless you want to become the least popular person around.
Well, I hope that BG:EE mod authors won't mind if some of their mods will be able to be converted on the fly with the main game to work on BG2:EE engine - if confirmed to work correctly. I'm not touching their folders or tp2 files directly, just apply patches if needed during conversion of BG:EE resources. On the other hand some modders probably won't be happy that their work works on different platform, so I will probably start expanding compatibility list (that is used to limit mods that can be installed on BG:EE before installing EET on BG2:EE) after the release, only if mod author ask for it. If the response for auto conversion will be overall negative than there are still EET cmpvars libraries and PCU dictionaries that can be used by modders to add native EET support in the same vein as for BGT. We will see.

Quote
Would someone be so kind and explain what "EET" stands for. Searching for it gives a lot of threads with "greetings", "teeth" and "sweet" in it, and I can't find other info than e.g. "EET added to GAME_IS" in the weidu change log.
As Cahir and The Imp said it is Baldur's Gate: Enhanced Edition Trilogy - a mod for BG2:EE that merges both games into one. It is also meant to merge in Adventure Y when it get released. It's not a secret or anything. The mod is pretty much finished, but there is no public topic created yet because:
- I've been waiting for BG2:EE 1.3 patch to be released before I start testing it - Beamdog has released it few days ago (1.2 was barely playable for vanilla game, so there was no point in testing mods with it),
- It would be silly to ask for help with beta testing until I complete the whole saga with it and fix obvious problems,
- There is this problem that I was hoping patch 1.3 will resolve, but it didn't happen. So the project is screwed if Beamdog won't add BG:EE areas compatibility or if there won't be a tool to convert PVRZ files back to TIS.
- I still need to write a proper readme and documentation. My English is bad, so I think it's better to finish the readme before trying to explain everything in a post. If you are interested in more details here is a very rough, unfinished readme file that for now mostly explains how this mod differs from BGT  (this is not a port of BGT to EE although I may change naming convention to BGT one, if there will be demand for it): https://www.sendspace.com/file/z3j9qu
Skip compatibility part - technically the mod is already compatible for example with BG1NPC project installed on BG:EE before installing EET on BG2:EE, but as mentioned earlier in this post I will probably release it with empty compatibility list and wait for mod authors to agree to add them.

edit:
Quote
PS, look at the three period("full stop") marker there, specifically the third one, it's nearly an invisible link to the original posters projects page in github. Did I say too much ? :the imp throws a wrench to anyone that even tries to open their mouth:
nah, it is not a secret. The mod is available on my GitHub page, but I don't recommend using it before I finish playing the whole saga with it and iron out obvious mistakes. Keep in mind that due to the bug mentioned in the first post BP BGT Worldmap will install incorrect tables even if you remove 'EET.flag' file from override directory (worldmap has a code block with bgee argument above bg2ee argument, and both of them returns true, so weidu installs wrong files).
« Last Edit: January 22, 2015, 08:34:02 PM by K4thos »

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: [bug?] GAME_IS and ENGINE_IS can contradict themselves
« Reply #7 on: December 22, 2014, 05:43:39 AM »
Thank you very much! This was kind of a secret, though, as neither I (nor anyone from the German community that talked about how fancy a EET would be) knew about this. This is great!!!

-The Imp: I apologize, I lost that thread and didn't see your response. (Actually, when I posted my question above, I had a faint recall I posted it earlier, somewhere... But I forgot, where. -It also skipped the list of "unread topics since your last visit", for some reason.)

Offline The Imp

  • Planewalker
  • *****
  • Posts: 288
  • Gender: Male
Re: [bug?] GAME_IS and ENGINE_IS can contradict themselves
« Reply #8 on: December 22, 2014, 04:58:03 PM »
Quote
Don't use your mod to alter the tp2/mod folder of other mods. Not unless you want to become the least popular person around.
Well, I hope that BG:EE mod authors won't mind if some of their mods will be able to be converted on the fly with the main game to work on BG2:EE engine ...
Well, the concern here is that it's easier for everyone to disallow the use of mods in the BG1EE game, as that's just the source for the EET converter. That's what the BGT-weidu did, and the EasyTutu did, at least in their readmes, the mods can then be made EET compatible on their own, just like all the story BG1 mods have been made for the BGT-weidu, as well as some to Tutu, BG1EE. But you are the programmer, and it's up to you. And THEM.
But it definitely helps with trouble shooting, when everything has to be installed on the one game that's in use... so there won't be v15 BG1UB and a v23 BG1UB installed to the two games which results to a conflict in EET in between them(yes, we are looking at the imaginary future now).
Also this way it's sometimes easier to code the multi-platform mods as a single mod, so you won't end up with a whole bunch of the "same mod", it was done in the past and the Mega-moding (BiG World Project and Setup) still suffers for it. Although it could be argued that the community actually crew better for having more than one conversion project, cause the BG1EE and IWDEE wouldn't be where they are now, for example if the IwD-in-BG2 wouldn't have been coded by DavidW, there wouldn't have been the v8 source code, also the Iwd-in-BG2 was a result of the other projects and iterations. Truthfully, we should be cursing  :P the Westley Weimer for giving a glimpse of the Icewind Gate 2 and allowing others to use his work in converting things in the Infinity Engine. ;D Kidding of course.

-The Imp: I apologize,
Don't, you/we got K4thos to come out and tell more things about his project, it can't be that bad. :devil smiley:
But if you want to, you could use the "View the most recent posts on the forum." -link at the bottom of the forums main page to check out what has been written, the forum isn't really totally that active that it get's confusing, after you get used to it, reading post in the reverse order.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: [bug?] GAME_IS and ENGINE_IS can contradict themselves
« Reply #9 on: January 01, 2015, 02:52:05 PM »
Quote
Works for me. Bear in mind 0-byte files do not exist.
I've used a 0-byte file for test, so this is indeed not a problem.
GAME_IS and anything that uses FILE_EXISTS_IN_GAME treat 0-byte files as non-existent.

 

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)?: