Skip to content

General mod Questions thread

16465676970

Comments

  • BubbBubb Member Posts: 1,005
    edited November 2019
    I’d like to eliminate the bonus hit points...

    An idea about this bit, not sure about the rest.

    The engine attaches Opcode #18 directly to the Opcode #192 target. A zero-duration Opcode #101 with param2 = 18, placed before the Opcode #192, should prevent the Opcode #18 from sticking.

    Unfortunately, that solution makes it so Opcode #18 can't be used at all in the current spell effects list, due to a bug with Opcode #101 not clearing out its internal immunity list correctly, (relevant if you wanted to customize the hitpoint modification, for example).
  • The user and all related content has been deleted.
  • ArthasArthas Member Posts: 1,091
    Question: when a new patch for the game is released, e.g patch 2.6, does every mod need to be updated to be compatible with the new version? And if yes, what warrants specifically the "changes" whenever a game update happens?

  • jasteyjastey Member Posts: 2,781
    I don't understand your second question.

    The obvious answer to question 1 would be "that depends on the changes the patch introduces" and "probably not all but most". To phrase it differently: to answer this question, one would need to know all mods and all changes of the patch 2.6.

    For mods which are NPCs and quest mods for example it would be especially important if patch 2.6 changes state numbering again and changes the way quests triggers work (as they did for Thrix in SoD in the 2.5 patch, for example), these would need to be adjusted. If there are no changes to that, they should work without changes, unless BeamDog changed something that borks the current way of implementing kits or the likes.
  • [Deleted User][Deleted User] Posts: 0
    edited November 2019
    The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    That's the main reason why I'm asking since November what will be 2.6 changes - want to prepare myself ti whatever is necessary.

    For instance, 2.5 made some under-the-hood UI changes necessary to mod some spells.

    But Beamdog refuses to answer.
  • The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    Raduziel wrote: »
    That's the main reason why I'm asking since November what will be 2.6 changes -

    ha ha... November 2018? 2017? How many years have we been waiting for this patch? :confused:

    Beamdog's initial ETA was December, 2018. I was referring to November of the same year.
  • fluke13fluke13 Member Posts: 399
    Does anyone know how to create a creature with a rectangular base, instead of circle?
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited December 2019
    Bubb wrote: »
    @Luke93:
    Luke93 wrote: »
    By the way, if you / anyone is wondering what exactly all the combined EAs include, here's a full listing:
    [ANYONE] =>
    1 INANIMATE
    2 PC
    3 FAMILIAR
    4 ALLY
    5 CONTROLLED
    6 CHARMED
    28 GOODBUTRED
    29 GOODBUTBLUE
    128 NEUTRAL
    201 EVILBUTGREEN
    202 EVILBUTBLUE
    255 ENEMY
    254 CHARMED_PC

    [GOODCUTOFF] =>
    1 INANIMATE
    2 PC
    3 FAMILIAR
    4 ALLY
    5 CONTROLLED
    6 CHARMED
    28 GOODBUTRED
    29 GOODBUTBLUE

    [NOTGOOD] =>
    128 NEUTRAL
    201 EVILBUTGREEN
    202 EVILBUTBLUE
    255 ENEMY
    254 CHARMED_PC

    [ANYTHING] =>
    1 INANIMATE
    2 PC
    3 FAMILIAR
    4 ALLY
    5 CONTROLLED
    6 CHARMED
    28 GOODBUTRED
    29 GOODBUTBLUE
    128 NEUTRAL
    201 EVILBUTGREEN
    202 EVILBUTBLUE
    255 ENEMY
    254 CHARMED_PC

    [NOTEVIL] =>
    1 INANIMATE
    2 PC
    3 FAMILIAR
    4 ALLY
    5 CONTROLLED
    6 CHARMED
    28 GOODBUTRED
    29 GOODBUTBLUE
    128 NEUTRAL

    [EVILCUTOFF] =>
    201 EVILBUTGREEN
    202 EVILBUTBLUE
    255 ENEMY
    254 CHARMED_PC
    1. So there's no difference between ANYTHING and ANYONE?
    2. As you know, the trigger 'NearestEnemyOfType()' takes object selectors as argument. My question is: what's the point in setting an EA value (if any)? I mean, is there a point in writing something like 'NearestEnemyOfType(CHARMED.0.0.MONK)'? Shouldn't that 'Enemy' in the name of the trigger automatically pick all those object selectors of opposite allegiance (with respect to the active creature)? How does that trigger work exactly?
  • fluke13 wrote: »
    Does anyone know how to create a creature with a rectangular base, instead of circle?

    I don't know but do you want to create the infamous gelatinous cube?
  • BubbBubb Member Posts: 1,005
    Luke93 wrote: »
    1. So there's no difference between ANYTHING and ANYONE?
    2. As you know, the trigger 'NearestEnemyOfType()' takes object selectors as argument. My question is: what's the point in setting an EA value (if any)? I mean, is there a point in writing something like 'NearestEnemyOfType(CHARMED.0.0.MONK)'? Shouldn't that 'Enemy' in the name of the trigger automatically pick all those object selectors of opposite allegiance (with respect to the active creature)? How does that trigger work exactly?

    1) That is correct - while they are separate EA values, they each define the same behavior.

    2) Also correct, NearestEnemyOfType auto-populates the EA field of the object selector and immediately evaluates it, so it's useless to define the EA manually.
  • fluke13fluke13 Member Posts: 399
    fluke13 wrote: »
    Does anyone know how to create a creature with a rectangular base, instead of circle?

    I don't know but do you want to create the infamous gelatinous cube?

    Actually it's for my Ice Wall spell, currently I'm using three invisible barrels as a work around. I've also been playing around with the idea of using creatures as destructible environments like walls, but this would really need rectangular bases ?
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    Bubb wrote: »
    2) Also correct, NearestEnemyOfType auto-populates the EA field of the object selector and immediately evaluates it, so it's useless to define the EA manually.

    If that's the case, then I guess the same holds for 'NearestMyGroupOfType' and the SPECIFIC field, i.e.: 'NearestMyGroupOfType' auto-populates the SPECIFIC field of the object selector and immediately evaluates it, so it's useless to define the SPECIFIC manually => Is that correct?
  • BubbBubb Member Posts: 1,005
    Luke93 wrote: »
    If that's the case, then I guess the same holds for 'NearestMyGroupOfType' and the SPECIFIC field, i.e.: 'NearestMyGroupOfType' auto-populates the SPECIFIC field of the object selector and immediately evaluates it, so it's useless to define the SPECIFIC manually => Is that correct?

    Yep!
  • OneHandedSquireOneHandedSquire Member Posts: 4
    Hey folks,

    I've been trying to use Near Infinity to create a weapon that will cast a spell on a backstab, cast a different spell on a crit, and cast yet another spell on a backstab that is also a crit. The first two were easy enough to figure out, but getting it to do something special on a critical backstab is proving insurmountable. Any of you folks who actually know what you're doing have any ideas?
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited February 2020
    @Bubb

    I've recently found out that 'SpellRES()', 'ForceSpellRES()', 'ReallyForceSpellRES()' and the like support a third parameter, i.e.: I:CastingLevel (in so doing, you can instruct a creature to cast the specified spell as if it were at the specified level – that's really handy).

    My question is: can I safely APPEND the following

    31 SpellRES(S:RES*,O:Target*,I:CastingLevel)
    113 ForceSpellRES(S:RES*,O:Target*,I:CastingLevel)
    // etc...
    

    to ACTION.IDS without the risk of screwing something up?

    Could you also confirm that the same does not hold for the non-RES versions – for instance, '113 ForceSpell(O:Target,I:Spell*Spell,I:CastingLevel)' does nothing (i.e., the spell will be cast using creature's level instead of the specified one...)
    Post edited by _Luke_ on
  • BubbBubb Member Posts: 1,005
    @Luke93: Correct, the RES variants treat the first I: parameter as the casting level. The non-res variants treat the first I: as the spell id - so it doesn't apply to them.

    There should be no issue appending the altered signature(s), (just don't remove the originals and you should be fine). I guess it depends on how the script parser you are working with handles it, but NI works just fine, so I assume the rest will too.
  • kjeronkjeron Member Posts: 2,368
    @Luke93 Add them using different labels to avoid conflicts:
    31 SpellLevelRES(S:RES*,O:Target*,I:CastingLevel)
    113 ForceSpellLevelRES(S:RES*,O:Target*,I:CastingLevel)
    
    However, I've only ever seen the level version work on the Force-RES variants:
    113 ForceSpellLevelRES(S:RES*,O:Target*,I:CastingLevel)
    114 ForceSpellPointLevelRES(S:RES*,P:Target*,I:CastingLevel)
    181 ReallyForceSpellLevelRES(S:RES*,O:Target*,I:CastingLevel)
    240 ReallyForceSpellDeadLevelRES(S:RES*,O:Target*,I:CastingLevel)
    337 ReallyForceSpellPointLevelRES(S:RES*,P:Target*,I:CastingLevel)
    
    Luke93 wrote: »
    Could you also confirm that the same does not hold for the non-RES versions – for instance, '113 ForceSpell(O:Target,I:Spell*Spell,I:CastingLevel)' does nothing (i.e., the spell will be cast using creature's level instead of the specified one...)
    Most likely because it expects the level value in the same integer slot as the spell.
    Here's SpellLevelRES("SPWI112",(target),1):
    1 0 0 0 0"spwi112" ""
    
    While this is SpellLevel((target),2112,1) (2112 = SPWI112):
    2112 0 0 1 0"" ""
    
  • BubbBubb Member Posts: 1,005
    edited February 2020
    @kjeron: What are the conflicts you mention? Is it just caution, or does the engine / a tool screw up with same-named entries?
    Post edited by Bubb on
  • kjeronkjeron Member Posts: 2,368
    AFAIK it's not an issue for BCS scripts, since they're already compiled, but for dialogs and weidu, it will cause problems.
    The engine will only look at the first instance of a unique label when running dialogs, while weidu expects you to use the last instance.
    A dialog with the action:
    ForceSpellRES("SPPR111",Myself)
    
    will fail if they are ordered in ACTION.IDS as:
    113 ForceSpellRES(S:RES*,O:Target*,I:CastingLevel)
    113 ForceSpellRES(S:RES*,O:Target)
    
    while dialog with the action
    ForceSpellRES("SPPR111",Myself,15)
    
    will fail they are ordered in ACTION.IDS as
    113 ForceSpellRES(S:RES*,O:Target)
    113 ForceSpellRES(S:RES*,O:Target*,I:CastingLevel)
    
    Weidu's problem is similarly related to the ordering, except it will still install successfully so long as both action variants are still listed in ACTION.IDS, though it will still spit out parse warnings.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited February 2020
    kjeron wrote: »
    However, I've only ever seen the level version work on the Force-RES variants:
    113 ForceSpellLevelRES(S:RES*,O:Target*,I:CastingLevel)
    114 ForceSpellPointLevelRES(S:RES*,P:Target*,I:CastingLevel)
    181 ReallyForceSpellLevelRES(S:RES*,O:Target*,I:CastingLevel)
    240 ReallyForceSpellDeadLevelRES(S:RES*,O:Target*,I:CastingLevel)
    337 ReallyForceSpellPointLevelRES(S:RES*,P:Target*,I:CastingLevel)
    

    Yep, you're right, just tested.
    Hopefully, it's not that bad. I find them useful when scripting creatures like Balors – if you follow P&P, you should set Level to 13 but Caster Level should be 20 => 'ReallyForceSpellLevelRES("RES",(target),20)'.
    In so doing, you can avoid creating aliases of existing SPLs that scale with level / setting the creature's Level to 20 (see OHNVBALR.CRE).
    kjeron wrote: »
    Most likely because it expects the level value in the same integer slot as the spell.
    Here's SpellLevelRES("SPWI112",(target),1):
    1 0 0 0 0"spwi112" ""
    
    While this is SpellLevel((target),2112,1) (2112 = SPWI112):
    2112 0 0 1 0"" ""
    

    Sorry, what are you saying exactly? Is it actually possible? I mean, it's not that relevant since the RES variant also works for SPELL.IDS entries, but...
    Post edited by _Luke_ on
  • kjeronkjeron Member Posts: 2,368
    Luke93 wrote: »
    Sorry, what are you saying exactly? Is it actually possible? I mean, it's not that relevant since the RES variant also works for SPELL.IDS entries, but...
    Not possible, it's as @Bubb described - the non-RES versions reserve the first integer slot for the spell (2112) instead of caster level, so it doesn't work.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited February 2020
    kjeron wrote: »
    Luke93 wrote: »
    Sorry, what are you saying exactly? Is it actually possible? I mean, it's not that relevant since the RES variant also works for SPELL.IDS entries, but...
    Not possible, it's as @Bubb described - the non-RES versions reserve the first integer slot for the spell (2112) instead of caster level, so it doesn't work.

    Fine, I apology for the misunderstanding.
  • RatatoskrRatatoskr Member Posts: 726
    Does anyone know how I can give a character the ability to cast a spell? I already created an innate spell that will hopefully do what I want, but I need the character to be able to cast it once per day and I'm not sure what code to use.

    I'm thinking it's ADD_KNOWN_SPELL, but I need to add this to an existing CRE file as the result of a banter. And I'm not sure if that's actually possible. Any ideas? I need to do this with several different spells over the course of several different banters so a solution that doesn't involve continuously copying and patching the CRE file would be preferred.
  • kjeronkjeron Member Posts: 2,368
    You can this action in the dialog:
    AddSpecialAbility(S:ResRef*)
  • RatatoskrRatatoskr Member Posts: 726
    kjeron wrote: »
    You can this action in the dialog:
    AddSpecialAbility(S:ResRef*)

    Thanks. Would the special ability be the name of the spell itself? So AddSpecialAbility(Spellname)?
  • kjeronkjeron Member Posts: 2,368
    edited March 2020
    The filename of the spell (without .spl), in "quotes"
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    @Bubb

    [HIDESPL.2DA]: Do you perhaps know what "IS_FINAL" and "IS_REMOVED" mean?
  • BubbBubb Member Posts: 1,005
    If a spell is flagged as IS_REMOVED, the engine removes it from a character's known spells / removes all memorizations on initial chargen. I suppose the main use would be to allow a spell to be "removed" in a patch, and then any old characters you import will have the spell automatically removed. (This isn't checked for levelups, only once at chargen).

    IS_FINAL appears to be unused.
Sign In or Register to comment.