• 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

Common Code Examples

That is ... odd. What is an example? I know UIDs and Tags are all Case Sensetive, although I guess some things like if statements can be If of if (I've seen both used in code).
 
The most recent example was

Code:
<before name="calc trtFinal"/>
vs
Code:
<before name="Calc trtFinal"/>

Calc should be upper case to work on a Mac, but seems to work with either in windows
 
that is weird ... it's a string and shouldn't matter either way. If it's causing errors on a mac you should report a bug.
 
It should be, yes, but I've encountered this problem a few times when developing or testing something on my windows machine works and testing on the mac where it doesn't. In every case it has been case sensitivity.

Yeah. In specific, your problem with my file wasn't causing a problem when I loaded it myself, so I didn't even realize the case was wrong.
 
I have been fixing up a modded version of the Hellfrost data. It looks like that I got the Disciple of Tiw working, where it allows for the character to treat Combat edges as one rank lower. I figure that there are uses for this in other settings/edges.

The timing is so that it will work for an Edge (as that is what the Disciple of Tiw is).

Initialization/2101
Code:
var rank as number
var target as number
rank = herofield[acRank].value
target = 0

if (rank <= 3) then
   rank += 1
   foreach thing in Edge where "EdgeType.Combat"
      target = eachthing.tagvalue[MinRank.?]
      if (rank = target) then
         var ignoretag as string
         ignoretag = "IgnoreRank." & eachthing.idstring
         perform hero.assignstr[ignoretag]
      endif
   nexteach
endif

Validation/100
Code:
var rank as number
var target as number
rank = herofield[acRank].value
target = 0

if (rank <= 3) then
   rank += 1
   foreach thing in Edge where "EdgeType.Combat"
      target = eachthing.tagvalue[MinRank.?]
      if (rank = target) then
         perform assign[Helper.IgnoreRank]
      endif
   nexteach
endif
 
Changing the Cash Symbol

Changing the cash symbol, and moving it to after the number: (PreTraits/5000 seems fine)

Code:
      herofield[acCshSymbl].text = " gp"
      perform hero.assign[Hero.CashBackwd]
 
Question,

I am looking for a common code example for raising an attribute by 1 or two levels.

I have looked through the listed examples and it didn't just out at me. Thanks.

Salcor
 
That's because I think we mostly included stuff that wasn't readily available from other examples in the base data files already. Just take a look at the Race Elven (racElven), for example, which you'll find bootstraps the Racial Ability Agile (abAgile). Looking at the Racial Ability we see at Pre-Traits 5000 it does:

Code:
#traitcreation[attrAgi] += 1
 
Thanks,

I guess there really isn't anything different between raising the attributes before the player chooses them or after.

Salcor
 
Zarlor,

Sorry I am working on character attribute adjustments for Savage Rifts Iconic Frameworks. I was wondering, how do you change the assigned skill for a weapon. I made Flame Bolt as a ranged weapon and want to tie it to Psionics.

Salcor
 
AH, I haven't really read through Rifts, but I would think #traitcreation would be fine if I understanding Iconic Frameworks well enough. As for assigned skill... I'm not too sure about that.
 
Adding Power?

Greetings,

I'd like to add the Mega Powers from Savage Rifts. I can do this with the editor..how can I add a Mega Power (or a new power, for that matter) outside of the editor?

Thanks,

GB
 
What do you mean by "outside of the editor"? Speaking strictly for a new Power (I'm not familiar with Rifts to know what a Mega Power is compared to a Power) if you were using a text editor you could copy the code for some other power in the .user file and paste that as a new section to modify the xml code from there (I like using Notepad++ for modifying xml files for that). Unless you mean within the main HL program, in which case I think there is a spot under the Powers tab where you might be able to add a custom power there (but that will only get saved in the portfolio you are modifying and noplace else.) Or do you mean something else?
 
A Mega Power is just an enhanced version of a regular power. Thanks for the help...I'll copy the relevant data from the custom .user file. Should this data be appended to one of the .dat files (perhaps the main file..rifts.dat)?

GB
 
That's a question for the Rifts thread. That depends on how they are trying to organize things as to which .dat file it should be in so that's heavily dependent on that specific project.
 
[SWADE] - How to add a power as an innate ability
  1. Create "Innate Abilities" Arcane Background. Make note of the ID you give it.
  2. Go to the Invalid Powers button and select all of the listed powers. Leave Power Points and number of Powers empty. You can adjust these through scripts.
  3. Create Racial Ability / Property which adds the power you are looking for.
  4. Bootstrap the Arcane Background from (1) and the Innate Power to the Ability / Property created in (3)
  5. Open the Tags section of the bootstrap for your innate power.
  6. Add Arcane as the Group with the ID from (1) as the Tag.
  7. Save and Reload your data, Select the race with the new Ability/Property. See the shiny new "Innate Abilities" tab with the power you've made innate. :)

Of course, you may have to create a new power depending if your power has any innate modifiers like Range (Self) or such.
 
Last edited:
Something I haven't seen discussed, and it may apply in all game systems, is if you have the need for bootstrapping an edge to an ability but the edge has a chooser on it and you need a specific selection from the chooser as part of the bootstrap.

In the editor:
Field ID: usrChosen1
Value: id of the needed choice
select Pick instead of Assign.

Reload your dataset and you should be good. :)
 
Back
Top