Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

-HOW TO DO STUFF IN WEIDU-

1234568»

Comments

  • Jaguar_KnightJaguar_Knight Member Posts: 8
    I put it into PDF form so it can be viewable, this is from Steam!

  • SkitiaSkitia Member Posts: 550
    The pdf is coming off as corrupted so I can't use it. You can load it as a .txt if it's easier than doing it as a zip.

  • GwendolyneGwendolyne Member Posts: 391
    At first glance, it has nothing to do with the script, but more probably WeiDU can't load it. Did you check any possible typo in your code?

  • Jaguar_KnightJaguar_Knight Member Posts: 8
    Here you are, Skitia, Almost forgot I could make ZIPs for a moment there.

    And no, Gwen, at least, not that I think so. But I'll definitely look around for such.

  • Jaguar_KnightJaguar_Knight Member Posts: 8
    Gwen... you were correct. I was foolish, and one of my files were misspelled. Thank you for that.

    It fully installed... Now to see if the guy shows up.

  • GrammarsaladGrammarsalad Member Posts: 2,533
    edited May 8
    No formatter is installed for the format deleted

    This should have been saved. It was very useful

    Edit: okay, I'll posta few basics re using splprot later

  • GwendolyneGwendolyne Member Posts: 391
    Gwen... you were correct. I was foolish, and one of my files were misspelled. Thank you for that.

    Usually, this kind of message (without any warning or message error) means that WeiDU did not find the library or file to be loaded or copied. Either you moved it to another place, or you misspelled it in your code. ;)

  • WizardStylesWizardStyles Member Posts: 1
    I need some help with patching existing items and spells.

    Specifically, I have created some items that can inflict conditions (Stunned etc.) accompanied by unique Display String effects.
    I'm now trying to ensure those strings aren't shown if the target is immune to the condition, by way of Opcode 267.

    For that, I need to add effects using Opcode 267 to creatures, spells, items and item abilities that have/confer relevant immunities. In all cases, I can copy existing Opcode 267 effects.

    Here is an example implementation for item (equipped) effects, mostly copy-pasted from Tweaks Anthology:
    COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
      READ_LONG  0x6a fx_off
      READ_SHORT 0x70 fx_num
      FOR (fx_curr = 0 ; fx_curr < fx_num ; ++fx_curr) BEGIN
        READ_SHORT (fx_off +        (fx_curr * 0x30)) opcode
        READ_LONG  (fx_off + 0x04 + (fx_curr * 0x30)) parameter1
          PATCH_IF (opcode = 267) AND (parameter1 = 25807) BEGIN
    	      LPF CLONE_EFFECT INT_VAR multi_match = 999999 match_opcode = 267 match_parameter1 = 25807 parameter1 = RESOLVE_STR_REF (@67) STR_VAR insert = ~last~ END
    	      LPF CLONE_EFFECT INT_VAR multi_match = 999999 match_opcode = 267 match_parameter1 = 25807 parameter1 = RESOLVE_STR_REF (@89) STR_VAR insert = ~last~ END
          END
      END BUT_ONLY
    

    Short summary:
    All items are copied, a for loop finds all existing 267 effects giving immunity to string 25807 ("Confused") and clones all such effects twice giving immunity to two other strings (@67 and @89). If any patching happens the patched item goes into the override folder.

    This works, and a very similar implementation is possible for effects that are part of .CRE files.

    But I don't know right now how exactly I would do this for item and spell abilities. So, to continue the example with string 25807, I'm not sure how to patch Chaotic Commands and all similar spells through a for loop.
    I'm not even sure if CLONE_EFFECT is really applicable in this case.

    Any help with this would be appreciated.

  • ithildurnewithildurnew Member Posts: 222
    edited July 7
    [edit] slightly off topic, will post elsewhere

  • lroumenlroumen Member Posts: 2,127
    Hi all,

    I want to trigger an action or script upon reading a book. I would prefer not to only check if the item is in the inventory.
    Is it possible to trigger a script on the right-click book and "copy note" actions?

Sign In or Register to comment.