-
May 11th, 2020, 16:26 #1
Can Player Disable Campaign Extension
Is it possible for a player to disable an extension that is enabled in a game they join?
Specifics
I, as the GM, have an extension that puts my dice in a very specific location. It works great for the size and resolution of my monitor.
However, when players join my game this extension automatically loads for them. Because they have monitors with different sizes and resolutions it puts the dice in a 'weird' place for them.
Can the players disable or not load this specific extension when they are joined to my game.
Daniel
-
May 11th, 2020, 16:29 #2
Welcome to FG. No, players can not disable extensions.
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
May 11th, 2020, 16:40 #3
Players cannot unload or disable extensions, but perhaps the extension author can put in code that the code only gets executed for the GM.
For support with any of my extensions, visit my #mattekure-stuff channel on Rob2e's discord https://discord.gg/rob2e
-
May 11th, 2020, 22:57 #4
Thank you for the replies. Unfortunate, but not unexpected. I'll look at different options.
-
May 12th, 2020, 23:45 #5
-
May 13th, 2020, 00:12 #6
-
May 13th, 2020, 15:36 #7
Thank you for the responses. I did look at the code and started down the same path as indicated above. Specifically the User.isHost() command. I could not, however, find any way to use the User.isHost() command to then call xml commands. The extension I'm modifying is actually the Move Dice extension that you wrote Damned.
Specifically, the gameelements.xml is modified. For each of the dice a <position> tag is added, see below -
<die name="d4">
<icon>d4icon</icon>
<position>-3050,-68</position>
</die>
I can add a <script> tag to the <die> tag but I can't then call the <position> tag from inside the function in the <script> tag
<die name="d4">
<icon>d4icon</icon>
<script>
function changePos()
if User.isHost() then
<position>-3050,-68</position>
end
end
</script>
</die>
I get this error when loading the extension - "Script Error: [string "d4"]:1: 'end' expected near '<eof>'". I did try the code with and without a semicolon at the end of the <position> tag line of code.
So. Is there a different way to call the xml tag from within the <script> tag? Or is there a way to set the position using lua code in the function? Or is there a different way to do this?
Sorry for the wall of text but I wanted to be clear on the code I was using.
-
May 13th, 2020, 15:50 #8
try replacing it with this and see if that works (you will need to set your coordinates yourself, my d4 is set at <position>470,-68</position>)
Code:<!--GM's Dice --> <die name="d4"> <icon>d4icon</icon> <position>distancefromleftinpixels,distancefromtopinpixels</position> <script> function onInit() if User.isHost() then setVisible(true); else setVisible(false); end </script> </die> <!--Player's Dice --> <die name="d4"> <icon>d4icon</icon> <position>distancefromleftinpixels,distancefromtopinpixels</position> <script> function onInit() if not User.isHost() then setVisible(false); else setVisible(true); end </script> </die>
Last edited by pr6i6e6st; May 13th, 2020 at 15:58.
-
May 13th, 2020, 22:30 #9
pr6i6e6st - Good idea. Unfortunately, that does not appear to work.
Whatever <position> values are put in the second <die> tag are what are used.
I added some Debug.chat calls and best I can tell the <script> is never called.
Reviewing the Developer Ruleset API Reference for the <die> tag it does not look like the <script> tag is an option here. (https://www.fantasygrounds.com/refdoc/die.xcp)
-----
die
This definition is used to define the properties of a built-in die resource.
If a standard die type (d4,d6,d8,d10,d12,d20,dF) is defined, the 3D model of the die will be available on the desktop.
Definition
<die name="..." >
<icon > ... </icon> The name of an icon resource used to represent the die results in the chat log
<position > ... </position> The default placement of the die on the desktop in the form "x,y"
</die>
-
May 13th, 2020, 22:33 #10
what about changing the first line <die name="d4" mode="host"> and a duplicate d4 control which has the mode "client"? scratch the script stuff.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks