DICE PACKS BUNDLE
Page 34 of 109 First ... 2432333435364484 ... Last
  1. #331
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    Quote Originally Posted by Kevlyn View Post
    psicodelix, I tried a dozen or more ways to do this, but nothing has worked.

    My list object name is specialability_list, my datasource name is .specialabilities and I have tried

    window.specialabilities.createWindow() a nil value
    window.getDatabaseNode().specialabilities.createWi ndow() a nil value
    window.getDatabaseNode().getChild("specialabilitie s").createWindow() a nil value

    And probably several other iterations, plus using getChildren() to see if I can see the node at all. Nothing seems to be working, or maybe I'm just too tired to see it. Any pointers from here?
    You can't "createWindow" against a database node - FG doesn't know where to create that window.

    You need to createWindow against the windowlist GUI control - "specialability_list" in this case.

    https://fantasygroundsunity.atlassia...t#createWindow

    Assuming your code is running within the window scope, use window.specialability_list.createWindow() - as per the example in post #326 above.
    Last edited by Trenloe; February 22nd, 2021 at 14:17.
    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!

  2. #332
    Thanks Trenloe, that was where I was going wrong!

  3. #333
    Quote Originally Posted by psicodelix View Post
    Awesome work!!!!

    Could you attach the source code of the problematic window class?
    Thanks, the first one is:

    <?xml version="1.0" encoding="ISO-8859-1"?>

    -<root>


    -<windowclass name="TraitDetail">


    -<placement>

    <size width="530" height="117"/>

    </placement>


    -<sheetdata>


    -<combobox name="ComboBox_trait">


    -<frame>

    <name>fielddark</name>

    <offset>8,0,8,0</offset>

    </frame>

    <bounds>357,34,104,30</bounds>

    <listdirection>down</listdirection>

    <script> function onInit() super.onInit(); add("Talent","Talent"); add("Trait","Trait"); add("Drawback","Drawback"); add("Disorder","Disorder"); add("Taint of Chaos","Taint of Chaos"); end </script>

    </combobox>


    -<stringfield name="StringField_traitname">

    <bounds>26,7,483,20</bounds>

    <color>#FF800000</color>

    <empty textres="TraitDetail_StringField_traitname_EmptyTe xt"/>

    <lineoffset default="on">0</lineoffset>

    <font>DOMISC_20</font>

    </stringfield>


    -<combobox name="ComboBox_type">


    -<frame>

    <name>fielddark</name>

    <offset>8,0,8,0</offset>

    </frame>

    <bounds>239,34,104,30</bounds>

    <listdirection>down</listdirection>

    <script> function onInit() super.onInit(); add("",""); add("Ancestral","Ancestral"); add("Professional","Professional"); add("Special","Special"); add("Bonus Adv.","Bonus Adv."); add("Unique Adv.","Unique Adv."); end </script>

    </combobox>


    -<stringfield name="StringField_TraitEffect">


    -<frame>

    <name>fielddark</name>

    <offset>8,0,8,0</offset>

    </frame>


    -<anchored>

    <left offset="23"/>

    <right offset="-17"/>

    <top offset="63"/>

    </anchored>

    <multilinespacing>30</multilinespacing>

    <font>ACaslon_bold_20</font>

    </stringfield>


    -<stringcontrol name="Label1">

    <bounds>25,46,49,20</bounds>

    <static textres="TraitDetail_Label1_LabelCaption"/>

    <font>CaslonPro_15</font>

    </stringcontrol>

    </sheetdata>

    </windowclass>

    </root>

  4. #334
    please, send the main trait window source code too.
    Ruleset Wizard
    The Ruleset Development Environment
    www.rulesetwizard.com
    Ruleset Wizard Tutorials
    Damned's Ruleset Wizard Tutorials

  5. #335
    When you click on add folder, can you please set focus to the text box for the folder's name? That would really go for any popup that is prompting for a name (e.g. add XML, Script, etc.)
    Last edited by deer_buster; February 23rd, 2021 at 21:06.
    aka Laendra

    (Discord: Laendra#9660)
    Ultimate license (FGC/FGU)
    Current Timezone : Central (CDT) (GMT -5)
    OP: 3317036507 / 2369539

    My opinions are my own and represent no entity other than myself

    Extension Support Discord: https://discord.gg/gKgC7nGpZK

    Extensions = risk to your gaming experience. If you haven't tested out the extensions in your campaign before your gaming session, turn them off. If you don't backup your campaigns regularly, you're doing it wrong.


  6. #336
    Quote Originally Posted by deer_buster View Post
    When you click on add folder, can you please set focus to the text box for the folder's name? That would really go for any popup that is prompting for a name (e.g. add XML, Script, etc.)
    Ok.
    Ruleset Wizard
    The Ruleset Development Environment
    www.rulesetwizard.com
    Ruleset Wizard Tutorials
    Damned's Ruleset Wizard Tutorials

  7. #337
    Quote Originally Posted by psicodelix View Post
    please, send the main trait window source code too.
    Thank you for your help; I built this into the Abilities part of the character sheet and this is the only code I can get (by right clicking):

    <?xml version="1.0" encoding="ISO-8859-1"?>

    -<root>


    -<windowclass name="charsheet_abilities">


    -<placement>

    <size width="610" height="526"/>

    </placement>


    -<sizelimits resize="both">

    <maximum width="615" height="700"/>

    <minimum width="500" height="500"/>

    <dynamic/>

    </sizelimits>


    -<sheetdata>


    -<genericcontrol name="IconControl2">

    <bounds>6,33,-10,-5</bounds>

    </genericcontrol>


    -<windowlist name="TraitList">


    -<anchored>

    <left offset="41"/>

    <right offset="-69"/>

    <top offset="41"/>

    <bottom offset="-12"/>

    </anchored>

    <gmeditonly/>

    <class>TraitDetail</class>

    <datasource>TraitList</datasource>

    <allowcreate/>

    <allowdelete/>

    </windowlist>


    -<scrollbarcontrol name="ScrollBar1">


    -<frame>

    <name>scrollbar_base</name>

    </frame>

    <bounds>-65,37,23,-15</bounds>

    <target>TraitList</target>


    -<normal name="scrollbutton_normal">

    <minimum height="scrollbutton_normal"/>

    </normal>

    </scrollbarcontrol>

    </sheetdata>

    </windowclass>

    </root>

  8. #338
    at a first glance, I think the datasource of your list should be .TraitList (note the dot before the name), as the data source must be relative.
    Ruleset Wizard
    The Ruleset Development Environment
    www.rulesetwizard.com
    Ruleset Wizard Tutorials
    Damned's Ruleset Wizard Tutorials

  9. #339
    Okay, my last challenge for this exercise is to add modifiers to a Dice Field when the dice are dragged off. I have added the information into the control's Dice Roll section, but that does not do anything.

    I'm wondering if I need to set Control Custom Properties for the Dice Field, but if so then what fields exactly need to be set or how can I customize the dice rolled, for instance sending a message to the chat box that indicates which weapon was attacked with and what the skill modifier is for the weapon.

    Thanks in advance for the help!!

  10. #340
    Quote Originally Posted by Kevlyn View Post
    Okay, my last challenge for this exercise is to add modifiers to a Dice Field when the dice are dragged off. I have added the information into the control's Dice Roll section, but that does not do anything.

    I'm wondering if I need to set Control Custom Properties for the Dice Field, but if so then what fields exactly need to be set or how can I customize the dice rolled, for instance sending a message to the chat box that indicates which weapon was attacked with and what the skill modifier is for the weapon.

    Thanks in advance for the help!!
    to make a dice field add a modifier to the roll set
    - Allow drag & drop to: true
    - Dice roll string to: + {modifierfield}

    to set the description for the roll you can set the Roll Description Property, for example.

    Attack with {weaponname}


    you can find more advanced examples of dice handling in the Ruleset Wizard Core demo project.
    Ruleset Wizard
    The Ruleset Development Environment
    www.rulesetwizard.com
    Ruleset Wizard Tutorials
    Damned's Ruleset Wizard Tutorials

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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
  •  
STAR TREK 2d20

Log in

Log in