Aller au contenu

Photo

wizards reading scrolls


  • Veuillez vous connecter pour répondre
10 réponses à ce sujet

#1
aramoro999

aramoro999
  • Members
  • 42 messages
about wizards ability to add spell by reading scrolls...how does it work ?

i could use it for what im working on now...

#2
Morbane

Morbane
  • Members
  • 1 883 messages
Wizards can scribe practically any scroll - so if you make a custom spell you can edit iprop_scroll.2da so that the game can see your new spell on a scroll which can be made in the toolset once you have edited the iprop_scroll.2da. I have done this for various spells not normally available in NWN2 that I made for my Modules.

The 2da name is as close as I can remember it - so look for something like that to see the 2da and add you spell to a scroll in the toolset.

EDIT: Im not sure but I think CLerics can do it too - that is add a new spell to their book - but I really am not sure - it has been a while since I worked on that part of my Modules

EDIT(2): The 2da is iprop_spell.2da - which I take to stand for "Item Property Spell"

Modifié par Morbane, 03 mai 2012 - 09:04 .


#3
Morbane

Morbane
  • Members
  • 1 883 messages
http://nwn2.wikia.com/wiki/2DA

#4
aramoro999

aramoro999
  • Members
  • 42 messages
thx i was wondering about what iprop_spell.2da was used anyways

but how is it implemented? there are no functions for this as far as i know?
hardcoded stuff ?
it be good if i could bypass the scroll reading, and just add the spell into spellbook

Modifié par aramoro999, 04 mai 2012 - 08:06 .


#5
Morbane

Morbane
  • Members
  • 1 883 messages
The only way to add a spell to a spellbook - other than gaining a level - is to use a scroll and scribe it. There are no scripting methods to do it.

#6
kevL

kevL
  • Members
  • 4 075 messages

Morbane wrote...

.... There are no [ legitimate ] scripting methods to do it.

// MAP 3/24/2009
// EXPERIMENTAL- USE AT YOUR OWN RISK!
// blah bla ..
void SetSpellKnown(object oCreature, int nclassPosition, int nSpell, int bKnown = TRUE, int bTrackWithLevel = TRUE);


i never used it.

#7
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
I have set up chat commands that do that.

Lists all known spells and adds them as needed to the player. Useful for DM's. Part of my testing things out prior to setting up a full UI.

( uses my data objects to make it work quickly, so i can iterate all the spells a character might have since i have to test each one )

Adjusting memorized spells is also supported, make em rest to know all of them, then remove uses as needed until they have the correct number. ( prevented them logging out and back in to bypass resting prior to 1.23 )

Modifié par painofdungeoneternal, 04 mai 2012 - 10:14 .


#8
MasterChanger

MasterChanger
  • Members
  • 686 messages

painofdungeoneternal wrote...

( uses my data objects to make it work quickly, so i can iterate all the spells a character might have since i have to test each one )


I'd be very interested in an efficient way to retrieve the spells a player knows rather than looping over all of spells.2da every time I want to know.

Adjusting memorized spells is also supported, make em rest to know all of them, then remove uses as needed until they have the correct number. ( prevented them logging out and back in to bypass resting prior to 1.23 )


I've thought of using force-resting to increment spell uses, but I can't get my head around how to avoiding ending all magical and extraordinary effects the player has out there. Do you just figure that's not a big deal since you do this relatively rarely?

#9
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
its in my csl - look at the following chat commands

chat_dm_givespell.nss
chat_dm_listspell.nss

Again it uses my dataobjects which iterate the entire spells.2da, and then builds a list of all spells sorted by first class, then by level, then alphabetically. ( each class has it's own spellbook object ). This is intense, but a one time deal which caches forever.

I don't do it anymore, 1.23 does not force rest on player re-entry.

use void ForceRest(object oCreature); - not sure but assume it isn't going to remove those effects.

Per the notes -> The effects of this function occur instantly. The creature doesn't actually go into resting mode. Use ActionRest if that is what you want. Useful for repelinishing a PC's abilties and things for custom resting systems, dreams, or cutscenes (in which they rest). For NPC's, it is a good way to make sure they will replenish all thier feats and spells after a battle.

#10
aramoro999

aramoro999
  • Members
  • 42 messages
wow...u did that whit a chat command...

can u link me to ur stuff ?
i wanna see it

#11
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
CSL Library Reference

CSL Support Files
CSL Scripts

Takes some setup to get it working ( all above in override, then attaching the events as is obvious to the module )

Modifié par painofdungeoneternal, 07 mai 2012 - 05:47 .