SR4 Party Tracker: Excel help requested |
SR4 Party Tracker: Excel help requested |
Feb 11 2006, 11:04 PM
Post
#1
|
|
Moving Target Group: Members Posts: 169 Joined: 13-December 05 From: Portland, OR Member No.: 8,070 |
I'm working on creating a simple GM sheet for my weekly game. The sheet contains the attributes and skill and misc modifiers for all the characters so I can easily reference them.
I want to put in a simple dice roller tool at the top of the sheet. The tool would use the following drop-down menus, most likely activated by Combo Boxes A: Character Name - this is pulled from the character info lists B: Type of Test (EX: "Perception: Hearing") - this is from a list of predefined common tests, and determines Attribute and Skill necessary C: Misc Mods - this is a drop-down list of numbers, ranging from -10 to 10, maybe more, applied as a dice pool mod. Then a button which, when pressed, rolls the dice, checks for hits and glitches, and gives the result. I'm fairly adept at excel, so working out the formulas is not proving to be much of a problem so far. The problem is mainly one of aesthetics: using the standard random functions in excel, the calculations occur EVERY TIME new data is entered. I want this one specific calculation to run ONLY when the button is pressed. Thoughts? Suggestions? Any and all help is appreciated. |
|
|
Feb 11 2006, 11:24 PM
Post
#2
|
|
Dragon Group: Members Posts: 4,138 Joined: 10-June 03 From: Tennessee Member No.: 4,706 |
Explore this line of thought. It may or may not work.
Hide the box where the random numbers are generated. Have the button press cause the randomization to occur and copy the numeric content of the box into a display box. This way, you get a random result only when you hit the button. Not sure how well it'll work, though. |
|
|
Feb 11 2006, 11:29 PM
Post
#3
|
|||
Moving Target Group: Members Posts: 169 Joined: 13-December 05 From: Portland, OR Member No.: 8,070 |
Do you know a formula for copying the contents of a cell into a display box? |
||
|
|||
Feb 12 2006, 12:06 AM
Post
#4
|
|||
Dragon Group: Members Posts: 4,138 Joined: 10-June 03 From: Tennessee Member No.: 4,706 |
It's not a formula. You'll need to use a macro. This worked for me:
A2 holds the random number function and C2 is where I want it displayed. You should be able to freely change them. |
||
|
|||
Feb 12 2006, 12:10 AM
Post
#5
|
|||||
Moving Target Group: Members Posts: 169 Joined: 13-December 05 From: Portland, OR Member No.: 8,070 |
Looks good. Might be a way of doing it. Now that I have my data decided in the boxes, I need a way to calculate "random number from 1 to 6, X number of times, count the 5s and 6s" |
||||
|
|||||
Feb 12 2006, 12:33 AM
Post
#6
|
|
Moving Target Group: Members Posts: 169 Joined: 13-December 05 From: Portland, OR Member No.: 8,070 |
I've got all the variables in place and harvesting accordingly, now all I need is the formula. I need a formula that finds a random number X times, and then counts the number of times Y and Z occur. Hmmmm...
|
|
|
Feb 12 2006, 12:40 AM
Post
#7
|
|
Dragon Group: Members Posts: 4,138 Joined: 10-June 03 From: Tennessee Member No.: 4,706 |
|
|
|
Feb 12 2006, 12:50 AM
Post
#8
|
|||
Moving Target Group: Members Posts: 169 Joined: 13-December 05 From: Portland, OR Member No.: 8,070 |
Wow, that's intense! Hahah. On the "hidden dice sheet" there's a whole buttload of "#NAME?" errors all starting in column B. Which leads me to believe that for some reason my randbetween function is not working. WTF... EDIT: Doh. New install of excel, didn't have the add-ins enabled. |
||
|
|||
Feb 12 2006, 12:51 AM
Post
#9
|
|
Dragon Group: Members Posts: 4,138 Joined: 10-June 03 From: Tennessee Member No.: 4,706 |
Click tools->add-ins and enable the Analysis ToolPak. That'll fix the "#NAME?" errors. You need it because I'm lazy and was running RANDBETWEEN functions.
EDIT: Yeah. That. I found an addin that is supposed to roll dice, but it only returns a solid result. Ie, you can get it to roll 3d6, but it'd just give you the sum. |
|
|
Feb 12 2006, 12:54 AM
Post
#10
|
|||
Moving Target Group: Members Posts: 169 Joined: 13-December 05 From: Portland, OR Member No.: 8,070 |
Beat ya to it =) Now, to add Glitches. This should be fun... You know, there HAS to be a simpler way to do this. |
||
|
|||
Feb 12 2006, 12:56 AM
Post
#11
|
|||
Dragon Group: Members Posts: 4,138 Joined: 10-June 03 From: Tennessee Member No.: 4,706 |
Glitches aren't bad, actually. Just do a countif 1 and then do a comparison between hits and the result of that. Edge is going to be the killer. |
||
|
|||
Feb 12 2006, 11:21 AM
Post
#12
|
|||
Dragon Group: Members Posts: 4,138 Joined: 10-June 03 From: Tennessee Member No.: 4,706 |
The A+ answer is to do it all in a macro. This one works:
I had a little trouble using cell names as references, so you'll need to do a find and replace to change the cell values to what you need them to be. |
||
|
|||
Feb 14 2006, 09:01 PM
Post
#13
|
|
Moving Target Group: Members Posts: 169 Joined: 13-December 05 From: Portland, OR Member No.: 8,070 |
After a bit of work, I've got it mostly worked out, including Edge, Glitches, Specializations, and more, with only one (unnecessary) macro that hits F9 (recalc sheet) when the "roll" button is pressed..
The problem with the original macro that copied the value, is that it copied the value before the recalculation, and the glitch report I had wasn't up to par with that. Anyway, if you wanna see the excel sheet, I'll email it to you. Be warned, I use a different set of rules options: 1. Hits on 4, 5, and 6 2. Edge adds itself as direct hits, and additionally opens the rest of the dice to the rule of 6 3. Edge dice do not glitch 4. We're using a fantasy setting =) EDIT: Here's a link to the file: CLIKY CLICKY |
|
|
Feb 14 2006, 09:10 PM
Post
#14
|
|||||
Moving Target Group: Members Posts: 169 Joined: 13-December 05 From: Portland, OR Member No.: 8,070 |
Can you whip up a file with this as an example? |
||||
|
|||||
Feb 15 2006, 12:54 AM
Post
#15
|
|
Dragon Group: Members Posts: 4,138 Joined: 10-June 03 From: Tennessee Member No.: 4,706 |
|
|
|
Feb 15 2006, 11:48 PM
Post
#16
|
|||
Moving Target Group: Members Posts: 169 Joined: 13-December 05 From: Portland, OR Member No.: 8,070 |
Thanks! This helps immensely |
||
|
|||
Lo-Fi Version | Time is now: 22nd November 2024 - 08:21 PM |
Topps, Inc has sole ownership of the names, logo, artwork, marks, photographs, sounds, audio, video and/or any proprietary material used in connection with the game Shadowrun. Topps, Inc has granted permission to the Dumpshock Forums to use such names, logos, artwork, marks and/or any proprietary materials for promotional and informational purposes on its website but does not endorse, and is not affiliated with the Dumpshock Forums in any official capacity whatsoever.