Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Jun 20, 2012 17:55 Post subject: Create Spells on the fly via Struct editing? |
|
|
I was browsing the nwn32 sources, and found the struct definitions of for instance - Spells etc.
http://nwn.virusman.ru/svn/nwnx2-win32/branches/maxrock/include/CNWSpell.h
I was just wondering,
If we had a Spell Structure definition, like we have here.
Is it possible, with a little effort, to actually create a constructor, in nwnscript, that allows us to create a Spell?
Eg -
Specify all the offset information, and details
or even better, we call a NWNX Function like
struct sSpellInfo = sNWNX_Funcs_GetBaseSpell();
Which would return a detailed struct definition in nwn_script, which we then edit, and then we feed it back to nwnx, and then somehow force the server to cast the spell that we had just defined?
eg
Code: |
struct sSpellInfo = NWNX_Funcs_GetBaseSpell();
sSpellInfo.sp_name_tlk = 53322; //Change the spell name to something else in tlk.
sSpellInfo.sp_school = 4; // Change the spell school
sSpellInfo.sp_impactscript = "myNewSpell"l //The script to fire on spell impact.
NWNX_Funcs_CastCustomSpell(oPC,oTarget,sSpellInfo);
|
Does anyone think this has merit, or potential to be possible?
It would potentially open up the ability to create custom spells without needing to edit tlk or 2da's.
(If you can live with re-using tlk entries) |
|