Aller au contenu

Photo

Where does the spell list get called from in character creation?


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

#1
Orion7486

Orion7486
  • Members
  • 161 messages
Hi all,
I was wondering when you are creating the PC, what determines which spells are available to be picked from.  I thought it would be as easy as just changing the has arcane/has divine columns in class.2da, but it wasn't.  Plus, that wouldn't explain where the spell lists are coming from for the other spell caster's like ranger, druid, warlock.

Also is there a way to make your own spell list for a custom class?
Thanks for any replies.

#2
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
spells.2da, columns for each spell book ( bard, cleric, etc )

for a custom class making a new spellbook, no there is no way

Projects to address that are being worked on, but it's not a simple fix.

#3
Orion7486

Orion7486
  • Members
  • 161 messages
Thanks. The question comes to mind then, what do the has arcane/has divine columns do in classes.2da?

#4
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
From a PNP perspective, if they are casting spells provided by a deity or they have to do it themselves. So you could use wizard spells and get them from a divine source.

From what those do, no real clue, and likely not much at all, but i can say that about most columns. A lot of columns are from NWN1, not used in NWN2, and can just be completely ignored and i just know certain columns that matter.

It's a very good idea to just set the values and test them a bit and see if there is any in game effect most of the time, usually i just kind of set things so it kind of makes sense and hope by doing so i get the result i want as i don't want to spend a few hours just documenting some kooky column. I also post on NWN2Wiki when i learn things. I imagine if there was a thing that blocked all divine spells, or all arcane spells, they would use that column.

#5
The Fred

The Fred
  • Members
  • 2 516 messages
The requirements for certain PrCs include arcane or divine levels (or at least, they did in NWN1) and is one reason the game needed to know whether the class was an arcane or divine caster. Presumably the HasArcane/Divine columns still work (i.e. the game still "knows the difference"), they just might not be necessary any more.

#6
raptor21_c

raptor21_c
  • Members
  • 3 messages
I have managed to add a custom spell list to the spells.2da file; however I am now trying to figure out how to reference the new column in the chargen_spells XML file so that the new spell list shows in the GUI. I suspect that the method, UIListBox_OnUpdate_AvailableSpellList("CHARGEN","SPELL_TEXT","SPELL_IMAGE","SPELL_ACTION"), calls each individual spell in the spell list to the GUI list and I also suspect that the CHARGEN argument controls which spelllist is looked that. Could someone give a little better explanation on how the CHARGEN argument works for pointing to the different spell lists if what I suspect is correct?

Modifié par raptor21_c, 17 juillet 2011 - 04:18 .


#7
The Fred

The Fred
  • Members
  • 2 516 messages

raptor21_c wrote...
Could someone give a little better explanation on how the CHARGEN argument works for pointing to the different spell lists if what I suspect is correct?

It doesn't. Unfortunately, the spell lists don't work that way and all that stuff is hardcoded. There's no real way to add a spell list, and there's especially no way to do anything at character creation.

I assume, since you've posted there too, that you've read this thread? That's going into the process of creating a new spellcasting class with it's own class list, and as you can see it's no easy matter. In fact, I don't think anyone has actually really done it yet. It's theoretically possible, but requires quite an overhaul. Unfortunately one can't simply expect the engine to understand any new column you might add to the 2da.

#8
raptor21_c

raptor21_c
  • Members
  • 3 messages
I would still be interested in understanding what the CHARGEN argument represents to get a good feel for what is going on in the code. I know that the chargen_spells XML file is the file that generates the spells GUI at character generation and i know that UIListBox_OnUpdate_AvailableSpellList still accesses and displays the different spells as three parts for a button gui ( the icon, the spell name text, and the button to add the spell to the spells added list). My understanding of CHARGEN based on what I have seen thus far is that it is a temp file used to create the character. In that file, it would have what the class is, and all information created thus far. It would also use the hardcoded information to access spell.2da to reference the spell list (at least I guess it would). I would like to analyse that to see there what the references might be. On a side note, when I added the new column, I added it between the Cleric and Druid spell lists. The insertion did not affect any of the other classes. So I do know that the reference is not based on column number.

#9
The Fred

The Fred
  • Members
  • 2 516 messages
As far as I know, the only difference between "CHARGEN" and "LEVELUP" is that "CHARGEN" does not restrict class selection for companions. I think this is how some of the companion multiclassing tweaks work, by changing "LEVELUP" to "CHARGEN" in the levelup screen.

#10
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages

raptor21_c wrote...

I would still be interested in understanding what the CHARGEN argument represents to get a good feel for what is going on in the code. I know that the chargen_spells XML file is the file that generates the spells GUI at character generation and i know that UIListBox_OnUpdate_AvailableSpellList still accesses and displays the different spells as three parts for a button gui ( the icon, the spell name text, and the button to add the spell to the spells added list). My understanding of CHARGEN based on what I have seen thus far is that it is a temp file used to create the character. In that file, it would have what the class is, and all information created thus far. It would also use the hardcoded information to access spell.2da to reference the spell list (at least I guess it would). I would like to analyse that to see there what the references might be. On a side note, when I added the new column, I added it between the Cleric and Druid spell lists. The insertion did not affect any of the other classes. So I do know that the reference is not based on column number.


The column added is just being ignored, the spell books are hard coded. You won't be able to implement this via 2da edits.

Review this -> Enhanced LevelUp & Events Demo

Most of this is hard coded, and it is a lot easier to review what has already been accomplished instead of starting from scratch. Some clever folks have been working on this, and progress has been made. You can also get on IRC and discuss it with those working on it, but the truth of the matter is this is not some simple fix without replacing what the engine is doing entirely. A number of projects are in progress to recreate the various systems soas to make it possible for us to add our own spellbooks. ( The above link is actually part of all that. )

The other alternative is set it up as feats, like epic spells and kaedrin did blackguards and assasins, or getting into NWNx development.

#11
Shallina

Shallina
  • Members
  • 1 011 messages
It's fully possible with a custom scripted GUI. Basically you need to do a custom GUI, that will call scripted function instead of hard coded one. By calling scripted function, you can change what is called and how the information is processed.

This would allow custom spellbooks, custom caster class with different books (need new XML screen for this), and unrestricted level cap.

this is the same problem as in the Custom Spellbooks/lists thread.

The problem is that you are limited by hard coded function. The solution is to change those hard coded function into scripted function. Basically you need to rewrite the hard coded function with NWNscript, and rewrite the GUI so you will call the scripted function instead of the hard coded one. The GUI is in XML format in the GUI folder.

Modifié par Shallina, 18 juillet 2011 - 09:23 .