Page 1 of 1

New combat model

Posted: Tue Aug 28, 2007 8:04 pm
by Darkhour
Hi there, I was whether anyone could help me with figuring out how to go about this.

Keep in mind I know nothing about java...

I need to figure the difference between 2 numbers and then find out if that number is less then a role on a d100..

cheers.. :)

Posted: Wed Aug 29, 2007 11:56 pm
by Darkhour
anyone..?

Posted: Thu Aug 30, 2007 4:36 pm
by RPTroll
I guess the question is, what are you trying to do?

Do you want to modify the .js file to load a dice tool function or are you asking for the java syntax?

Posted: Thu Aug 30, 2007 9:34 pm
by Darkhour
cheers for the reply..

I really don't exactly know.. if there is already a syntax that will work inside dicetool then well and good, it'd be nice to know how to do the above but if there isn't then anyone who can help me with setting script within the .js file would much be appreciated.. :)

Posted: Thu Aug 30, 2007 11:23 pm
by Hawke
how's your game system work? I'm curious what you're using it for

Posted: Fri Aug 31, 2007 10:49 am
by Darkhour
it's just a new combat model primarily used for army type combat that can also cross over to rpg style combat. It's not meant to be used statistically for anything complex in a rpg role.

I've remodeled it once and now I'm happy with it's relationship to variables between units etc. but i need to test it on a mass scale so i can work out damage numbers and overall balance.

Posted: Sat Sep 01, 2007 10:24 am
by Darkhour
rptroll? anyone?..

Posted: Sat Sep 01, 2007 10:40 am
by RPTroll
Here is the dicetool documentation.

http://rptools.net/doku.php?id=dicetool:documentation

You'll see a section that talks about functions.js. That is where you will put your new combat model.

I'm not versed in javascript so you'll need another resource for the syntax.

Posted: Sat Sep 01, 2007 2:28 pm
by Hawke
Tell me more! Sounds like you're running some sort of macro strategy game...

I don't use DiceTool so I'm not particularly sure how you run stuff and how scripting works, but lemme see if I can get the concept down without using javascript and then we'll go from there...

Where are you getting the new numbers? Are they random or are you wanting to tell it or?

So do you tell it "5 and 50" and then want it to roll 1d100 (result, say 60) and since 60 > 45, it's a failure (or success?)

Posted: Fri Sep 07, 2007 1:54 am
by Darkhour
along those lines simplistically... if I gave away too much then it wouldn't be a secret project.. :)

well if no-one else can help me out.. ive tried looking for a a configurable dice program but this one seemed to be the way to go.... is there anything else out there?

I might just have to settle with a spreadsheet or something...

Posted: Fri Sep 07, 2007 11:45 am
by giliath
I don't completely understand what sort of function you are wanting, otherwise I could throw together one in javascript or dicetool syntax.

This might help though

Code: Select all

if (abs(var0 - var1) < d100, 1, 0)
That function works in the current dicetool syntax.

For my testing I set var0=50 and var1=20 and sometimes dicetool would print 1 and sometimes 0.

Does that help?