Skip to content

Modifying spellcasting in engine

Currenly, nwscript only allows the level of a spell cast to be set using predefined levels, you can not enter a level other than the predefined set for any specific spell. While it would be possible to ceate a work around using nwscript, the level of work to do so would be onerous. The entire spell system would need to be recreated, SR check, save check, and any other check required to determine if a spell is successfully cast or effect resisted/evaded. It would be simpler if the engine allowed the use of a simple integer while retaining the current functionality, maybe just adding to the engine and therefore to nwscript an additional predefined parameter set to some val so that you could modify the script function, adding a parameter like ,int casterlevel = -1).

Comments

  • FreshLemonBunFreshLemonBun Member Posts: 909
    The spells are based entirely on scripts and 2da information, while it's true some functions are hardcoded it's still used or not used by each specific script. You'll find that if you want to do anything interesting with spellcasting in general you'll be better off replacing or rewriting the entire system.

    There isn't much value in moving more of the process into hard coded engine maintained variables rather than just replacing it all with soft coded variables. Only a few things pose a definite brick wall such as spellbook interaction, learn/remove known spell, and getting a specialist wizard's spell school.
  • KMdSKMdS Member Posts: 3
    edited February 2018
    The engine IS the game, nwscript is only an appendage of the engine allowing a user to access the engine. "Hard code " and "soft code" are not a specific type of code. They merely represent whether a certain capability within the engine is available or hooked into the nwscript. What I suggest is the "softcoding" of the setting of the level of a spell cast so the a content creator can create items, ect.. which can cast at varying levels of power without the restriction of requiriing the caster level being set to a limited number of predefined levels.

    Whether or not the additions you suggest are included, the need for "softcoding" the caster level would be a benefit and most likely be easily achieved.

  • ShadooowShadooow Member Posts: 402
    The workaround needed to do that already exists in community patch. Version for EE is here.
  • FreshLemonBunFreshLemonBun Member Posts: 909
    You can quibble about definitions but essentially almost everything is a number in the scripts or can be replaced by such a number, it's only useful to separate what can be changed with scripts and what can't. There is nothing stopping, say, setting caster level or adding practiced caster feats, or spell power feats. The issue is that you just can't access the script of certain functions, hence work arounds, but it's impossible to anticipate everything you want to add or change, hence replacement is usually necessary regardless.

    Softcoding caster level through replacement of the system isn't difficult. However affecting those other things like spell school specialization is not a task accomplished by scripting, you need for example NWNX or something else to mess with the character file.
Sign In or Register to comment.