.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old March 6th, 2004, 05:06 PM
Arryn's Avatar

Arryn Arryn is offline
Major General
 
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
Arryn is on a distinguished road
Default Arryn\'s PD calculator v1.01

I've put up on my website a Java utility I wrote to calculate PD costs for those that are too lazy to use a calculator, or that don't wish to use a spreadsheet.

The direct link to the file is here.

EDIT: converted into a .jar file for your convenience. Anyone who downloaded the .rar should re-download.

If anyone finds this to be a useful tool, please let me know. Constructive comments and suggestions are also always welcome.

[ March 06, 2004, 16:54: Message edited by: Arryn ]
__________________
Visit my Dominions II site
Reply With Quote
  #2  
Old March 6th, 2004, 06:13 PM
Nagot Gick Fel's Avatar

Nagot Gick Fel Nagot Gick Fel is offline
Major
 
Join Date: Sep 2003
Posts: 1,177
Thanks: 0
Thanked 1 Time in 1 Post
Nagot Gick Fel is on a distinguished road
Default Re: Arryn\'s PD calculator v1.01

Is it right? It's a bit hard to read on my browser, but I think I can read "10 to 21 costs 165 gold" (?). That should be 176 if I'm not mistaken. I believe the formula is

(1 + initial + target) * (target - initial) / 2

[ March 06, 2004, 16:14: Message edited by: Nagot Gick Fel ]
__________________
God does not play dice, He plays Dominions Albert von Ulm
Reply With Quote
  #3  
Old March 6th, 2004, 06:21 PM

alexti alexti is offline
First Lieutenant
 
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: Arryn\'s PD calculator v1.01

Quote:
Originally posted by Arryn:
I've put up on my website a Java utility I wrote to calculate PD costs for those that are too lazy to use a calculator, or that don't wish to use a spreadsheet.

Screenshot of the program showing:
code:
Initial PD: 10
Target PD: 21
Cost to raise PD: 165

May I ask you if the image shows the real output?To my knowledge, the cost to raise PD from 10 to 21 is 176, not 165. And for extremely lazy people (like me ) who can't be bothered to start the program to do the calculation, the formula seems to be (n1+n0+1)*(n1-n0)/2. n0 is starting PD, n1 is target PD.
Reply With Quote
  #4  
Old March 6th, 2004, 06:23 PM

alexti alexti is offline
First Lieutenant
 
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: Arryn\'s PD calculator v1.01

Quote:
Originally posted by Nagot Gick Fel:
Is it right? It's a bit hard to read on my browser, but I think I can read "10 to 21 costs 165 gold" (?). That should be 176 if I'm not mistaken.
Yeah, I've noticed it too. It must be that the marketing department was producing promotional materials before the program was completed
Reply With Quote
  #5  
Old March 6th, 2004, 06:50 PM
Arryn's Avatar

Arryn Arryn is offline
Major General
 
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
Arryn is on a distinguished road
Default Re: Arryn\'s PD calculator v1.01

Fixed. A stupid error. Worked correctly for *even* numbers, and silly me forgot to test with odd ones.

Thanks to the both of you for the catch.



The direct link to the file is here.
__________________
Visit my Dominions II site
Reply With Quote
  #6  
Old March 6th, 2004, 07:29 PM
Nagot Gick Fel's Avatar

Nagot Gick Fel Nagot Gick Fel is offline
Major
 
Join Date: Sep 2003
Posts: 1,177
Thanks: 0
Thanked 1 Time in 1 Post
Nagot Gick Fel is on a distinguished road
Default Re: Arryn\'s PD calculator v1.01

Quote:
Originally posted by Arryn:
Worked correctly for *even* numbers, and silly me forgot to test with odd ones.
Why test? The formula applies to odd and even number just the same.
__________________
God does not play dice, He plays Dominions Albert von Ulm
Reply With Quote
  #7  
Old March 6th, 2004, 08:59 PM
Arryn's Avatar

Arryn Arryn is offline
Major General
 
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
Arryn is on a distinguished road
Default Re: Arryn\'s PD calculator v1.01

Quote:
Originally posted by Nagot Gick Fel:
Why test? The formula applies to odd and even number just the same.
Forgive me for saying this, but "why test?" is a stupid question. Lesson #1 in programming: All software needs to be tested, and thoroughly. Just because the *formula* works doesn't mean that the *implementation* of the formula in code works as intended.
__________________
Visit my Dominions II site
Reply With Quote
  #8  
Old March 7th, 2004, 01:42 AM
Nagot Gick Fel's Avatar

Nagot Gick Fel Nagot Gick Fel is offline
Major
 
Join Date: Sep 2003
Posts: 1,177
Thanks: 0
Thanked 1 Time in 1 Post
Nagot Gick Fel is on a distinguished road
Default Re: Arryn\'s PD calculator v1.01

Quote:
Originally posted by Arryn:
quote:
Originally posted by Nagot Gick Fel:
Why test? The formula applies to odd and even number just the same.
Forgive me for saying this, but "why test?" is a stupid question. Lesson #1 in programming: All software needs to be tested, and thoroughly. Just because the *formula* works doesn't mean that the *implementation* of the formula in code works as intended.
Ah OK. And it wasn't a stupid question, only a misunderstanding: I thought you "tested" for even/odd numbers in your code, which of course has nothing to do with "testing" software.
__________________
God does not play dice, He plays Dominions Albert von Ulm
Reply With Quote
Reply

Bookmarks


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 On

Forum Jump


All times are GMT -4. The time now is 03:02 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.