Junior Member
Join Date: May 2015
Posts: 14
|
Hello.
I have recently started creating gamesystem files for earthdawn. Since this is my first experience with the HAK, I foresee a lot of questions For those who perhaps do not know earthdawn I will start by describing a few things to perhaps make my question more understandable. Earthdawn has a class system, where classes are called disciplines. Each discipline gains access to abillities called talents, based on their level (called circle in ED). So I thought using a matrix to store what talents and when are granted by the discipline. The talent has their own compset, and can be created in the editor, and I would like to be able to assign these talents to the matrix, also in the editor by using a selector of some sort. I have been checking the sample files in the hopes of finding something, but have had no luck. So thank you to anyone who might be able to help. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Quote:
It's a field, you define an it_field for it in the editor file, just like any other field. The matrix or array is defined within the component fields, and the editor seems to know this when you have an array or matrix already. This is the code from my editor for Merits in Exalted using an array of non sequential dots for Merit choices. Code:
<inputthing name="Non-Sequential Dot Cost" helptext="Specify the array of choices to show the user."> <it_field field="mrtNSArray"/> </inputthing> 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 |
Junior Member
Join Date: May 2015
Posts: 14
|
Got the it_field thingie already so to get a selector I need to somehow set a reference in the component part? Would that be a tag expr or perhaps a linkage.
or have I totally misunderstood |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
This sounds very much like the class abilities in d20 and pathfinder - have you taken a look at how those abilities are added to their class? And how the level is set as part of the bootstrap?
|
#4 |
Junior Member
Join Date: May 2015
Posts: 14
|
That would work fine. Can't seem to find how to code the editor to do that.
Are there ways to look at source files for those systems that I dont know about. thx |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
The bootstrap of an ability to a class is something visible from just the editor.
|
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Quote:
To define an array in a component, you need to set up the field to show style="array" and then arrayrows="x" where x is the number of rows you need. Code:
<field id="clMemCur" name="Current Memorized Spells" type="derived" style="array" arrayrows="10" defvalue="0"> </field> Sample code showing a Matrix from my AD&D2e file: after defining the type you derive the "style=" part to be matrix. Then set the number of rows and columns. Hero Lab starts with row 0, column 0 as its default setting when you build these, so its important to remember this. If you're doing a matrix for 30 levels, for example, you want to start referencing it in your code at row 0 for level 1 up to row 29 for level 30. Code:
<field id="clTurnUnd" name="Turn Undead" type="derived" style="matrix" arrayrows="30" matrixcolumns="13" maxlength="2"> </field> In your code, the field[whatever].matrixvalue[row,column] is what you need to use in your scripts to access the information. Here's an example from my AD&D 2e file showing how the class level is used to find the appropriate number of spell slots per level of the spell. I think this is what you were looking for based on the original post... Code:
<!-- calculate our maximum number of spells --> <eval index="5" phase="Effects" priority="5500"><![CDATA[ if (tagis[SpellCast.?] <> 0) then if (field[cTotalLev].value > 0) then var level as number level = field[cTotalLev].value - 1 field[clMemMax].arrayvalue[0] = field[clSpellDay].matrixvalue[level,0] field[clMemMax].arrayvalue[1] = field[clSpellDay].matrixvalue[level,1] field[clMemMax].arrayvalue[2] = field[clSpellDay].matrixvalue[level,2] field[clMemMax].arrayvalue[3] = field[clSpellDay].matrixvalue[level,3] field[clMemMax].arrayvalue[4] = field[clSpellDay].matrixvalue[level,4] field[clMemMax].arrayvalue[5] = field[clSpellDay].matrixvalue[level,5] field[clMemMax].arrayvalue[6] = field[clSpellDay].matrixvalue[level,6] field[clMemMax].arrayvalue[7] = field[clSpellDay].matrixvalue[level,7] field[clMemMax].arrayvalue[8] = field[clSpellDay].matrixvalue[level,8] field[clMemMax].arrayvalue[9] = field[clSpellDay].matrixvalue[level,9] endif endif ]]></eval> 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. Last edited by RavenX; July 30th, 2017 at 02:59 PM. |
|
#7 |
Junior Member
Join Date: May 2015
Posts: 14
|
Thank you for your answers. What I wanted to do was create some kind of menu in the editor to select a talent and a level, and have it bootstrap through that. It would then automatically add the necessary conditions using the level value specified. It was more meant to make adding talents to the character easier. But I am just going to add them the normal way.
Again. Thx. |
#8 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Matrices and Arrays are good for user chosen abilities, like spells, and other custom abilities the user selects from.
Anything you bootstrap is automatically added, and requires tags to let hero lab know when to display them. 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. |
#9 |
|
|