Jump to content


Photo

NearInfinity


  • Please log in to reply
1153 replies to this topic

#721 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 14 November 2016 - 03:45 AM

Is it possible to manually edit the "Game Properties" for an unknown/unrecognized game?  If not than that ability would be useful when many of the "identifier" files from a game directory have been deleted, and for ensuring forward compatibility.  Alternatively, is it possible to "force" an install to be recognized as a particular game?

I can probably add a command line parameter which forces NI to set a specific game type.



#722 Sam.

Sam.
  • Administrator
  • 1292 posts

Posted 14 November 2016 - 07:40 AM

... is it possible to "force" an install to be recognized as a particular game?

Well generally, you just pop in a file that the system you use to identify the games sort. And it doesn't have to be the original... just renamed empty text file should do fine.

Is there an exhaustive list somewhere of exactly which files are used to identify each recognized game and game variant (without searching through the source code)? 
 

Is it possible to manually edit the "Game Properties" for an unknown/unrecognized game?  If not than that ability would be useful when many of the "identifier" files from a game directory have been deleted, and for ensuring forward compatibility.  Alternatively, is it possible to "force" an install to be recognized as a particular game?

I can probably add a command line parameter which forces NI to set a specific game type.

That would be useful, thank you :) .


Edited by Sam., 14 November 2016 - 07:40 AM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#723 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 14 November 2016 - 08:11 AM

 

... is it possible to "force" an install to be recognized as a particular game?

Well generally, you just pop in a file that the system you use to identify the games sort. And it doesn't have to be the original... just renamed empty text file should do fine.
Is there an exhaustive list somewhere of exactly which files are used to identify each recognized game and game variant (without searching through the source code)?

I posted game detection conditions a while back in this post, but it didn't include the Enhanced Editions yet.

This is an updated list of game detection conditions:

Spoiler

@Sam.: Maybe you could add this bit of information to the first post.


Edited by Argent77, 14 November 2016 - 08:16 AM.


#724 Sam.

Sam.
  • Administrator
  • 1292 posts

Posted 15 November 2016 - 07:53 AM

 

... is it possible to "force" an install to be recognized as a particular game?

Well generally, you just pop in a file that the system you use to identify the games sort. And it doesn't have to be the original... just renamed empty text file should do fine.
Is there an exhaustive list somewhere of exactly which files are used to identify each recognized game and game variant (without searching through the source code)?

I posted game detection conditions a while back in this post, but it didn't include the Enhanced Editions yet.

This is an updated list of game detection conditions:

Spoiler

@Sam.: Maybe you could add this bit of information to the first post.

I can if you want, but personally I think it would be more useful to put in in the Wiki.


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#725 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 15 November 2016 - 08:13 AM

I can if you want, but personally I think it would be more useful to put in in the Wiki.

Yes, that's also an option. I'll probably add it to the Troubleshooting section of the Wiki.

Edit: Updated Near Infinity Wiki.


Edited by Argent77, 15 November 2016 - 08:31 AM.


#726 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 18 November 2016 - 07:52 AM

Update: NearInfinity v2.0-20161118

Changes:

  • Added behavior flags bit 6 to PRO resources.
  • Added new command line option to enforce a specific game type (execute "java -jar NearInfinity.jar -help" for more information).
  • Updated effect opcodes 99 and 342.
  • Changed Memorization field type in CRE -> Memorized Spells structure.
  • Fixed a bug when adding resources to decompressed SAV files.


#727 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 06 January 2017 - 11:48 AM

Update: NearInfinity v2.0-20170106

Changes:

  • Added a "Properties" feature to BAM and MOS resource viewers.
  • Added new color scheme "Monokai" for text files. It may be necessary to reset the selected color scheme for
    • BCS: Options > Text Editor > BCS and BAF > Color Scheme
    • GLSL, LUA and SQL: Options > Text Editor > Misc. Resource Types > Color Scheme for GLSL/LUA/SQL
  • Updated exclusion flags of SPL resources. Flag descriptions change depending on selected spell type.
  • Improved TIS export into PVRZ-based variant by attempting to preserve relative tileset structure for door regions and extra tiles.
  • Improved consistency in PVRZ file generation between BAM, MOS, PVRZ and TIS converters by setting background color to full transparency.
  • Improved transparent color detection in BAM V1 decoder.
  • Improved ACT palette import routine for BAM converter.
  • Improved description of effect "Dispel/Resistance" type 0.
  • Improved field names in ARE > Door structures and Vertex structures.
  • Improved field names in WED > Overlay Tilemap structures.
  • Removed a restriction which prevented NI from referencing BIFF folders outside the current game installation path (relevant only for non-EE games).
  • Fixed a condition which prevented NI to provide an option to export BAM resources as compressed BAMs.
  • Fixed a bug which prevented loading different PVRZ files of same name, but different locations.
  • Several minor bugfixes.


#728 Isewein

Isewein
  • Member
  • 98 posts

Posted 23 January 2017 - 02:44 PM

hey, a question - when editing an existing game installation with NearInfinity, does the program acknowledge precedence of files in the override folder? As in, when I search 'in all existing scripts', does it check the original files or those in the override folder?



#729 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 23 January 2017 - 03:37 PM

Yes, it does. Near Infinity applies the same order of override folders as the game itself (there can be more than one). When you select a resource in the resource tree you should be able to see its real location in the status bar at the bottom.
 



#730 Isewein

Isewein
  • Member
  • 98 posts

Posted 26 January 2017 - 03:12 AM

Great to be sure, thank you!



#731 K4thos

K4thos
  • Modder
  • 315 posts

Posted 27 January 2017 - 02:48 AM

Argent77, I'm wondering if implementing LUA support directly into NI executable wouldn't be a good idea. Not sure how much faster BCS/DLG file content searching would be with LUA compared to java, but when it comes to weidu there is a huge difference - code that used to take 10+ minutes (regexp in all DLG and BCS files imported by EET) now takes about 2 seconds with LUA (and in this time external LUA code opens all of these files one by one). I've noticed that searching phrases in NI can take several minutes in highly modded game, so maybe it would be better for this task as well? I can help with LUA code if you're interested.

 

edit: on the other hand NI prints exact line numbers when it founds something so in this case I'm not sure if LUA gmatch command would be that much faster when used line by line rather than once for whole file content.


Edited by K4thos, 27 January 2017 - 02:58 AM.


#732 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 27 January 2017 - 05:18 AM

The problem is not Java itself (which is pretty much as performant as LUA or other programming languages). It's mainly the way how NI searches script files. Each script has to be decompiled by a compiler which is already quite old, using outdated functionality and inefficient routines. The search routine will also decompile each script as if it's about to be displayed in NI (i.e. it resolves symbols, looks up string references, and does other things to prettify the code). There is a lot of potential for optimizations, but that will be a daunting task. It would probably be better to write a new compiler instead (although this may be even more time-consuming). The search itself is very fast since (regexp) search patterns are directly forwarded to native Java calls, and more recent NI releases already use multithreading to speed up the search.
 

Btw, LUA would most likely require NI to deal with platform-specific code, which I want to avoid at all if possible.



#733 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 27 January 2017 - 09:56 AM

NI allows to select 6 SPECIFIC.IDS as a valuable parameter2 field for opcode #219 (Stat: AC vs. Creature Type Modifier), either with an Enhanced or vanilla + ToBEx install, despite IESDP doesn't list it as a valuable choice.

 

Who tells the truth? I wish NI is right cause I could at least create the spell I gave up to code. ;)


CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#734 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 27 January 2017 - 10:12 AM

You're right. Both IESDP and DLTCEP opcode description are not listing SPECIFIC.IDS. Which is weird since similar opcodes 178 (THAC0 vs. Creature Type) and 179 (Damage vs. Creature Type) appear to support SPECIFIC.IDS.

Do you know how to test it in game? Does it show in the attack roll message?
 



#735 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 27 January 2017 - 11:04 AM

Great!

 

ToBEX offers an option which displays the damage and To Hit rolls calculations. As I used to code for classical version, I did not test those effects in EE. I guess there is an option in the settings parameters.

If anybody knows it, I would be glad to save my time... ;)


Edited by Gwendolyne, 27 January 2017 - 02:21 PM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#736 nullset

nullset
  • Member
  • 18 posts

Posted 27 January 2017 - 12:19 PM

I noticed that NI will not find strrefs for some dlg displays, especially in BGEE SoD. I have needed to export the .dlg and decompile with WeiDU to get a clear read of the dialog, and this doesn't give the EXTERN references.



#737 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 27 January 2017 - 12:37 PM

I noticed that NI will not find strrefs for some dlg displays, especially in BGEE SoD. I have needed to export the .dlg and decompile with WeiDU to get a clear read of the dialog, and this doesn't give the EXTERN references.

Make sure you have a current version of NI and that it points to the right chitin,key, especially when you use a steam or gog version of BGEE.

Everything looks fine in my NI NearInfinity v2.0-20170106.


Edited by Roxanne, 27 January 2017 - 12:40 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#738 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 27 January 2017 - 01:05 PM

I noticed that NI will not find strrefs for some dlg displays, especially in BGEE SoD. I have needed to export the .dlg and decompile with WeiDU to get a clear read of the dialog, and this doesn't give the EXTERN references.

Can you give a specific example to reproduce? Also, which NI version are you using, and where did you purchase SoD (GOG, Beamdog, Steam)?
 



#739 nullset

nullset
  • Member
  • 18 posts

Posted 27 January 2017 - 01:41 PM

Here it is. Sorry, I don't know how to put the picture directly into the post. I am using the latest and greatest NI NearInfinity v2.0-20170106.

Attached Files

  • Attached File  Cap.bmp   2.31MB   174 downloads

Edited by nullset, 27 January 2017 - 01:43 PM.


#740 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 27 January 2017 - 02:07 PM

This file is displayed perfectly fine on my system. It looks like you have the Beamdog version of the game, so it is no DLC issue.

 

Please enable Options -> Show Strrefs in View tabs and select the same dialog (BDVALIS.DLG) again. The view tab should now display the respective string references next to lines of text.

 

The line of state 4 (the topmost one) should be Strref 47515. Open the StringRef Lookup dialog (via Ctrl+L or menu Search -> StringRef...) and enter this number into the StringRef field. It should display the text that is used for this state: "Hah! The light of truth is my shield and my sword and they have struck the traitor down!". Does everything work as described?

Can you also open the Debug Console (via Ctrl+D or Tools -> Show Debug Console) and tell me if there are any messages?

Do you have any mods installed that could have made changes to SoD dialogs?