PDA

View Full Version : Yet another thread that asks about coin weights and extensions, sorta...



Xyvius
December 29th, 2022, 04:38
Hello All. First let me say that as a returning user of FG I am glad to see the community is still actively helping one another. This feels welcoming, like putting on an old pair of comfy socks on a cold night. Anyway.. Thanks for that.

I have a related question to the above topic in the title but have been unable with all my lurking and searching over the last few days to find an answer.

I have a home-brew world that I am currently exploring with my players using 5e, I have enough custom content and rules that I have decided to give making an extension and corresponding module (for the things that extensions don't handle) a try. This is in its early stages and I am new to both XML and LUA. My question comes down to the following; I would like for any new campaigns I create for this world in FGU to have all the basic things preloaded (like custom languages, coins, etc.) so that I don't spend time entering these items in over and over every time a new campaign starts. I figured out the languages and fonts without much trouble, as I had dealt with that in classic, but I am having issues getting the custom coins to load upfront.

I have dropped the following text:
GameSystem.currencies = {"AS";"CP";"GP";"PP";"SP";"TS"}; into the LUA code and it populates the fields upon creation as you would expect, but i can't seem to nail getting the weights (or values) in also. I expect it is a lack of understanding of the structure on my part, but I would appreciate a push in the right direction.

Thanks so much in advance,
Xyvius

Xyvius
December 29th, 2022, 05:15
LOL, Why does this always happen, decided to move on and wait for a reply and came across a format that answered the question for me. Seems like the answer is always found after a I publicly voice my ignorance :).

For any who find this thread and need to know the answer (simple as expected) I found to be:

GameSystem.currencies = {
{ name = "AS", weight = 0.002, value = 10 },
{ name = "CP", weight = 0.02, value = .01 },
{ name = "GP", weight = 0.02, value = 1 },
{ name = "PP", weight = 0.02, value = 10 },
{ name = "SP", weight = 0.02, value = 0.1 },
{ name = "TS", weight = 0.002, value = 10 },
};

Zacchaeus
December 29th, 2022, 09:32
The easiest way to do this is set up a new campaign and adjust everything in that campaign how you like it (note that you can adjust the coin weight and values inside FGU now). Then just copy the folder inside your campaigns folder and rename the copy to whatever you want.

See video Forty Two here for other methods and other things you can do to preserve settings over multiple campaigns https://www.fantasygrounds.com/forums/showthread.php?55797-How-do-I-in-Unity

Xyvius
December 29th, 2022, 19:14
Thanks for the share Zacchaeus. I am always impressed with how helpful this community is. I watch your videos and will continue to do so. As for the copy method, I will keep that in mind in the future. Though I must admit that I will probably continue to look into how to set stuff up through an extension, if for no other reason just to learn it... It is how my head works. But, that being said. It's a good thing to know and keep in my "tool-belt". I am looking forward to learning more about XML and LUA.

Thanks again!