PDA

View Full Version : Power Up



rhagelstrom
July 31st, 2022, 01:05
Power Up
Current Version: 1.5
Updated:: 10/10/22

Power Up is Fantasy Grounds extension that allows a user to see the name of extensions that have been updated since the last time the campaign was loaded. Power Up also allows for customization and control of the loading on player modules by the GM.

The slash command /powerup will show which extensions have been updated since the last time the campaign was loaded.

The slash command: /powerupman will show which extensions have been updated since the last time /powerupman was run on the host.

Options


Name
Default
Options
Notes


Chat: Post new extension versions on Load
off
off/on
When on, will post the results of /powerup to the chat window when the table is loaded (Scroll to the top).


Modules: Client autoload player modules
off
off/on
When on, will autoload all player loadable modules on the client(s).


Modules: Client only load GM player modules
off
off/on
When on, will only allow loading of player modules specified by the GMs campaign.



Extension Devs:

For PowerUp to process your extension correctly you need to have a version in your extension.xml file
<version>X.Y</version>
FG doesn't process micro versions so X.Y.Z the Z gets stripped off and it also doesn't like any characters, only numbers.

Alternatively, If you want to use your own version string you can register with PowerUp with the following code in your onInit function where "My Extension Name" and "My Extension Version" are both strings. You will need to have your own process of making sure "My Extension Version" is updated every time you update your extension. To use this method, your load order must be above 10



if PowerUp then
if PowerUp.registerExtension("My Extension Name", "My Extension Version") == 0 then
--successfully registered
else
--error registering
end
end




function onInit()
if PowerUp then
PowerUp.registerExtension("My Extension Name", "My Extension Version", {
{
['link'] = "https://github.com/FG-Unofficial-Developers-Guild/",
['message'] = "v0.9\nAdded registration code"
},
{
['link'] = "https://fgapp.idea.informer.com/",
['message'] = "Please vote for this on the idea informer wishlist",
['icon'] = "shooting_star"
},
}
)
end
end

https://forge.fantasygrounds.com/shop/items/726/view

BaneTBC
August 1st, 2022, 22:42
A very simple thing (not saying the coding is) but boy is it nice to be able to know what Forge items got updated :) Thanks!

GKEnialb
August 2nd, 2022, 03:25
Very nice!

rhagelstrom
August 2nd, 2022, 14:23
Thanks. Part of an afternoon's work address an annoyance I had. It's not perfect but should alert on most cases. I found it does shine a spotlight on the version field of extensions and that while undocumented, it should be in the format X.Y where X,Y are numbers

bmos
August 2nd, 2022, 14:27
Oooh. This is awesome.
I'd suggest also reporting all extensions changed since the last time the command was run.
Otherwise you're out of luck if you loaded the campaign for some quick thing and didn't take the time to run the command.

rhagelstrom
August 3rd, 2022, 17:52
Version Update: 1.2
Thanks @bmos for some quality of life improvements

Changes
Added /powerupman which will show which extensions have been updated since the last time /powerupman was run on the host.
Option to automatically display which extensions have changed since last campaign load
Fixed: extensions with version in the name such as (v3.2.1) where not being processed correctly

SirMotte
August 3rd, 2022, 20:42
Soo good. love it!

rhagelstrom
August 7th, 2022, 00:05
Version Update: 1.3
Added: Registration function for extensions that do not follow the major.minor version format

rhagelstrom
August 28th, 2022, 21:03
Version Update: 1.4
Added: getExtensions() function for other extensions to get the extensions loaded table

rhagelstrom
October 10th, 2022, 19:11
Version Update: 1.5
Feature - API extension for update messages with link support (thx @bmos)
Feature - API extension allow custom icons (thx @bmos)
Feature - Option to only allow modules specified in GM campaign to be loaded by players. Rolls in functionality previously provided by the extension "No Extra Pudding" https://fgapp.idea.informer.com/proj/?ia=136920
Feature - Option to force load on client(s) modules that are loadable by players. https://fgapp.idea.informer.com/proj/?ia=135437
Changed - Options are in their own group "Power Up"

MrDDT
October 10th, 2022, 22:05
Nice, I will remove the other ext and just use this one, I like the added tools

rhagelstrom
February 19th, 2023, 21:36
Version Update: 1.6
Updated DB calls for how SW wants them with the incoming update
Added Luacheck for automated code analysis for errors/warning
Code Formatting

rhagelstrom
August 20th, 2023, 18:43
Version Update: 1.7
Feature: Import/Export campaign options

Atreides Ghola
November 24th, 2023, 18:24
Heya,

I'm looking at the options for loading here - but they don't match the options you have listed in the first post.

I have
Chat: Post new extension versions on load
Modules: Client force load GM player modules
Modules: Client only load GM player modules

Not sure what the difference is for the Module load options, or which they refer to in the first post. Could you clarify, please?

rhagelstrom
November 26th, 2023, 17:46
Heya,

I'm looking at the options for loading here - but they don't match the options you have listed in the first post.

I have
Chat: Post new extension versions on load
Modules: Client force load GM player modules
Modules: Client only load GM player modules

Not sure what the difference is for the Module load options, or which they refer to in the first post. Could you clarify, please?

Client force load GM player modules - This is going to force load on the client all the modules that are marked green (loadable) by the client. You are going to want to be careful turning this on so they aren't loading a bunch of stuff you really don't intend, but you may find it useful in pick up games or one shots, especially if you have new FG users.

Client only load GM player modules - Restricts what the client can load to only what the GM sets as green (loadable). This prevents modules that the player themselves own or have in their modules folder from being loadable by the player. Useful for preventing players from bringing in character options and the like that the GM hasn't approved into the game.

rhagelstrom
December 12th, 2023, 21:18
Version Update: 1.8
Added option to default all modules to not player loadable