Jump to content


Photo

NearInfinity


  • Please log in to reply
1070 replies to this topic

#1061 Gamemacik

Gamemacik
  • Member
  • 55 posts

Posted 25 August 2021 - 03:17 AM

BCS -> BAF (De)Compiler BUG

 

When NearInfinity tries to displays content of BCS script file action UseItemSlotAbility(O:Target*,I:Slot*Slots,I:Ability*)  is displayed as UseItemSlot(O:Target*,I:Slot*Slots)

 

Eg.:

//This amulet has 2 magic abilities, ability0, ability1

IF
	HasItem("_!AM010",Myself)  
THEN
	RESPONSE #100
		UseItemSlotAbility(Myself,SLOT_AMULET,1)
END

 

After reopening BCS script file, I:Ability* argument is lost, further compiling of script causes stripping ability argument unless source code is manually fixed again.

 

//This amulet has 2 magic abilities, ability0, ability1

IF
	HasItem("_!AM010",Myself)  
THEN
	RESPONSE #100
		UseItemSlot(Myself,SLOT_AMULET)
END

For modders:
Animation resources: NWN RED DRAGONTRWNDbl.pngDRAGONWHELP PACK+DRAGONBREATHTRWNDbl.png
For loosers: SPOILER ALERT! RCEuOoU.pngQeZVcUw.png


#1062 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 25 August 2021 - 05:10 AM

 
BCS -> BAF (De)Compiler BUG
 
When NearInfinity tries to displays content of BCS script file action UseItemSlotAbility(O:Target*,I:Slot*Slots,I:Ability*) is displayed as UseItemSlot(O:Target*,I:Slot*Slots)


Thanks. I'll look into it.



#1063 smyth25

smyth25
  • Member
  • 5 posts

Posted 31 August 2021 - 12:50 PM

EDIT: Ok it turns out that the issue could be fixed by replacing the chitin.key file in the GoG BG2EE install with the copy from Steam BG2EE. Perhaps the chitin.key file was corrupted somehow (the game still seemed to run normally before replacing it though). This isn't exactly an optimal solution though, since I need to switch back to the original chitin.key when I want to play the game, but it allows me to use NI at least.

 

---

 

Hi Argent, I'm having a bit of an issue. Its been going on for a while now, I was hoping a fresh install of the game might solve it (which I delayed until I had finished a modded playthrough), but it looks like it's still persisting.

 

NearInfinity seems to only be able to open files that are present in the override folder (or rather, it cannot open anything stored in the .BIFs). Also, it seems to be unable to open certain file types at all, such as .CRE. Trying to open these files results in NI returning "Error reading *file* @null" What's more strange is that this is only affecting my BG2EE install bought from GoG. BGEE from GoG is fine, as well as BG2EE from Steam.

 

I'm currently using the latest version of NI on mac (could perhaps be a permissions issue since mac security is rather tight?). I'm also using the latest version of Java to the best of my knowledge. If you need any more information then please ask, it would be good to nip this one in the bud since it has been persisting across multiple versions of NI. Many thanks!


Edited by smyth25, 01 September 2021 - 06:31 AM.


#1064 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 08 September 2021 - 12:44 AM

EDIT: Ok it turns out that the issue could be fixed by replacing the chitin.key file in the GoG BG2EE install with the copy from Steam BG2EE. Perhaps the chitin.key file was corrupted somehow (the game still seemed to run normally before replacing it though). This isn't exactly an optimal solution though, since I need to switch back to the original chitin.key when I want to play the game, but it allows me to use NI at least.

 

---

 

Hi Argent, I'm having a bit of an issue. Its been going on for a while now, I was hoping a fresh install of the game might solve it (which I delayed until I had finished a modded playthrough), but it looks like it's still persisting.

 

NearInfinity seems to only be able to open files that are present in the override folder (or rather, it cannot open anything stored in the .BIFs). Also, it seems to be unable to open certain file types at all, such as .CRE. Trying to open these files results in NI returning "Error reading *file* @null" What's more strange is that this is only affecting my BG2EE install bought from GoG. BGEE from GoG is fine, as well as BG2EE from Steam.

 

I'm currently using the latest version of NI on mac (could perhaps be a permissions issue since mac security is rather tight?). I'm also using the latest version of Java to the best of my knowledge. If you need any more information then please ask, it would be good to nip this one in the bud since it has been persisting across multiple versions of NI. Many thanks!

 

Sorry for the late reply. Since you're playing the game on macOS the issue could be a permissions issue. Can you open the debug console (menu Tools > Show Debug Console) and post the error messages which are triggered when you start NI or try to open a biffed resource?



#1065 smyth25

smyth25
  • Member
  • 5 posts

Posted 09 September 2021 - 12:13 PM

 
Sorry for the late reply. Since you're playing the game on macOS the issue could be a permissions issue. Can you open the debug console (menu Tools > Show Debug Console) and post the error messages which are triggered when you start NI or try to open a biffed resource?
 

 

No worries! Here is the debug output from the launch of NI and from trying to open 1 biffed file. 


Spoiler

 

I do also have mods installed on this version of the game, it's just strange that I can have the same mods installed on BGEE or BG2EE from a different platform and not have the same problem.



#1066 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 10 September 2021 - 05:08 AM

There are two notable error types:

1) NI can't set up macOS-specific functionality for quitting the application. Apple is known for making regular changes to the API though. If you can still close NI without problems then I can ignore this issue (for now).

 

2) NI doesn't appear to detect various BIFF files. It's still possible that this is the result of a corrupted chitin.key file. But to make sure, can you check if the files data/BlackPits.bif and data/25Deflt.bif are present in the game? Their file sizes should be ca. 40 MB and 2.8 MB respectively.


Edited by Argent77, 10 September 2021 - 05:09 AM.


#1067 smyth25

smyth25
  • Member
  • 5 posts

Posted 11 September 2021 - 04:14 AM

I've had a check and both those BIFFs seem to be present in the data folder. Through some further tinkering though I think I may have found that the issue is related to case sensitivity in the chitin.key. Examining the key file through a text editor shows that the BIFF files were referenced in all caps, whereas they were not stored as such in the data folder. Changing the name of the BIFF file to match the case in the key file seemed to allow me access to its contents through NI, while not impeding the game.

 

I think the change to chitin.key was made by a mod, possibly by tweaks anthology if this thread is anything to go by (it's also 7 years old though so I'm not sure how much has changed since).

 

In regards to mac specific quitting issue, I've only had odd behaviours as opposed to problems. If I quit NI through the main menubar on my mac (or by using hotkeys), then NI tends not to save any changes I made to my preferences (such as where files in the override folder are displayed). However, if I quit NI from within the application by using Game -> Quit, then it will save any preference changes as normal.



#1068 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 11 September 2021 - 04:28 AM

I'll see if I can find alternate methods for adding functionality to close NI on macOS. Without that feature macOS seems to kill the process right away without giving NI the chance to do some clean-up.

Considering your latest remark about file case it is possible that there is another issue involved which is currently only a problem on Linux. Can you start Near Infinity with the following command line and check if the problem persists?

java -jar NearInfinity.jar -i

 

Replace "NearInfinity.jar" with the full path to the file if needed.


Edited by Argent77, 11 September 2021 - 04:29 AM.


#1069 smyth25

smyth25
  • Member
  • 5 posts

Posted 11 September 2021 - 04:53 AM

Yes that command line did work, NI can read the BIFFs even when they are not matching cases. I'm not sure whether its relevant, but the terminal also returned the following warnings when I opened NI using the command line:

 

Spoiler



#1070 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 11 September 2021 - 04:59 AM

Good to know. The case-sensitivity issues is already on my todo list and will (hopefully) be fixed in the next release.

 

The warnings are harmless. They are caused by deprecated but (still) working code.



#1071 smyth25

smyth25
  • Member
  • 5 posts

Posted 11 September 2021 - 05:03 AM

Thank you very much for you help!