Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
k9monkey
Junior Member
 
Join Date: Sep 2014
Posts: 14

Old September 11th, 2014, 09:05 AM
Hi there,

I am a new to building files and I am working on a game system where fighters roll a number of d6 +/- x

Is there a way to have a stat show 2d6 and then add the +1 or +3 based on the weapon they select, or are the stat fields only able to show a single number?

Thanks,
CmB
k9monkey is offline   #1 Reply With Quote
k9monkey
Junior Member
 
Join Date: Sep 2014
Posts: 14

Old September 11th, 2014, 09:01 PM
Thought I would post an update. I found this script in the user guide; however for some reason it is not processing the / 100 line and I am getting 302d6+2 when I enter 302 for the stat. Any ideas???

if (@value >= 100) then
var roll as number
var adjust as number
roll = @value / 100
adjust = @value % 100
@text = @value & "d6"
endif
if (adjust > 0) then
@text = @text & "+" & adjust
endif
k9monkey is offline   #2 Reply With Quote
k9monkey
Junior Member
 
Join Date: Sep 2014
Posts: 14

Old September 11th, 2014, 09:21 PM
Update #2
Cleaned up script to this.

if (@value >= 100) then
var roll as number
var adjust as number
roll = @value / 100
adjust = @value % 100
@text = roll & "d6"
endif
if (adjust > 0) then
@text = @text & "+" & adjust
endif

I am now getting decimal places before the "d6" as 201/100 is 2.01. I have trimmed decimals everywhere I can find it and still no luck. Does anyone have a suggestion?

I would move this to the game system folder; however the game I am working on does not have a folder yet.

Thanks,
CmB
k9monkey is offline   #3 Reply With Quote
k9monkey
Junior Member
 
Join Date: Sep 2014
Posts: 14

Old September 11th, 2014, 09:25 PM
After a bit more playing around I ended up here...

if (@value >= 100) then
var roll as number
var adjust as number
var final as number
roll = @value / 100
adjust = @value % 100
final = round(roll,0,0)
@text = final & "d6"
endif
if (adjust > 0) then
@text = @text & "+" & adjust
endif

This works like a dream. If anyone needs to show a stat as Xd6 feel free to use this Finalize script on their stat. When you enter your stat you do so as 302 for 3d6+2
k9monkey is offline   #4 Reply With Quote
Reply


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 01:11 AM.


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