PDA

View Full Version : General 2021-11 Ruleset Updates Feedback



Zarestia
October 21st, 2021, 14:10
Just wanted to share some quick general feedback on the first changes without going into too much details. I think specific threads for specific things are better.

- The new sidebar funcionality is amazing, really nice stuff
- The new modules window with export and reference menu builder is also nice, no more need to type in chat
- The reference menu builder looks great so far and really intuitive
- Paging support is definitely nice to have

Haven't checked the code changes for now.

All in all I think the changes go in the "right" direction being more intuitive and end-user friendly (especially beginners). I honestly only expected changes under the hood so all the new stuff is definitely a nice surprise.

superteddy57
October 21st, 2021, 15:17
Thanks for the feedback. Really glad to hear all the likes :)

Kelrugem
October 21st, 2021, 16:46
Yup, I really like the changes so far, too :) Finally I will also try to build reference manuals for our group :)

darrenan
October 21st, 2021, 23:04
Is the reference manual builder stuff currently a work in progress? Will we eventually be able to edit pages as well? Seems like I can only edit the structure of the navigation pane right now.

Moon Wizard
October 21st, 2021, 23:46
You should be able to edit the pages themselves. There's a separate lock icon for the index vs. each page. It may also depend on how the reference manual was built. In the built-in reference manual builder, you can edit both, and then export correctly to either read-only or edit-able.

Regards,
JPG

darrenan
October 22nd, 2021, 00:09
I think I had the Author extension loaded and it was breaking some things. It's all good now.

Mephisto
October 22nd, 2021, 14:30
Is the reference manual builder stuff currently a work in progress? Will we eventually be able to edit pages as well? Seems like I can only edit the structure of the navigation pane right now.

Same here and I don't have any extensions loaded. Structure is fine, but not the pages. I don't see any lock icon for the page, only for the index. Tested with the latest CoreRPG in Test Channel.

jharp
October 22nd, 2021, 14:37
I've found you must lock the index to edit the pages.

Mephisto
October 22nd, 2021, 14:52
That did the trick. The pages didn't appear immediately in the index so I didn't click on them once the index was locked. Maybe it could be made a bit more obvious how it works. :-)

Moon Wizard
October 22nd, 2021, 19:55
I do not have this issue in my test 5E campaign (see picture) of both unlocked and editable.

I'll need more information on exact steps with a new campaign, if you are seeing an issue.

Regards,
JPG

celestian
October 22nd, 2021, 21:19
I think I had the Author extension loaded and it was breaking some things. It's all good now.

Yup, author will definitely break in the beta right now. A lot of the export functionality changed.

celestian
October 22nd, 2021, 21:51
Was playing with the Builder... one thing it needs is the ability to import story entries (unless there are near-term plans to drop story entries for ref-manual entries exclusively).

Bulk import and individual import.

Allow folks to import the story entries and do something like Author and build a simple chapter system based on their "group/category" and then we do the editing manually once it's imported.

Allow drag/drop (append) to a ref-manual page entry of a individual story...

Without these things... we'll be typing/formatting all this stuff twice.

jharp
October 22nd, 2021, 22:11
Was playing with the Builder... one thing it needs is the ability to import story entries (unless there are near-term plans to drop story entries for ref-manual entries exclusively).

Bulk import and individual import.

Allow folks to import the story entries and do something like Author and build a simple chapter system based on their "group/category" and then we do the editing manually once it's imported.

Allow drag/drop (append) to a ref-manual page entry of a individual story...

Without these things... we'll be typing/formatting all this stuff twice.


*ahem* Gratuitous plug of extension https://forge.fantasygrounds.com/shop/items/185/view

mattekure
October 22nd, 2021, 22:19
I hope there are no plans to drop story entries, they serve a definite purpose to me. Ref Man entries are great for non-adventure content that should always be static, but adventure content is frequently changed by the DM. As story entries, the DM can tweak and edit the content as necessary.

celestian
October 22nd, 2021, 22:50
*ahem* Gratuitous plug of extension https://forge.fantasygrounds.com/shop/items/185/view

2E ruleset does single drag/drop story entries natively to just about anything tho might need a tweak to work with the builder entries. I mostly want the bulk import ;) My point was mostly about having to enter text twice which should never happen.

celestian
October 22nd, 2021, 22:53
I hope there are no plans to drop story entries, they serve a definite purpose to me. Ref Man entries are great for non-adventure content that should always be static, but adventure content is frequently changed by the DM. As story entries, the DM can tweak and edit the content as necessary.

You can already edit story entries even on purchased content. Why would that be different if story entries moved to ref-manual pages.

superteddy57
October 22nd, 2021, 23:00
I hope there are no plans to drop story entries, they serve a definite purpose to me. Ref Man entries are great for non-adventure content that should always be static, but adventure content is frequently changed by the DM. As story entries, the DM can tweak and edit the content as necessary.

Reference Manuals are now editable if the module isn't set to be Read Only

Zacchaeus
October 22nd, 2021, 23:01
You can already edit story entries even on purchased content. Why would that be different if story entries moved to ref-manual pages.
He means if story entries go away and only a ref manual remains. I’m not at a computer to check but can’t you edit the refmanual entries in the builder?

mattekure
October 22nd, 2021, 23:01
Reference Manuals are now editable if the module isn't set to be Read Only

That’s good. So as long as the adventure modules are not marked locked you could use the ref manual for everything

celestian
October 22nd, 2021, 23:05
He means if story entries go away and only a ref manual remains. I’m not at a computer to check but can’t you edit the refmanual entries in the builder?

My thought process was if story entries were going to be replaced with ref-man (not even announced as a thing, just my thought experiment) they'd need to function the same... Also would need to be able to load a ref-man page on a pin for a map as well. We'll need someway to get links to those pages/etc.

The upside is, inline images and fancy text formatting!

Ecks
October 22nd, 2021, 23:06
I do not have this issue in my test 5E campaign (see picture) of both unlocked and editable.

I'll need more information on exact steps with a new campaign, if you are seeing an issue.

Regards,
JPG

Not sure if this is the same as what was seen in the earlier post, but I've seen this where you can't start entering data until locking the index and selecting a page.

To recreate with a new reference manual in a new (5E) campaign:

Open Builder with no data
Hit New Chapter, the view now looks like this: Capture1.JPG (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=49590)
Click on the <<New Page>>, the right hand panel is blank with no options or ability to enter text
Add a few pages and give them names, the right hand panel remains blank even though it looks like Page 2 is selected: Capture2.JPG (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=49593)

This seems to be because you cannot select a page while the index is unlocked for editing. It selects the page name for editing, but doesn't change the actual page view - perhaps it could do both in the unlocked case?

Once you lock the index, you can then select a page and begin editing as expected: Capture3.JPG (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=49592)

Zacchaeus
October 22nd, 2021, 23:29
You need to double click on the page to see the edit icons.

So click New Chapter then double click on <<New Page>> to open it - either before or after you name the page

Zacchaeus
October 22nd, 2021, 23:34
My thought process was if story entries were going to be replaced with ref-man (not even announced as a thing, just my thought experiment) they'd need to function the same... Also would need to be able to load a ref-man page on a pin for a map as well. We'll need someway to get links to those pages/etc.

The upside is, inline images and fancy text formatting!


Indeed they would. Currently the refmanual on it's own is not really something you could create an adventure module in if story entries are still required since as you say you'd need to enter everything twice. Some bulk transfer would be needed to create the story entries from the ref manual pages or vice versa. But, if we now longer need story entries for adventures then the ref pages would need to function like story pages do now. I'd be happy to drop story entries since the refmanuals are so much better.

Ecks
October 22nd, 2021, 23:48
You need to double click on the page to see the edit icons.

So click New Chapter then double click on <<New Page>> to open it - either before or after you name the page

Ah, thanks, yes double clicking it does work. I didn't really expect that since it is single click when the index is locked. I wonder if its possible to have single click do both - select the page name for editing and also switch the page view on the right, just to avoid having to double click. The only other double click I've come across in the Builder is frame selection, but maybe there are others I haven't run into yet.

jharp
October 23rd, 2021, 00:36
2E ruleset does single drag/drop story entries natively to just about anything tho might need a tweak to work with the builder entries. I mostly want the bulk import ;) My point was mostly about having to enter text twice which should never happen.

I was just being cheeky. :)

darrenan
October 23rd, 2021, 03:24
It seems to be pretty common that the ref builder window gets confused about the XY coordinates of the controls on the page being edited. Sometimes clicking on the actual controls don't give it focus, but clicking a little bit above the control does. It seems to repro somewhat randomly but if I get a solid set of steps I will post here.

Jiminimonka
October 23rd, 2021, 13:22
You have to double click the entries to start editing them.

darrenan
October 23rd, 2021, 15:59
You have to double click the entries to start editing them.

Was that a response to my last post? The issue I'm talking about is WHILE editing a page, not an issue with being able to start editing the page.

Moon Wizard
October 25th, 2021, 16:00
@darrenan, please let me know if you find any steps to reproduce. I deliberately added the background color to the text fields while editing, so that the user could see where to click to edit the text. If that is off, it may be a client-level issue to investigate.

@Ecks, I think I'll look into making everything single click as much as possible with the builder in the next pass, so that should help alleviate any confusion. The double click was originally a way to trigger page activation, without having the page refresh every time the page name is clicked.

Regards,
JPG

darrenan
October 25th, 2021, 18:37
It looks to me like the top line with the link, title, and lock control might be screwing things up. Whenever I get this issue, if I mouse over that top line and then scroll it up so it's not visible and then scroll back, that seems to fix it. It's like it's not counting the height of the top line when computing the locations of controls. I always need to click above the location of the control I intend to click on, so it's thinking the 'y' location of the intended control is smaller than it should be. I still don't have a reliable way to get into that state, but hopefully my 'fix' will give you some clue about what's going wrong.

It seems kind of weird to me that the top line can be scrolled off the top of the page at all. It should be fixed location and always visible at the top shouldn't it? The scrollbar should only apply to the content.

P.S. This issue isn't just limited to the blocks in the content. It applies to the "button_iadd_block_xxx" buttons at the bottom, and the link and lock button at the top. When I get into this state I need to do the scroll trick to even be able to lock/unlock the page, or add a new block.

Moon Wizard
October 25th, 2021, 19:00
I haven't been able to recreate this, so any ideas how to get into that "state" are appreciated.

Regards,
JPG

darrenan
October 25th, 2021, 20:12
Turns out it is pretty easy to repro. Create two ref pages, A and B. In page A scroll down until the link, title, and lock controls go off the top of the page. Select page B, you will now be unable to toggle the lock control. In page B scroll those controls off the top of the page and then back down so they are visible. Fixed.

I just resynced to the TEST channel, and verified this in a brand new CoreRPG campaign.

Can I get some other folks to try these steps to confirm?

P.S. If page B has blocks on it, for example an empty text block, you will see that clicking directly on the block edit control will not set the caret, but clicking slightly above it will.

Ecks
October 25th, 2021, 20:38
Turns out it is pretty easy to repro. Create two ref pages, A and B. In page A scroll down until the link, title, and lock controls go off the top of the page. Select page B, you will now be unable to toggle the lock control. In page B scroll those controls off the top of the page and then back down so they are visible. Fixed.

I just resynced to the TEST channel, and verified this in a brand new CoreRPG campaign.

Can I get some other folks to try these steps to confirm?

P.S. If page B has blocks on it, for example an empty text block, you will see that clicking directly on the block edit control will not set the caret, but clicking slightly above it will.

I can recreate this with these steps.

I also ran into a console error that popped up when testing it:

[10/25/2021 12:35:59 PM] [ERROR] Script execution error: [string "ref/scripts/ref_manual.lua"]:86: findWindow: Invalid parameter 1
To recreate the error with a new CoreRPG campaign (v2021-11-15):

Start with an empty Reference manual in builder
Click New Chapter
Click New Page (not having named anything, there should be two new pages now)


(Apologies if I should've posted this in a separate thread).

darrenan
October 25th, 2021, 20:59
I'm seeing that script error as well.

darrenan
October 27th, 2021, 01:02
Reference Builder Feature Request: Option when right-clicking an image block to bring up a properties windows that allows adjusting the image size (the same way the <size></size> element allows in the underlying XML) and edit the caption.

Jiminimonka
October 27th, 2021, 11:46
Reference Builder Feature Request: Option when right-clicking an image block to bring up a properties windows that allows adjusting the image size (the same way the <size></size> element allows in the underlying XML) and edit the caption.

Yeah good idea.

Moon Wizard
October 27th, 2021, 21:07
The size element is no longer used. The images automatically resize to the size of the window (single column) or half the window (double column), with a min size of 600 and 300, respectively.

Regards,
JPG

Jiminimonka
October 27th, 2021, 22:19
Now you tell me... when I turn off the PC. I made a side column entry and the picture seemed smaller than the text. Does it force scale or do the images have to be above a certain resolution?

darrenan
October 27th, 2021, 23:26
The size element is no longer used. The images automatically resize to the size of the window (single column) or half the window (double column), with a min size of 600 and 300, respectively.

Regards,
JPG

manager_referencemanual.lua still seems to be using it in the onBlockAdd function. Is this a new change that hasn't been checked in yet?

If the image is less than 300 or 600 in width, respectively, will it use the image's width, or will it position the image in a 300 or 600-wide space depending on how it is being used?

Moon Wizard
October 28th, 2021, 00:18
@darenan, @Jiminimonka,
* Those references in manager_referencemanual.lua are just leftover from the older code; those are the old defaults and they're not used anywhere.
* The minimum image width is 100 pixels; images smaller than that are scaled to 100 width.
* The maximum image width is 600 single column (or 300 double column).
* If the width is between minimum and maximum, then the resolution width of the image is used.
* When resized, the image proportions are preserved.

Regards,
JPG

Jiminimonka
October 28th, 2021, 06:32
@darenan, @Jiminimonka,
* Those references in manager_referencemanual.lua are just leftover from the older code; those are the old defaults and they're not used anywhere.
* The minimum image width is 100 pixels; images smaller than that are scaled to 100 width.
* The maximum image width is 600 single column (or 300 double column).
* If the width is between minimum and maximum, then the resolution width of the image is used.
* When resized, the image proportions are preserved.

Regards,
JPG

Cool. That makes things easier.

TomtheBu
October 30th, 2021, 22:16
The new Export and Builder Functions are very nice. There is just one little issue with the export of (custom) effects. The checkmark is set for effects but the new exported module has no added effects in the Master Effects List when activated in a new campaign. I tested with both SWADE and SWPF. (I also tested in the live channel with the normal export function and there were no problems).

I also wonder, if there will be support for more "Exported Record Views" for SWADE and SWPF. The only two items are Armor and Vehicles by now.

Thank you for the great work so far! :)

Moon Wizard
October 31st, 2021, 17:47
The typical usage for exported views in other rulesets is only Items (Weapons, Armor), NPCs (By Type, By Difficulty), and Vehicles (By Type). You don't want to have too many to maintain in a ruleset, but they give an alternate view for more in-depth table types in rulebooks (usually the ones above). Also, this is defined by the ruleset creator, and Savage Worlds is developed by the user @Ikael. You can try posting in the Savage Worlds forums with any suggestions.

For the exported effects, I was able to recreate, and I will look into fixing.

Regards,
JPG

TomtheBu
October 31st, 2021, 18:25
Hi Moon Wizard, thank you for your fast help with the effects export.

I guess the SWADE and SWPF Rulesets have just these two (armor and vehicles) exported views available, due to the Enhanced Library Extension (SWEL), which actually supports nearly every kind of record entry at the moment. I would be happy if both - hand and ranged weapons exported record views would be added to the new export function, as well as maybe powers by rank. But you are right, I will go for the ruleset specific forum and ask if support for these items are planned in the future.

darrenan
October 31st, 2021, 18:39
It doesn't appear that the order of the pages shown in the nav pane is being respected by the prev/next buttons in the generated reference manual. @Moon Wizard I'm going to email you a generated module that exhibits this issue.

Moon Wizard
November 1st, 2021, 03:23
@darrenan,

Thanks for the information. As I mentioned in email, the manual indexing is currently in order of creation; so I'll need to look at somehow incorporating the "order" field used to allow move up/down in the UI.

Regards,
JPG

TomtheBu
November 6th, 2021, 11:47
Opening the Modifier Button in SWADE or PFSW Ruleset triggers the following error:
Script execution error: [string "utility/scripts/modifierlist_presets.lua"]:7: attempt to call field 'getModWindowPresets' (a nil value)

But everything seems to work, just the error pops up.

Moon Wizard
November 7th, 2021, 00:25
I've just pushed an update to the SavageWorlds ruleset to fix the script conflict. Please run a new Check for Updates, and try again.

Regards,
JPG

TomtheBu
November 7th, 2021, 12:05
After the Savage Worlds Ruleset Update, the script error has gone for both SWADE and PFSW, Thank you :)

TomtheBu
November 25th, 2021, 08:13
Will there be an option to export the decal of a campaign into a module? Or how is the common way to add a decal to the module?

The same maybe for an export field to activate Ruleset specific options like setting or house rules options for a SWADE or PFSW?

Moon Wizard
November 25th, 2021, 16:59
Decal modules will need to be made manually for now. All they require is a definition.xml file and the decals in the folder and format as noted in the Developer Thread.

Regards,
JPG

darrenan
November 27th, 2021, 15:43
Do decals need to be in their own module, or can they be part of a larger module?

LordEntrails
November 27th, 2021, 15:46
They can be part of a larger module.

Zacchaeus
November 27th, 2021, 15:53
Do decals need to be in their own module, or can they be part of a larger module?

If the product is going to be sold via the store then the decals need to be in their own module. Otherwise you can include decals in the the module itself.

celestian
November 28th, 2021, 07:16
How hard would it be to add the ability to use a "Random" encounter entry in a Table that outputs encounters? I thought it would work and noticed it doesn't.

Thanks!

So I decided to get you at least a working example. This works in my local tests.

All I did was update addLinkToBattle to support 'battlerandom' items.



...
NPCManager.addLinkToBattle = addLinkToBattle;
...

--[[

Generate Encounter from Random Encounter and return the node

]]
function generateEncounterFromRandom(nodeSource)
if not nodeSource then
return;
end

local sDisplayClass = LibraryData.getRecordDisplayClass("battle");
local sRootMapping = LibraryData.getRootMapping("battle");
if ((sRootMapping or "") == "") then
return;
end

local nodeTarget = DB.createChild(sRootMapping);
DB.copyNode(nodeSource, nodeTarget);

local aDelete = {};
local sTargetNPCList = LibraryData.getCustomData("battle", "npclist") or "npclist";
for _,nodeNPC in pairs(DB.getChildren(nodeTarget, sTargetNPCList)) do
local sExpr = DB.getValue(nodeNPC, "expr", "");
DB.deleteChild(nodeNPC, "expr");

sExpr = sExpr:gsub("$PC", tostring(PartyManager.getPartyCount()));

local nCount = StringManager.evalDiceMathExpression(sExpr);
DB.setValue(nodeNPC, "count", "number", nCount);
if nCount <= 0 then
table.insert(aDelete, nodeNPC);
end
end
for _,nodeDelete in ipairs(aDelete) do
nodeDelete.delete();
end
DB.setValue(nodeTarget, "locked", "number", 1);

if CampaignDataManager2 and CampaignDataManager2.onEncounterGenerated then
CampaignDataManager2.onEncounterGenerated(nodeTarg et);
end

return nodeTarget;
end

function addLinkToBattle(nodeBattle, sLinkClass, sLinkRecord, nCount)
local sTargetNPCList = LibraryData.getCustomData("battle", "npclist") or "npclist";

if sLinkClass == "battle" then
local nodeTargetNPCList = DB.createChild(nodeBattle, sTargetNPCList);
for _,nodeSrcNPC in pairs(DB.getChildren(DB.getPath(sLinkRecord, sTargetNPCList))) do
local nodeTargetNPC = DB.createChild(nodeTargetNPCList);
DB.copyNode(nodeSrcNPC, nodeTargetNPC);
if nCount then
DB.setValue(nodeTargetNPC, "count", "number", DB.getValue(nodeTargetNPC, "count", 1) * nCount);
end
end

-- new bit here
elseif sLinkClass == "battlerandom" then
local nodeRandomEncounter = DB.findNode(sLinkRecord);
local nodeGeneratedEncounter = generateEncounterFromRandom(nodeRandomEncounter);

-- normal battle entry stuff... copied from above
local nodeTargetNPCList = DB.createChild(nodeBattle, sTargetNPCList);
for _,nodeSrcNPC in pairs(DB.getChildren(DB.getPath(nodeGeneratedEncou nter.getPath(), sTargetNPCList))) do
local nodeTargetNPC = DB.createChild(nodeTargetNPCList);
DB.copyNode(nodeSrcNPC, nodeTargetNPC);
if nCount then
DB.setValue(nodeTargetNPC, "count", "number", DB.getValue(nodeTargetNPC, "count", 1) * nCount);
end
end
-- new bit ends here

else
local bHandle = false;
local sLinkSourceType = NPCManager.getNPCSourceType(sLinkRecord);
if sLinkSourceType == "npc" then
bHandle = true;
else
local aCombatClasses = LibraryData.getCustomData("battle", "acceptdrop") or { "npc" };
if StringManager.contains(aCombatClasses, sLinkSourceType) then
bHandle = true;
elseif StringManager.contains(aCombatClasses, sLinkClass) then
ChatManager.SystemMessage(Interface.getString("battle_message_wrong_source"));
return false;
end
end

if bHandle then
local sName = DB.getValue(DB.getPath(sLinkRecord, "name"), "");

local nodeTargetNPCList = DB.createChild(nodeBattle, sTargetNPCList);
local nodeTargetNPC = DB.createChild(nodeTargetNPCList);
DB.setValue(nodeTargetNPC, "count", "number", nCount or 1);
DB.setValue(nodeTargetNPC, "name", "string", sName);
DB.setValue(nodeTargetNPC, "link", "windowreference", sLinkClass, sLinkRecord);

local nodeID = DB.getChild(sLinkRecord, "isidentified");
if nodeID then
DB.setValue(nodeTargetNPC, "isidentified", "number", nodeID.getValue());
end

local sToken = DB.getValue(DB.getPath(sLinkRecord, "token"), "");
if sToken == "" or not Interface.isToken(sToken) then
local sLetter = StringManager.trim(sName):match("^([a-zA-Z])");
if sLetter then
sToken = "tokens/Medium/" .. sLetter:lower() .. ".png@Letter Tokens";
else
sToken = "tokens/Medium/z.png@Letter Tokens";
end
end
DB.setValue(nodeTargetNPC, "token", "token", sToken);
else
return false;
end
end

return true;
end

Moon Wizard
November 29th, 2021, 04:05
That sounds reasonable. But, why create the intermediate encounter at all? Why not just add the random counts directly to the encounter you are dropping on?

JPG

celestian
November 29th, 2021, 05:03
That sounds reasonable. But, why create the intermediate encounter at all? Why not just add the random counts directly to the encounter you are dropping on?

JPG

Good point ;) It was a quick and dirty 10-20 minutes test to see if the basic model would work.

mccartysr
November 29th, 2021, 14:09
In the 5E ruleset, ActionSkill.getUnlistedRoll doubles the modifier for skill rolls. This does not typically show up because this function is only called from the party sheet roll code. A PC that is calling this will inherently have a modifier of 0 because all the built in rolls are required on the sheet. However, if you pass an NPC to this function because it did not have a specific roll for the skill, it will grab the stat needed for the skill roll and then add it in two different places.

Only dealing with nMod once fixes this issue. (As a note, this happens in the current version and test version.)


function getUnlistedRoll(rActor, sSkill)
local rRoll = {};
rRoll.sType = "skill";
rRoll.aDice = { "d20" };

local nMod = 0;
local bADV = false;
local bDIS = false;
local sAddText = "";

local sAbility = nil;
if DataCommon.skilldata[sSkill] then
sAbility = DataCommon.skilldata[sSkill].stat;
end
if sAbility then
nMod, bADV, bDIS, sAddText = ActorManager5E.getCheck(rActor, sAbility, sSkill);
end
--nMod added here
rRoll.nMod = nMod;

rRoll.sDesc = "[SKILL] " .. sSkill;
if sAddText and sAddText ~= "" then
rRoll.sDesc = rRoll.sDesc .. " " .. sAddText;
end
if nMod and nMod ~= 0 then
rRoll.sDesc = rRoll.sDesc .. string.format(" [%+d]", nMod);
--nMod added here again
rRoll.nMod = rRoll.nMod + nMod;
end
if bADV then
rRoll.sDesc = rRoll.sDesc .. " [ADV]";
end
if bDIS then
rRoll.sDesc = rRoll.sDesc .. " [DIS]";
end

return rRoll;
end

celestian
November 29th, 2021, 14:56
That sounds reasonable. But, why create the intermediate encounter at all? Why not just add the random counts directly to the encounter you are dropping on?

JPG

This seems to work, generates random encounters directly, without the encounter middle man.



--[[
Replacement function to add support for battlerandom in tables
]]
function addLinkToBattle(nodeBattle, sLinkClass, sLinkRecord, nCount)
local sTargetNPCList = LibraryData.getCustomData("battle", "npclist") or "npclist";

if sLinkClass == "battle" then
local nodeTargetNPCList = DB.createChild(nodeBattle, sTargetNPCList);
for _,nodeSrcNPC in pairs(DB.getChildren(DB.getPath(sLinkRecord, sTargetNPCList))) do
local nodeTargetNPC = DB.createChild(nodeTargetNPCList);
DB.copyNode(nodeSrcNPC, nodeTargetNPC);
if nCount then
DB.setValue(nodeTargetNPC, "count", "number", DB.getValue(nodeTargetNPC, "count", 1) * nCount);
end
end
--- added this to support random encounter in tables
elseif sLinkClass == "battlerandom" then
-- get the random encounter node
local nodeRandomEncounter = DB.findNode(sLinkRecord);
local nodeTargetNPCList = DB.createChild(nodeBattle, sTargetNPCList);
local aDelete = {};
-- flip through npcs in the random encounter and make copy
for _,nodeNPC in pairs(DB.getChildren(nodeRandomEncounter, sTargetNPCList)) do
local sExpr = DB.getValue(nodeNPC, "expr", "");
local nodeTargetNPC = DB.createChild(nodeTargetNPCList);
DB.copyNode(nodeNPC, nodeTargetNPC);
DB.deleteChild(nodeTargetNPC, "expr");
sExpr = sExpr:gsub("$PC", tostring(PartyManager.getPartyCount()));

--figure out count of npcs
local nCount = StringManager.evalDiceMathExpression(sExpr);
DB.setValue(nodeTargetNPC, "count", "number", nCount);
if nCount <= 0 then
table.insert(aDelete, nodeTargetNPC);
end
end
-- if any of the npc count ended up being 0 or less we delete them
for _,nodeDelete in ipairs(aDelete) do
nodeDelete.delete();
end
-- end of random encounter table support
else
local bHandle = false;
local sLinkSourceType = NPCManager.getNPCSourceType(sLinkRecord);
if sLinkSourceType == "npc" then
bHandle = true;
else
local aCombatClasses = LibraryData.getCustomData("battle", "acceptdrop") or { "npc" };
if StringManager.contains(aCombatClasses, sLinkSourceType) then
bHandle = true;
elseif StringManager.contains(aCombatClasses, sLinkClass) then
ChatManager.SystemMessage(Interface.getString("battle_message_wrong_source"));
return false;
end
end

if bHandle then
local sName = DB.getValue(DB.getPath(sLinkRecord, "name"), "");

local nodeTargetNPCList = DB.createChild(nodeBattle, sTargetNPCList);
local nodeTargetNPC = DB.createChild(nodeTargetNPCList);
DB.setValue(nodeTargetNPC, "count", "number", nCount or 1);
DB.setValue(nodeTargetNPC, "name", "string", sName);
DB.setValue(nodeTargetNPC, "link", "windowreference", sLinkClass, sLinkRecord);

local nodeID = DB.getChild(sLinkRecord, "isidentified");
if nodeID then
DB.setValue(nodeTargetNPC, "isidentified", "number", nodeID.getValue());
end

local sToken = DB.getValue(DB.getPath(sLinkRecord, "token"), "");
if sToken == "" or not Interface.isToken(sToken) then
local sLetter = StringManager.trim(sName):match("^([a-zA-Z])");
if sLetter then
sToken = "tokens/Medium/" .. sLetter:lower() .. ".png@Letter Tokens";
else
sToken = "tokens/Medium/z.png@Letter Tokens";
end
end
DB.setValue(nodeTargetNPC, "token", "token", sToken);
else
return false;
end
end

return true;
end

Moon Wizard
November 29th, 2021, 20:11
@srmccarty,
I pushed update to fix that in beta version of 5E ruleset.

@celestian,
I added the random encounter link drop to encounter support in the latest beta version of CoreRPG.

Regards,
JPG

celestian
November 29th, 2021, 21:21
@celestian,
I added the random encounter link drop to encounter support in the latest beta version of CoreRPG.


Awesome thanks ;)

MadBeardMan
December 2nd, 2021, 21:43
So far I've been very impressed by the work, the sidebar is a huge improvement and the builder will allow many folks to produce professional-looking content.

However, one issue I have is with Reference Manuals.

The widths have changed of the content list (chapters etc) and the page. The content list has been made wider, and the bar between content list wider to fit the new 'collapse the content list' (nice feature btw).

This has meant that all images of 550px are being truncated (headers and main images).

Also more worrying is that images that are set to be smaller than 550 (some larger maps for example set to 375 x height) are increased to 550 if they are that size or bigger on disk.

Plus I've also noticed that in LIVE the image is one size, and in TEST the same image is a bit larger, meaning the reduced width of the page is even more of an issue.

I've got an attachment showing the TEST (at the top) compared to the LIVE (at the bottom).

Cheers,
MBM

DoktorPete
December 6th, 2021, 21:14
Lovin the Reference Builder so far; I was able to get most of the way through overhauling the Weird War 1 Player's Guide yesterday for an upcoming game. My only gripe is that the chapter/sub-chapter headings aren't pages that you can put information in themselves and/or you can't create sub-pages because I'd love to see a 2nd place in the sorting hierarchy that could hold information. Edges are a great example of where this would be handy; a summary page at the 2nd sub-chapter level, and then the categories nested below it as 6 pages on the 3rd level vs the summary and 6 pages all being at the 3rd level together. I'm assuming there's a bunch more stuff you can do with xml but I honestly wouldn't even know where to start. Either way, I love the fact that I can finally make setting books without having to figure out anything besides copy/paste.

superteddy57
December 6th, 2021, 21:22
The index is setup with a 3 step system. You might want to raise the edges to a higher level as a page themselves.

Here I simply added 4 spaces to create the illusion of additional organization.
50216

You also gain access to two more layers of organization with the header block and using the title header within text blocks. So there is further organizational levels.

DoktorPete
December 6th, 2021, 22:21
The index is setup with a 3 step system. You might want to raise the edges to a higher level as a page themselves.
I'm already at the page level with them, the issue is more so that the first 2 steps are purely for sorting so you're at the bottom step of that index before you can put information in.
https://imgur.com/To6z7qn
If I could enter information at the 2nd step too I would only need to go down 2 steps instead of 3 in most cases, so it could just be Characters-->Hindrances, instead of Character-->Hindrances-->Hindrances, leaving that 3rd step for when I want it for something like edges. It's purely the way I like to organize things, and that 4 space trick works well enough to trick my brain so thanks for all the suggestions

celestian
December 6th, 2021, 22:51
I've noticed an odd behavior, or interaction. Author now imports Story entries into the Builder as it allows for more features when creating the ref-manual... but I've noticed if a image is linked in the normal Author style (any single link to a image) and the image is a multi-layer map it adds/adjusts the records in the builder.

Here is what it looks like. You'll note the "blank" image above the link that Builder created.

https://i.imgur.com/GOkOgyT.png

You can see the record entries here. The red box is where I expect the record to be... and it would be for a normal single layer image. Builder added the "picture" frame entry and moved the link there.

https://i.imgur.com/Bcwg2KA.png

Here is a single layer in the builder.

https://i.imgur.com/f0T3WKf.png

The record for this one is.

https://i.imgur.com/C0pUmru.png

Is this the expected behavior moving forward? Before this rev linking a multi-layer image simply showed as a link, not inline. What is the best way to dynamically determine if an imagine is multi-layer to avoid this extra record entry?

celestian
December 6th, 2021, 23:54
Following up on the above I found it's not builder at all but...

local nAssetX, nAssetY = Interface.getAssetSize(sAsset);

That function returns 0, 0 if the image is not a flat image.

Further shows that my sAsset from local sAsset = DB.getText(w.getDatabaseNode(), "image", ""); wasn't valid if the image was multi-layer.

Not sure if this was a thing before the changes on Test but I've built a work-a-round for now to do what I expected, just create a link to a image, not an inline image.

Valyar
December 7th, 2021, 14:14
I noticed that in TEST channel, <font name="reference-bi"> is no longer taken into effect by FGU.

superteddy57
December 7th, 2021, 15:45
I double checked and the font is available in CoreRPG. Where are you seeing issue with this font?

Valyar
December 7th, 2021, 16:56
I double checked and the font is available in CoreRPG. Where are you seeing issue with this font?

We are preparing Alien/Vaesen rulesets for the new release and while I was merging and reviewing the changes done by Moon Wizards (thanks for the support!) I noticed that the font is no longer rendering correctly. SVN is updated with latest code from my side.

superteddy57
December 7th, 2021, 17:49
I can verify the font is in the ruleset and appears to be using the CoreRPG version of it. I'll inform Moon of this to have a deeper look.

damned
December 7th, 2021, 20:39
The update didnt drop today?

Valyar
December 14th, 2021, 09:33
I noticed that Collapse/Expand All buttons on reference manuals no longer work.

psicodelix
December 15th, 2021, 07:30
The Refresh Folder Assets button in the portrait selection window throws an exception:

Attempt to call field 'buildWindows' (a nil value)

swbuza
December 19th, 2021, 12:58
The new sidebar menu is awesome. I would love to see the tool buttons collapse into a tools header just like the rest. I am really missing the collapse/expand all buttons in special abilities.