Steve Jackson Games Forums

Steve Jackson Games Forums (https://forums.sjgames.com/index.php)
-   GURPS (https://forums.sjgames.com/forumdisplay.php?f=13)
-   -   Combat Calculator Utility (https://forums.sjgames.com/showthread.php?t=80646)

ClayDowling 06-14-2011 10:49 PM

Combat Calculator Utility
 
I'm horrible about remembering to put in the mods for range and posture (one of my players had to keep reminding me Sunday). So I whipped up a silly little utility that does it for you.

http://www.obrienscafe.com/gurps-combat-calculator.html

I've included source code with Makefile, an OSX command line binary, and a Windows GUI version.

It's pretty crude at this point, but if there are additions which it should contain, I'd be happy to hear them. Multi-shot bonuses are the next most obvious one.

Wolf 06-14-2011 11:45 PM

Re: Combat Calculator Utility
 
Pretty cool. Will use this a good bit... Thanks.

roguebfl 06-15-2011 12:00 AM

Re: Combat Calculator Utility
 
How about some screenshots?

Onkl 06-15-2011 03:28 AM

Re: Combat Calculator Utility
 
Thanks, looks good. I've got just one little suggestion. I've used your utility in the following manner:

onkl:Downloads sl$ ./gurps_calculator -r 13 -p Kneeling -t Lying Down -s 0
Attacks at -9
Active Defense at -2

Active Defense is not correct, Lying Down gives you -3 to your active defense (B551)

or maybe I got it all backwards, and what you are displaying is the active defense for the attacking character... but that doesn't make sense either... :/ *confused*

Onkl

ClayDowling 06-15-2011 08:00 AM

Re: Combat Calculator Utility
 
This utility displays statistics from the perspective of only one character, the "Attacking" character. Numbers straight from the charts in B551.

ClayDowling 06-15-2011 08:24 AM

Re: Combat Calculator Utility
 
Screen shot has been added for the Windows version. The OSX command line utility isn't really screen-shot worthy.

JMD 06-15-2011 10:54 AM

Re: Combat Calculator Utility
 
This is an awesome idea! I think I will incorporate something similar into my Droid app.

Maz 06-15-2011 04:20 PM

Re: Combat Calculator Utility
 
Quote:

Originally Posted by ClayDowling (Post 1194186)
This utility displays statistics from the perspective of only one character, the "Attacking" character. Numbers straight from the charts in B551.

Personally I would find it more logical to list the defenders penalty to defend, as that is what you are going to need.

So all the numbers is for "the attack", not "the character attacking".

So you have the penalties to making the attack, and the penalties to the defence. As that's the numbers you are going to need for that action.

Otherwise, very cool. Thanks for sharing.

Noven 06-15-2011 07:32 PM

Re: Combat Calculator Utility
 
Neat program. I compiled it on Linux and it appears to be a CLI program only.

ClayDowling 06-15-2011 08:17 PM

Re: Combat Calculator Utility
 
Quote:

Originally Posted by Noven (Post 1194507)
Neat program. I compiled it on Linux and it appears to be a CLI program only.

The distributed source is indeed CLI only. The GUI version is Qt based, and Qt apps are a bit of a nuisance to write Makefiles for, because of an additional intermediate step that I frankly don't understand that well. All of the logic is the same in the CLI program and the GUI program. Windows users just tend to have more trouble with CLI programs, so I made a GUI for them.

Noven 06-15-2011 08:47 PM

Re: Combat Calculator Utility
 
could you make a qt interface for linux? I would really love you if you made a gtk interface haha.

ClayDowling 06-15-2011 11:00 PM

Re: Combat Calculator Utility
 
I'll play with it and see what I get. My Linux laptop died of a broken internal power connection, so I only run it under emulation on my mac now. Nowhere near as fun. But it would be Qt, not GTK. GTK is worlds of no-fun to deal with on any other platform.

JMD 06-19-2011 04:29 PM

Re: Combat Calculator Utility
 
I'm seeing a slight problem.

If you put in 6 as the range you end up with -3, when you should have -2. The -3 penalty does not apply until you reach 7 yards.

The trend continues up the chart. 31 yards gives you a -8 a full 19 yards before the actual -8 threshold at 50 yards.

I ran into a similar problem in my own code when making my droid app.

Looking at your code I see the issue.

Quote:

int i;
int target;

target = abs(yds);
for(i=0; range_band[i] > 0 && range_band[i] < target; ++i);

return 0 - i;
This should have one additional line

Quote:

int i;
int target;

target = abs(yds);
for(i=0; range_band[i] > 0 && range_band[i] < target; ++i);

if(range_band[i] != target) i--;

return 0 - i;

gilbone 06-19-2011 10:57 PM

Re: Combat Calculator Utility
 
Quote:

Originally Posted by JMD (Post 1194262)
This is an awesome idea! I think I will incorporate something similar into my Droid app.

Please do ;)

JMD 06-20-2011 12:17 AM

Re: Combat Calculator Utility
 
Quote:

Originally Posted by gilbone (Post 1196502)
Please do ;)


I did! It's not released yet, but a screenshot of the new functionality is up in my own thread. You can find the link in a reply above.


All times are GMT -6. The time now is 03:28 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.