Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Roleplaying > GURPS > GURPS Character Assistant

Reply
 
Thread Tools Display Modes
Old 11-14-2018, 10:23 PM   #1
Refplace
 
Refplace's Avatar
 
Join Date: Nov 2008
Location: Yukon, OK
Default Making Pick lists

So I made a skill and it works as intended and Techniques off it also work.
However I want to make it a pick list and pulled from the Wrist Lock Technique as a guide.
Trouble is the list is empty and I think I am not creating the right group name or category.
Here is an example trying to load items with "Affinity" or "Affinity Skill" as a tag.
************************************************** ************************************************** ***\[STOP]
[SKILLS]
************************************************** ************************************************** **\[START]


<Ritual Magic Affinities, Affinity>
Affinity (Magic), type(IQ/VH), default(SK:Ritual Magic - 6, SK:Symbol Drawing - 6, SK:Thaumatology - 6), needs(SK:Ritual Magic | SK:Symbol Drawing | SK:Thaumatology), page(00), cat(Affinity)

Under Spells I want this code to make a Technique from a list.

Ritual Spell (%AffinitySkill%), Tech/A, default("SK:%AffinitySkillList%::level"), needs(SK:%AffinitySkillList%), upto(prereq + 4), page(00),
x(#ChoiceList(_
name(Affinity Skill),
title(Wrist Lock: Choose a combat skill),
text(Choose a combat skill from the list:),
picksallowed(1),
method(bynumber),
list(_
#grouplist(GR:Affinity, flags(NoPrefix))_
)_
)_
), noresync(yes)

The code loads an empty list.
__________________
My GURPS publications GURPS Powers: Totem and Nature Spirits; GURPS Template Toolkit 4: Spirits; Pyramid articles. Buying them lets us know you want more!
My GURPS fan contribution and blog:
REFPLace GURPS Landing Page
My List of GURPS You Tube videos (plus a few other useful items)
My GURPS Wiki entries
Refplace is offline   Reply With Quote
Old 11-15-2018, 11:14 AM   #2
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: Making Pick lists

Well, #grouplist is a directive to build a list out of a defined Group. So my first question is: Do you actually have a Group named Affinity defined in the data file?

Other things. These won't affect displaying the choice list, but:
  • if you name your list Affinity Skill with that space between words, then you must include the space in the variable references to it: %Affinity Skill% and %Affinity SkillList%. Or remove the space from the name.
  • I know the official files do it all the time, but if you only care about getting and using one choice, there's no need to use the %XList% result variable, you can just use %X%. So %AffinitySkill% would be the same result as %AffinitySkillList% and easier to keep straight.

Data File Reference Guide
__________________
Armin D. Sykes | Visit my GCA5 blog for updates and previews. | Get GURPS Character Assistant 5 now at Warehouse 23.

Last edited by Armin; 11-15-2018 at 11:21 AM.
Armin is offline   Reply With Quote
Old 11-15-2018, 12:43 PM   #3
Refplace
 
Refplace's Avatar
 
Join Date: Nov 2008
Location: Yukon, OK
Default Re: Making Pick lists

Quote:
Originally Posted by Armin View Post
Well, #grouplist is a directive to build a list out of a defined Group. So my first question is: Do you actually have a Group named Affinity defined in the data file?
[/LIST]
Data File Reference Guide
I think so, not sure how to tag the group. I tried adding a category tag and <Affinity Skill> before the group of Affinity skills. Also Did multiple verions with and without the space, Think I am using <Affinity> now in case the space was throwing it off. Ill review the datafile gude and try again, Thanks the guide should be a lotof help,did not see it from the tutorial pages.


That fixed it! So the error on my part was I was doing <Affinity> instead of [Affinity] since I treated it as a skill block and had [Skills]. Thank you very much for your help!
__________________
My GURPS publications GURPS Powers: Totem and Nature Spirits; GURPS Template Toolkit 4: Spirits; Pyramid articles. Buying them lets us know you want more!
My GURPS fan contribution and blog:
REFPLace GURPS Landing Page
My List of GURPS You Tube videos (plus a few other useful items)
My GURPS Wiki entries

Last edited by Refplace; 11-15-2018 at 12:58 PM.
Refplace is offline   Reply With Quote
Old 11-15-2018, 03:26 PM   #4
ericbsmith
 
ericbsmith's Avatar
 
Join Date: Aug 2004
Location: Binghamton, NY, USA. Near the river Styx in the 5th Circle.
Default Re: Making Pick lists

Quote:
Originally Posted by Armin View Post
  • I know the official files do it all the time, but if you only care about getting and using one choice, there's no need to use the %XList% result variable, you can just use %X%. So %AffinitySkill% would be the same result as %AffinitySkillList% and easier to keep straight.
Normally I use #GroupList() and #List() when the choices get used in multiple traits or templates. This makes the data files slightly smaller, but more importantly makes changes to the lists much easier since an addition or correction only needs to be made in one place instead of multiple.

So things like the Action background lens advantage additions get built using a #List, while the rest of the advantages are just added as named traits. Some data files have a lot of traits getting reused so use a lot of lists, other - especially the older files like the Basic Set - were originally written using named traits in the list and have only partially switched to using #GroupList() and #List() where appropriate.

Quote:
Originally Posted by Refplace View Post
That fixed it! So the error on my part was I was doing <Affinity> instead of [Affinity] since I treated it as a skill block and had [Skills]. Thank you very much for your help!
I'm surprised that worked. Groups and Lists are their own datafile section, so would normally be set up as:
[GROUPS]
<Affinity>
AD:Fu
[LISTS]
<Discordian>
AD:Bar
__________________
Eric B. Smith GURPS Data File Coordinator
GURPSLand
I shall pull the pin from this healing grenade and...
Kaboom-baya.
ericbsmith is offline   Reply With Quote
Old 11-15-2018, 04:26 PM   #5
Refplace
 
Refplace's Avatar
 
Join Date: Nov 2008
Location: Yukon, OK
Default Re: Making Pick lists

Quote:
Originally Posted by ericbsmith View Post

I'm surprised that worked. Groups and Lists are their own datafile section, so would normally be set up as:
[GROUPS]
<Affinity>
AD:Fu
[LISTS]
<Discordian>
AD:Bar
I was typing in a hurry and my eyes still blurry.
I did [GROUP] not [Affinity] and followed it with <Affinity> which took it out of the skill section listing, but Ill call that a feature rather than a bug. I can avoid duplicating it in the datafile by using lists instead of single entries when using the program. The lists are already quite long when using the program so since I have a around 20 Affinity skills I will just display them with lists.
Less screen clutter, especially since later I will add Runes and some other long lists.
I read the datafile reference guide but will need some practice to get the Group and List functions really worked out in my head.
__________________
My GURPS publications GURPS Powers: Totem and Nature Spirits; GURPS Template Toolkit 4: Spirits; Pyramid articles. Buying them lets us know you want more!
My GURPS fan contribution and blog:
REFPLace GURPS Landing Page
My List of GURPS You Tube videos (plus a few other useful items)
My GURPS Wiki entries
Refplace is offline   Reply With Quote
Old 11-16-2018, 12:33 PM   #6
Refplace
 
Refplace's Avatar
 
Join Date: Nov 2008
Location: Yukon, OK
Default Re: Making Pick lists

Still having trouble here.
I can get it to pick from a group but have the following issues.
1) It appends multiple picks together instead of separate items, in this case skills.
2) It shows the prerequisite tag but does not seem to inherit the info from the skill, such as Type(IQ/H). I think I could work around the type part by using an inputreplace with a choice but at that point I might as well just leave it as a bunch of skills in the main list. That would be easier for the user than specifying type for each item.

Current working (mostly) code..
_Test (%skilllist%), default(SK:%skilllist% - 6), needs(SK:%skilllist%), page(00),
x(_
#ChoiceList(_
name(skill),
title(Ritual Magic Path),
text(Please select an appropriate Ritual Magic core skill:),
picksallowed(1),
method(bynumber),
default(13),
list(_
#grouplist(GR:Affinity Skills, flags(NoPrefix))_
),

)_
)

Actually one way that may work is by separating the skills into groups based on type(IQ/?) and hard coding type(IQ/A) etc into each selection.
That seems a bit clunky but workable and does still keep the skill clutter on the main skill list down.
Do people not worry about a long skill list? Maybe I'm worrying too much about something thats not really a problem here.
I need the end product to be this...
Affinity (Magic), type(IQ/VH), default(SK:Ritual Magic - 6, SK:Symbol Drawing - 6, SK:Thaumatology - 6), needs(SK:Ritual Magic | SK:Symbol Drawing | SK:Thaumatology), upto(SK:Ritual Magic), page(00), cat(Affinity)
So replacing the above first line might be....
_Test (%skilllist%), type( (IQ/H) default(SK:Ritual Magic - 6, SK:Symbol Drawing - 6, SK:Thaumatology - 6), needs(SK:Ritual Magic | SK:Symbol Drawing | SK:Thaumatology), upto(SK:Ritual Magic), page(00), cat(Affinity)
__________________
My GURPS publications GURPS Powers: Totem and Nature Spirits; GURPS Template Toolkit 4: Spirits; Pyramid articles. Buying them lets us know you want more!
My GURPS fan contribution and blog:
REFPLace GURPS Landing Page
My List of GURPS You Tube videos (plus a few other useful items)
My GURPS Wiki entries

Last edited by Refplace; 11-16-2018 at 01:05 PM.
Refplace is offline   Reply With Quote
Old 11-16-2018, 01:12 PM   #7
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: Making Pick lists

Okay, I'm now pretty lost as to what you're trying to do.

I thought you were trying to make techniques that were based off of a skill that you picked from a list. Your previous code seemed to support that.

Now, I'm not sure. But, let's see...

Quote:
Originally Posted by Refplace View Post
1) It appends multiple picks together instead of separate items, in this case skills.
I don't know what you mean here. Do you mean "if I allow multiple picks, it then puts all of them into the result"? Then yes, that is what the %<listname>list% variable is *supposed* to do.


Quote:
Originally Posted by Refplace View Post
2) It shows the prerequisite tag but does not seem to inherit the info from the skill, such as Type(IQ/H). I think I could work around the type part by using an inputreplace with a choice but at that point I might as well just leave it as a bunch of skills in the main list. That would be easier for the user than specifying type for each item.
I honestly am not sure what you're expecting here. Let me be somewhat explicit in what's going on with a #ChoiceList:

The user is presented with a list of text items. They pick one or more. GCA replaces some variables with text values based on the user's selection. This is all text, replacing text, based on entries you provide to the #ChoiceList.

There are no *traits* involved, here. Traits aren't being picked or placed, only text.

If you want a skill to be created using values from the #ChoiceList, you need to build *all the things a skill needs* in the trait definition that includes the #ChoiceList. Values from the #ChoiceList are just text put into the trait definition before it ends up on the character sheet, but it's just text. There's nothing like object types or inheritance going on.

So, if your _Test skill is to be a skill, you need to provide a type() tag yourself, somehow. If you want to be fancy, you can do this using #directives, but the fancier you get, the more complex things get.

Again, everything is just text, until all #directive processing is complete, and then, finally, GCA turns the final resulting line of text into a trait, using all the tags that it finds.

Does any of that help at all to clear up what might be happening versus what you are expecting?
__________________
Armin D. Sykes | Visit my GCA5 blog for updates and previews. | Get GURPS Character Assistant 5 now at Warehouse 23.
Armin is offline   Reply With Quote
Old 11-16-2018, 01:20 PM   #8
ericbsmith
 
ericbsmith's Avatar
 
Join Date: Aug 2004
Location: Binghamton, NY, USA. Near the river Styx in the 5th Circle.
Default Re: Making Pick lists

What you need to do is consider what output you want to use and build altlists to support that output. GCA offers list(), aliaslist() and alt1list() to alt5list(), so you can have up to 7 different lists with different outputs.

In this case I used alt1list to create the grouplist with the SK: prefix and alt2list to include the prefix as well as append the -6 for the default entry. I have not tested this code, but it should work.

_Test (%skilllist%), default(%skillalt2list%), needs(%skillalt1list%), page(00),
x(_
#ChoiceList(_
name(skill),
title(Ritual Magic Path),
text(Please select an appropriate Ritual Magic core skill:),
picksallowed(1),
method(bynumber),
default(13),
list(_
#grouplist(GR:Affinity Skills, flags(NoPrefix))_
),
alt1list(_
#grouplist(GR:Affinity Skills)_
),
alt2list(_
#grouplist(GR:Affinity Skills, append(-6))_
)_
)_
)
__________________
Eric B. Smith GURPS Data File Coordinator
GURPSLand
I shall pull the pin from this healing grenade and...
Kaboom-baya.
ericbsmith is offline   Reply With Quote
Old 11-16-2018, 01:23 PM   #9
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: Making Pick lists

Thanks, Eric. That's much more useful, and probably much more what he was after, than my screed.
__________________
Armin D. Sykes | Visit my GCA5 blog for updates and previews. | Get GURPS Character Assistant 5 now at Warehouse 23.
Armin is offline   Reply With Quote
Old 11-16-2018, 01:33 PM   #10
Refplace
 
Refplace's Avatar
 
Join Date: Nov 2008
Location: Yukon, OK
Default Re: Making Pick lists

Yeah the first bit of code was for a Technique, this is for a skill. They are similar in function so I opted to work on the skil for now thinking it would be easier. This is for a custom magic system that sort of merges Ritual, Book/Path, and Realm into one system. Like RPM did but its not RPM.

Heres the current code

_Test (%skilllist%), type(IQ/H), default(SK:Ritual Magic - 6, SK:Symbol Drawing - 6, SK:Thaumatology - 6), needs(SK:Ritual Magic | SK:Symbol Drawing | SK:Thaumatology), upto(SK:Ritual Magic), page(00), cat(Affinity),
x(_
#ChoiceList(_
name(skill),
title(Ritual Magic Path),
text(Please select an appropriate Ritual Magic core skill:),
picksallowed(1),
method(bynumber),
default(13),
list(_
#grouplist(GR:Affinity Skills, flags(NoPrefix))_
),

)_
)

Far as I can tell the bolded parts do not work, everything else does (maybe).
It wont let me change the value of the skill, leading me to think its not using the type() flag.
It wont increase when I increase Ritual Magic so I dont think its inheriting the default either.
It did add the Ritual Magic skill and prompt for everything correctly.
If I can get type() and default() to work correctly I think this would let me pick a skill from a list and I just have to organize the lists by type() so I would have 4 choice lists for my user.

This could also be used for stylists where all the type() levels are the same, like classic RPM.
Which by the way I have not found in the datafiles, Book/Path, Rune and of course default magic system but no RPM.
__________________
My GURPS publications GURPS Powers: Totem and Nature Spirits; GURPS Template Toolkit 4: Spirits; Pyramid articles. Buying them lets us know you want more!
My GURPS fan contribution and blog:
REFPLace GURPS Landing Page
My List of GURPS You Tube videos (plus a few other useful items)
My GURPS Wiki entries
Refplace is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:01 AM.


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