Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Common Code Examples (http://forums.wolflair.com/showthread.php?t=33740)

AndrewD2 July 7th, 2015 12:14 PM

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).

Endtransmission July 7th, 2015 12:44 PM

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

AndrewD2 July 7th, 2015 12:52 PM

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.

Paragon July 7th, 2015 05:54 PM

Quote:

Originally Posted by Endtransmission (Post 212251)
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.

SeeleyOne May 11th, 2016 08:51 PM

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


CapedCrusader July 24th, 2017 07:38 PM

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]


salcor December 6th, 2017 04:19 PM

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

zarlor December 7th, 2017 05:49 AM

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

salcor December 7th, 2017 05:10 PM

Thanks,

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

Salcor

zarlor December 8th, 2017 05:04 AM

In what context are you trying to do this?


All times are GMT -8. The time now is 09:20 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.