Thread: [Programming] Dice names in xml?
-
April 10th, 2020, 04:16 #1
[Programming] Dice names in xml?
Hey guys! so I finally got a copy of the Unity version, and decided today i'd poke in at fixing the code for the Alien RPG.
I've got it working for the most part, but I notice something. First, I'm getting errors to start, which is probably leading to the next issues I have.
Code:[4/9/2020 11:28:26 PM] [<color="red">ERROR</color>] die: Name (d3.1) must be alphanumeric value. [AlienRPGtestphase] [definitions/dice.xml] [4/9/2020 11:28:26 PM] [<color="red">ERROR</color>] die: Name (d3.2) must be alphanumeric value. [AlienRPGtestphase] [definitions/dice.xml]
Second thing, when i roll any dice, d6 or anything, no box or graphics show the die results or the dice rolled.
i imagine i just have to rename the die faces in the definitions/dice.xml but I'm not sure what that would be.
I'll include my .pak file. the new dice should show at the bottom as icons next to the d6, but can be rolled from the stats of a character sheet if the number is above 0.
thanks for any advice
-
April 10th, 2020, 04:37 #2
Rename the dice something like d301, d302 etc
-
April 10th, 2020, 05:55 #3
I've just had to do the same for The One Ring to get the custom dice to show up. I renamed the dice as damned suggests, replacing the "." with "r" (e.g. d6r1, d6r2, etc.). I've then had to use the Adobe Blank font to hide the actual die results, to avoid the results numbers being shown on the custom dice faces.
See:
https://www.fantasygrounds.com/forum...accepts-period
https://www.fantasygrounds.com/forum...nversion/page7Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
-
April 10th, 2020, 06:14 #4
i appear to be lacking the graphic results now. i got the errors to stop, following Damned's advice; but rolling dice just create a chat entry, nothing saying how many of what die were rolled and what the result was. My custom dice do tell me via chat how many successes or fails there are, but i can't see the result of a d6 or d60 etc. etc. even if i roll a table, i don't know what number i rolled, i just get the text from that table column.
examplediceresults.png
might be worth noting that i started this project back in august, so if there were important changes to the custom dice extension, i might need to have a gothrough of that
-
April 10th, 2020, 12:44 #5
Did you change the dice handlers when changing the results to the custom dice graphics?
e.g.
Code:dicetable[n].type = dicetable[n].type .. "." .. dicetable[n].result;
Code:dicetable[n].type = dicetable[n].type .. "r" .. dicetable[n].result;
Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
-
April 10th, 2020, 22:55 #6
ah ok i figured out what you mean. awesome. that is looking a lot better. Now, i don't know if you worked it out yet or not, but i think I'm having the issue Trenloe was having. Was there a workaround? Thanks for the help btw.
examplediceresults.png
-
April 10th, 2020, 23:38 #7
instead of making a whole new thread, since i mentioned it within this one, what changed about <buttonfield><frame></fame></buttonfield>? it seems that none of my buttons show frames anymore, nor do my <windowlist><frame></frame></windowlist>
edit: actually, I'm not totally sure about this. it seems a fair amount of the frames are working for the character sheets, but some buttons and the npc list are not showing frames.Last edited by pr6i6e6st; April 10th, 2020 at 23:42.
-
April 11th, 2020, 01:02 #8
-
April 11th, 2020, 02:19 #9
figured out the second issue. seems that the <buttoncontrol><frame></frame></buttoncontrol> format won't work anymore in unity, and it needs to look more like <buttoncontrol><frame name="fielddark" offset="0,0,0,0" /></buttoncontrol>
to clarify, this is what i had before
Code:<buttonfield name="type"> <anchored width="90" height="30"> <top parent="columnanchor" anchor="bottom" relation="relative" offset="0" /> <left offset="97" /> </anchored> <state text="Vehicle" /> <state text="EEV" /> <state text="Starship" /> <default>0</default> <color>000000</color> <frame>fielddark</frame>-----------------------<<<<here <font>reference-r</font> <script> function onInit() onValueChanged(); end function onValueChanged() window.update(); end </script> </buttonfield>
Code:<buttonfield name="type"> <anchored width="90" height="30"> <top parent="columnanchor" anchor="bottom" relation="relative" offset="0" /> <left offset="97" /> </anchored> <state text="Vehicle" /> <state text="EEV" /> <state text="Starship" /> <default>0</default> <color>000000</color> <frame name="fielddark" offset="0,0,0,0" />-------------------<<<<here <font>reference-r</font> <script> function onInit() onValueChanged(); end function onValueChanged() window.update(); end </script> </buttonfield>
Last edited by pr6i6e6st; April 11th, 2020 at 02:24.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks