PDA

View Full Version : Renaming the Arcane Backgrounds in an Extension



Coanunn
December 23rd, 2016, 19:46
Ok, so I know there is a command in the lua you can use to remove all the arcane backgrounds or even to create a new arcane background. I've used those before. I am in the process of writing up a new module for a home game where I have created some new arcane backgrounds but also modified Super Powers to work different. I want to be able to go in and rename Super Powers without altering the way Fantasy Grounds handles Super Powers. I assume I am just missing the command to do redefine an existing arcane background but LUA is a skill I am VERY far from a master.

Ikael
December 23rd, 2016, 19:55
Bt using SavageWorlds ruleset API, you can get the arcane background by title. This will bring the whole setup/configuration of that arcane background as lua table. Give new name to that setup (might be title named property) and add it as new arcane background.

Coanunn
December 23rd, 2016, 20:00
Ikael,

Thank you, now unfortunately that just means I have to go learn the API.. lol! In all honesty thank you for such a fast response though!

Ikael
December 23rd, 2016, 20:28
Ikael,

Thank you, now unfortunately that just means I have to go learn the API.. lol! In all honesty thank you for such a fast response though!

Short answer,



ArcanePropertyManager.getArcaneConfig("Super Powers").title = "API Powers"


see the API documented here

(https://www.fantasygrounds.com/forums/showthread.php?26363-Savage-Worlds-API&p=234185&viewfull=1#post234185)EDIT: This will replace Super Powers arcane backend name, if you want to add new arcane backend next to it, you need to register it manually

Coanunn
December 23rd, 2016, 20:42
Again sir, you are a gentlemen and a saint. I will likely spend my weekend reading that documentation and breaking things! :)

Talyn
December 25th, 2016, 02:30
The API is actually really easy to use. When I did Lankhar, that setting prohibits most of the usual Savage Worlds arcane backgrounds and adds one custom one of its own. So my extension deleted all the default stuff, added the custom one and the character sheet is ready to rock. Easy peasy.

DaveFY
March 7th, 2017, 01:08
Alright, this API sounds like just what I need. However, as a novice on Fantasy Grounds in general beyond the default stuff, I am afraid I am lost on where this API can be found/where I need to put the commands.

Any direction as to where?

Coanunn
March 7th, 2017, 01:10
Alright, this API sounds like just what I need. However, as a novice on Fantasy Grounds in general beyond the default stuff, I am afraid I am lost on where this API can be found/where I need to put the commands.

Any direction as to where?

The file you are looking for is launcher.lua and it is placed in an extension in the scripts folder. I was able to make all of the changes I needed fairly quickly once I learned the appropriate syntax.

DaveFY
March 7th, 2017, 02:07
The file you are looking for is launcher.lua and it is placed in an extension in the scripts folder. I was able to make all of the changes I needed fairly quickly once I learned the appropriate syntax.

I need more details. Which extension? Or do I need to create a new one? Do I just copy ArcanePropertyManager.getArcaneConfig("Super Powers").title = "API Powers", for instance, as one line in the launcher.lua file? Where do I put the new/modified launcher.lua file, and further the extension as a whole?

When I said I was a novice.. haha. I can learn fast; just need a bit more direction on this subject.