Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Savage Worlds

Notices

Reply
 
Thread Tools Display Modes
Paragon
Senior Member
 
Join Date: Feb 2010
Posts: 874

Old August 14th, 2014, 09:02 AM
By the way, before I forget, I'd like to thank you again, Zarlor; doing this project has taught me a lot about both using the editor in HL in general, and specifically for SW, and I doubt I'd have been able to get where I am with it without your help. Much, much appreciated. I suspect I'll find any successive projects I do incredibly easier because of your patience with me here.
Paragon is offline   #31 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old August 14th, 2014, 09:32 AM
Quote:
Originally Posted by Paragon View Post
[snip]Yeah. I noticed that, as written, there'd be no way to apply it to the by-the-book laser pistol because its just lumped into futuristic energy weapons and not broken out as, say, "energy pistol".
You can change it just a tad to pick up the other era pistols (or other things) as well with something like:

Code:
foreach pick in hero from WeapRange
   if (eachpick.tagis[WeaponType.ModPistol] | eachpick.tagis[WeaponType.FutPistol] <> 0) then
      eachpick.field[wpDmgBonus].value += 2
   endif
nexteach
I think that's right anyway, although I could be off a little on my syntax here. At any rate that | is an OR function, so if the pick is ModPistor OR FutPistol it will still pick it.

Quote:
Given the above limitations, do you actually think its useful to post there? Its a little more--specific--than most of the code chunks I saw in that thread, and as you note, actually has some more heavy lifting to work right.
You never know who might find it useful or when so sure, post it in. You figured out how to do it, after all. Besides, that code could be used to do something to any kind of equipment in that same vein as long as folks are aware of how things are grouped in the setting they are using.

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #32 Reply With Quote
Paragon
Senior Member
 
Join Date: Feb 2010
Posts: 874

Old August 15th, 2014, 07:37 AM
Quote:
Originally Posted by zarlor View Post
You can change it just a tad to pick up the other era pistols (or other things) as well with something like:

Code:
foreach pick in hero from WeapRange
   if (eachpick.tagis[WeaponType.ModPistol] | eachpick.tagis[WeaponType.FutPistol] <> 0) then
      eachpick.field[wpDmgBonus].value += 2
   endif
nexteach
I think that's right anyway, although I could be off a little on my syntax here. At any rate that | is an OR function, so if the pick is ModPistor OR FutPistol it will still pick it.
Interesting to know, but that wouldn't work in the case of the by the book laser pistol because it actually has no tag listing it as a pistol; its just listed with the general category of "future energy weapon". You'd have to go block it off and put in a new entry for Future Pistol.

Quote:


You never know who might find it useful or when so sure, post it in. You figured out how to do it, after all. Besides, that code could be used to do something to any kind of equipment in that same vein as long as folks are aware of how things are grouped in the setting they are using.
Fair enough. I'll go do it now.
Paragon is offline   #33 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old August 15th, 2014, 11:26 AM
Just a couple of tips. You can put your code into those boxes like I used by putting putting [ CODE ] (no spaces between the brackets and the word) and [ /CODE ] at the end (again, remove the spaces.) Also you'll note how I indented things? Obviously it works perfectly well without any indentation, but for readability it's kind of an old coder trick to indent stuff so it lines up with the earlier things it references. In the example above I've got the foreach starting at the beginning of the line, but since the "if" statment happens inside of the foreach loop I normally indent it. Same with the "eachpick" line since it's only doing something based on the "if" line before it. Then the endif, since it relates to that earlier "if" line is placed at the same amount of indentation as the "if" it belongs to and the same for that nexteach line. Not a big deal at all with something relatively short like that, but if you ever have to start nesting if statements inside of each other it can be easy to lose track of which endif goes with which if so indenting like that tends to help some. Thanks for sharing your findings!

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #34 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:44 AM.


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