PDA

View Full Version : 4E - Changing dmg types and skills for Gamma World



raynbowbrite
March 31st, 2020, 12:14
I'm working on babby's first extension to make 4e a little more playable for Gamma World 7th edition. I copied someone else's damage type extension and was able to get that working, so I got confident and tried to add in skills instead.

It seems like it works, I see the correct skills on the character sheet, BUT, I also get an error in the console whenever I open a character sheet.


Runtime Notice: Reloading ruleset
Runtime Notice: s'DataCommon.dmgtypes = ' | { #1 = s'acid', #2 = s'cold', #3 = s'fire', #4 = s'force', #5 = s'lightning', #6 = s'necrotic', #7 = s'poison', #8 = s'psychic', #9 = s'radiant', #10 = s'thunder', #11 = s'physical', #12 = s'electricity', #13 = s'laser', #14 = s'radiation', #15 = s'sonic', #16 = s'critical' }
Runtime Notice: s'DataCommon.skills = ' | { #1 = s'acrobatics', #2 = s'athletics', #3 = s'conspiracy', #4 = s'insight', #5 = s'interaction', #6 = s'mechanics', #7 = s'nature', #8 = s'perception', #9 = s'science', #10 = s'stealth' }
Runtime Notice: s'DataCommon.skilldata = ' | { s'Science' = { s'stat' = s'intelligence' }, s'Conspiracy' = { s'stat' = s'intelligence' }, s'Athletics' = { s'stat' = s'strength', s'armorcheckmultiplier' = #1 }, s'Insight' = { s'stat' = s'wisdom' }, s'Mechanics' = { s'stat' = s'intelligence' }, s'Interaction' = { s'stat' = s'charisma' }, s'Perception' = { s'stat' = s'wisdom' }, s'Stealth' = { s'stat' = s'dexterity', s'armorcheckmultiplier' = #1 }, s'Acrobatics' = { s'stat' = s'dexterity', s'armorcheckmultiplier' = #1 }, s'Nature' = { s'stat' = s'wisdom' } }
Runtime Notice: s'DataCommon.psskilldata = ' | { #1 = s'Acrobatics', #2 = s'Athletics', #3 = s'Conspiracy', #4 = s'Insight', #5 = s'Interaction', #6 = s'Mechanics', #7 = s'Nature', #8 = s'Perception', #9 = s'Science', #10 = s'Stealth' }
Script Error: [string "scripts/manager_string.lua"]:81: attempt to get length of local 'set' (a nil value)
Script Error: [string "scripts/manager_string.lua"]:81: attempt to get length of local 'set' (a nil value)
Database Notice: Campaign saved.


I looked in the ruleset under the scripts folder, and I don't see a manager_string.lua file, and I'm not sure where else to look to figure out what might be wrong.

I'd be super grateful for any guidance, if anyone knows what this error is.

Thanks!

Trenloe
March 31st, 2020, 12:21
The 4E ruleset is layered on top of the CoreRPG ruleset - which is where you'll find the manager_string.lua file.

raynbowbrite
March 31st, 2020, 12:23
Thanks for the quick reply!

This is what's at line 81:


function contains(set, item)
for i = 1, #set do
if set[i] == item then
return true;
end
end
return false;
end

Any idea why changing the skill names would break this? I'm pretty sure it's the skill names and not the damage types, and it also appears to be related to the combat tab.

Trenloe
March 31st, 2020, 13:11
Do a find in files in the 4E ruleset for StringManager.contains to see where it's being called and try to work out which call is causing the issue.

raynbowbrite
March 31st, 2020, 13:20
Thanks, I've done some programming in the past, but not with Lua. Does it have an IDE or a project manager or anything where you put all the pieces together like Eclipse or Visual Studio?

Trenloe
March 31st, 2020, 13:23
Thanks, I've done some programming in the past, but not with Lua. Does it have an IDE or a project manager or anything where you put all the pieces together like Eclipse or Visual Studio?
Nope.

Extract the ruleset files to somewhere outside of the FG rulesets directory. Then use "find in files"... A lot of people use Notepad++ (me included) it has LUA code colour formatting and there's an XML plugin that can test XML syntax when changing FG XML files. Other than they you're pretty much on your own. And use Debug.console a lot...

raynbowbrite
March 31st, 2020, 13:34
Yeah I <3 Notepad++

Thanks for all the advice, I may have to table this for another day, as I'm not sure how much effort I want to put in just for a Gamma World oneshot, and it looks like the skills are def more complex than the damagetypes.

Trenloe
March 31st, 2020, 13:37
Do you get those original errors when you create a new character? Or only when you open a previously created character sheet?

raynbowbrite
March 31st, 2020, 13:40
Both, I had the same thought, that it might just be an old charactr had the old skills on it, but it does it with a freshly created character too. It seems like the skill list is just tied more directly into the ruleset. I did a search on one of the skills i removed and it came up in like 4 files, so there's probably alot more work that needs to be done.

raynbowbrite
March 31st, 2020, 16:29
I *thought* my damage type fix was working, but it actually seems like it's breaking things too.

All the effects are gone from my effects window, any idea what would cause that?

All I did was add new damage types to the DataCommon.dmgtypes



-- Damage types supported
my_dmgtypes = {
"acid", -- ENERGY TYPES
"cold",
"fire",
"force",
"lightning",
"necrotic",
"poison",
"psychic",
"radiant",
"thunder",
"physical",
"electricity",
"laser",
"radiation",
"sonic",
"critical", -- SPECIAL DAMAGE TYPES
};


function onInit()
-- Damage types
DataCommon.dmgtypes = my_dmgtypes;


Debug.console("DataCommon.dmgtypes = ", DataCommon.dmgtypes);


end

Trenloe
March 31st, 2020, 16:58
All the effects are gone from my effects window, any idea what would cause that?
I believe that is populated from DataCommon.conditions.

So, it sounds like there is something somewhere in your modifications that has messed up DataCommon standard data - which might also explain the initial Script Error: [string "scripts/manager_string.lua"]:81: attempt to get length of local 'set' (a nil value) errors.

raynbowbrite
March 31st, 2020, 17:32
Yeah that manager_string.lua error went away when I took the custom skils out. Now I only have the additions to damage types. It's a very simple extension, the .lua i posted in the previous post is the entirety of the lua file. I've attached the whole thing here in case there's something I'm missing, if anyone wants to take a look at it.

Trenloe
March 31st, 2020, 17:36
Remove <importruleset source="4E"/>

This extensions runs against the 4E ruleset and then you're telling FG to load the 4E ruleset again.

You should only use that in a ruleset that is layering on top of something else. For example, the 4E ruleset relies on CoreRPG - so the 4E ruleset uses <importruleset source="CoreRPG" /> at the beginning of its base.xml file to load the CoreRPG ruleset first.

Further info here: https://www.fantasygrounds.com/refdoc/importruleset.xcp

raynbowbrite
March 31st, 2020, 17:41
Ok, fixed that, thanks.

But it doesn't look like it changed anything my Effects are still missing in action.

Trenloe
March 31st, 2020, 18:19
But it doesn't look like it changed anything my Effects are still missing in action.
Start a new compaign.

If that doesn't fix it then please post a screenshot of what you're missing - as I may not be understanding what you're referring to.

raynbowbrite
March 31st, 2020, 21:33
Started a new campaign, still missing.

It's this button in the 4e ruleset:
32869

and it should have the standard 4e conditions already in it like this:
32870

Instead it's blank, all the conditions are gone.

raynbowbrite
April 2nd, 2020, 12:28
Well I couldn't really figure out what it didn't like, so i took another approach.

I copied the whole ruleset and made the edits I wanted directly into the common data file, and then packaged it back up as a new ruleset. For some reason that doesn't seem to cause the same issues. I was even able to redo the skills that way without getting the string error I got before.

Trenloe
April 2nd, 2020, 13:00
So, it sounds like there is something somewhere in your modifications that has messed up DataCommon standard data...
Sorry, I should have followed through further on this thought.

You're overriding the whole DataCommon global script package with this line:


<script file="scripts/data_common.lua" name="DataCommon"/>

This basically completely replaces the 4E DataCommon data - hence why you get the errors and the lack of conditions in the effect window.

Change the name to something like MyDataCommon and you should be fine. Also from previously, remove <importruleset source="4E"/>.

raynbowbrite
April 2nd, 2020, 14:09
I'm testing now, but I think that worked, and I was even able to put my skills back in. Don't worry about not responding earlier, you're not required to respond to my dumb questions!

But I do appreciate that help!