Jump to content


Photo

Heh heh heh heh


  • Please log in to reply
4 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 26 April 2017 - 01:50 PM

I just experimented with adding Cures to a temple beyond the standard list. Thought it wouldn't work, but it seems that Abi-Dalzim's Horrid Wilting works fine as a single-target effect. The results weren't pretty, though, were they, Quayle?

 

For the boring and practical application this could mean long-lasting conveniences like Protection from Negative Energy, Fire/Cold, Evil, Normal Missiles, Strength, Luck, Armor, possibly some useful Polymorphs and Invisibility...

 

By the way, I can't seem to get rid of the Donate page of a temple, even when I tick it off in properties. Is it hard-coded? If it weren't for this part, the function would be ready as a wizard-service shop.



#2 temnix

temnix
  • Member
  • 983 posts

Posted 16 May 2017 - 02:13 AM

Update: if you want to experiment with extra magical "services," keep in mind that some of this stuff seems hard-coded. The reason is probably that only temples normally provide magical boosts and cures, and they have a fixed list, it's just shorter for BG1 than for BG2. So Raise Dead (and Resurrection in BG2) are the only cures available to a dead character - everything else, as you all know, is grayed out. The engine discriminates in just those two cases. It won't distinguish a custom cure if you make a Dead Actor-targeted spell and properly gray things out. For custom options it'll cast anything on anyone, but obviously SPL files that target Living Actor won't do anything to dead people, though effects that target Dead Actor WILL work on living party members... well, not Raise them obviously, but everything else that you include.

 

If you want to add new services for the living and the dead, it's easy - just add a custom SPL as a cure at the "temple." In the tp2, write e.g.

 

COPY ~Wanted Charname/REINCA_#.spl~ ~override~
SAY NAME1 ~Reincarnate~
SAY NAME2 ~Reincarnate~

OUTER_SET strref = RESOLVE_STR_REF (~The selected character us brought back in a random body.~)
APPEND speldesc.2da ~REINCA_# %strref%~
BUT_ONLY

 

Then you need to give your cure a custom icon. I had a nice swastika hand-drawn for Reincarnate, but another hard-coded feature turned out to be that that only BAM icons for existing spells - the stones that you click in the bar to cast - are valid as custom icons for cures. Not the icons from the spellbook, not scrolls, not your own stuff. Elsewhere you can draw your own icons and get them to show inside the game for your own spells just fine, but not here. Standard selection only. Even other existing BAMs in the game won't work. But BG1, BGEE I mean, does contain stone icons for high-level spells not actually available until the sequel, so the selection is wide enough. After you settle on some appropriate icon and update the 2DA as above, the spell will appear with your description, but all custom icons will be grayed out for dead characters and enabled for living party members (remember, only Raise Dead and Resurrection get a break from the engine, the rest are treated as "spells for the living.") To deliver a custom cure to a dead character, you need to switch to a living character first, select the cure button there and then switch to the dead one. The button will remain selected, you'll be able to buy the cure and, in this case, reincarnate the dead one.

 

In the end I decided against Reincarnate, for a few reasons. But charms for the living are easy to make. Pick some icons, give them custom names, glows, descriptions, bundle any effects and durations you want. I haven't been able to find a caster level for cures, unless you put it inside the SPL. For simplicity with durations and ranges I go for fixed terms or definite random rolls. You aren't limited to regular magic, too. Anything the opcodes can do, anything that could be construed as a service, could be ordered here, from the services menu. Dye hair? Sure. Orange 1 gp, yellow 2 gp, ultraviolet 10 gp. Draw a card from a virtual Deck of Many Things? Why not. Don't forget to include a minor death. Normal gambling? Easy. Pay 150 gold for a roll that creates 10d20 gold pieces or pay 200 gold for a roll that creates 3d4 random gemstones. Just write the terms opposite the "cures" so the player can see what's what. Teleportation hub? Of course. Athkatla 10 gp, Underdark 100 gp. Useful mutations? Why not. Reduce Dexterity by 1 point, Raise Strength by 1 point. Or hire help: an option that uses Summon Creature to conjure an invisible minion scripted to make itself Global, follow the party around and blast enemies with lightning - or just run a timer so that a few hours later the party will be magically refreshed.



#3 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 16 May 2017 - 07:44 PM

Seems fun.  Now I want a temple of Tymora where you get a random spell cast on you.



#4 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 16 May 2017 - 09:18 PM

 I haven't been able to find a caster level for cures, unless you put it inside the SPL

Temples cast spells at minimal level, so it's pretty useless if you want to re-purpose standard spells without making fixed-level copies for temples.

 

So Raise Dead (and Resurrection in BG2) are the only cures available to a dead character - everything else, as you all know, is grayed out. The engine discriminates in just those two cases.

IIRC Remove Curse also has hardcoded checks to be available only when there's cursed item/status on the character.

 

but another hard-coded feature turned out to be that that only BAM icons for existing spells - the stones that you click in the bar to cast - are valid as custom icons for cures.

Try to end the BAM's name with a "b", it may do the trick.


Edited by GeN1e, 16 May 2017 - 09:20 PM.

Retired from modding.


#5 temnix

temnix
  • Member
  • 983 posts

Posted 17 May 2017 - 08:33 AM

You were quite right: ending the icon's name with B did it! This needs to be the icon on the main page of an SPL, not in Spell Ability.