PDA

View Full Version : Arcane Backgrounds



Panzermeyer
March 23rd, 2020, 04:50
I have two questions.

In characters is there a way to add new Arcane Backgrounds in the SWADE edition. I can add a new arcane background in the edges area but it is not showing up in the Powers tab on the character sheet.

Secondly, is there a way to display two arcane backgrounds. I have a custom race that gets a power from an Arcane Background. And if the character wants to take a different arcane background. Or for a character that wants to take two arcane backgrounds. How would this be handled in Fantasy Grounds?

Thanks

Panzermeyer

kronovan
March 23rd, 2020, 16:31
Good questions. I was wondering the same, because both of my Arcane Backgrounds are custom and I have 2 races that have AB (Gifted). Meanwhile, Gifted in my setting doesn't allow a character of that race to acquire additional powers -just the 1 innate power. If they want additional powers they need to acquire an AB like any other character.

[Edit] If this currently requires a custom extension, what would be nice for a future update would be a new edge type of "Arcane Background Edge". Then enumerate for any edge with that type and populate the [Arcane Background] dropdown list on the Powers form with it.

lozanoje
March 23rd, 2020, 18:36
Nope, you have to create an extension to add new arcane backgrounds

lozanoje
March 23rd, 2020, 18:39
In more detail:

In extension.xml:


[...]
<base>
<script name="Launcher" file="scripts/launcher.lua" />
</base>
[...]

In "scripts/launcher.lua": change as appropiate for the name of the background and the linked skill


function onInit()
ArcaneManager.unregisterAll()
ArcaneManager.registerArcaneType("Maestría del Loto", {skill = "Lotomancia", powerpoints = "main"})
ArcaneManager.registerArcaneType("Brujería", {skill = "Hechicería", powerpoints = "main"})
ArcaneManager.registerArcaneType("Misticismo", {skill = "Iluminación/Tinieblas", powerpoints = "main"})
end

Panzermeyer
March 23rd, 2020, 18:48
Are there any documents or wikis or anything that might detail future how to do up an extension?

Thanks Panzermeyer

kronovan
March 23rd, 2020, 19:12
After probing a bit more, I can see this is only possible with a custom extension. The big problem is that there's no way (or no field) on an edge for identifying a linked skill.

[Edit] Oops had my post open to0 long and lozanaje beat me to it.

kronovan
March 23rd, 2020, 19:20
In more detail:

In extension.xml:



In "scripts/launcher.lua": change as appropiate for the name of the background and the linked skill

Are you sure about this?

I don't have a script named launcher.lua in my unpacked Savage Worlds ruleset, but see the following in the manager_arcane.lua:


function onInit()
registerArcaneType("Gifted", {skill = "Focus"})
registerArcaneType("Magic", {skill = "Spellcasting"})
registerArcaneType("Miracles", {skill = "Faith"})
registerArcaneType("Psionics", {skill = "Psionics"})
registerArcaneType("Weird Science", {skill = "Weird Science"})
end

Nevermind, I think I see what you're suggesting. If I'm reading that correctly, you're suggesting adding a line to the extension.xml that calls a new script called launcher.lua. Then create a launcher.lua script in the extension's script folder with the entries for your own custom arcane backgrounds and their linked skills. Which would then override the ABs that are set in the manager_ arcane.lua script. That correct?

I'm a bit confused by your suggestion though, as the registerArcaneType function in the manage_arcane.lua doesn't support a powerpoints argument. So why would it be different in a custom script?

kronovan
March 23rd, 2020, 20:35
Many thanks for the extension example lozanoje - that did indeed work. :)

The powerpoints = "main" was throwing me off a bit. Reading further into the manager_arcane.lua script though, I could see where the registerArcaneType function there was calling a createArcaneTypeEntry function as an argument, which was then making the same powerpoints assignment. I can see now where your syntax is a simpler, cleaner way of doing it.

lozanoje
March 23rd, 2020, 22:11
Many thanks for the extension example lozanoje - that did indeed work. :)

Sorry, I didnt have the time to elaborate the solution.

I meant that you need to create a new extension, see attached file.

kronovan
March 23rd, 2020, 22:28
Sorry, I didnt have the time to elaborate the solution.

I meant that you need to create a new extension, see attached file.

NP, I figured it out and created my own extension and lua script. I'd previously gone through the Extension tutorial, so I wasn't completely at a loss - just a partial loss. :p

Panzermeyer will probably find your attached extension file useful.

Panzermeyer
March 23rd, 2020, 22:36
Where is this extension tutorial?

kronovan
March 24th, 2020, 00:30
Where is this extension tutorial?

Here at this link (https://www.fantasygrounds.com/forums/showthread.php?25234-Jeff-s-Excruciatingly-Simple-Extension-Tutorial)

Something to be aware of though, is that the extension examples given in the tutorial are for an older edition of the client and the code no longer works. It's still a good tutorial though for understanding the basics of how you create an extension. The 1st couple of pages or so, should be enough to understand how to use the extension example that Lozanoge posted.

Panzermeyer
March 24th, 2020, 17:24
So in the tutorial it uses an uncommon path for placing the extension that would allow the extension to be loaded.

Panzermeyer

Mortar
March 24th, 2020, 18:29
Put into the extensions folder in your FG library data path. If you are unsure where that is click the folder icon at the top of the launcher.

kronovan
March 25th, 2020, 03:41
So in the tutorial it uses an uncommon path for placing the extension that would allow the extension to be loaded.

Panzermeyer

There isn't really a common Extension path, because it's a subfolder within the data directory which you can change at the time of installation, or afterwords via the 'Data Directory' box on the Settings form. It confused me at first and I actually ended up changing my Data Directory path because I didn't find the initial location particularly convenient.
As Mortar said, the [Open Data Folder] button on the top right of launcher always opens the folder that's currently listed in the Data Directory box.

Optimus21
March 29th, 2020, 04:33
Sorry if this is a silly question, but does this all work with the Unity version of FG? I tried to make it work and it didn't seem to.

Nevermind, figured it out in Unity. My apologies for the post.

Dandersonjr32
March 31st, 2020, 19:29
My big question is how do I use the Arcane Background Changer for SWADE by Viriato139ac extension? I have her all loaded up but don't know how to use it.

KingCrud
January 3rd, 2021, 10:34
Thanks to everyone for the patient advice on this subject, but the XML coding is confusing the hell out of me. Jeff's Tutorial (elsewhere in this thread) doesn't work for me at all, so I reverted to dropping lozanoje's ext file above into my extensions folder, and... nothing happened. No extra option appears in my load game or new game window, so I'm stumped.

Mike Serfass
January 3rd, 2021, 19:45
That could be because it's for a different version of the SW rules.
Here's one I wrote for my setting. It runs in FGU, Core Rules 3.3.12A, SWADE 5.2.10.
It removes the psionics and weird science ABS and adds bard, mystic warrior, nature, and shaman.
It's named Teledrial AB Changer in the list of extensions. It will give a message in chat that it loaded.
42507