Skip to content

New versions of NearInfinity available

1293032343544

Comments

  • kjeronkjeron Member Posts: 2,368
    edited August 2019
    Alonso wrote: »
    And yet another clarification about this: Animate Dead (SPCL106) uses a dispellable op177 for the effect SPANDE01. SPANDE01 itself is not dispellable, as you'd expect from a summoning effect, but following what you said, what matters here is that op177 is dispellable, so it follows that the spell as a whole is dispellable (which means, I guess, that the summoned skeleton can be banished with Dispel Magic). Is that correct?
    The effect has to be attached to a creature in order to be dispelled. Instantaneous effects can only be dispelled if they're timing mode is one of the "delayed" types (in which case they could be dispelled up until they trigger), otherwise they're run and done, leaving nothing to dispel (or remove by other means either).

    Consider Melf's Acid Arrow - you can't dispel the instantaneous damage, but you can dispel the delayed damage.

    The Summoning effects are instantaneous. The creature is summoned with an op68(Unsummon) effect attached to itself, on a delayed timer equivalent to the duration of the effect that summoned it (in the case of an EFF summon, it's the duration of the op177 calling it). This op68 does not inherit any aspects from it's source: it's always undispellable, "display text" option, and has all other fields not related to timing/duration at their zero/default value.

    Dispel/Remove Magic spells cannot dispel summoned creatures, though the Nishruu are scripted to kill themselves if one of three spells is cast on it (Wizard Dispel Magic, Wizard Remove Magic, Cleric Dispel Magic).
  • AlonsoAlonso Member Posts: 806
    edited August 2019
    Thank you. I was reviewing what we've discussed so far and found something that seems contradictory:
    kjeron wrote: »
    In general, when attached through op177, the fields in the EFF contribute to blocking the effect, but not removing the effect.
    It will be Dispellable only if op177 is dispellable.
    kjeron wrote: »
    Opcodes that cast spells will check Magic Resistance if that effect is flagged for it. The spell those opcodes cast will then check Magic Resistance again for its effects if any of them are flagged to.

    Dispelling works similar.

    Op177 is an opcode that casts spells. According to the first quote the "net effect" is dispellable only if op177 is dispellable. But according to the second quote the "net effect" is dispellable if either op177 or the called effect are dispellable. What did I miss?
  • AquadrizztAquadrizzt Member Posts: 1,069
    @Alonso, I can't say for certain, but technically Opcode 177 applies an EFF, not a SPL. As such, it might not follow the same logic as, say 326 (Apply Spell).
  • AlonsoAlonso Member Posts: 806
    I've created a wiki about Infinity Engine modding. For now all the content it has is what we've discussed in the last few posts of this thread: Effects and Spells and abilities. If you have a minute to spare, have a look and let me know if I got it right.
  • NiziNiziNiziNizi Member Posts: 70
    One question about STATE.IDS. What exactly are differences between STATE_DISABLED, RZ_STATE_DISABLED, D0_STATE_DISABLED, STATE_HEPLESS? I mean, which conditions are exactly needed to get into mentioned state?

    I assume there is difference between them (also looking at some mage scripts I can see both used in same script), but I can't figure out myself.

    Anybody know exactly, or is there a way to check through NI ?

    Tnx!
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    @NiziNizi

    STATEs are cumulative.

    All those STATEs that aren't a power of 2 are combinations of other STATEs.

    In particular, you can BOR (bitwise OR) the base STATEs (i.e., all those listed at offset 0x0020 of a CRE file) to form all the others.....

    For instance, STATE_HARMLESS is FEEBLEMINDED | CHARMED | IMMOBILE..... and IMMOBILE is HELPLESS | STUNNED | SLEEPING.
  • NiziNiziNiziNizi Member Posts: 70
    OK, lets see if I understand it right. If you set for example STATE_HARMLESS, that means you already covered FEEBLEMINDED state, because FEEBLEMINDED is included in STATE_HARMLESS.

    Sorry, I'm not expert there, I still do not understand how and where exactly I can check to know in detail about every state in IDS files.

    And what about D0_STATE_DISABLED, and RZ_STATE_DISABLED, what is difference there? I can see both used in same scripts.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited August 2019
    NiziNizi wrote: »
    Sorry, I'm not expert there, I still do not understand how and where exactly I can check to know in detail about every state in IDS files.

    STATE_HARMLESS is 0x00102029.

    0x00102029 = 0x00100000 (STATE_FEEBLEMINDED) BOR 0x00002000 (STATE_CHARMED) BOR 0x00000029 (STATE_IMMOBILE).

    0x00000029 = 0x00000020 (STATE_HELPLESS) BOR 0x00000008 (STATE_STUNNED) BOR 0x00000001 (STATE_SLEEPING).
  • NiziNiziNiziNizi Member Posts: 70
    edited August 2019
    Ehhhhh, now I get you. Without example I woudn't understand. Thank you.

    Now I will take a look at my State.ids.

    Ok, 0x00000029 D0_STATE_DISABLED, 0x00000029 STATE_IMMOBILE, 0x00000029 RZ_STATE_VULNERABLE. All of them are 0x00000029, this would mean is D0, Vulnerable are just same as Immobile?

    0x8010202D RZ_STATE_DISABLED. But why this have letter D at the end, what is meaning of that? Looks like probably Confused + Feebemind + Charmed + Helpless or Berserk, but this letter D confuse me.
  • The user and all related content has been deleted.
  • NiziNiziNiziNizi Member Posts: 70
    NiziNizi wrote: »
    0x8010202D RZ_STATE_DISABLED. But why this have letter D at the end, what is meaning of that? Looks like probably Confused + Feebemind + Charmed + Helpless or Berserk, but this letter D confuse me.

    If I'm not mistaken, the values are in hexadecimal, so 0x0000000D is
    0x00000008 +
    0x00000004 +
    0x00000001


    That would mean RZ_STATE_DISABLED are 0x00000008 STATE_STUNNED, 0x00000004 STATE_PANIC, 0x00000001 STATE_SLEEPING ?
  • AlonsoAlonso Member Posts: 806
    In the Abilities window (accessed from the Abilities panel of spells, for instance) the View tab lists effects in alphabetical order, but the Edit tab lists them in their actual order of application. This can be confusing. Would it be possible to display effects in order of application in both tabs?

    Original discussion here.
  • NiziNiziNiziNizi Member Posts: 70
    I now understand how work all other states. But still can't understand 0x8010202D RZ_STATE_DISABLED. I do not know what states it includes.

    All I need is to someone who knows exactly, tell it. I need it to probably include in my scripts, but I can't include when I'm not clear about it.
  • AndreaColomboAndreaColombo Member Posts: 5,530
    edited September 2019
    @argent77 - Is there a particular reason why Near Infinity shows a lot more entries as "Unknown" in CRE files' sounds when browsing the original BG1 engine as opposed to, say, the original BG2? Those entries that are not "Unknown" appear to be the same and in the same order across the two engines, so I would expect the others to also be common?

    There are two entries that are likely to be "Emerge" and "Hide" for the Ankheg, but they do not appear to be the ones to which those sounds are attached in vanilla BG1 as they don't play frame-by-frame with their animation. I'll be experimenting with the "Unknown" slots until I find them and let you know which ones they are.
  • argent77argent77 Member Posts: 3,476
    Sound slot labels in CRE files are auto-generated from entries in SNDSLOT.IDS or SOUNDOFF.IDS. For BG1 you could add missing entries to SOUNDOFF.IDS to reduce the number of Unknowns in NI.
  • NiziNiziNiziNizi Member Posts: 70
    Can anyone finally clear what exactly 0x8010202D RZ_STATE_DISABLED consist of? Just like member Luke93 simply clarified for some other states.

    I can take guesses based on existing input, but I can't make decision while writing scripts do I need that state or not (maybe I already covered it by using number of others) based just on my guesses, when I'm not familiar with this hexademical and thus can't be 100% sure.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    NiziNizi wrote: »
    Can anyone finally clear what exactly 0x8010202D RZ_STATE_DISABLED consist of?

    Are you perhaps talking about IWD2? Because there's no STATE named like that in BG/IWD1 games – there's 0x8010202D STATE_DISABLED (without "RZ_".....)
  • NiziNiziNiziNizi Member Posts: 70
    I talk about Baldurs Gate, EET.

    Now I just check STATE.IDS with Near Infinity. There are STATE_DISABLED, and RZ_STATE_DISABLED, both are same number 0x8010202D.

    Every SCS script I inspected so far I see RZ_STATE_DISABLED are being used.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    NiziNizi wrote: »
    I talk about Baldurs Gate, EET.

    I see, I've never used EET.....

    Anyway, STATE_DISABLED should be:
    0x8010202D = 0x80000000 [STATE_CONFUSED] + 0x00100000 [STATE_FEEBLEMINDED] + 0x00002000 [STATE_CHARMED] + 0x00000029 [STATE_IMMOBILE] + 0x00000004 [STATE_PANIC]
  • argent77argent77 Member Posts: 3,476
    RZ_STATE_DISABLED sounds like a mod-added STATE.IDS entry. If there are multiple IDS names pointing to the same numeric value, NI takes the first one available (which isn't necessarily the first in the IDS file). It doesn't make a difference for the games, since they work only with the numeric values.

    As someone already explained above, each set bit of the value refers to a different state. To see which states are included in the number, you can convert it into binary representation (e.g. with an online converter). Then take note of every set bit (=1) in the binary value, counting from right to left, and look up the corresponding bit positions in the states table below.

    For STATE_DISABLED (or RZ_STATE_DISABLED):
    0x8010202D (hex) => 10000000000100000010000000101101 (bin) => bits 0,2,3,5,13,20,31
    => STATE_SLEEPING, STATE_PANIC, STATE_STUNNED, STATE_HELPLESS, STATE_CHARMED, STATE_FEEBLEMINDED, STATE_CONFUSED

    States table:
    Bit   State
    0     STATE_SLEEPING
    1     STATE_BERSERK
    2     STATE_PANIC
    3     STATE_STUNNED
    4     STATE_INVISIBLE
    5     STATE_HELPLESS
    6     STATE_FROZEN_DEATH
    7     STATE_STONE_DEATH
    8     STATE_EXPLODING_DEATH
    9     STATE_FLAME_DEATH
    10    STATE_ACID_DEATH
    11    STATE_DEAD
    12    STATE_SILENCED
    13    STATE_CHARMED
    14    STATE_POISONED
    15    STATE_HASTED
    16    STATE_SLOWED
    17    STATE_INFRAVISION
    18    STATE_BLIND
    19    STATE_DISEASED
    20    STATE_FEEBLEMINDED
    21    STATE_NONDETECTION
    22    STATE_IMPROVEDINVISIBILITY
    23    STATE_BLESS
    24    STATE_CHANT
    25    STATE_DRAWUPONHOLYMIGHT
    26    STATE_LUCK
    27    STATE_AID
    28    STATE_CHANTBAD
    29    STATE_BLUR
    30    STATE_MIRRORIMAGE
    31    STATE_CONFUSED
    
  • NiziNiziNiziNizi Member Posts: 70
    Thank you everyone! This info was helpful for me in this moment.

    Yes, RZ_STATE_DISABLED is definitely mod-added. I already did check non-modded BG2 install with NI, and take a look at STATE.IDS there, it doesn't have that state.

    I used in scripts :

    !StateCheck(NearestEnemyOf(Myself),STATE_FEEBLEMINDED)
    !StateCheck(NearestEnemyOf(Myself),STATE_STUNNED)
    !StateCheck(NearestEnemyOf(Myself),STATE_CHARMED)
    !StateCheck(NearestEnemyOf(Myself),D0_STATE_DISABLED)
    !StateCheck(NearestEnemyOf(Myself),STATE_CONFUSED)
    !StateCheck(NearestEnemyOf(Myself),STATE_PANIC)

    Looks like it cover exactly same as STATE_DISABLED (RZ_STATE_DISABLED). Because D0_STATE_DISABLED is exactly same as 0x00000029 STATE_IMMOBILE. Luckily, looks like I won't need to rework that part because it happened to cover same.

    I excluded BERSERK for reason (and I think states I included shouldn't include Berserk, when looking at numbers, I will test it more when comes to that part to confirm), because such character still can attack, but I lack enough testing about Berserk at moment. Have to test more.
    All other mentioned states, I can confirm AI can recognise it no problem, so for example I can tune it to kill disabled ones when there is valid, non-disabled, target not present in visual range (on order of priority 1. Confused- still pose some threat, 2-all others disabled, 3-Panic as last priority because of vasting time pursuing such running around target). Berserk would ideally come between non-disabled and Confused priority, but I have to check more on it.
  • NiziNiziNiziNizi Member Posts: 70
    Tested immediately for Berserk, simply by using Minsc I spawn. If his berserking (when you lose control over him) is proper Berserk state, than I can say that six states I used (mentioned in above post) do not include Berserk.

    Tested also by test creature, StateCheck(NearestEnemyOf(Myself),STATE_BERSERK) is recognised using such lines, no problem.

    But when I think more, maybe I have to correct myself. Not sure treating Berserk between non-disabled and Confused would be best decision. Besides Minsc berserk, I'm not clear what exactly cause creature to go into berserking (I seen that very very rarely in game). What if berserking character is buffed, improved hasted, etc.. and in modded game, there is tons overpowered items which for example grants you + number of APR bonus. Now I thing such creature should be treated as valid target (based on all other stats for deciding on target of course).
  • DavidWDavidW Member Posts: 823
    Just to clarify: entries in IDS files are purely there for human readability, The engine doesn’t know about them: when a script is compiled, any IDS entry is just replaced by its numerical value. If an IDS file has multiple entries with the same numerical value (as with RZ_STATE_DISABLED and plain STATE_DISABLED) then the decompiler has to pick one, but again, the game engine doesn’t care. If you add

    0x8010202D MY_AWESOME_STATE

    to state.ids and then view SCS scripts, you’ll find that they all use MY_AWESOME_STATE, but as far as the game is concerned nothing will have changed.
  • NiziNiziNiziNizi Member Posts: 70
    David, tnx for information and making things more clear. It is appreciated ;)
  • NiziNiziNiziNizi Member Posts: 70
    One more question comes into my mind.. if Domination is cast upon some target, and target fail its Save and get dominated.., it that case, which spell state cover that?

    I did also check splstate.ids, stats.ids, but did not found anything about Domination.

    I would suspect maybe 0x00000020 STATE_HELPLESS, or maybe it falls under STATE_CHARMED. But if anyone know for sure, please let me know.
  • BubbBubb Member Posts: 1,005
    @NiziNizi: Domination, or more specifically the Opcode #5 that it uses for the charm effect, sets 0x2000 (STATE_CHARMED). That appears to be the only state that's set.
  • NiziNiziNiziNizi Member Posts: 70
    Bubb wrote: »
    @NiziNizi: Domination, or more specifically the Opcode #5 that it uses for the charm effect, sets 0x2000 (STATE_CHARMED). That appears to be the only state that's set.

    Tnx for quick and clear explain.
  • AciferAcifer Member Posts: 194
    edited September 2019
    The NI Bam converter is a fantastic tool for fast creature bam rearranging, thank you so much for its implementation.
    One note to an issue mentioned here:
    Ulb wrote: »
    It's probably not something that concerns many modders but newer versions of NI seem to still have issues with the palette of animation bams. It appears as if the color index number is just randomly changed, at least for the shadow color.
    When resizing or recentering "darker" creature animations, some of the blackest palette entries are messed up- especially the palette entry #1 (shadow color) with a RGB value 0-0-0 is out of place, so the shadow color isn't shown properly ingame after the conversion.
    I could handle that problem by assigning a temporary "new" shadow color to palette entry #1 with an extreme value (e.g. RGB 255-0-0), converting the Bams with the Bam converter and re-coloring the palette entry back to RGB 0-0-0 after the conversion.
    The shadow color stays in the same place all the time and everything works fine.


    Post edited by Acifer on
  • switswit Member, Translator (NDA) Posts: 495
    edited September 2019
    I've noticed that the engine sometimes refers to very high strrefs numbers, far outside TLK range. For example 15729574 in bg2ee is "Backstab Damage" (same as 12128). I've checked it in NI and to my surprise NI is able to correctly display these strings too. @argent77, how exactly NI converts this value? I assume the big strref still somehow refers to normal TLK range. It doesn't seems to be simple subtraction since the next and previous strings are different compared to TLK order.
  • UlbUlb Member Posts: 295
    Acifer wrote: »
    ...
    I could handle that problem by assigning a temporary "new" shadow color to palette entry #1 with an extreme value (e.g. RGB 255-0-0), converting the Bams with the Bam converter and re-coloring the palette entry back to RGB 0-0-0 after the conversion.
    The shadow color stays in the same place all the time and everything works fine.

    You can just use an older version of NI to edit bam files, they work fine and there won't be any extra work required for you.

Sign In or Register to comment.