Understanding the code by example?
OK, after spending most of the weekend trying to get something going for a game system not already in HL, I'm exhaused from the learning curve.
I have a very light programming background (bash scripts a plenty, and a book on Java and Python under my belt, but no seasoned programmer to be sure). Anyway, I've been reading the wiki until my brain feels like... I don't know. But now I've had a beer and a half, and though I'm feeling better, I'm still struggling to understand some of the skeleton code (the beer will help, right?): So I'm going to attempt to enhance my learning by deciphering the following code bit by bit. For the love of the gods, if anyone can help that would be appreciated. Code:
<procedure id="DshRolls" scripttype="mouseinfo"><![CDATA[ |
proceedure id = DshRolls : OK a unique ID for this proceedure. Got it.
scripttype="mouseinfo" : I have no idea what this means. <![CDATA[ : This is an XML construct to deal with conflicting reserved characters. We pretend it isn't there. var final as string var roll as string : We are defining variables here, "final" and "roll" they will contain string data. foreach pick in hero where "DashTacCon.Rolls" : OK here is where I start to have trouble. hero is the character "container" we are creating, pick is... I dunno. everything with the element/thing/don'tknowtheproperterm DashTacCon.Rolls... ??? |
scripttype determines what types of scripts are allowed to call this procedure, because some scripts have special behaviors or options that can only be done on those types of scripts. So scripttype tells the procedure what type of script it will be used in. Here's the wiki page about procedures, which is where it lists all the scripttype options that are available.
http://hlkitwiki.wolflair.com/index.php5?title=Procedure_Element_(Data) Here's a youtube recording of a seminar I gave at Gen Con, covering how to set up searches (like the foreach operation) in Hero Lab: https://www.youtube.com/watch?v=9UPWoih8-q8&t=161s Post #7 in this thread is also about foreaches: http://forums.wolflair.com/showthread.php?t=21663 |
Another bit confusing me:
Code:
<inputthing Compset Attribute contains three components... Code:
<compset Code:
<linkage linkage="attribute" optional="no"/> |
An <inputthing> element defines a line on an editor entry. In that case, this is a place in the editor where the user is selecting which attribute to assign to the "attribute" linkage on that skill.
Try opening the editor, and create a new file. Then, go to the skills tab, and try creating a new skill. You'll see an entry with that name - "Linked Attribute for Skill", and when you try the drop-down, you'll see a list of every item from the Attribute compset. If you look at the XML generated by the editor, you'll see that what you get is: Code:
<link linkage="attribute" thing="attrSam"/> So that will generate the sort of records you're seeing in the thing_skills.dat file. |
All times are GMT -8. The time now is 03:22 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.