Skip to content

[How to] Making kit mods for the EE!

189111314

Comments

  • ReddbaneReddbane Member Posts: 222
    @CrevsDaak
    or anyone. . .
    Does anyone have a contact email for Black Wyrm Lair? I've been trying to register on their site/forum for two days know and they haven't sent any validation emails. I've checked spam, I've tried using different email addresses, but nothing works. When I try using the "contact us" links on their website all I get is broken javascript.

    This is very important, as otherwise I cannot register a prefix for the mods I have in development.
  • The user and all related content has been deleted.
  • ReddbaneReddbane Member Posts: 222
    @subtledoctor
    As far as I can tell, one cannot.
    Attempting to go to the Forums with an unregistered account results in a message:
    "Sorry, but you do not have permission to use this feature."

    Moreover, I wanted to ask them some questions about some more esoteric characters, like the daggers (†‡) or the "irony mark" (⸮), as I noticed the use of the section mark (§) in one prefix; so I figured their might be less interference if I use a more uncommon signature, and I need confirmation on what characters the IE engine can handle in it's coding.

    At the very least I wish to be polite and, as they ask, explain what my future modding plans are so they know the prefix is not being wasted.
  • GwendolyneGwendolyne Member Posts: 461
    You are not the only one who can't register. A few days ago, I registered a prefix for another modder who could not register.

    As for the prefix rules:
    Conditions:
    • ONLY two-letter prefixes can be registered. (Note: prefixes that had been registered before this rule came into force were not deleted; they are still valid.)
    • If you want to register a prefix, check if there isn't a 3-letter prefix already that starts with the same letters as yours (e.g. it's useless and may cause prefix conflict if you register 'XQ' if 'XQP' is already registered by someone else).
    Valid Two-Letter Prefixes
    Based on TheBigg's recommendations

    First possibility: [A-Za-z][0-9A-Za-z#_!-]
    Second possibility: [#][A-Za-z_!-]

    which could be expressed as:
    Any letter, followed by any number, letter, #, _, ! or - character.
    OR
    A '#' character, followed by a letter, _, ! or - character.
  • ReddbaneReddbane Member Posts: 222
    @Gwendolyne
    Is this a recent problem? Or to be more to the point, is it an issue that one could expect to be resolved soon?

    Communicating by proxy is not ideal my regards, given I will probably find myself having followup questions to any answers, before I am comfortable with being granted a community prefix. It would seem rather a significant obstacle to introducing new IE modders into the community if a critical step in that process is bottle-necked within a website that beyond easy contact.

    I know this might be beyond your purview, which is all the more reason I wish to be able to actually get into contact with someone associated with the website.
  • ReddbaneReddbane Member Posts: 222
    Again, does anyone have a way to contact Black Wyrm Lair?
  • RaduzielRaduziel Member Posts: 4,714
    edited February 2018
    So, as I said in another thread, @CamDawg gave me a code and I worked a bit on top of it. The result is a macro that turns spells into a kit feature.

    So, let's say: you want to make a kit permanently under Protection From Evil? Gotch. Free Action? Ok. Death Ward? Perfect. Negative Plan Protection? Got you back. Haste? No problem.

    The macro itself is
    // Thanks CamDawg for saving me with this

    DEFINE_PATCH_MACRO ~SPELL_TO_KIT_FEATURES~ BEGIN

    WRITE_SHORT 0x1C 4
    WRITE_LONG 0x34 1
    WRITE_LONG 0x22 00
    LPF ALTER_SPELL_HEADER INT_VAR projectile = 0 target = 5 range = 1 speed = 0 location = 0 END
    LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 9 END
    LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 50 END
    LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 139 END
    LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 141 END
    LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 174 END
    LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 215 END
    LPF ALTER_EFFECT INT_VAR target = 2 timing = 9 duration = 0 resist_dispel = 0 END

    END
    When building your kit you just need to
    COPY_EXISTING ~SPPR409.spl~ ~override\SPELLNAMEFORTHEKIT.spl~
    LPM SPELL_TO_KIT_FEATURES
    Now your kit can have "Death Ward always active" as a feature. :)

    If you don't want the spell's icon to appear on the portrait you just need to add the following line right:
    LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 142 END
    The opcodes deleted are related to sound and graphics, so your character won't be glowing around Faerun. If you want them to, just remove the line that has the opcode you want to preserve.

    You can find a very comprehensive and user-friendly list of opcodes here
  • RaduzielRaduziel Member Posts: 4,714
    Ok, let's say I want to make a spell that creates an item permanentely

    But I want this item to disappear if I cast this same spell again.

    Let's say:

    Cast 1: spell X opens the option to create an item. Chooses Y. Creates item Y.

    Cast 2: spell X opens the option to create an item (Y included). Chooses Z. Item Y is destroyed and item Z is created.

    Does a simple Opcode 321 with Resource = THIS_SPELL solve this?
  • kjeronkjeron Member Posts: 2,367
    Opcode 112 or 123 will remove items, but unless the item is undroppable, there is no way to enforce this, as you could always drop it, recast, then pick up the old item.
  • RaduzielRaduziel Member Posts: 4,714
    edited February 2018
    kjeron said:

    Opcode 112 or 123 will remove items, but unless the item is undroppable, there is no way to enforce this, as you could always drop it, recast, then pick up the old item.

    My idea is to make the item undroppable. Looks like Op112 is more aggressive than Op123, am I right?

    PS: Is there a way to prevent an item to be placed inside a Bag of Holding?
  • kjeronkjeron Member Posts: 2,367
    Op112 is the default to remove items created by opcode 111.
    Op123 is the default to remove items created by opcode 122.
    Op112 plays a hardcoded sound when it removes an item.
    Neither can remove items within containers (bags of holding).

    Undroppable = cannot pick up, move, or drop, so it's not very useful unless you are using opcode 143 to create the item in an equipped slot (which overwrites any item currently in that slot), or unless the item is something you activate from within the inventory (like the familiars).

    Bags of Holding allow items based on their itemtype/category. Depending on what this item is, you could possibly assign it a new or defunct item type that would not be allowed in any such container.
  • RaduzielRaduziel Member Posts: 4,714
    kjeron said:

    Undroppable = cannot pick up, move, or drop

    There goes my plan.

  • ReddbaneReddbane Member Posts: 222
    Is it possible for a Kit to have a different weapon proficiency gain rate (per levels) than it's parent class?
  • The user and all related content has been deleted.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited March 2018
    @Raduziel If I write something like ~0x00000002 2~, then my custom kit will appear under Thieves instead of Fighters. Do you know why?

    [SOLVED] I also need to take into account the following line: ~K_T_H K_T_D K_T_G K_T_E K_T_HE K_T_HL K_T_HO~
    Post edited by _Luke_ on
  • RaduzielRaduziel Member Posts: 4,714
    The Inertia Man saves the day once more.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited March 2018
    @subtledoctor How does the pair "Give Innate Ability (171)" & "Remove Spell (172)" work exactly (you use it for your called shots in Might & Guile)? Because for me opcode 172 isn't working (so every time I use a certain ability, opcode 171 adds 1 charge but opcode 172 doesn't remove the innate ability....)
  • kjeronkjeron Member Posts: 2,367
    @Luke93
    The spells filename must be 7 characters long or less for opcode 172, excluding the ".SPL" extension.
    8-character long filenames function differently with opcode 172.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited March 2018
    kjeron said:

    @Luke93
    The spells filename must be 7 characters long or less for opcode 172, excluding the ".SPL" extension.
    8-character long filenames function differently with opcode 172.

    The filename is OFFST.SPL, so it's valid. This is the situation: my ability has 1 charge. Opcode 172 removes the ability, then after a certain number of rounds (specified by attribute "duration" of opcode 171, "Timing Mode: Delay/Permanent") the ability is restored. The problem is that now it has 2 charges instead of 1. If I repeat the process, the number of charges doesn't increase, so there is something wrong with the first use.....
  • RaduzielRaduziel Member Posts: 4,714
    @Luke93

    The code below was given to me by @Grammarsalad to make infinite spells. All I know is that it works.

    Maybe you'll need to adjust the Timing to fit your needs, but here is it. Hope it helps.

    COPY_EXISTING ~RATYR1.spl~ ~override~
    PATCH_IF (~%SOURCE_SIZE%~ > ~0x71~) BEGIN
    READ_SHORT 0x1c spell_type
    PATCH_IF (%spell_type% = 4) BEGIN
    READ_LONG 0x64 ab_off // Abilities Offset
    READ_SHORT 0x68 ab_num // Number of Abilities
    READ_SHORT 0x6a fx_off // Effects Offset
    READ_SHORT 0x70 glob_fx // Number of Global Effects
    SET glob_add = 0

    INSERT_BYTES (fx_off) 0x30
    WRITE_SHORT (fx_off) 171 // opcode
    WRITE_BYTE (fx_off + 0x2) 1 // Target (self)
    // WRITE_BYTE (fx_off + 0x4) 1 // Level 1
    // WRITE_LONG (fx_off + 0x8) 0 // Wizard
    WRITE_LONG (fx_off + 0xc) 9 // timing (Perm)
    // WRITE_LONG (fx_off + 0xe) 10 // duration
    WRITE_BYTE (fx_off + 0x12) 100 // Probability 1
    WRITE_ASCII (fx_off + 0x14) ~RATYR1~ // resource
    ++glob_add

    INSERT_BYTES (fx_off) 0x30
    WRITE_SHORT (fx_off) 172 // opcode
    WRITE_BYTE (fx_off + 0x2) 1 // Target (self)
    // WRITE_BYTE (fx_off + 0x4) 1 // Level 1
    // WRITE_LONG (fx_off + 0x8) 0 // Wizard
    WRITE_LONG (fx_off + 0xc) 9 // timing (Perm)
    // WRITE_LONG (fx_off + 0xe) 10 // duration
    WRITE_BYTE (fx_off + 0x12) 100 // Probability 1
    WRITE_ASCII (fx_off + 0x14) ~RATYR1~ // resource
    ++glob_add

    glob_fx += glob_add
    WRITE_SHORT 0x70 glob_fx // Increment Number of Global Effects
    FOR (i = 0; i < ab_num; ++i) BEGIN // Offset Effect Index for all Abilities
    READ_SHORT (ab_off + i * 0x28 + 0x20) fx_idx
    WRITE_SHORT (ab_off + i * 0x28 + 0x20) (fx_idx + glob_add)
    END
    END
    END
  • UlbUlb Member Posts: 295
    @Luke93

    There really is no magic to it, it should work the way you describe it if everything is set up right.

    I would suggest to start from scrap (regarding those two effects, give/remove), to make sure everything is set up correctly.

    Just add the remove+give opcodes (tipp: add them to the spell header directly, not to the melee effect of your spell, even 0 cast time spells can be disrupted, causing you to lose the ability otherwise).

    You could also just copy the effects from another spell that uses them and replace the resource with your spell, just to make sure everything works.

  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited March 2018
    Raduziel said:

    @Luke93

    The code below was given to me by @Grammarsalad to make infinite spells. All I know is that it works.

    Maybe you'll need to adjust the Timing to fit your needs, but here is it. Hope it helps.

    COPY_EXISTING ~RATYR1.spl~ ~override~
    PATCH_IF (~%SOURCE_SIZE%~ > ~0x71~) BEGIN
    READ_SHORT 0x1c spell_type
    PATCH_IF (%spell_type% = 4) BEGIN
    READ_LONG 0x64 ab_off // Abilities Offset
    READ_SHORT 0x68 ab_num // Number of Abilities
    READ_SHORT 0x6a fx_off // Effects Offset
    READ_SHORT 0x70 glob_fx // Number of Global Effects
    SET glob_add = 0

    INSERT_BYTES (fx_off) 0x30
    WRITE_SHORT (fx_off) 171 // opcode
    WRITE_BYTE (fx_off + 0x2) 1 // Target (self)
    // WRITE_BYTE (fx_off + 0x4) 1 // Level 1
    // WRITE_LONG (fx_off + 0x8) 0 // Wizard
    WRITE_LONG (fx_off + 0xc) 9 // timing (Perm)
    // WRITE_LONG (fx_off + 0xe) 10 // duration
    WRITE_BYTE (fx_off + 0x12) 100 // Probability 1
    WRITE_ASCII (fx_off + 0x14) ~RATYR1~ // resource
    ++glob_add

    INSERT_BYTES (fx_off) 0x30
    WRITE_SHORT (fx_off) 172 // opcode
    WRITE_BYTE (fx_off + 0x2) 1 // Target (self)
    // WRITE_BYTE (fx_off + 0x4) 1 // Level 1
    // WRITE_LONG (fx_off + 0x8) 0 // Wizard
    WRITE_LONG (fx_off + 0xc) 9 // timing (Perm)
    // WRITE_LONG (fx_off + 0xe) 10 // duration
    WRITE_BYTE (fx_off + 0x12) 100 // Probability 1
    WRITE_ASCII (fx_off + 0x14) ~RATYR1~ // resource
    ++glob_add

    glob_fx += glob_add
    WRITE_SHORT 0x70 glob_fx // Increment Number of Global Effects
    FOR (i = 0; i < ab_num; ++i) BEGIN // Offset Effect Index for all Abilities
    READ_SHORT (ab_off + i * 0x28 + 0x20) fx_idx
    WRITE_SHORT (ab_off + i * 0x28 + 0x20) (fx_idx + glob_add)
    END
    END
    END
    It's not working (i.e., my innate ability is infinite but with 2 charges instead of 1.....)

    Moreover, I have a problem with opcode Ranged Hit Effect: how does it work? I mean, I've set its Probability 1 to 100 and Probability 1 of its .eff file to 100 but nothing happens in game....
    Well, it's not only Ranged Hit Effect: I noticed that some effects of the melee ability of my spell don't trigger, other effects do. Why?
    Post edited by _Luke_ on
  • kjeronkjeron Member Posts: 2,367
    upload the files for inspection, there are too many possible reasons to guess at if none of these worked.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    kjeron said:

    upload the files for inspection, there are too many possible reasons to guess at if none of these worked.

    Here are the files.
  • kjeronkjeron Member Posts: 2,367
    edited March 2018
    sorry, meant the files for opcode 171/172

    I don't see anything wrong with those files, the Ranged Hit Effects have (Preset Target [2]) instead of (Self[1]), but that shouldn't matter unless you are somehow casting them on other creatures.

    Edit: The effect index for CS_TRIP.spl's ability is screwed up, currently (-2), should be (1).
    Edit: Likewise for CS_DIS.spl's ability, currently (0), should be (1).

    Normally you should not be manually altering that field, it is updated automatically by NI when adding/removing effects, the various ADD_(type)_EFFECT functions in weidu, or, in the code above, this:
    glob_fx += glob_add
    	WRITE_SHORT 0x70 glob_fx			                             // Increment Number of Global Effects
    	FOR (i = 0; i < ab_num; ++i) BEGIN		                         // Offset Effect Index for all Abilities
    	  READ_SHORT (ab_off + i * 0x28 + 0x20) fx_idx
    	  WRITE_SHORT (ab_off + i * 0x28 + 0x20) (fx_idx + glob_add)
    	END
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited March 2018
    kjeron said:

    sorry, meant the files for opcode 171/172

    This is the piece of code that adds those two opcodes:
    COPY_EXISTING ~CS_DIS.spl~ ~override~
    PATCH_IF (~%SOURCE_SIZE%~ > ~0x71~) BEGIN
    	READ_SHORT 0x1c spell_type
    PATCH_IF  (%spell_type% = 4) BEGIN
        READ_LONG 	0x64	ab_off			                             // Abilities Offset
    	READ_SHORT	0x68	ab_num			                             // Number of Abilities
    	READ_SHORT	0x6a	fx_off			                             // Effects Offset
    	READ_SHORT	0x70	glob_fx			                             // Number of Global Effects
    	SET	glob_add = 0
    
    INSERT_BYTES (fx_off) 0x30
    	WRITE_SHORT (fx_off) 171			                             // opcode 171 -> Give Innate Ability
    	WRITE_BYTE (fx_off + 0x2) 1			                             // Target (self)
    	// WRITE_BYTE (fx_off + 0x4) 1			                         // Level 1
    	// WRITE_LONG (fx_off + 0x8) 0			                         // Wizard
    	WRITE_LONG (fx_off + 0xc) 4			                             // timing 4 -> Delay/Permanent
        WRITE_LONG (fx_off + 0xe) 12                                     // duration
    	WRITE_BYTE (fx_off + 0x12) 100			                         // Probability 1
    	WRITE_ASCII (fx_off + 0x14) ~CS_DIS~                             // resource
    	++glob_add
    
    INSERT_BYTES (fx_off) 0x30
    	WRITE_SHORT (fx_off) 172			                             // opcode 172 -> Remove Spell
    	WRITE_BYTE (fx_off + 0x2) 1			                             // Target (self)
    	// WRITE_BYTE (fx_off + 0x4) 1			                         // Level 1
    	// WRITE_LONG (fx_off + 0x8) 0			                         // Wizard
    	WRITE_LONG (fx_off + 0xc) 9			                             // timing 9 -> Permanent
        // WRITE_LONG (fx_off + 0xe) 10                                  // duration
    	WRITE_BYTE (fx_off + 0x12) 100			                         // Probability 1
        WRITE_ASCII (fx_off + 0x14) ~CS_DIS~                             // resource
    	++glob_add
    	
        glob_fx += glob_add
    	WRITE_SHORT 0x70 glob_fx			                             // Increment Number of Global Effects
    	FOR (i = 0; i < ab_num; ++i) BEGIN		                         // Offset Effect Index for all Abilities
    	  READ_SHORT (ab_off + i * 0x28 + 0x20) fx_idx
    	  WRITE_SHORT (ab_off + i * 0x28 + 0x20) (fx_idx + glob_add)
    	END
    END
    END

    kjeron said:

    I don't see anything wrong with those files, the Ranged Hit Effects have (Preset Target [2]) instead of (Self[1]), but that shouldn't matter unless you are somehow casting them on other creatures.

    You should consider CS_DIS.SPL and CS_TRIP.SPL as a sort of Called Shot: that's why I put Preset Target (2) instead of Self (1).....
    kjeron said:


    Edit: The effect index for CS_TRIP.spl's ability is screwed up, currently (-2), should be (1).
    Edit: Likewise for CS_DIS.spl's ability, currently (0), should be (1).

    Normally you should not be manually altering that field, it is updated automatically by NI when adding/removing effects, the various ADD_(type)_EFFECT functions in weidu, or, in the code above, this:

    glob_fx += glob_add
    	WRITE_SHORT 0x70 glob_fx			                             // Increment Number of Global Effects
    	FOR (i = 0; i < ab_num; ++i) BEGIN		                         // Offset Effect Index for all Abilities
    	  READ_SHORT (ab_off + i * 0x28 + 0x20) fx_idx
    	  WRITE_SHORT (ab_off + i * 0x28 + 0x20) (fx_idx + glob_add)
    	END
    I see, thanks for the explanation. That's why probably Display Portrait Icon of the melee ability of CS_TRIP.SPL is not working too.....
  • kjeronkjeron Member Posts: 2,367
    Luke93 said:

    You should consider CS_DIS.SPL and CS_TRIP.SPL as a sort of Called Shot: that's why I put Preset Target (2) instead of Self (1).....

    The effects in the SPL should target "Self", since tou are giving "Yourself" the ability to inflict those EFF's when attacking. It only doesn't matter in this case since the ability target is "Caster", so you are both "Self" and the "Preset Target".

    The EFF's referenced by opcodes 248/249 are hardcoded to affect the target(s) of an attack, regardless of what targeting is specified in the EFF.

    If the effect indexes were already broken when adding the opcode 171/172 effects, then that might also be why they were not working, as it only gets updated based on its current value. I suspect the ability was pulling the last global effect as its own (which would be opcode 171), duplicating it.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    kjeron said:


    If the effect indexes were already broken when adding the opcode 171/172 effects, then that might also be why they were not working, as it only gets updated based on its current value. I suspect the ability was pulling the last global effect as its own (which would be opcode 171), duplicating it.

    So, I deleted everything and started from scratch -> everything is working as expected now, thanks!
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited April 2018
    [Solved]
    Post edited by _Luke_ on
  • kimmuryielkimmuryiel Member Posts: 89
    Excuse me if this is a bit off topic, but how in the nine hells do I turn off whatever is in FinnJO's subrace mod that forces a color change???? I've been at it for at least four fucking hours trying to figure this out! (I'm trying to use it in IWDEE and it works EXCEPT IT FUCKING CHANGES NELLA'S COLOR TOO! Even though she isn't in the party yet! (don't know if it's FinnJO's mod or because, for some reason, the other characters refer to my character as Nella. (another thing I don't know how to fix))
    (I apologize for the language. Like I said, I've been at this for *hours* and it's frustrating the hell out of me)
Sign In or Register to comment.