1. #1

    How to give client host privileges

    Can I run a single procedure in lua with higher permission than the client has but only for that function(similar to run as admin)?

    The code works fine on host side, but returns nil values as a client.

    I need help in giving the client permissions as a host within the function.

    My buddy says that I need to use OOB, but can't seem to grasp it.
    FG License: Standard License
    Timezone: -5 EST/EDT

  2. #2

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,699
    Yeah, OOB basically has the client send a message to the host, the host then performs the action and sends the result back to the client.

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    22,410
    Yep, OOB messaging.

    Do a find in files search for "OOB" in your chosen ruleset and you'll see some examples.

    You'll need
    1) Your OOB message name and corresponding function name registered with OOBManager.registerOOBMsgHandler usually in the onInit() function of a LUA script file.
    2) Within the client side code that needs to trigger the process, set the data that needs to be passed in the msgOOB LUA table, including the msgOOB.type which ties in the handler name used in step #1. Then call the OOB message handler using Comm.deliverOOBMessage(msgOOB)
    3) The handler function registered to the msgOOB.type in #1 then executes on the GM side - use the data stored in msgOOB to do the needed operation.


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    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!

  4. #4
    For step 2 is it possible to send an entire function as the data for the GM to process?
    FG License: Standard License
    Timezone: -5 EST/EDT

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    22,410
    Quote Originally Posted by MyGivinOpinion View Post
    For step 2 is it possible to send an entire function as the data for the GM to process?
    I'm guessing probably not - I've had issues sending more complex data in the past (for example, a database node object, and had to send a text reference to a DB node location and then get the database node from that in the handler function).

    You'd probably have to control the exact code to run in the handler function.


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    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!

  6. #6
    @Trenloe, May I message you privately about this further?
    FG License: Standard License
    Timezone: -5 EST/EDT

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    22,410
    Quote Originally Posted by MyGivinOpinion View Post
    @Trenloe, May I message you privately about this further?
    If it’s a general discussion about FG coding I’d prefer it in the forums so others can contribute and also learn. Private messages, for me, should be related to private topics directly addressing me or specific topics that can’t be discussed publicly - see the comment in my signature. Hope you understand. If your need to message me is indeed private, then please go ahead and PM me...


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    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!

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in