-
May 6th, 2025, 19:48 #1
[Fate Core] Making Skills Roll Dice in the NPC Window
I recently completed my extension to change the vehicle window for Fate Core so it better suits Inteface Zero 2.0. I'm now wanting to simplify things for the NPC window. My work on Fate Core vehicles actually involved changing the CoreRPG ruleset vehicles, whereas The NPC window is a Fate Core specific window. The first thing I want to do is make it so that skills listed in the skill field will roll dice when they're double-clicked. Currently, the individual skills do get correctly highlighted when you click them, but double-clicking them does nothing. This is what this field currently looks like with the Shoot skill highlighted.
NPC_Window.png
I noticed this code in the Fate Core record_npc.xml file.
Code:<label_column name="skills_label"> <static textres="npc_label_skills" /> </label_column> <string_columnh name="skills"> <nodragselect /> <script file="campaign/scripts/npc_roll.lua" /> </string_columnh>
Code:function fatediceCheck(number, bonus, name) if ChatManager.control then local dice = {}; for i = 1, number, 1 do table.insert(dice, "dF"); end ChatManager.control.throwDice("fatedice", dice, bonus, name); end end
But, because it's a skills roll, any skill double-clicked would always roll a 4dF + skill value.
As per usual, I'm pretty much uesless when it comes to LUA, but hey, I keep adventuring.Last edited by kronovan; May 6th, 2025 at 20:12.
-
May 7th, 2025, 23:13 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 22,211
The campaign/scripts/npc_roll.lua file is located in CoreRPG; and since it's not defined in FATECore, then it would fall back to the version in CoreRPG.
The CoreRPG version of the script is just looking for simple name/roll combinations in a comma-delimited list (i.e. Name NdN+N, ...); and then triggering a simple dice roll with that name and dice string.
The chatdice.lua file you found is not actually referenced anywhere, and the code is old and not used. I'll get that removed in the next update pass.
If you want to override the skills field behavior, I would start by copying the CoreRPG version of the file into your extension/ruleset in the same location ("campaign/scripts/"); and then, modifying it to how you want it to work.
You can look at the 5E or 3.5E NPC skills fields for examples of what they do.
Regards,
JPG
-
May 8th, 2025, 04:54 #3
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks