• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Renaming attributes?

Oystein

Member
So, is there any way to rename an attribute?
I want to use the "honor" stat but rename it something else.

Is that possible? :)
 
I think you can set the livename of the attribute to whatever you like? Give it a shot and tell me how it goes.
 
Hmm,

okie, made some head start at least. So it is both aHon and svHon I want to replace (so it also shows the right attributename on the saving throw as well).

But then the question becomes - where should I put it for it to be applied automatically? Mechanics?

And am I correct in that both liveword and listwords have to be changed, something like this:

aHon[listname].text = "Bloodpoints"
aHon[livename].text = "Bloodpoints"
 
Yeah, a mechanic would work. However listnames aren't a field attributes possess (that's a class ability thing). I think you'd need to alter the livename field, the aAbbr field, and the aNameCaps field.

Also, your transitions to the aHon attribute need to be altered.

hero.childfound[aHon].field[livename].text = "Bloodpoints"
 
Hey,

thanks - got it mostly working now. Only field it doesn't want to change yet is the aAbbr ones, which gives me the error:

Only derived fields can generally be modified via scripts (field 'aAbbr')

When I try both:
hero.childfound[svHON].field[aAbbr].text = "BLO"
hero.childfound[aHON].field[aAbbr].text = "BLO"
 
Hmm, looks like that is a "static" field, which means it's somewhat protected from changing. I'll switch the field to being a derived field (static is something of a relic from the early days of HL, which we don't really use anymore). In the meantime, I think you might be able to get around the issue by using trustme.

Code:
trustme

hero.childfound[aHON].field[aAbbr].text = "BLO"

Though it now occurs to me, is there a reason you're renaming and repurposing the Honor attribute rather than adding a new attribute of your own?
 
Not beyond that I haven't found how to add a new ability?

I found an old thread (from 2008) about adding attributes, but it refernces files and such that is no longer used. (source files, like abilities.dat or someting)

But I haven't found how to do it from the editor at least. I guess I have to create it in the user file directly?
 
Yeah, you'd have to work in the raw XML, but attributes are fairly simple by themselves. It's just that they are a foundation from which many other things draw values.

Here's what I suggest. Start a new .user file and save it. Open the file in a text editor (I use editpad, but whatever floats your boat). You should have something that looks more or less like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<document signature="Hero Lab Data"></document>

Elements in XML open with < and end with </ so you can see that the blank file just has a document open and then immediately closes. Every thing you define will be placed between the document element open and close. Here is an example of an existing attribute. I think you can tweak it pretty easily.


Code:
<?xml version="1.0" encoding="UTF-8"?>
<document signature="Hero Lab Data">

  <thing
    id="aSTR"
    name="Strength"
    compset="Attribute"
    isunique="yes"
    description="Strength measures bodily power, athletic training, and the extent to which you can exert raw physical force.">
    <fieldval field="aAbbr" value="STR"/>
    <tag group="explicit" tag="5"/>
    <tag group="AbilSumOrd" tag="5"/>
    <tag group="AttribCat" tag="Physical"/>
    <link linkage="save" thing="svSTR"/>
    </thing>

  </document>

So paste the XML, change what you need, then save it. You shouldn't need to bootstrap the attribute to anything, as there are background mechanisms which add all attributes to all heroes.
 
Thanks a tons :)

It gives an error on the link to svBLD, which is because naturally there isn't an saving throw made called it. (Editing out the link gives another error, but lets the ability show up)

I tried adding this, but not sure what the right compset is - looking at the debug fields for other saving throws shows 3 components.. Tried adding this, but gives me an error on compset.

Code:
  <thing
     id="svBLD"
     name="Bloodline"
     compset="Saving Throws"
     isunique="yes"
     description="Bloodline save">
    <fieldval field="svAbbr" value="BLD"/> 
    <fieldval field="svOutName" value="BLD"/>  
    <tag group="AttribCat" tag="Other"/>
    <tag group="AbilSumOrd" tag="75"/>
    <tag group="explicit" tag="75"/>
  </thing>
 
One additional question (just one.... kinda sorta hopefully).

Since I've added the new ability, their order has been changed.
Is the "AbilSumOrd" and "Explicit" tags somehow used to order them?

I'd like them to be like standard only with Blood added at the end :)
 
Have you tried adjusting the tag values and seeing what happens? Experimentation may be quicker than waiting for a response from me.
 
The explicit tag set is used to order them. You'll need to add an explicit tag and the AttribCat.Other tag to have them sort properly.
 
Oystein, I have been trying to do the same thing but my saves dont increment as my attribute goes up. This is what I am using:-

<thing id="aRES" name="Resolve" description="This is resolve" compset="Attribute" replaces="aWIS" uniqueness="unique">
<fieldval field="aAbbr" value="RES"/>
<tag group="AttribCat" tag="Mental" name="Mental" abbrev="Ment"/>
<tag group="explicit" tag="40" name="30" abbrev="30"/>
<tag group="AbilSumOrd" tag="40" name="30" abbrev="30"/>
<link linkage="save" thing="svRES"/>
</thing>
<thing
id="svRES"
name="Resolve"
compset="Save"
isunique="yes"
description="Resolve save"
replaces="svWIS">
<fieldval field="svAbbr" value="RES"/>
<fieldval field="svOutName" value="RES"/>
<tag group="AttribCat" tag="Other"/>
<tag group="AbilSumOrd" tag="75"/>
<tag group="explicit" tag="75"/>
</thing>

Any advice is much appreciated. Thanks in adavance.
 
Back
Top