Jump to content

Using detectable spells


i30817

Recommended Posts

I've been looking around and it seems SCSII has the latest, most up to date version of DS.

I was wondering if i could package/use it on my mod, and if it safeguards against double installing.

 

And of course, the "how to install in my tp2 for dummies" question, though i can probably figure it out.

 

Also, does it have any dynamic content i can account for? For instance, mod added spells can be detectable, or is that off limits?

Link to comment

I've been looking around and it seems SCSII has the latest, most up to date version of DS.

I was wondering if i could package/use it on my mod,

 

By all means.

 

 

and if it safeguards against double installing.

 

As far as I can recall, it does (on a spell-by-spell basis, so that you can (for instance) write a mod with new spells and include DS code just for those spells, without confusing SCS at a later stage.)

 

And of course, the "how to install in my tp2 for dummies" question, though i can probably figure it out.

There are some basic instructions in the comments at the top of ds.tph.

 

Also, does it have any dynamic content i can account for? For instance, mod added spells can be detectable, or is that off limits?

 

Again, see ds.tph, but basically the actual details of which spells to modify are externalised to a file to which you can add whatever spells you like.

Link to comment

So, i can just dump this:

 

OUTER_SPRINT ~detectfile~ ~scsii/ds/cddetect.2da~
OUTER_SPRINT ~statsfile~ ~scsii/ds/stats.2da~
OUTER_SPRINT ~khelbenfile~ ~scsii/ds/spwi705.spl~

LAUNCH_ACTION_MACRO ~detectable_spells~

OUTER_SPRINT ~detectfile~ ~scsii/ds/dw#detect.2da~

LAUNCH_ACTION_MACRO ~detectable_spells~

// Fix scripts in Ascension and Kelsey that will have been broken by the new DS

OUTER_SPRINT ~marker~ ~dw#fixasc~
OUTER_SPRINT ~oldfiles~ ~scsii/DS/oldfiles_asc.2da~
OUTER_SPRINT ~oldswapfile~ ~scsii/DS/oldds_swap.2da~
LAUNCH_ACTION_MACRO ~fix_old_DS_scripts~

OUTER_SPRINT ~marker~ ~dw#fixkelsey~
OUTER_SPRINT ~oldfiles~ ~scsii/DS/oldfiles_kelsey.2da~
LAUNCH_ACTION_MACRO ~fix_old_DS_scripts~

in my tp2 with the paths adjusted and i will have a complete STATS.IDS?

Link to comment

Mmmm i think i will just require SCSII installed... it looks too complex to account for old unfixed bugs in other mods myself.

 

Edit:

err, i installed scsII and checked stats.ids. It doesn't have the spells i want, mostly area effects spells to disallow autoattacking if the enemy is suffering from them and "myself" is not in weapon range (to minimize friendly fire).

 

Web and entangle and grease are all stats from vanilla.

 

But

//cloudkill, Incendiary Cloud, stinking cloud, Sphere of Chaos, Teleport Field, Acid Fog, fire storm, Ice storm

aren't. Or at least they have a different name.

 

And i guess i DO need to embed DS for this anyway, but that code to check for bugs in ascension and kelsey made me cry.

 

Also is there documentation for what the states and their additional stats mean?

Just because SCRIPTING_STATE_6 is not exactly self documenting.

Link to comment

So, i can just dump this []

in my tp2 with the paths adjusted and i will have a complete STATS.IDS?

Yep. (You need to actually INCLUDE ds.tph too, of course.)

 

Mmmm i think i will just require SCSII installed... it looks too complex to account for old unfixed bugs in other mods myself.

 

It shouldn't be. You don't need to know what the code does - just include it.

 

//cloudkill, Incendiary Cloud, stinking cloud, Sphere of Chaos, Teleport Field, Acid Fog, fire storm, Ice storm

aren't. Or at least they have a different name. Is it possible to add a "Harmfull area effect stat" that if >0 or something means the enemy is under one of these?

 

Up to a point, though not trivially. Also, there are a fixed number of stats, and all are used by SCS, so you'll break SCS compatibility. (I think ToBEx may introduce new stat slots, though.)

 

Also is there documentation for what the states and their additional stats mean?

Just because SCRIPTING_STATE_6 is not exactly self documenting.

As far as I can recall, it doesn't do anything; it's just a scripting state.See http://iesdp.gibberlings3.net/files/ids/bg2/stats.htm for (some) more information.

Link to comment
As far as I can recall, it doesn't do anything; it's just a scripting state.See http://iesdp.gibberl...s/bg2/stats.htm for (some) more information.

No offense, but that is insufficient information. The stats have default values (which 0 or 1 or what), and i know some of them are overloaded too. Not to mention that sometimes the names are unhelpful to find what the state does. Maybe the mods should append to a comment file when they change a spell to change a stat.

 

 

 

Mmm. I just noticed the tobex scripting stats section.

 

Not as flexible as i hoped.

 

TobEx expands the use of STATS.IDS to support new hard-coded stats and custom stats for modmaker use. The features of new stats are:

  • New stats can be set using effect opcode 318 (0x13E) with description below
  • New stats 202-400 are reserved for hard-coded stats
  • New stats can be checked correctly using CheckStat(), CheckStatLT(), and CheckStatGT() script triggers
  • New stats are not permanent, they require an ongoing effect opcode 318 in order to keep their values
  • In order to make a new stat semi-permanent, you can set an extremely long duration for the effect, or use timing mode 10 and set duration to INT_MAX (2147483647)
  • New stats will only be saved in saved games if stored as an effect opcode 318
  • Actions cannot directly set the value of new stats (they will not keep); use an action to trigger effect opcode 318 if actions are required
  • New stats have no effect on the game unless you specifically script in; for example, use scripts to CheckStat() and apply appropriate actions

 

DS doesn't allow using this opcode to set new slots over the limit does it? Would be nice feature.

The new hardcoded stats are already slightly useful though.

Link to comment
As far as I can recall, it doesn't do anything; it's just a scripting state.See http://iesdp.gibberl...s/bg2/stats.htm for (some) more information.

No offense, but that is insufficient information. The stats have default values (which 0 or 1 or what), and i know some of them are overloaded too. Not to mention that sometimes the names are unhelpful to find what the state does. Maybe the mods should append to a comment file when they change a spell to change a stat.

 

No offence, but it's not my job to provide documentation to your desired level of clarity. The data on what spells are actually changed is in the DS component (learn how to read cddetect.2da) and visible in IE on the spells themselves; and, since it's not end-user-visible, documenting it further is not exactly a priority.

Link to comment

I've written an update to DS half a year ago. Still had no time to utilize it properly :(

The main change is compatibility with ToBEx and SPL-altering mods (in preparation for SR v4).

 

Since then, a couple of other issues have been uncovered, which iirc I've fixed but kept somewhere offline. If there's a need, I can package a final working version and upload it within a day.

Link to comment
If there's a need, I can package a final working version and upload it within a day.
I doubt that (unless I missed the post or unless you've a time machine) but if you posted any updates you've done within the year, that would be cool. Sooner or later we (or someone) is going to want to try to use it in BP and Ascension, for the sake of standardisation etc.
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...