Is it possible to create your own spells with the editor or something like that?
If possible, How???
Create your own spells?
- Fiberfar
- Posts: 4196
- Joined: Fri Aug 13, 2004 12:07 pm
- Location: Looking down from ethereal skies
- Contact:
Create your own spells?
[QUOTE=Luis Antonio]ONLY RETARDED PEOPLE WRITE WITH CAPS ON. Good thing I press shift
[/QUOTE]
[QUOTE=Luis Antonio]Bah! Bunch of lamers! Ye need the lesson of the true powergamer: Play mages, name them Koffi Annan, and only use non-intervention spells! Buwahahahahah![/QUOTE]
[QUOTE=Luis Antonio]Bah! Bunch of lamers! Ye need the lesson of the true powergamer: Play mages, name them Koffi Annan, and only use non-intervention spells! Buwahahahahah![/QUOTE]
- Zel Greywords
- Posts: 147
- Joined: Sun Sep 12, 2004 2:55 pm
- Location: Sighlark
- Contact:
It is possible, but not really with the toolset IF you want to use your spells in the main campaigns. (toolset is better for adding spells to fanmodules).
There are two ways to bring a custom spell into the game: you can replace an existing spell with your own one (recommended) or you can really add a new spell to the spell list. (bad idea, since you will have to manually modify half a dozen of files then)
I won't elaborate on the second way, but the first variant works by replacing the original scripts that are triggered when a spell is cast.
What you need for this is three (well, two) programs:
- a program to get your hands on the default scripts (I recommend Zoligato's nwn-viewer)
- a text editor to rewrite/change the script
- a little proggie called "nwnnsscomp.exe" which will compile your newly made script.
Look around in the web a bit, those two should be easy to find.
How-To:
1) Getting the script name and script text
- launch the nwnViewer
- choose File->Bif->Neverwinter Nights
- choose "scripts.bif" from the BIF list
- choose the spell script that you want to change/replace from the file list
(for example nw_s0_rayfrost for "Ray of Frost". The spells are all named in this way, starting with nw_s0_... and then the (shortened) spell title. Note that this BIF only lists the default NWN spells, not the ones from HotU or SoU, but this should suffice anyway.)
- the original script text will appear on the right.
- copy/paste the spell script text into a simple text editor like Notepad
- close the nwnViewer
2) Modifying the script/Making your spell
- edit the script to your liking until the spell does what you want it to do.
3) Reimporting your spell into NWN
- save that document into NWN's ".../override" folder as a simple .txt file
- open that folder
- rename your own script so that it has the same name as the original script (for example nw_s0_rayfrost.nss)
- place the nwnNSScomp.exe into that folder
- run that exe via DOS prompt and append the name of the script you want to have compiled
(example:
c:\Program Files\NeverwinterNights\override\nwnNssComp.exe -c nw_s0_rayfrost.nss )
The compiler will produce two more files with the same name which will appear in the override folder.
Now you're finally good to go. Launch NWN - whenever you or someone else casts "ray of frost" now, your custom spell will be fired instead.
Seems a bit complicated, but is actually easier than it looks - I just wanted to be thorough here.
There are also ways to interdict NPCs to use this spell (so that you're not fried by your own uber-spell) but that's optional and requires some more work. Plus, something as small as "ray of frost" is never used against you by enemy spellcasters.
As for the actual scripting... well, if you are familiar with JAVA, C, or any other programming language you should be able to figure out which strings to pull in the script text. The easiest thing is changing the damage a spell does. I can also help you if you want to change the spells VISUALS, too (it's also done in the script text), but if you want to give it a shot, better start small.
<edit>
Well, note that the Ray Of Frost script will look awfully complicated at first... maybe better look at "Fireball" to get a grip on what is happening in there. If you are at a -total- loss what to do, simply look for the spot where the damage (usually "nDam") is defined and change it to something like nDam=100, meaning the spell will now do 100 points of damage. Thats already something one can enjoy.
-Zel
There are two ways to bring a custom spell into the game: you can replace an existing spell with your own one (recommended) or you can really add a new spell to the spell list. (bad idea, since you will have to manually modify half a dozen of files then)
I won't elaborate on the second way, but the first variant works by replacing the original scripts that are triggered when a spell is cast.
What you need for this is three (well, two) programs:
- a program to get your hands on the default scripts (I recommend Zoligato's nwn-viewer)
- a text editor to rewrite/change the script
- a little proggie called "nwnnsscomp.exe" which will compile your newly made script.
Look around in the web a bit, those two should be easy to find.
How-To:
1) Getting the script name and script text
- launch the nwnViewer
- choose File->Bif->Neverwinter Nights
- choose "scripts.bif" from the BIF list
- choose the spell script that you want to change/replace from the file list
(for example nw_s0_rayfrost for "Ray of Frost". The spells are all named in this way, starting with nw_s0_... and then the (shortened) spell title. Note that this BIF only lists the default NWN spells, not the ones from HotU or SoU, but this should suffice anyway.)
- the original script text will appear on the right.
- copy/paste the spell script text into a simple text editor like Notepad
- close the nwnViewer
2) Modifying the script/Making your spell
- edit the script to your liking until the spell does what you want it to do.
3) Reimporting your spell into NWN
- save that document into NWN's ".../override" folder as a simple .txt file
- open that folder
- rename your own script so that it has the same name as the original script (for example nw_s0_rayfrost.nss)
- place the nwnNSScomp.exe into that folder
- run that exe via DOS prompt and append the name of the script you want to have compiled
(example:
c:\Program Files\NeverwinterNights\override\nwnNssComp.exe -c nw_s0_rayfrost.nss )
The compiler will produce two more files with the same name which will appear in the override folder.
Now you're finally good to go. Launch NWN - whenever you or someone else casts "ray of frost" now, your custom spell will be fired instead.
Seems a bit complicated, but is actually easier than it looks - I just wanted to be thorough here.
There are also ways to interdict NPCs to use this spell (so that you're not fried by your own uber-spell) but that's optional and requires some more work. Plus, something as small as "ray of frost" is never used against you by enemy spellcasters.
As for the actual scripting... well, if you are familiar with JAVA, C, or any other programming language you should be able to figure out which strings to pull in the script text. The easiest thing is changing the damage a spell does. I can also help you if you want to change the spells VISUALS, too (it's also done in the script text), but if you want to give it a shot, better start small.
<edit>
Well, note that the Ray Of Frost script will look awfully complicated at first... maybe better look at "Fireball" to get a grip on what is happening in there. If you are at a -total- loss what to do, simply look for the spot where the damage (usually "nDam") is defined and change it to something like nDam=100, meaning the spell will now do 100 points of damage. Thats already something one can enjoy.
-Zel
- Fiberfar
- Posts: 4196
- Joined: Fri Aug 13, 2004 12:07 pm
- Location: Looking down from ethereal skies
- Contact:
Ok, Thanks
Now since I don't have a clue about scripting even as you explained how to do it, I'll play the game as it is.
Now since I don't have a clue about scripting even as you explained how to do it, I'll play the game as it is.
[QUOTE=Luis Antonio]ONLY RETARDED PEOPLE WRITE WITH CAPS ON. Good thing I press shift
[/QUOTE]
[QUOTE=Luis Antonio]Bah! Bunch of lamers! Ye need the lesson of the true powergamer: Play mages, name them Koffi Annan, and only use non-intervention spells! Buwahahahahah![/QUOTE]
[QUOTE=Luis Antonio]Bah! Bunch of lamers! Ye need the lesson of the true powergamer: Play mages, name them Koffi Annan, and only use non-intervention spells! Buwahahahahah![/QUOTE]