Steve Jackson Games Forums

Steve Jackson Games Forums (https://forums.sjgames.com/index.php)
-   GURPS Character Assistant (https://forums.sjgames.com/forumdisplay.php?f=17)
-   -   Help me out with something fairly complex? (Skills, limits, default caps, and more!) (https://forums.sjgames.com/showthread.php?t=77977)

PK 03-16-2011 02:14 AM

Help me out with something fairly complex? (Skills, limits, default caps, and more!)
 
Okay, I've tried a lot of different things to accomplish this. In fact, I've never managed to make GCA lock up completely until now. :) So instead of posting the ridiculous builds I've tried, I'd like to just present my needs and humbly solicit advice from those more knowledgeable than I.

I need to create a set of almost-identical IQ/VH skills, but for the sake of this post I'll just focus on one. Let's call it "Path of Magic" for now. This skill doesn't have to affect anything else on the character sheet, but it has some very specific properties.

1. It cannot be learned higher than Thaumatology skill. If you have Thaumatology at 13, your maximum Path of Magic skill is 13.

2. It also cannot be learned higher than (12 + Magery) level. If you have Magery 2, your maximum Path of Magic skill is 14.

NOTE: In this GDF, Magery no longer gives a bonus to Thaumatology skill; I mention this as it's potentially relevant to #1 and #2 above.

3. It defaults to Thaumatology-6. However, your maximum default level is 12, whether you have Magery or not. In other words, if you have Thaumatology-15, you know Path of Magic-9. But if you have Thaumatology-25, you only have Path of Magic-12.

Any ideas on how I can implement all three of these restrictions? When I tried it, I think my need()s went recursive, because GCA just bricked on me. :)

Bruno 03-16-2011 09:14 AM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Quote:

Originally Posted by Rev. Pee Kitty (Post 1139365)
1. It cannot be learned higher than Thaumatology skill. If you have Thaumatology at 13, your maximum Path of Magic skill is 13.

2. It also cannot be learned higher than (12 + Magery) level. If you have Magery 2, your maximum Path of Magic skill is 14.

upto(@min("SK:Thaumatology::level",(12+ST:Magery)) ) should cover this - it picks the lower of the two as your hard cap.

Quote:

Originally Posted by Rev. Pee Kitty (Post 1139365)
3. It defaults to Thaumatology-6. However, your maximum default level is 12, whether you have Magery or not. In other words, if you have Thaumatology-15, you know Path of Magic-9. But if you have Thaumatology-25, you only have Path of Magic-12.

Any ideas on how I can implement all three of these restrictions? When I tried it, I think my need()s went recursive, because GCA just bricked on me. :)

Needs isn't a good way to handle caps, that's for sure. That's what the upto tag is for :)

A default cap on the other hand... I'm not sure about. GCA implements the Rule of 20 by default, but that's a "hardware switch" ie set at the program level like which version of the modifiers math you're using, not at the datafile/character level.

This shoooould work?

default(@min("SK:Thaumatology::level"-6,12))

again, takes the lower of "your Thaumatology-6" or "12"

Bruno 03-16-2011 09:19 AM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Nope, I forgot GCA hates using integers for calculating defaults. The upto() works...

If you create a hidden statistic called (for example) PATHDEFAULTCAP that starts at 12 and doesn't get modified, you could do default(@min("SK:Thaumatology::level"-6,ST:PATHDEFAULTCAP )) I think

Bruno 03-16-2011 09:21 AM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Although there's VERY interesting behavior if you don't put points into the skill, just put in the default, and raise your thaumatology over (12+Magery+6) - suddenly GCA assigns a crapton of points to the skill.

That's weird.

PK 03-16-2011 01:42 PM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Hmm... could it maybe all be worked into the upto()? Like, leave the default at Thaum-6 and then include something like

Code:

upto(
        @if me::points=0 THEN
                @min("SK:Thaumatology::level",ST:MagicDefaultCap)
        ELSE
                @min("SK:Thaumatology::level",(12+ST:Magery))
)

(NOTE: I know the formatting is wrong, but I wanted to expand it to make my idea clear.) And here, ST:MagicDefaultCap is set at 12.

tmedwards 03-16-2011 02:58 PM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Just tossing in a comment here, based on what's been posted so far. Unless giving users the ability to easily redefine the maximum default level is a design goal, I don't really see a reason for the helper stat, when you could just use the literal value. Only create helper stats if you really need too.

Also, this should perform the same function as your code, but is tad more concise (I haven't tested this though, so…):
Code:

upto(@min("SK:Thaumatology::level", @if(me::points = 0 THEN ST:MagicDefaultCap ELSE 12+ST:Magery)))

Armin 03-17-2011 03:06 AM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
The default issue may be tricky. GCA is designed to look through a list of possible defaults, and pick the best, not the least. And, because GCA needs to track what it is defaulting from, math abilities are somewhat curtailed in the default() tag, and weirdness can happen if GCA gets confused as to what it thinks it's actually defaulted from, rather than what it really got when it solved the default() tag.

It's possible to do some trickery in there, but the only really safe default is some form of SK:X - Y or ST:X - Y or something similar, since GCA will generally try to use the first identifiable trait as the "defaulted from" item.

I can't think of a safe way to do a lesser-of default without possibly using a helper stat or something, right now. Maybe something will occur to me later. Wish I'd gone ahead and done 'variables'* when I'd planned to.

Armin

* variables would have been, and may still be, much like stats, except not in the stat list, so they'd clutter things up less.

PK 03-17-2011 01:55 PM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Okay, so would this approach work better?

1. Create a new stat. Let's say ST:MagicDefaultBase. Set it to 0.

2. Change Thaumatology so that it modifies this new stat. The stat should be equal to Thaumatology-6, but with a maximum of 12.

3. Have Path of Magic default to "ST:MagicDefaultBase::level".

Does that make sense? It seems like the easiest way to handle it.

I'm not 100% sure on the code, but it seems like the way to pull this off would be:

#MergeTags in "SK:Thaumatology" with gives(@if me::level < 18 THEN =+(me::level - 6) ELSE =+12 to "ST:MagicDefaultBase")

Would that work?

tmedwards 03-17-2011 03:08 PM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Well, your gives is boned. Try:
Code:

#MergeTags in "SK:Thaumatology" with {gives(=+@if(me::level < 18 THEN me::level - 6 ELSE 12) to "ST:MagicDefaultBase")}
Other than that, seems like it should work. I just tested and it looks like it works right.

tmedwards 03-17-2011 03:36 PM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
When I said I tested, I made a GDF with something like this in it:
Code:

[ATTRIBUTES]
"MagicDefaultBase", symbol(MDB), basevalue(0), maxscore(12), minscore(0), display(no)

[SKILLS]
#MergeTags in "SK:Thaumatology" with {gives(=+@if(me::level < 18 THEN me::level - 6 ELSE 12) to "ST:MagicDefaultBase")}
"Path of Magic", IQ/VH, default("ST:MagicDefaultBase"), upto(@min("SK:Thaumatology::level", 12 + "ST:Magery")), page(RPK), cat(_General, Occult/Magical)

As I said previously, it looks like it works – the various level interactions seem to do the right things, anyway. The points calculation for defaulting may be going wonky, however, since it's being based off of MagicDefaultBase rather than Thaumatology-6 – then again, the points may be perfectly fine and I'm just nuts. :)

Armin 03-17-2011 03:46 PM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Yup, if I understand things correctly, what tmedwards has provided should do the job (thanks, Thom). If not, let us know what's messed up ;-)

PK 03-17-2011 10:00 PM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Awesome! It worked! I threw a needs("SK:Thaumatology" = 1 pts) on the end as well, since there's (intentionally) no point in taking such a Path skill unless you have Thaumatology as well.

Thanks Em, Thomas, and Armin for all the help!

Armin 03-19-2011 03:18 AM

Re: Help me out with something fairly complex? (Skills, limits, default caps, and mor
 
Thanks, Emily and Thom!


All times are GMT -6. The time now is 06:13 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.