Fantasy Grounds Merchandise
Page 1 of 3 123 Last
  1. #1

    The code for a d100 /die command

    I'd originally posted this in the Armory, but I think it should have been here.

    I know this has been partially covered in another thread, for someone who wanted a 1d3 roll, but for completeness sake, and to save your fingers, here is my /die 1d100 command.

    1. First create a new folder for your ruleset. (I am assuming that you are wanting to play the standard d20 rules, with the addition of the 1d100.) I would recommend calling your new folder d20_yourname, replacing the yourname with your messageboard name, so that if you ever feel like posting the ruleset here it should end up being unique.

    2. Inside your new ruleset folder make a directory called data.

    3. Copy gameelements.xml from the main game data directory into this new data directory in your ruleset.

    4. Copy base.xml from the original d20 ruleset folder into your ruleset folder.

    You should now have the following files in your new folder.

    \FantasyGrounds\rulesets\d20_azutest\data\gameelem ents.xml
    \FantasyGrounds\rulesets\d20_azutest\base.xml

    5. Edit your copy of gameelements.xml and add the following after the defination of d20 and before dmdie

    Code:
    <die name="d100">
    <values list="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,
    20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,
    40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,
    60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,
    80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100" />
    <icon file="data\icons\d20_icon.png" />
    <position point="110,680" />
    </die>
    6. open up base.xml and alter the gameelements line....

    Code:
    <includefile source="rulesets\d20_azutest\data\gameelements.xml" />
    You are now ready to start a new campaign with the /die d100 command installed.

    Notes
    You may have noticed that the dice roller displays it's result in a white box with a picture of a dice. The dice pictures are not found in your icons folder, which makes me think that they are an override graphic only. In other words if you add the path to your own picture it will show up, but if you use the built-in ones it uses the internal bit map.

    In any event, I chose the d20 for this because it looks like it has a lot of sides and means that you dont need to make people download a new die graphic. Although that might be a good idea to stop people getting confused with what kind of dice it is. If you do need to make a new picture for the dice, then I don't know where you can get the original bitmap from, maybe it gets extracted if you select the unpak.exe file? I'm sure someone will let us know.

    Using this simple principle, it should be possible now to make other non-standard dice, such as the fudge dice, although you will have to wait for the devs to create composite dice rolling to make dice for games like Alternity and Sovereign Stone, as the simple die result sequence cannot easily represent rolling two or more dice with different faces at a time.

  2. #2

    Join Date
    Dec 2004
    Location
    Chicago-ish
    Posts
    2,234
    Very nice! Thanks for shareing.

    rv

  3. #3
    fyi, if u right click the d10, it has a % option, where it rolls %

  4. #4
    OMG u can roll up to 20 dice by right clicking...SWEET

  5. #5
    I made an icon for the d100. You can find it here:
    https://mywebpages.comcast.net/nezzi.../d100_icon.png

    Put it in your rule sets icon directory and change the line in the gameelements file to:
    <icon file="rulesets\mymodname\icons\d100_icon.png" />

  6. #6
    Quote Originally Posted by AzureaSkyes
    Notes
    You may have noticed that the dice roller displays it's result in a white box with a picture of a dice. The dice pictures are not found in your icons folder, which makes me think that they are an override graphic only. In other words if you add the path to your own picture it will show up, but if you use the built-in ones it uses the internal bit map.

    In any event, I chose the d20 for this because it looks like it has a lot of sides and means that you dont need to make people download a new die graphic. Although that might be a good idea to stop people getting confused with what kind of dice it is. If you do need to make a new picture for the dice, then I don't know where you can get the original bitmap from, maybe it gets extracted if you select the unpak.exe file? I'm sure someone will let us know.
    You are pretty close here. Anytime you see a file referenced in the example ruleset but don't see a copy of the file in any physical directory it is located in the resource.pak file. The files are internal to the game and you could replace these and even affect the default fantasy grounds stuff but that isn't recommended. It would be better to create your own ruleset and then reference your new picture as opposed to accidentally screwing up something in the original .pak file and not being able to restore without a complete reinstall.

  7. #7
    Quote Originally Posted by PowerJ
    OMG u can roll up to 20 dice by right clicking...SWEET
    Actually, you can "pick up" up to 20 dice by right clicking. Once you have those 20, before you roll them, right-click again. Each right-click will add one MORE die, up to a total of 30 dice.

    How do ya like THEM apples?
    This space for rent!

  8. #8
    This is great - I implemented the d100 die detailed here for my RM ruleset - but I'm confused as to the point of the position tag. That seems it's supposed to place it on the desktop, which it doesn't.

    The png icon is like all the other icons and is used for displaying the dice results in the chat window....but what I'd like is to add it as one of the real dice on the desktop.

    Also how can I remove the dice from the desktop? RM doesn't use all those other dice and while I might like to keep a d6 and d10 around I'd rather remvoe all the others from the desktop...but deleting the position tag only moves the die to the top left desktop. I don't want to delete the code entirely because won't that make it inaccessible from the command line (/die d4). I don't want to remove those dice from being used, just from the desktop.

  9. #9
    Quote Originally Posted by Vroomfogle
    This is great - I implemented the d100 die detailed here for my RM ruleset - but I'm confused as to the point of the position tag. That seems it's supposed to place it on the desktop, which it doesn't.

    The png icon is like all the other icons and is used for displaying the dice results in the chat window....but what I'd like is to add it as one of the real dice on the desktop.

    Also how can I remove the dice from the desktop? RM doesn't use all those other dice and while I might like to keep a d6 and d10 around I'd rather remvoe all the others from the desktop...but deleting the position tag only moves the die to the top left desktop. I don't want to delete the code entirely because won't that make it inaccessible from the command line (/die d4). I don't want to remove those dice from being used, just from the desktop.
    I remember a dev post not too long ago stating that removing dice should be possible in 1.06. But for custom dice I don't think you will be able to have the ability to add a graphical representation unless its just a generic shape as if I did a d22 or d50 or whatever it would have to model that in 3D realtime. But maybe a generic type custom die so you can still roll and apply modifiers would be cool.

  10. #10
    Well in this case the models already exist for the % dice....since you can access them from clicking on d10->%.
    Now how can we get them to display on the desktop?

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
  •  
5E Product Walkthrough Playlist

Log in

Log in