PDA

View Full Version : Nymph's Kiss Feat


Corwyn
July 9th, 2010, 05:20 PM
Hi,
I've been wracking my brain for the programming (it's been well over 15 years since I used this type) and frankly I'm pounding my forehead against the wall now. I've been able to add a new race, new weapons, and some new abilities (all stuff based off other stuff, like suggested elsewhere).
However, I'm trying to add this Feat and after a few EPIC fail attempts, I found this. which failed to pass as well.

Feat does the following (for those that don't know)
+2 bonus to all Cha-based skill checks
+1 bonus on saves vs spells & spell-like abilities
+1 skill point per level.

==================================
~search through all the class levels
foreach pick in hero from BaseClass
~for each class level that's at or above the level we've chosen
if (field[cLvlIndex].value >= field[hUsed].value) then
~retrieve the cClsIndex from the class helper, and use that to figure
~out which arrayvalue of the skill totals array to add a bonus to

~we'll add +1, since this will repeat once for every class level
herofield[tSkTotals].arrayvalue[eachpick.linkage[helper].field[cClsIndex].value] += 1

~if the feat was taken at level 1, and we're modifying the class level
~at level 1, add another 3 skill points, so that we've added +4 total
~for this level
if (field[hUsed].value= 1) then
if (field[cLvlIndex].value = 1) then
herofield[tSkTotals].arrayvalue[eachpick.linkage[helper].field[cClsIndex].value] += 3
endif
endif
endif
nexteach

=======================


ANY help would be greatly appriciated. I think I found an older verison user file maybe... I don't know.

Please and thank you for any help.
Corwyn

ShadowChemosh
July 10th, 2010, 11:59 AM
Wow! So I think what you have their is allot of older or d20 file stuff? Either way what you want is pretty easy to do. You can not do the +1 bonus on saves as that is a situtional modifier and should be applied by the player. The rest is not too bad to script.

The only skill that is a pain is the Perform skill as their can be new ones added by classes or players and their is a large list. Luckely HL tags these all with a helper tag that makes finding them all easy. After that the list of Cha skills is pretty small and then we just need to apply a single point per level to our total skills point to spend. We don't have to do anything weird now in PFPRG as classes don't get x4 Sp at level 1.

Here is the final working script for you. The first comment line is telling you what timing to put the script at which you have to do at the top of the eval window.


~Phase: First, Priority 5,000

~Adjust all Peformance skills by one
foreach pick in hero from BaseSkill where "Helper.SkCatPerf"
eachpick.field[Bonus].value += 1
nexteach
~Adjust the rest of the Cha skills by one
#skillbonus[skBluff] += 1
#skillbonus[skDiplo] += 1
#skillbonus[skDisguise] += 1
#skillbonus[skIntim] += 1
#skillbonus[skUseMagic] += 1
~Give a bonus skill point equal to the total level of the hero
hero.childfound[resSkill].field[resMax].value += #totallevelcount[]


Hope that helps.

Corwyn
July 10th, 2010, 03:19 PM
Awesome, thanks. Working with out info would explain why I was trying to pull my hair out (not that I have that much left) :)

Appreciate all your help.
Corwyn

risner
July 10th, 2010, 08:09 PM
Hope that helps

IIRC it is more complicated for the skills.
I think it only works from when you take the feat.

So can you determine when the feat was taken somehow?

ShadowChemosh
July 11th, 2010, 05:51 AM
So can you determine when the feat was taken somehow?
I don't know of any way of storing such information but that does not guarantee their is no way. The problem is from what I know is that all the different values are constantly being re-calculated. You would need to be able to store a static value somehow on the feat to represent the level you assigned the feat to the hero.

risner
July 11th, 2010, 09:43 AM
store a static value somehow on the feat to represent the level you assigned the feat to the hero.

Is there a way to put a text field? I needed this for things like Area Map (so you could describe what the map is.)

If so, could you convert the text field to number? You could then enter when you took it in a field and the math would just subtract this from the total.

ShadowChemosh
July 11th, 2010, 03:48 PM
Their is such a thing and I did fix the area map to allow exactly that. The issue is from the little testing I did that text area is a String(ie character field) and I would need some type of Built In Function(BIF) to convert string to numeric. I know HL converts numeric into string very easily, but didn't seem to like doing the other way around.

Granted I could just not know how, but usually in the languages I usually use their is a function that allows one to convert from one field type to another(ie %Dec or %Int). If we had something like that than it could maybe work with the player typing in the level......

Mathias
July 11th, 2010, 04:12 PM
Actually, I'd recommend using the "Choose Amount of Activation" to set the level it was chosen at - the user will have to flip to the In-Play page, but it's better than trusting the user to enter exactly the format you want, and not include anything extraneous.