FG Spreadshirt Swag
Page 2 of 5 First 1234 ... Last
  1. #11
    Quote Originally Posted by Necron99
    This function is really such a plus that the devs should just make it standard ruleset.

    Dang Josh, considering all the work you do (and did all through beta) SM should be paying you a retainer.
    I agree 110% about including this in the standard rules, but this works great as is and I have already included it in my custom rules.....thanks for the scripts.

    I just have a quick question. Whenever I click to roll an ability score, rather than listing which ability score is being rolled in chat, it just says "Score" no matter which ability scores are rolled. The skills sections works just fine however. But anyway, what would I need to do to make this display in chat which ability score is being checked?
    Again, thanks for the scripts

  2. #12
    I just added this to my 'd20custom' ruleset and it is a godsend. Really should be the default way it works (and indeed, in my first game it was the first thing I intuitively tried to do).

    Thanks Joshuha.


    I just have a quick question. Whenever I click to roll an ability score, rather than listing which ability score is being rolled in chat, it just says "Score" no matter which ability scores are rolled. The skills sections works just fine however. But anyway, what would I need to do to make this display in chat which ability score is being checked?
    I would also like to know this, plus it would be nice to have it work for the Saves boxes and the Initiative box as well though I'm sure that with a little time we can figure it out from what Joshuha has already shown us.


    Now if the code say, automatically rolled your attack die, compared to the AC of your target, determined if you hit, and then rolled your damage you are probably violating parts of the OGL about automation. Note the above is possible with some extensive LUA but I would only do it for another system where I wasn't afraid of violating a part of the license.
    One could do something like this for their own personal use though, no?

    Not that I will.. I mean I would if I could, but I think I have a ways to go before actually knowing how to.. but I'm working on it
    Last edited by Tropico; June 26th, 2007 at 15:15.

  3. #13
    Hmm I think my ability scores still work fine. Will need to double check. If not its due to an update that I don't have incorporated into the code that references the name differently.

  4. #14
    Well, I managed to get the Saves on the combat sheet to make the roll when double clicked... by adding the OnDoubleClick function to the <template name="save"> part of charsheet_templates.xml.

    BUT it gives me an error because I don't know how to reference the description text of the save properly I'm going crazy here trying to find the right syntax.. description.text, description[1], description.text[1], description.getValue(), description.text.getValue()... none works

    I can only get it to work fine by putting just a static string like "Save" on the string parameter of the function call.


    Edit -> Fine, I got it to work by simply repeating the function on every individual Save box on the charsheet_combat.xml file, with the a string for the description. So for Reflex:

    Code:
    <save name="reflexsave" source="saves.reflex.total">
    	<anchored>
    		<to>fortitudesave</to>
    	</anchored>
    	<root>reflex</root>
    	<stat>dexterity</stat>
    	<description>
    		<text>Reflex save</text>
    	</description>
            <script>
                   function onDoubleClick(x,y)
                          ChatManager.d20Check("d20", getValue(), "Reflex save");
                          return true;
                   end
            </script>
    </save>
    Yeah it's a bit ugly but it'll do until I actually learn what's going on.


    Later edit -> K, by now I've repeated the same thing on every ability bonus, every save and the initiative boxes on the main and combat sheets... every thing works a-OK with the proper names
    Last edited by Tropico; June 26th, 2007 at 16:40.

  5. #15
    Ok for the abilitybonus template replace the check with this:

    Code:
    ChatManager.d20Check("d20", getValue(), self.description[1].text[1]);
    That format should work for the saves too. This allows the control to get at its own description.text XML value.

  6. #16
    Awesome!

  7. #17
    Quote Originally Posted by joshuha
    Ok for the abilitybonus template replace the check with this:

    Code:
    ChatManager.d20Check("d20", getValue(), self.description[1].text[1]);
    That format should work for the saves too. This allows the control to get at its own description.text XML value.
    Sweet!
    Thanks for the info.....works perfectly!!

    On a related note, could somebody please tell me which files I need to edit to add the same double-click functionality to the character sheets initiative rolls as well? I can't seem to find a reference for it in charsheet_templates.xml.
    Last edited by thrylax; June 30th, 2007 at 12:03.

  8. #18
    OK....I'm pretty sure I found it in charsheet_combat.xml but could I get some insight into where I would need to place the proper code in order to get double-click functionality on initiative rolls as well. I'm still very new to xml scripting, but I'm learning more every day.
    Last edited by thrylax; July 2nd, 2007 at 16:31.

  9. #19
    Nevermind.....got it figured out!!!

    I simply added the following code..............
    Code:
                    <script>
                    function onDoubleClick(x,y)
                        ChatManager.d20Check("d20", getValue(), self.description[1].text[1]);
                        return true;
                    end
                    </script>
    ....just below the section for <sheetbonus name="initiative" source="initiative.total"> like so.............................
    Code:
                <sheetbonus name="initiative" source="initiative.total">
                    <anchored>
                        <to>initiativeframe</to>
                        <position>insidetopleft</position>
                        <offset>90,22</offset>
                        <size>
                            <width>32</width>
                            <height>20</height>
                        </size>
                    </anchored>
                    
                    <script>
                    function onDoubleClick(x,y)
                        ChatManager.d20Check("d20", getValue(), self.description[1].text[1]);
                        return true;
                    end
                    </script>
    Works perfectly so far. Thank you VERY much for the help.....I'm finally starting to get my ruleset character sheet the way it "should" be.

    Now all I need to do is find out where I need to edit in order to add this great functionality for Grapple checks.

    Thanks for the help joshuha :-D
    Last edited by thrylax; July 2nd, 2007 at 16:31.

  10. #20
    I'm having difficulties locating the charsheet_template.xml and charsheet_skills.xml files. They don't appear in my fantasy grounds 2 main directory or in my fantasy grounds applications folder.

    Could somebody point it out to me?

    Much thanks,
    Andro1d

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in