Jump to content

Spells vs. Innate abilities in Custom Kit


Sebastos

Recommended Posts

Hi,

 

I am attempting to create a Master Kensai kit with these abilities:

 

MASTER KENSAI: Kensai are also known as 'Sword Saints', warriors who have been specially trained to be one with their swords. They are deadly and fast and trained to fight without encumbrance.

 

Those amongst them who show superior dedication to the way of the sword receive addtional benefits granted by the single minded focus, such as the ability to create a virtual shield, or barrier, using their swords, but at the cost of mastering other weapons.

 

Kensai may not be of any Chaotic alignments.

 

Advantages:

- Bonus +1 to hit and +1 damage for every 3 levels

- Bonus -2 to AC for every 5 levels (start at 1st level, then 6th, 11th, etc.)

- Bonus -1 to speed factor for every 4 levels

- May use 'kai' ability one time per day for every 4 levels (starts at 1st level with one use): this ability lasts 10 seconds and makes all attacks do maximum damage.

- May cast Shield as an innate ability once every 4 levels (start at 1st level with one use): this ability works as the mage spell of the same name

- May create Blade Barrier once every 10 levels as per the priest spell of the same name

 

Disadvantages:

- May not use missile weapons (slings, bows and crossbows, darts) unless they also have a melee component (such as magic axes and daggers that can be both used in melee and hurled)

- Proficiency of non-bladed malee weapons limited to specialize (two stars)

- May not wear any armor

- May not wear gauntlets or bracers

 

I was able to customize the default Kensai kit to add the extra abilities and restrictions. Everything works except for the 2 new innate abilities. I can see them in Shadowkeeper when I view my saved game, but not in the game itself.

 

I basically took SPWI114 (Shield) and changed its type to innate from wizard saved it as S!SHLD.SPL and insterted into my custom .2DA file as GA_S!SHLD at the appropriate levels. Same of Blade Barrier (SPPR603).

 

Any ideas?

 

Thanks,

Sebastos

Link to comment

scripple scripple scripple

You did set the spell level to 1?

 

This should do what you wish in a WeiDU.exe's .tp2 file:

BACKUP ~modname/backup~
AUTHOR ~Sebastos~
VERSION ~v1~

BEGIN ~what ever~ 

//begin the kit addition and then add in the rest of this

DEFINE_PATCH_MACRO ~spell_to_innate~ BEGIN
 READ_LONG  0x64 "abil_off" ELSE 0
 READ_SHORT 0x68 "abil_num" ELSE 0
 READ_ASCII ("%abil_off%" + 0x04) "bam" (8) // reads the bam filename from ability
 WRITE_SHORT 0x1C 4						 // sets spell type to innate (4)
 WRITE_LONG  0x34 1						 // sets spell level to 1 to avoid scripting issues
 WRITE_EVALUATED_ASCII 0x3A "%bam%" #8	  // writes the bam filename from abilities to spell icon
 FOR ( index = 0; index < abil_num; index = index + 1 ) BEGIN
WRITE_SHORT ("%abil_off%" + 0x02 + (0x28 * "%index%")) 4 // changes ability icon location to innate (4)
END
 END
END

COPY_EXISTING ~spwi114.spl~ ~override/s!shld.spl~
 LAUNCH_PATCH_MACRO ~spell_to_innate~

COPY_EXISTING ~sppr603.spl~ ~override/s!bbar.spl~ //name for example 
 LAUNCH_PATCH_MACRO ~spell_to_innate~

The above features a predefined macro from Divine remix(which also had timer resetter)... at least I think so, but I can't find it now in that mod ... but it should thus work.

Link to comment
scripple scripple scripple

You did set the spell level to 1?

 

***snip**

 

You sir are god sent.

 

I spent hours with NearInifity trying different configurations. I did set the spell level to 1, then to 0. Then I reset all of the school information (schoolless for wizards, all priests, etc). I even tried all the different icon versions (A, B, and C) for the spell. No dice. But the script you posted did the job beautifully. In the end the only difference between my version of the Shield spell and the scripted one was that mine had the Wizard school = schoolless - 0, Spell school = Unknown (1) while the scripted had Wizard school = Invocation - 512 and spell school = Invocation (15).

 

Regardless, your way is way cleaner and quicker. Thanks!

 

I do have a quick follow up question about this part:

COPY_EXISTING ~spwi114.spl~ ~override/S!SHLD.SPL~
 LAUNCH_PATCH_MACRO ~spell_to_innate~

How does the macro know which file to modify? Does it link to the COPY_EXISTING command somehow? Or just works with the last argument from the previous command?

 

Thanks,

Sebastos

Link to comment
I do have a quick follow up question about this part:

COPY_EXISTING ~spwi114.spl~ ~override/S!SHLD.SPL~
 LAUNCH_PATCH_MACRO ~spell_to_innate~

How does the macro know which file to modify? Does it link to the COPY_EXISTING command somehow? Or just works with the last argument from the previous command?

LAUNCH_PATCH_MACRO is a patch, and patches are always connected to an action. In this case the action is COPY_EXISTING ~spwi114.spl~ ~override/S!SHLD.SPL~. You can stick as many other patches in there as you want (calling other patch macros, changing the name of the spell, whatever) and they will all apply to that same action. The indentation used is a stylistic choice to help show that the LAUNCH_PATCH_MACRO line "belongs" to the COPY_EXISTING action.

Link to comment

Innate ability question: are Inquisitor immune to the web spell?

 

I'd like to create a HLA that make the character immune to all disabling spells and I figured I'd start with Inquisitor's spcl233. However, I remember my Inquisitor getting webbed in one of my games. Was that a bug, or correct behavior?

Link to comment
Innate ability question: are Inquisitor immune to the web spell?

 

I'd like to create a HLA that make the character immune to all disabling spells and I figured I'd start with Inquisitor's spcl233. However, I remember my Inquisitor getting webbed in one of my games. Was that a bug, or correct behavior?

Well, we do not know was it intended behavior or not, but the spcl233.spl was not modified to also resist the modified web spell... in the mod that contained the new web spell. That's little to say of a large issue, and that is that all the mods should patch a lot of files...
Link to comment
Well, we do not know was it intended behavior or not, but the spcl233.spl was not modified to also resist the modified web spell... in the mod that contained the new web spell. That's little to say of a large issue, and that is that all the mods should patch a lot of files...

 

Thanks.

 

Also, in the future I'll pay more attention to the changes mods make to the game.

Link to comment
I basically took SPWI114 (Shield) and changed its type to innate from wizard saved it as S!SHLD.SPL and insterted into my custom .2DA file as GA_S!SHLD at the appropriate levels. Same of Blade Barrier (SPPR603).

 

 

Do you have change the place from "spell" to "innate" at all the needed places ? Open in DLTCEP, the spell must be edited in the "general properties" (spell type) and in "extended effect" (location) -> if you forget the location, the game search the spell in the spellbook, not in the inate places.

 

Another thing, for the inate abilities, the game prefer seven digit names. For exemple, the effect #172 cannot remove inate eight digit named, but for seven digit named, it can

Link to comment
Do you have change the place from "spell" to "innate" at all the needed places ?
The code above that I stoletook from Divine Remix does just that... in these two lines(in combination of the other lines):
  WRITE_SHORT 0x1C 4						 // sets spell type to innate (4)
WRITE_SHORT ("%abil_off%" + 0x02 + (0x28 * "%index%")) 4 // changes ability icon location to innate (4)

Isn't it nice to have commented code. :undecided:

 

The above features a predefined macro from Divine remix(which also had timer resetter)...
It did, here's that part of the code:
	READ_SHORT  ("%abil_off%" + 0x12 + (0x28 * "%index%")) "speed" // reads casting speed
PATCH_IF ("%speed%" > 3) BEGIN
  WRITE_SHORT  ("%abil_off%" + 0x12 + (0x28 * "%index%")) ("%speed%" - 2) // reduces casting speed
END ELSE BEGIN
  WRITE_SHORT  ("%abil_off%" + 0x12 + (0x28 * "%index%")) 0 // makes instant
END

Link to comment
Guest Guest_Sebastos
Well, we do not know was it intended behavior or not, but the spcl233.spl was not modified to also resist the modified web spell... in the mod that contained the new web spell. That's little to say of a large issue, and that is that all the mods should patch a lot of files...

 

Somewhat related question: is Berserker supposed to resist web? I know the ability description says that it provides immunity to hold, not web, but it seems kind of silly that rage can make one immune to hold but not web.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...