Adding String References
#1
Posted 06 August 2009 - 04:54 PM
#2
Posted 07 August 2009 - 12:35 AM
Hope it helps, or at least gives you some ideas
Cuv
// ...Spells
COPY ~ExpAssylum/Spl/CVFFLOK.spl~ ~override~
SAY 0x8 ~Targetting~ // general name
SAY 0x50 ~This spell attempts to set a stat checkable by scripts to avoid friendly fire~
SAY 0xfe ~Locking Targets~ // String This spell also sets the GLOBAL "CVLock" to 1
COPY ~ExpAssylum/Spl/Kessyl1.spl~ ~override~
SAY 0x8 ~Topaz Dragon Breath~ // general name
COPY ~ExpAssylum/Spl/CUVDRG.spl~ ~override~
WRITE_ASCII 0xde ~KAwake~ // Global Variable
COPY ~ExpAssylum/Spl/CVPROGD.spl~ ~override~
SAY 0x8 ~Protection From Good 10' Radius~ // general name
SAY 0x50 ~Protection From Good 10' Radius
(Abjuration)
Level: 4
Sphere: Protection
Range: Touch
Duration: 1 turn/level
Area of Effect: 10' radius
Saving Throw: None
When this spell is cast, all creatures within a 10' radius are affected individually by 'protection from good'. It creates a magical barrier around the recipients at a distance of one foot. The barrier moves with the recipient and has two major effects: First, all attacks made by good or goodly enchanted creatures against the protected creature receive a penalty of -2 to each attack roll, and second, any saving throws caused by such attacks are made by the protected creature with a +2 bonus.~
SAY 0x2d6 ~Protection From Good 10' Radius~
SAY 0x546 ~Protection From Good 10' Radius~
SAY 0x7b6 ~Protection From Good 10' Radius~
SAY 0xa26 ~Protection From Good 10' Radius~
SAY 0xc96 ~Protection From Good 10' Radius~
SAY 0xf06 ~Protection From Good 10' Radius~
SAY 0x1176 ~Protection From Good 10' Radius~
SAY 0x13e6 ~Protection From Good 10' Radius~
SAY 0x1656 ~Protection From Good 10' Radius~
SAY 0x18c6 ~Protection From Good 10' Radius~
SAY 0x1b36 ~Protection From Good 10' Radius~
SAY 0x1da6 ~Protection From Good 10' Radius~
SAY 0x2016 ~Protection From Good 10' Radius~
SAY 0x2286 ~Protection From Good 10' Radius~
#4
Posted 07 August 2009 - 11:14 PM
I really think that might be enough. You shouldn't even have to bother with a NAME2, since spells (unlike scrolls and other items) can't be "identified".At the moment my I simply have SAY NAME1
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#5
Posted 08 August 2009 - 07:37 AM
Show Hex Offsets in Near Infinity. I didn't know about that before -- certainly allows greater flexibility.You can set your string in the file during installation. You just need the hex address from the file you want to patch.
True, though 30% is as high as it allows.You could also take a look at header 12 of the Lower Resistance spell, which does precisely that.
Yes I can remove that. I was basing my code off of another .tp2 file in a different mod.I really think that might be enough. You shouldn't even have to bother with a NAME2, since spells (unlike scrolls and other items) can't be "identified".At the moment my I simply have SAY NAME1
#6
Posted 08 August 2009 - 07:35 PM
Ok, but what I meant was that the SAY NAME1 alone should be enough to get the spell text to display when cast, unless I'm not understanding the question. If it's an area effect spell, then Cuv's code may be more comprehensive.Yes I can remove that. I was basing my code off of another .tp2 file in a different mod.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#7
Posted 09 August 2009 - 07:50 AM
I wanted to customise the "Text: Display String [139]" text upon installation.Ok, but what I meant was that the SAY NAME1 alone should be enough to get the spell text to display when cast, unless I'm not understanding the question. If it's an area effect spell, then Cuv's code may be more comprehensive.Yes I can remove that. I was basing my code off of another .tp2 file in a different mod.
#8
Posted 09 August 2009 - 04:13 PM
Try this code:I wanted to customise the "Text: Display String [139]" text upon installation.
COPY_EXISTING ~spwi514.spl~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) BEGIN READ_LONG 0x64 abilities_off READ_SHORT 0x68 num_abilities READ_LONG 0x6a effects_off FOR (i = 0; i < num_abilities; i += 1) BEGIN // for each ability READ_SHORT (abilities_off + 0x28*i + 0x10) required_level READ_SHORT (abilities_off + 0x28*i + 0x1e) num_features READ_SHORT (abilities_off + 0x28*i + 0x20) features_ind FOR (j = 0; j < num_features; j += 1) BEGIN // for each feature of the ability READ_SHORT (effects_off + 0x30*(features_ind + j) + 0x00) opcode PATCH_IF (opcode == 139) BEGIN // if this is 'display string' effect SAY (effects_off + 0x30*(features_ind + j) + 0x04) ~Magic Resistance Lowered by 30%~ // add string to dialog.tlk and write its strref here END END END END BUT_ONLYIf you don't already use patching to adjust the amount of magic resistance that's actually being lowered, you could add it into the above code fairly easily as well.