1. #1
    Xarxus's Avatar
    Join Date
    Mar 2019
    Rome (Italy)

    OptionsManager registerOption2 - parameters explanation

    I need some explanation on these function parameters. I put the questions next to the parameters of the code.

    	"XYZ", 						--> This is the unique name of the option, right?
    	true, 						--> "true" is equal for all, "false" every client can define it?
    	"ABC", 						--> This should be the name of the group the option should be placed in, right?
    	"DEF", 						--> This is the option label
    	"fff", 						--> This is th option type, like "option_entry_cycler"
        { labels = "option1|option2",  			--> These are the labels on which the option cycles (if option_entry_cycler)?
          values = "123|456", 				--> These are the associated values?
          baselabel = "option3", 				--> Is this the default? Should it be one of the above? I find some example with a different option...
          baseval = "789", 					--> This depends on the answers above
          default = "ggg" });				--> Another default?
    FGU ULTIMATE License
    Click here for RPG Music or here for Dwarves songs on Spotify

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Blog Entries
    like with other cyclers the default is not one of the options. the default is an option its just not listed in the options, its listed as the default.
    you have a display value and a db value

  3. #3
    Xarxus's Avatar
    Join Date
    Mar 2019
    Rome (Italy)
    So baselabel and baseval are the default choices and aren't in labels and values.
    I've not undestood the default. Could you help me more, please?
    FGU ULTIMATE License
    Click here for RPG Music or here for Dwarves songs on Spotify

  4. #4
    From the OptionsManager function in CoreRPG, the function is defined as:
    registerOption2(sKey, bLocal, sGroupRes, sLabelRes, sOptionType, aCustom)

    So, the values are:
    • sKey = (string) Unique identifier to register/access this option
    • bLocal = (boolean) Specify whether option is local (i.e. editable by each user) or campaign-wide (i.e. only editable by GM)
    • sGroupRes = (string) Specify string resource to use for option group. All options with same option group name are grouped together in UI.
    • sLabelRes = (string) Specify string resource to display in UI for this option.
    • sOptionType = (string) Specify the window class to use for displaying the option. (Usually this is "option_entry_cycler".)
    • aCustom = (table) Specify any data used to customize the window or specify other optional information.

    aCustom is used by the window class defined by sOptionType in the original call. For "option_entry_cycler", the expected values are:
    • default = (string) Default value of option. By default, empty option value is the default value.
    • baselabel = (string) Specify string resource to denote label for empty option value.
    • baseval = (string) Specify the empty option value.
    • labels = (string) Pipe-delimited ("|") string resources to denote labels for non-empty option values.
    • values = (string) Pipe-delimited ("|") strings to denote available non-empty option values.

    This is one of the oldest global scripts, and one of the first ones to be used across multiple rulesets; so it's a little more complex than I would like, but it's not on the list to streamline at this point to avoid breaking older rulesets.


Thread Information

Users Browsing this Thread

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

Tags for this Thread


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 02

Log in

Log in