Jump to content


Photo

drop weapon effect; dialogF.tlk


  • Please log in to reply
27 replies to this topic

#1 Turambar

Turambar
  • Modder
  • 935 posts

Posted 12 September 2010 - 02:00 PM

I'm working on a priest of Shar kit, and I wanted to remove all spells concerning light: sunray, false dawn,...

I created a spell to remove them, whose effect was "remove spell", which was applied when the cleric reached the right level to cast that spell.
While testing, though, I noticed that he learned them again at the next level.
I tried to copy the AP_spell... all around the CLAB... table, but it didn't work.
Finally, I managed to do it by adding a second ability, which had the same effect one round later; it allows, though, to memorize that spell, if you do it just after levelling up, although it gets lost immediately.

Is there a better way to do that?

here's one of the spells I used:

Attached Files


Edited by Turambar, 23 September 2010 - 01:10 PM.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#2 vilkacis

vilkacis

    Rashemen REPRESENT! Word to yo hamsta!

  • Modder
  • 1571 posts

Posted 12 September 2010 - 04:01 PM

I think they ended up having to convert all priest spells to another format just to get around this when they made Divine Remix, so no, it doesn't seem like it's possible.

#3 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 12 September 2010 - 05:39 PM

I think they ended up having to convert all priest spells to another format just to get around this when they made Divine Remix, so no, it doesn't seem like it's possible.

I don't know if it does that but yes, DR does get that to work somehow. So the best place to look is at its code (it's been a while since I looked at it, so I can't really explain it - might say something in the readme though).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#4 Demivrgvs

Demivrgvs
  • Member
  • 143 posts

Posted 13 September 2010 - 12:09 AM

I think they ended up having to convert all priest spells to another format just to get around this when they made Divine Remix, so no, it doesn't seem like it's possible.

I don't know if it does that but yes, DR does get that to work somehow. So the best place to look is at its code (it's been a while since I looked at it, so I can't really explain it - might say something in the readme though).

Any spell flagged as "cleric/paladin" is automatically added to cleri/paladin's spellbook at each lvl up, even if you previously removed it. Afaik Divine Remix removes that flag and assigns each and every spell via clab files for all classes.

#5 vilkacis

vilkacis

    Rashemen REPRESENT! Word to yo hamsta!

  • Modder
  • 1571 posts

Posted 13 September 2010 - 10:59 AM

Whatever they actually do, the point is that it will break any cleric kits that aren't coded to take advantage of the new system. Which would mean a lot of work just for a single kit.

You could make your kit require DR, though, or try to get it included as a part of that mod (though they may already have a priest of Shar, I didn't check).

#6 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 13 September 2010 - 01:15 PM

(though they may already have a priest of Shar, I didn't check).

Yeah, Nightcloak of Shar - might want to check that first.

How many cleric kits are there outside of DR (and Paladins of Faerun, which uses DR rules)? Might be cool if they were all coded to use DR, or at least if that option were available.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#7 Arkenor

Arkenor
  • Member
  • 255 posts

Posted 13 September 2010 - 01:17 PM

(though they may already have a priest of Shar, I didn't check).

Yeah, Nightcloak of Shar - might want to check that first.

How many cleric kits are there outside of DR (and Paladins of Faerun, which uses DR rules)? Might be cool if they were all coded to use DR, or at least if that option were available.


I think TDD might have some. Would coding for DR break folks that don't use it? It's incompatible with Spell Revisions.
Arkenor Oakshadow
Ark's Ark Whois
Meddling in the affairs of modders. Modding in the affairs of genie.

#8 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 13 September 2010 - 01:58 PM

Would coding for DR break folks that don't use it?

Like I said, there should be the option, or the cleric kit mods should auto-detect DR and install accordingly.

It's incompatible with Spell Revisions.

Same goes for that (or if it patched instead of overwrote spells, it could probably accommodate DR).

Edited by Miloch, 13 September 2010 - 01:58 PM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#9 Mike1072

Mike1072
  • Modder
  • 539 posts

Posted 13 September 2010 - 03:07 PM

It's incompatible with Spell Revisions.

Same goes for that (or if it patched instead of overwrote spells, it could probably accommodate DR).

Making all changes via patching is not feasible and would not improve compatibility. To make SR and DR compatible, it's most sensible to modify DR so it recognises SR's changes and builds the CLAB files appropriately. Efforts are already underway to do this.

To get back to the original topic, a kit mod like this could alter the way divine spells are gained the same way DR does, but specific checks would need to be added to the mods so they recognise if the changes have already been made to the vanilla kits (so e.g. DR would know if it needed to remove spells from CLABs before implementing its sphere system).

#10 Turambar

Turambar
  • Modder
  • 935 posts

Posted 14 September 2010 - 05:17 AM

(though they may already have a priest of Shar, I didn't check).

Yeah, Nightcloak of Shar - might want to check that first.

How many cleric kits are there outside of DR (and Paladins of Faerun, which uses DR rules)? Might be cool if they were all coded to use DR, or at least if that option were available.


That was actually a revision of the TDD one.

There are quite a lot in TDD and NEJ (and also in Jarno's multikit mod, which collects them).

I know there's already one in DR, but I didn't like how DR worked; I think it's too restrictive, that's why I created this one. The only problem was that I couldn't accept a priest of Shar casting a spell with Selune's name in it...

Thank you for all your replies, I'll have a look at DR; otherwise, I'll leave it like this

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#11 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 14 September 2010 - 04:48 PM

In theory, the NPC could have a script that triggers RemoveSpell() for the unwanted spells. But that's kind of cludgy, would require the AI lantern to be on whenever they level, and you don't really want to bloat baldur.bcs in a megamod game either.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#12 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 15 September 2010 - 01:03 AM

In theory, the NPC could have a script that triggers RemoveSpell() for the unwanted spells. But that's kind of cludgy, would require the AI lantern to be on whenever they level, and you don't really want to bloat baldur.bcs in a megamod game either.

Unless its behaviour is radically different for divine spells RemoveSpell doesn't work like that. Link.

#13 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 15 September 2010 - 02:19 AM

Unless its behaviour is radically different for divine spells RemoveSpell doesn't work like that. Link.

Ah. Well then I guess you'd just force a spell with opcode 172 that removes the unwanted spells (I assume that's what Avenger's talking about). Or do both if you want to cover both memorised and known spells.

Given that all that could probably be handled in one ugly script block, one might be excused for slopping it into baldur.bcs (something I'd normally frown on). Offhand though, I don't know how you'd have it run at every level-up without running constantly, nor does there seem to be a trigger like HaveSpell that works on known rather than memorised spell, is there?

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#14 Deratiseur

Deratiseur
  • Member
  • 86 posts

Posted 20 September 2010 - 12:42 PM

There is a way to remove one or more specific spells from a priest book. I have use it on one of my kits.
use the ocpode 172 to remove the spell is the good way, but not enought.

As it is ever said, the game refresh the spellbook on each lvl Up. So the trick i've used to remove the spells is to apply the spell which removed the overs 1 second delayed, so 1 second after the level Up.
There is one glitch -> the removed spell can still be memorised, when accesing the spellbok just after the lvl Up, before leaving the caractere screen. But this is all what i have found.

I hope this will help you.

All my mods are on Github


#15 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 20 September 2010 - 04:55 PM

So the trick i've used to remove the spells is to apply the spell which removed the overs 1 second delayed, so 1 second after the level Up.

But you still need to script it, right? (Either that or expect the characters to apply the spell manually, which is never going to work.) Can you paste the script block you used?

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#16 Deratiseur

Deratiseur
  • Member
  • 86 posts

Posted 20 September 2010 - 07:16 PM

There is no script. The spell is apply at each lvl, as it is preset on the 2DA of the kit.

If you want, have a look of the "prêcheur des flammes" in my mod

All my mods are on Github


#17 Turambar

Turambar
  • Modder
  • 935 posts

Posted 21 September 2010 - 01:30 AM

There is no script. The spell is apply at each lvl, as it is preset on the 2DA of the kit.

If you want, have a look of the "prêcheur des flammes" in my mod


Yes, it's exactly what I did, finally: I used two effects for each spell, one instant, one delayed; if you memorize it, it disappears one second later from that list as well.

I'll assume it's the only way, then

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#18 Deratiseur

Deratiseur
  • Member
  • 86 posts

Posted 21 September 2010 - 02:32 AM

So excuse me please, my respond don't serve.

But note this : the instant effect is useless. you can erase it from the spell.

All my mods are on Github


#19 Turambar

Turambar
  • Modder
  • 935 posts

Posted 21 September 2010 - 03:35 AM

So excuse me please, my respond don't serve.

Thanks for the suggestion anyway!

But note this : the instant effect is useless. you can erase it from the spell.

It does work, but only the first time; I think it's nicer if it works correctly at least once.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#20 Turambar

Turambar
  • Modder
  • 935 posts

Posted 22 September 2010 - 09:27 AM

I've got other two questions.

I've tried using the effect 'drop item', but, if the opponent has a bow as weapon1 and a sword as weapon2, he loses the bow even if he's using the sword. How can I change that?

The other question is about the race-class compatibility: is it hard-coded or is it possible, for instance, to allow elves to become bards, and perhaps to only allow them to use specific kits (and not the unkitted class)?

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg