Tuesday, March 13, 2007

Finally back to work on FRWCC

It's been a busy couple of weeks, but I finally squeezed in a few hours of work on the character creator tonight. My primary focus was to write and script the alignment-shifting altar. I have to say, I'm amazed at how easily it came together. I have almost no clue what I'm doing in that scripting editor, but I somehow managed to get it working tonight. My jaw literally dropped when everything seemed to be working as planned...on the first try, no less!

Right now, the sequence is:
1. Activate conversation on the altar by clicking on it.
2. If you don't have 10% of your total worth (gold + item value) in gold, you're forced to walk away.
3. If you do have 10% of your net worth in gold, you can pray to gods of any of the four alignment directions (good, evil, law, chaos) and give the 10% of your total worth in exchange for a 10-point alignment shift in that direction.

Everything seems to be basically complete except that I'd like to add some sort of visual effect when the alignment shift happens, and I haven't figured out how to do that yet. I think it'll just be a small addition to the script, but I'll have to do some snooping to figure out how to attach a single-fire visual effect (I'm thinking "fx_bard_ins_song_cast") to a character. I did that sort of thing once before when I was working on a nwn1 module, but I think I was using Gestalt's cutscene scripts at the time and therefore had prepackaged visual effect invocation scripts. Shouldn't be too difficult a thing to do though.

3 comments:

  1. ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectNWN2SpecialEffectFile("name_of_vfx.sef"), oPC);

    ...where name_of_vfx.sef is a NWN2 special effects file (sef) that you can preview using the built-in VFX plugin. Let me know if you need instructions on setting up and using the plugin--it's not obvious. :)

    ReplyDelete
  2. Oh, and "oPC" is GetFirstPC(); of GetPCSpeaker(); or whatever. :)

    ReplyDelete
  3. Thanks! :) Hopefully I'll get a chance to give that a go tonight.. -B

    ReplyDelete