Member
Join Date: Aug 2014
Posts: 52
|
The following code:
Code:
<creation><![CDATA[ var level as number foreach pick in hero where "ClassLevel.?" level += eachpick.tagvalue[ClassLevel.?] nexteach level += 1 perform this.assignstr["ClassLevel." & level] ]]></creation> Quote:
Last edited by sincla; September 6th, 2014 at 06:00 PM. |
|
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Code:
foreach pick in hero from component where "the tags" RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#2 |
Member
Join Date: Aug 2014
Posts: 52
|
I added in the component:
Code:
foreach pick in hero from Class where "ClassLevel.?" I didn't know the from Component was required. The wiki example doesn't have it: Code:
foreach pick in hero where "group.tag" debug "id: " & eachpick.idstring nexteach Code:
foreach pick in hero where "system_tag.minion" |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Usually specifying the component is important, otherwise you're searching through all the picks on the actor having the tag...
I'd say lookup foreach context in the kitwiki and read it. I'm not sure if you can use a foreach loop during a creation script, as you usually set field limitations and default user values with a creation script. I think creation scripts are for preadvancement phase characters. Once a character is locked for advancement those scripts are done running. What are you trying to do specifically with your foreach loop? What are you trying to tell the compiler to do? RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#4 |
Member
Join Date: Aug 2014
Posts: 52
|
Oh this is just one of my convoluted schemes to try and get sequential ordering of the class rows in the level column of the class level table like the d20 system. I was trying to make class picks not unique, give each one a separate level tag for the character level at which it was added, and display that in the level portal of the table dynamic.
To be completely clear about the ultimate goal, I've attached a screenshot. I hope it's helpful. |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Table Dynamic Element in the wiki
look for: orderfield="" You don't need a foreach loop for that... RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#6 |
Member
Join Date: Aug 2014
Posts: 52
|
|
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
It took me awhile to figure out, its not so easy to figure out honestly. I've had to ask for help many times.
RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#8 |
Member
Join Date: Aug 2014
Posts: 52
|
Thanks, that makes me feel a little less of an idiot .
|
#9 |
|
|