• 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

Extra damage for weapon per die type.

jbearwillis

Well-known member
How would I write the script for this when weapon is equipped.

1) The base damage is Str+D8, plus an additional +1 for each Die Type the character has in Agility (D4=+1, D6=+2, D8=+3, etc.). So a character with an
agility of D8 would do Str+D8 +3 damage.:)
 
I've been looking this over some but I'm not sure I can figure out a way to do it programmatically yet. If nothing else you can always just list it under the "Special Damage" as "Str+d8+1/Agility Die".

That does no real calculations, but it will show the formula on the weapon, at least. Although I do have to wonder about using that algorithm anyway. It seems a bit clunky. Rather non-Fast, Fun, Furious, if you know what I mean. I'm not sure I'm fond of it as a gamer, to be honest. Sorry I couldn't be more help (and I've been looking! I think my head is about to explode from the past few days of working on how to code stuff in Hero Lab!)
 
Well the weapon is one I'm borrowing for my space game NightFall and it comes from Interface Zero and has that setup.
 
Sorry if I'm being a big pain - but that's where I'm lacking, is in how to write the codes for some of the things I need to do. I understand the concept but could you give an example for me on how to write it. Usually if I have an example I can figure it out from there, even if it's not exactly what I want it to do. I can usually rewrite it to do what I want or get an idea of how somethings works which usually gets me thinking on what I want it to do.
Thanks for any help.
 
Not at all. How about...

var DamagePlus as number
DamagePlus = hero.childfound[attrAgi].field[trtFinal].value - 1
field[wpDmgBonus].value += DamagePlus

I really need to learn how to place code markers...
 
CapedCrusader you are a god among men. That code worked perfectly.
Thank you very much.
That puts me one step closer.
 
I put it as an Eval Script at Final 5000, it didn't work at Pre-Traits so I looked at the script and took a guess to put in Final (because of the trtfinal part) and it worked perfectly. I'm not sure if you could put it any early, because I stop when it worked.
 
Ok, thanks. I'm putting together a list of example codes for all of these things. Maybe it will be useful to post for anyone else if I have a consolidated list. Speaking of which, would you mind sharing that drop-down list code you have? I'll be happy to give you full attributions, of course!
 
Great... so where would you like me to go to get it? Not working right, though, is something I'm hoping someone with some more skills than we have can come up with an answer to. I think a lot of the things we've been working on are kind of hinging on how to Bootstrap something in code. I have my fingers crossed.
 
Here is the screen shots, show where I got and the editor screen shot with a short explanation of what I did to the right if the editor screen. hope you can figure it out. if not I will try to explain it to you.:)
 

Attachments

  • Creation Screen.jpg
    Creation Screen.jpg
    115.6 KB · Views: 4
  • Editor Screen.jpg
    Editor Screen.jpg
    193.4 KB · Views: 9
Oh, I see. I never knew what those "Menu #" items were all about. Very interesting, I may have to play around with that a little. I'll let you know if I figure anything about on it.
 
One thing I just noticed,and I almost hate to mention it since it looks like you have so much of this done, but one of the naming conventions it it looks like is being used for the official data files is to include a two letter Source ID in Unique IDs. So if you called your setting "Jbear's ScFi Setting" you might name that Support Edge "edgJSSuppo" or something like that. It's really useful, I've found, in case you want to be able to load multiple .user files since it helps prevent naming conflicts.

Still not sure how you would use that drop-down list method to pick and add something, but I'll let you know if I think of something.
 
Well that's ok because that was made as an example for you to see how I did the drop down box. It's not in my file any more I deleted it. On a lot of my names I put cap letters in weird places to stop that problems and in a lot of my file names I do add NF for NightFall. so I'm good - but thanks for the advise.
 
Call this thinking out loud, but it seems to me you might set your list to say Skill.skHealing (or whatever) rather than thingid. Just because I think it would alleviate the system having to do any extra searching since it could go straight to Skills rather than having to look through all things for the specific skill (at least that's how I would guess it works, but I could be completely wrong about that.)

When I tested it I didn't use your Pre-Req code, though. I didn't seem to need to since it would mark the Edges tab and that Edge as red without it.

So then bootstrapping still means figuring that part out, but in my case what I want to do is just add a bonus depending on which skill was picked. So that part we do know how to code in an Eval Script, we'd just need to be able to put it into an if/then statement depending on what was picked. So I think I'll have to see if we can at least figure out how to do the if/then part of things so once we do have a way to Bootstrap from a script we would be able to do what you need.

That's assuming any of my understanding of how things work is even remotely correct, of course. Let me see if I can figure any of that part out, at least.

EDIT: So maybe something like this for my example where I want to pick a skill from the Drop-down box and then use this Eval script (Pre-Traits/5000) to give a +1 bonus to the selected skill:

Code:
if (this.idstring = hero.tagis[Skill.skBoating]) then
      perform #traitroll[skBoating,+,1,"Ordo Novus Templum"]
   elseif (this.idstring = hero.tagis[Skill.skDriving]) then
      perform #traitroll[skDriving,+,1,"Ordo Novus Templum"]
   elseif (this.idstring = hero.tagis[Skill.skPiloting]) then
      perform #traitroll[skPiloting,+,1,"Ordo Novus Templum"]
endif

I think the "this.idstring" part might not be right though as this code doesn't really work, but I'm thinking it MIGHT be on the right track... maybe?
 
Last edited:
Well check out the scholar edge, it might get you in the right direction, that's what I use for a bases, but mine works a little different then that edge as yours does, but yours is much closer to it then mean was.
 
Back
Top