Skip to content

New versions of NearInfinity available

1313234363744

Comments

  • kjeronkjeron Member Posts: 2,368
    edited December 2019
    Luke93 wrote: »
    Unless I'm missing something, most values between 255 and 65536 will end up in the first category. Is that correct? I think it would be clearer if you added an example (how it works and why one'd want to use it).
    I don't really think there is any reason to want to use p2=1 it with p1 values > 255, or even >100.
    If 'Parameter1' is 65536, it will deal damage while the target's current HP is between 0 and 50, 100 and 150, 200 and 250, etc...
    If 'Parameter1' is 131072, it will deal damage while the target's current HP is between 0 and 25, 50 and 75, 100 and 125, etc...
    Both at a rate of 1/s. Dropping out of those ranges does not end the effect, damage will resume if they are later healed/damaged back into one of those ranges.

    This function (param2=1) was intended to damage a target for a total given percentage of maximum health (See description on Arrows of Biting), but has never worked that way, and is why it's mechanics are so weird.
    The arrows, in their current form, damage a target until their current HP < 3.33 (100 / 30) , or their duration expires (it's on redmine somewhere, if they haven't purged it yet).
    Luke93 wrote: »
    To sum up, the opcodes that behave like that are: #25 (Poison) and #98 (Regeneration). #78 (Disease) and #272 (Use EFF file on condition) seem to be slightly different. In particular:
    • op#78 – when param#2 = 1, the damage dealt is 'Parameter1' per rounds (instead of per seconds)
    • op#272 – param#2 = 1 is unknown
    Is that correct? Are there any other significant differences?
    In the EE's, op25, 78, and 98 share the same p2=1 behavior.
    In the EE's, op272 does not AFAIK have any function when p2=1, thought the effect is still present (it doesn't just instantly terminate), and will generate a portrait icon is special is non-zero.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited December 2019
    kjeron wrote: »
    Luke93 wrote: »
    To sum up, the opcodes that behave like that are: #25 (Poison) and #98 (Regeneration). #78 (Disease) and #272 (Use EFF file on condition) seem to be slightly different. In particular:
    • op#78 – when param#2 = 1, the damage dealt is 'Parameter1' per rounds (instead of per seconds)
    • op#272 – param#2 = 1 is unknown
    Is that correct? Are there any other significant differences?
    In the EE's, op25, 78, and 98 share the same p2=1 behavior.
    In the EE's, op272 does not AFAIK have any function when p2=1, thought the effect is still present (it doesn't just instantly terminate), and will generate a portrait icon is special is non-zero.

    What about p2=0,2,3,4 and the special field? Do they share the same behavior?

    If I got it right, the only difference between op#25, #78, #98 and #272 should be the relation with opcode #329 (which affects only op#25) and that detail about p2=1 and op#272 – Is that correct?
  • kjeronkjeron Member Posts: 2,368
    The special field determines the portrait icon for all 4 opcodes regardless of parameter2. The only difference between the opcodes special field is which icon is used as the default (#0). (Poison uses the poison icon, the others default to "none").

    The other major difference is op78 (Disease) p2 values 4-13, which are completely unrelated to the other 3 opcodes. Used for ability score drain, mold touch, slow, and contagion.
    The ability score drain effects are rather simple - reduces said ability score by 'parameter1'.
    The Slow effect is no different from that caused by op40, including it's stacking interaction with haste, except that it is blocked/removed as a disease, not as a slow effect.
    Contagion is a composite of Strength, Dexterity, Charisma drain and the Slow effect, each ability score reduced by 'parameter1'.
    Mold touch is complicated and not consisted across the EE games (it currently does not match what is mentioned on IESDP), but the general idea is that it deals (x or xd6) damage and applies the resource SPL every (round or second) for either 1 round (single) or across multiple rounds dealing less each round (decrement).
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited December 2019
    kjeron wrote: »
    The other major difference is op78 (Disease) p2 values 4-13, which are completely unrelated to the other 3 opcodes.

    Unlike the other 3 opcodes, this one lacks the behavior that involves EFF files and 'Parameter3', right?
    kjeron wrote: »
    Mold touch is complicated and not consisted across the EE games (it currently does not match what is mentioned on IESDP), but the general idea is that it deals (x or xd6) damage and applies the resource SPL every (round or second) for either 1 round (single) or across multiple rounds dealing less each round (decrement).

    I see, so NI's description of the special field is wrong too...
    When you say it deals (x or xd6) damage, that 'x' is 'parameter1', right?
  • kjeronkjeron Member Posts: 2,368
    edited December 2019
    Luke93 wrote: »
    Unlike the other 3 opcodes, this one lacks the behavior that involves EFF files and 'Parameter3', right?
    Yes.
    Luke93 wrote: »
    I see, so NI's description of the special field is wrong too...
    When you say it deals (x or xd6) damage, that 'x' is 'parameter1', right?
    If p2=11(single), it's always '1'.
    If p2=12(decrement), it depends on the game:
    IWDEE uses 'parameter1' for x, and calculates duration as (6 * parameter1).
    BGEE calculates x from (duration / 6). (I think BG2EE uses this one as well).
    If you set (duration = 6 * parameter1) it should junction the same in both games.
    'parameter4' determines whether it deals damage every second or every round, and whether it deals x or xd6 damage.
    p4 = 0 = xd6 per round.
    p4 = 65536+ (even) = x per round.
    p4 = 65537+ (odd) = x per second.
    regardless, the value of x decrements only once per round.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    @kjeron

    Thank you, everything is hopefully clear now...

    I've got other questions though:
    1. What are the differences between op#218 and op#314? As far as op#218 is concerned, is it correct that if p2=1, then the total number of skins is: p1 + dice values (i.e., it behaves like op#12)?
    2. It seems that if a CRE is affected by op#39, then STATE_REALLY_DEAD returns true. Intended or bug?
    3. As far as ITM headers are concerned, what are exactly Alternative dice thrown (located at offset 0x11) and Alternative damage bonus (located at offset 0x13)?
    4. Is it true that op#45 (Stun) automatically provides the stun portrait icon?
    5. Is it true that both op#175 and op#185 automatically provide the "Held" string (or, better, the string specified by STRREF_EFFECT_HOLD in ENGINEST.2da)?
  • kjeronkjeron Member Posts: 2,368
    edited January 2020
    Luke93 wrote: »
    [*] What are the differences between op#218 and op#314? As far as op#218 is concerned, is it correct that if p2=1, then the total number of skins is: p1 + dice values (i.e., it behaves like op#12)?
    Yes to dice values.
    Each sets a different STAT (218:88, 314:199), important for detecting them through scripts.
    #314 doesn't support the dice values or a customizable portrait Icon through the Special Field.
    The Juggernaut Golem 'TOMEGOL4.CRE' is scripted by 'TOMEGOL4.BCS' to Kill() itself if its Summoner and none of the Players Party have stat #199 set to a non-zero value.
    Stat 199 can also be set by op282 (Modify Scripting States), though is not officially supported, setting it this way provides all the benefits of stoneskin, but it does not decrement, nor does it provide the "stone" overlay color.
    Luke93 wrote: »
    [*] It seems that if a CRE is affected by op#39, then STATE_REALLY_DEAD returns true. Intended or bug?
    I don't see such behavior in my game, whether op39 is used for sleep or unconsciousness.
    STATE_REALLY_DEAD should be 0x00000FC0 in STATE.IDS
    Luke93 wrote: »
    [*] As far as ITM headers are concerned, what are exactly Alternative dice thrown (located at offset 0x11) and Alternative damage bonus (located at offset 0x13)?
    Unused AFAIK.
    Luke93 wrote: »
    [*] Is it true that op#45 (Stun) automatically provides the stun portrait icon?
    Yes.
    Luke93 wrote: »
    [*] Is it true that both op#175 and op#185 automatically provide the "Held" string (or, better, the string specified by STRREF_EFFECT_HOLD in ENGINEST.2da)?
    Sadly yes (both), it even overrides the entries in EFFTEXT.2DA.

  • Looks like NI sometimes allows filenames of over 8 characters. Not sure in what circumstances though. Made EEKeeper crash when I loaded the new resources.

    ybpyphnyv2nd.png
  • argent77argent77 Member Posts: 3,474
    Looks like NI sometimes allows filenames of over 8 characters. Not sure in what circumstances though. Made EEKeeper crash when I loaded the new resources.
    Do you have menu "Options -> Show Unknown Resource Types" enabled? In this case the entry counts as "unknown resource" and should not be available for resource-specific operations. Other game editors (and the game itself) should ignore these files. They were probably installed by some mods, maybe as marker files or simply by accident.
  • Yes, that option was enabled by default when I first started up the program. The files in the screenshot were in the override folder, and were created by me using "Add copy of".
  • majbermajber Member Posts: 53
    Can anyone please provide step by step guide how to build Near Infinite (compile) with build.xml (latest commits)?
    I cant start Ant -> that program should compile? I dont know now anything.
    Please help
    That my NearInfinite dir: https://imgur.com/a/UXho8Vp
  • argent77argent77 Member Posts: 3,474
    @majber If you have correctly installed JDK (8 or later) and Apache Ant then calling "ant" from the source base directory (where build.xml is located) should be enough to build NearInfinity.jar. You might see a couple of warnings if you compile it with more recent JDK versions, but the build process should complete successfully (haven't tested yet with JDK 13 though).

    But it's not really necessary to build NI yourself unless you want to modify the sources or test the latest experimental changes. Precompiled binaries can be downloaded from the link in the first post of this thread.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited April 2020
    argent77 wrote: »
    • Allow negative numbers in parameter 1 of opcode 233

    The same should hold for opcode #1 (Modify attacks per round) too...

    Moreover, I'd rename op#318 and op#324 to "Protection from resource" and "Immunity to resource and message" respectively (they can block SPL, ITM and EFF files). Op#206 instead can block SPL and EFF files (but only if "Resource type" is 1 – Spell), so I'd leave "Protection from spell" here...
  • argent77argent77 Member Posts: 3,474
    Luke93 wrote: »
    argent77 wrote: »
    • Allow negative numbers in parameter 1 of opcode 233

    The same should hold for opcode #1 (Modify attacks per round) too...
    Opcode 233 is special because of the complicated encoding scheme of active and original class values. For opcode 1 you can right-click on the field and select "Edit as number" to enter numeric values directly, including negative values.

    Luke93 wrote: »
    Moreover, I'd rename op#318 and op#324 to "Protection from resource" and "Immunity to resource and message" respectively (they can block SPL, ITM and EFF files).
    Sounds reasonable. Will be fixed.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited April 2020
    argent77 wrote: »
    Opcode 233 is special because of the complicated encoding scheme of active and original class values. For opcode 1 you can right-click on the field and select "Edit as number" to enter numeric values directly, including negative values.

    I see. The "problem" is that once you save changes, NI displays "Error (-2)" (or whatever value you put)... I know it's a purely cosmetic issue, but still kinda bad...?
  • argent77argent77 Member Posts: 3,474
    Luke93 wrote: »
    argent77 wrote: »
    Opcode 233 is special because of the complicated encoding scheme of active and original class values. For opcode 1 you can right-click on the field and select "Edit as number" to enter numeric values directly, including negative values.

    I see. The "problem" is that once you save changes, NI displays "Error (-2)" (or whatever value you put)... I know it's a purely cosmetic issue, but still kinda bad...?
    Yes, that's a bit misleading. I'll see if I can come up with a solution.
  • GwendolyneGwendolyne Member Posts: 461
    edited April 2020
    Very nice feature: for now, I always use WeiDU for this kind of search as NI did not allow them. But I don't know how you will manage to propose an intuitive search canvas.
  • argent77argent77 Member Posts: 3,474
    Yeah, that's actually the biggest challenge I have to overcome. Many settings have additional tooltips with helpful hints and clarifications. I will also add a section to the NearInfinity Wiki eventually. The original "Extended Search" will still be available though, since it's easier to use for a quick and simple search.
  • argent77argent77 Member Posts: 3,474
    The Near Infinity Wiki has been updated!

    It should now reflect the current state of Near Infinity's feature set. Several outdated links have been fixed, and documentation for the upcoming "Advanced Search" has been added.
  • jasteyjastey Member Posts: 2,776
    Thank you for your continuous support of NI!
  • BalquoBalquo Member, Developer Posts: 2,746
    Thank you indeed for the continuous updates!

    Was just searching now and noticed this bug remains:
    Balquo wrote: »
    Found a small issue I believe. Using StringRef Lookup and search for 27505 (bgee string) it will find 6 hits. However, opening any one of these hits will open up the first hit only - In this case being state 1.

  • argent77argent77 Member Posts: 3,474
    Balquo wrote: »
    Thank you indeed for the continuous updates!

    Was just searching now and noticed this bug remains:
    Balquo wrote: »
    Found a small issue I believe. Using StringRef Lookup and search for 27505 (bgee string) it will find 6 hits. However, opening any one of these hits will open up the first hit only - In this case being state 1.
    Ah yes, that one is still buried in my (ever-growing) todo list. I'll look into it.
  • rkocourrkocour Member Posts: 34
    edited May 2020
    Looking for some help. Trying to edit a custom item to add an ability to cast a spell once per day. I've tried a couple ways, but every time i actually add the ability, the item corrupts and i get and error reading item null.

    Even copying an ability from an existing item to the item in question, corrupts the file. The following errors throw in the debug console. I'm curious if i'm missing something obvious.
    Error reading PCRING01.ITM
    java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at org.infinity.resource.ResourceFactory.getResource(Unknown Source)
    at org.infinity.resource.ResourceFactory.getResource(Unknown Source)
    at org.infinity.gui.ResourceTree.valueChanged(Unknown Source)
    at java.desktop/javax.swing.JTree.fireValueChanged(JTree.java:2967)
    at java.desktop/javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3456)
    at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:641)
    at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1111)
    at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:297)
    at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:191)
    at java.desktop/javax.swing.JTree.setSelectionPath(JTree.java:1656)
    at java.desktop/javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2736)
    at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:4016)
    at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3955)
    at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6633)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
    at java.desktop/java.awt.Component.processEvent(Component.java:6401)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5012)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4844)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4919)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4545)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4489)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2764)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4844)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Caused by: java.nio.BufferUnderflowException
    at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:690)
    at java.base/java.nio.HeapByteBuffer.get(HeapByteBuffer.java:164)
    at org.infinity.datatype.Bitmap.read(Unknown Source)
    at org.infinity.datatype.Bitmap.<init>(Unknown Source)
    at org.infinity.resource.itm.Ability.read(Unknown Source)
    at org.infinity.resource.AbstractStruct.<init>(Unknown Source)
    at org.infinity.resource.AbstractStruct.<init>(Unknown Source)
    at org.infinity.resource.AbstractAbility.<init>(Unknown Source)
    at org.infinity.resource.itm.Ability.<init>(Unknown Source)
    at org.infinity.resource.itm.ItmResource.read(Unknown Source)
    at org.infinity.resource.AbstractStruct.<init>(Unknown Source)
    at org.infinity.resource.itm.ItmResource.<init>(Unknown Source)
    ... 49 more

    EDIT: Removing existing effects, adding the item ability and then adding effects seems to work. Is it a case of offsets not setting right if abilities and effects aren't added in a certain order?
  • argent77argent77 Member Posts: 3,474
    @rkocour Thanks for the report. I was able to reproduce this issue.

    You're right, currently abilities and global effects must be added in the correct order to an item that doesn't contain any abilities yet (add ability first). Otherwise the resource is corrupted when adding ability effects. Btw, SPL resources are affected by this issue as well.

    I'll see if I can fix it.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    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...
Sign In or Register to comment.