Thread: Keep Highest/Drop Lowest ?
-
September 20th, 2014, 22:36 #11"Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness
Post your SavageWorlds ruleset feature requests and issue reports here!
-
November 22nd, 2014, 20:54 #12
- Join Date
- Sep 2014
- Location
- Michigan
- Posts
- 65
I have just completed my first draft of a "Drop Lowest" extension, which you can download from here. It is still a very simple implementation, but before I get much further along in development I have come to a point where I don't quite know what I am doing wrong.
With this extension activated, typing "/rolld" in the chat window will trigger a roll of 4d6. The lowest roll is determined and removed, and a message is sent to the chat window with the results. Everything seems to work perfectly. Here is an image that shows the results of using the "/die 3d6" command on one line and the "/rolld" command on the next: Attachment 8004
The problem I am having is when I drag the results onto the ability score on the character sheet. The result from the first command can be dropped onto the Strength score and it will be automatically applied. The result from the "/rolld" command, however, will not be applied if I try the same thing. I can, however, drag the result from "/rolld" back into the chat window, in which case it will come back with only the total, as in this image: Attachment 8005.
I have no problem dragging the total onto my character sheet, so technically this functionality works... at least to a point. I cannot seem to figure out why the results from my custom command can't be dragged like the results of the "/die" command can. It seems to me that I have everything wired up correctly. If anyone who might be able to give me a hand wants to take a look at my code to see where I went wrong, I would really appreciate the advice. This module is something my players have strongly requested from me, and I really learned quite a lot just getting it this far. If I can figure out what I am doing wrong I am planning to modify the functionality so that the new slash command will accept parameters for the dice to be rolled and the number to be dropped, so instead of just having it always roll 4d6 drop lowest, you could instead do something like "/rolld 5d8 2" to roll 5d8 dropping the 2 lowest results.
NOTE: These screenshots and all of my testing have been done using the 3.5E ruleset.Last edited by DMFirmy; November 22nd, 2014 at 20:56. Reason: Leaving Note
-
November 23rd, 2014, 19:50 #13
- Join Date
- Sep 2014
- Location
- Michigan
- Posts
- 65
I just posted an update to this extension on my website (the original link still works) that now allows you to pass in the number of dice, dice type, and number of results to be dropped, though the same issue mentioned in my previous post is still present. It is also a known issue that, at the moment, the handling for d100 rolls is not properly implemented, but I will get around to that at some later time when I find the time and energy to do so. Once I figure out how to make the roll results draggable onto the character sheet, I think this extension will be pretty close to ready to release in the main forums, so again, any help would be appreciated.
-
November 23rd, 2014, 22:02 #14
@DMFirmy - good work.
Give it a couple of days and hopefully one of the more experienced programmers will spot your thread and have a look.
-
November 23rd, 2014, 22:41 #15
- Join Date
- Sep 2014
- Location
- Michigan
- Posts
- 65
Thanks damned...
I actually just added support for d100's, so I think this little extension is pretty close to complete. Even with the annoying extra step of having to drag the totals back into chat to make them draggable, it is certainly faster and easier than having to mentally do the drops.
-
November 26th, 2014, 07:04 #16
Is the extension file still available for download?
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
November 26th, 2014, 16:17 #17
- Join Date
- Sep 2014
- Location
- Michigan
- Posts
- 65
Yeah, sorry about that. I didn't realize my website modified the file name when I uploaded the updated version.
Here is a link to the download page on my website as opposed to a direct link to the file. I will always attempt to keep the most up-to-date version uploaded to this page.
-
November 26th, 2014, 18:48 #18
The ability score number field only accepts drops that are a number. It doesn't recognise your customer type of "rolld" as having a number portion and so doesn't do anything with it. A quick fix is to change the rMessage.type in the createChatMessage function to be "dice", i.e. rMessage.type = "dice"; This will allow you to drag a rolld result to an ability score field and the total of the roll will be populated in the field.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
November 26th, 2014, 19:56 #19
- Join Date
- Sep 2014
- Location
- Michigan
- Posts
- 65
-
November 26th, 2014, 20:12 #20
- Join Date
- Sep 2014
- Location
- Michigan
- Posts
- 65
@Trenloe: Thanks, that fix does the trick!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks