Skip to content

New versions of NearInfinity available

1323335373844

Comments

  • argent77argent77 Member Posts: 3,474
    edited May 2020
    Luke93 wrote: »
    I've been told that the Animation field (CRE files, offset 0x28) is just 2 bytes long (instead of 4). The other two bytes are unused...? Calling @Bubb for confirmation...

    No, the CRE animation field is actually 4 bytes long according to the CRE file format description published here: https://forums.beamdog.com/discussion/comment/10571/#Comment_10571
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    Fine, I apologize.
  • BubbBubb Member Posts: 1,005
    The field is 4 bytes, but the engine switches between reading all 4 bytes, and sometimes opting to only read the low 2 bytes. The engine would probably break in some places if the field was ever filled with an id greater than 0xFFFF.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    Bubb wrote: »
    The engine would probably break in some places if the field was ever filled with an id greater than 0xFFFF.

    If that's the case, is it better to use WRITE_SHORT 0x28 in place of WRITE_LONG 0x28?
  • BubbBubb Member Posts: 1,005
    WRITE_LONG would be preferable, as the upper 2 bytes should still be zero'd for normal operation.
  • GwendolyneGwendolyne Member Posts: 461
    @Luke93 I know many people may have been confused by this and followed the codding rules introduced by IA. Unfortunately, as said by @argent77 and @Bubb , the right way of patching this field is WRITE_LONG. This will be fixed in next version. ;)
  • CahirCahir Member, Moderator, Translator (NDA) Posts: 2,819
    Is there a way to filter only one filetype i.e in the Override folder? For example I want to review only .itm files from Override folder without the clutter of all remaining files.
  • argent77argent77 Member Posts: 3,474
    No, unfortunately that's not possible. And I fear chances for such a feature are rather slim. Making (even slight) changes to the resource selection tree usually results in unwanted side effects in dozens of different places which have to be fixed as well (and may cause even more side effects). In any case, it would be a lot of work I'd rather avoid.
  • ThacoBellThacoBell Member Posts: 12,235
    Kind of random question here. What would it take to import item files from IWD2 to BG2EE? Is that even feasible, or would it be easier to make a new item wholecloth?
  • argent77argent77 Member Posts: 3,474
    ThacoBell wrote: »
    Kind of random question here. What would it take to import item files from IWD2 to BG2EE? Is that even feasible, or would it be easier to make a new item wholecloth?
    IWD2 uses a different item resource format. From a quick glance, the base format differs only in an additional 16 bytes of data at offset 0x72. That can be fixed very easily with WeiDU. However, the bigger issue is the different set of effect opcodes available in IWD2. You'll probably have to recreate many of them manually to achieve the same effect.

    I think @swit could tell you more (if you can get a hold of him), since he dealt with IWD2 resource conversion for the IWD-in-EET project.
  • ThacoBellThacoBell Member Posts: 12,235
    @argent77 Thanks for replying. That's a bit above my head, unfortunately.

    For what I hope is a simpler question, can near infinity be used to easily alter class restrictions?
  • SjerrieSjerrie Member Posts: 1,236
    ThacoBell wrote: »
    @argent77 Thanks for replying. That's a bit above my head, unfortunately.

    For what I hope is a simpler question, can near infinity be used to easily alter class restrictions?

    Class/race restrictions, or class/weapon restrictions? It has been ages since I've been through IWD2's files, but in BG2/EE it's a breeze:

    CLSRCREQ.2DA handles class(kit)/race in BG(EE) for instance,
    DUALCLAS.2DA handles dual-classing limitations (with the hard-coded exceptions),
    MGSRCREQ.2DA handles specialist mage kit restrictions, and
    WEAPPROF.2DA handles the max proficiency points per weapon/class.

    Item files have a pretty clear checkboxes for which class and/or kit can equip them or not, and this at least is the same in IWD2.
  • ThacoBellThacoBell Member Posts: 12,235
    @Sjerrie Class/weapon restritions. I did some poking around in NI and I think I figured it out, unfortunately a mod has changed how the game handles proficiencies. WHoops.
  • crittocritto Member Posts: 32
    First of all, thanks for keeping up the great initiative. A long-time user of NI on Mac OS X.

    I dived back into modding recently, installed a latest version of NI. Can't seem to get rid of an error message "Error parsing baldur.lua. Using language defaults." at startup. It does not seem to affect anything later on, but still kind of annoying. When I look into Game -> Game Properties, I see that the path is correct. How can I fix this?
  • argent77argent77 Member Posts: 3,474
    @critto It could be an access rights issue. Could you also post the error message printed in the debug console (menu Tools > Show Debug Console)?
  • crittocritto Member Posts: 32
    Looks like you're right. I didn't realize there was a debug console to look at.

    <pre>
    java.nio.file.FileSystemException: /Users/mac/Documents/Baldur's Gate II - Enhanced Edition/baldur.lua: Operation not permitted
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    ...</pre>

    Usually, when software tries to access personal folders on OS X Catalina, a security alert pops up and asks for permission. Doesn't happen in case of NI, though.

    I've tried to give NI full access to Files and Folders in Settings -> Security & Privacy, but it didn't help.
  • argent77argent77 Member Posts: 3,474
    I don't know how to fix access rights on macOS. However, it is possible to skip autodetection of the game language in NI by selecting a specific language under menu Options > TLK Language (EE only).

    NI is a Java application, which is why it doesn't behave like native macOS apps. There is a project by @AstroBryGuy (NearInfinity-OSX) which attempts to integrate NI more tightly into the system, but it hasn't been updated for a while now.
  • crittocritto Member Posts: 32
    Yes, I remember running the package made by @AstroBryGuy in the past. It's a shame the project's on hiatus right now. At a quick glance, it looks like a simple wrapper around the jar archive. I wonder if it could be bumped to the latest version simply by replacing it.

    For now, I've set the language to English in the options and it seem to have helped.
  • crittocritto Member Posts: 32
    I think there is some problem with NI not showing new secondary types correctly in the latest release, 2.1-20200620.

    By default msectype.2da contains 13 rows in BG2EE. I add a new secondary type using ADD_SECTYPE. The msectype.2da file is updated with the new value correctly, and I assign this value to a spell. When I look at the secondary type of this spell in NI, clicking on the respective field in the spell's structure and browsing the values down below, I can see that the numeric value of the secondary type is correct but it is named "DORNS_SWORD" for some reason (there is no such value in msectype.2da).

    If I were to add further secondary types, numbered 15 and above, and assign them to a spell, they would show as "Unknown - 15" and wouldn't be present on the list.

    The previous release, Version 2.1-20200502, does not have this problem.
  • argent77argent77 Member Posts: 3,474
    I can't reproduce this behavior in my game. Do you have multiple msectype.2da instances in your override folders?

    The override folder where WeiDU installs modded files by default has the lowest priority. If you have another file somewhere else then this file is preferred by NI (supported override folders).

    Btw, DORNS_SWORD is an entry available in BGEE. Make sure that NI is actually pointing to the correct game.
  • crittocritto Member Posts: 32
    I can't reproduce this behavior in my game. Do you have multiple msectype.2da instances in your override folders?
    Definitely not:
    ➜ ls -l override | grep -i msectype                   
    -rwxrwxrwx  1 mac  staff      511 Jul  2 10:34 MSECTYPE.2DA
    
    The override folder where WeiDU installs modded files by default has the lowest priority. If you have another file somewhere else then this file is preferred by NI (supported override folders).
    I've checked all of them, only the override folder has msectype.2da (and only after my mod is installed).
    Btw, DORNS_SWORD is an entry available in BGEE. Make sure that NI is actually pointing to the correct game.
    It definitely is. The status bar in the bottom shows a proper path. Everything looks good in Game -> Game Properties. The actual resources are correct too, there is absolutely nothing from the first game.

    I do have two other games (BG1EE and IWD:EE) bookmarked in NI, but they are not active and I am positive that I do not load another game by mistake. I even uninstalled my own mod and installed SCS to make sure that there's nothing wrong with the mod specifically, and the weird behavior persists.

    I honestly don't know where the newer version of NI (20200620) gets the msectype.2da from, because 20200502 fetches the correct one, located in the override folder as shown above.
  • argent77argent77 Member Posts: 3,474
    critto wrote: »
    I honestly don't know where the newer version of NI (20200620) gets the msectype.2da from, because 20200502 fetches the correct one, located in the override folder as shown above.
    I'm just as puzzled. The latest release didn't touch anything related to secondary type processing.

    Just to be sure, is the correct msectype.2da opened (with all your additions) when you select it in NI? Path of the opened file (or associated BIFF) is shown in the status bar. Did you maybe activate menu Options > Ignore Overrides?
  • crittocritto Member Posts: 32
    Well, now I can't reproduce this :-( Maybe there was something weird going on when I was switching back and forth between two games in NI. But I definitely spent half an hour this morning adding and removing sectypes with the mod, seeing them in msectype.2da in NI, yet observing strange values inside the spell.

    Unfortunately, I didn't take notice of the status bar. If this ever happens again, I'll be sure to check the paths.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited July 2020
    argent77 wrote: »
    I don't know how to fix access rights on macOS.

    I have a similar issue with the "Save" folder. NI doesn't display it so I cannot access it (I'm using the latest macOS version of NI, i.e.: v2.1-20180615)
    It could be due to the latest OS update because I managed to access it some time ago...
  • crittocritto Member Posts: 32
    Yes, the ACL rules were modified in Catalina. What do you do to open the files? I found that using drag&drop feature in the Open File window works for me (game copy is from Steam and the save files are located inside the ~/Documents folder)
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited July 2020
    critto wrote: »
    (game copy is from Steam and the save files are located inside the ~/Documents folder)

    Me too.

    So, everything is fine if I use the Java app – because I can allow Java to access my ~/Documents folder. It seems I can't do the same with the native macOS app (the "+" button located in "System preferences > Security & Privacy > Privacy > Files and Folders" is greyed out...)

    Anyway, since the native macOS app is currently on hiatus, guess it's better to use the Java app...
  • ThacoBellThacoBell Member Posts: 12,235
    edited August 2020
    *edit* NVM
    Post edited by ThacoBell on
  • argent77argent77 Member Posts: 3,474
    edited August 2020
    ThacoBell wrote: »
    Is it possible to edit an npc's movement speed? I have Wilson in my party and he is sloooooooowwwwwwww.
    Yes, it's possible.

    I think the simplest way to make him move quicker is to apply the monk's movement speed modifier several times. In the debug console of the game execute this command while the mouse cursor is placed over Wilson's selection circle or portrait:
    C:Eval('ApplySpellRES("SPCL812",Myself)')
    
    After 4 or 5 times he should move as quickly as a hasted character.

    If you want a cleaner solution you could open the spell OHRBEAR1.SPL in NI and remove the effect containing opcode 181 (Disallow item type) with item type "Boots". If Wilson is already a party member you also have to open the baldur.gam of your save, select Wilson and remove the same effect from his character structure. That will allow Wilson to equip the Boots of Speed (or any other boots).
  • kungfuhobbitkungfuhobbit Member Posts: 169
    How can I merge 3 bam frames into 1 please?
    The aim is to have three comets fall together in a swarm (3 frames with different centres into one frame. so there are 3 comets falling in parallel, not in series one after the other)
    I dont think this is possible with 2 extra Play 3d effect (vvc) because they wont start in the sky and fall. I think this behaviour is hardcoded in comet.pro which controls the falling spcomtrv.bam
    I cant see anything in "Edit BAM". Is this possible please?
Sign In or Register to comment.