PDA

View Full Version : how to make a number field



Stordyr
August 5th, 2011, 20:08
Hi guys,

i'm currently working through the modification guide and trying just to build my own charakter sheet without big functionality.

And I'm wondering, how I can just make a simple number field where the people can put in a number and use it for rolling a D20 :) That's basicly all I need :)

regards

Christian

joshuha
August 5th, 2011, 21:42
Can you be more specific? What relation to the d20 roll is the number field related to? Do you mean you want a numberfield that they can double click on or something and a d20 is rolled and then that number added to the roll?

Stordyr
August 5th, 2011, 22:08
I can be more specific, sorry.
I want a number field, where they can put in a number beween 1 and 20
when they doubleclick the field, there should be a diceroll with a D20 and all that nice "<skill>: <value> <result of die throw>" should appear ;)
I just lack to understand the concept of those fields.

joshuha
August 5th, 2011, 22:17
Read this thread and let me know if that makes sense to you.

https://www.fantasygrounds.com/forums/showthread.php?t=6015

Stordyr
August 5th, 2011, 23:28
at least I can read the lua part.. what I don't get right now is:
how do i define the field correctly .. so that I may enter data. as a first step. What i managed to do is, is set frames and textfields... but numberfields... no chance in hell right now. I don't get the <"differentname here" and source="<something here>">.

Moon Wizard
August 6th, 2011, 14:08
I'm at Gencon right now, so not much time to write. Check out the developer reference for now, it might help.

https://www.fantasygrounds.com/refdoc/numbercontrol.xcp
https://www.fantasygrounds.com/refdoc/numberfield.xcp