-
September 18th, 2024, 03:23 #1111
Share your project file and directions to what element you are coding
If you are using AI to write the code for you it wont work. These AI tools do not know enough about FG to help you.
-
September 18th, 2024, 08:03 #1112
Ruleset Wizard
The Ruleset Development Environment
www.rulesetwizard.com
Ruleset Wizard Tutorials
Damned's Ruleset Wizard Tutorials
-
September 18th, 2024, 08:25 #1113
- Join Date
- Jul 2017
- Posts
- 10
screen.png
first of all, i want to code at least one skill check, after that, i gonna use it for all others rools. Actualy i think it have to be some sort of big red button with text like "PUSH" wich can use any others rolls.
-
September 18th, 2024, 08:46 #1114
-
September 18th, 2024, 08:50 #1115
- Join Date
- Jul 2017
- Posts
- 10
yes, sure. here
-
September 18th, 2024, 08:54 #1116
RCVD. Now where are you trying to use rRoll/rSource?
-
September 18th, 2024, 09:06 #1117
- Join Date
- Jul 2017
- Posts
- 10
I tried to follow your advice and save the roll results in a character's field. First, I attempted to use a Number Field, and then I tried using a Label. Later, I read that it's possible to create a virtual field that works only during the session, if I understood correctly. Unfortunately, I couldn't progress beyond the first step of your suggestion due to my limited programming knowledge.
1.
function SaveRollResult(rRoll, rSource, rTarget)
local playerNode = DB.findNode(rSource.sCTNode)
if playerNode then
playerNode.getChild("lastRoll").setValue(rRoll.nTo tal)
end
end
2.
function SaveRollResult(rRoll, rSource, rTarget)
local playerNode = DB.findNode(rSource.sCTNode)
if playerNode then
local rollResultNode = playerNode.getChild("lastRoll")
if not rollResultNode then
rollResultNode = playerNode.createChild("lastRoll", "number")
end
rollResultNode.setValue(rRoll.nTotal)
else
print("Ошибка: Не удалось найти узел игрока.")
end
end
there was others, but looks pretty same
-
September 18th, 2024, 10:05 #1118
And you want to roll #d6 and count 1s and 6s and reroll any remaining dice one more time.
Add all the 1s and all the 6s and compare them and declare a result?
-
September 18th, 2024, 10:27 #1119
- Join Date
- Jul 2017
- Posts
- 10
Absolutely correct! However, it would be preferable if the reroll was a separate button that the player could use at will. Essentially, it gives the player the chance to risk getting either a critical success or a critical failure.
-
September 18th, 2024, 13:55 #1120
This is not exactly what you want but it should give you some tangible ideas on how to do what you want.
RW_Frontier.png
Thread Information
Users Browsing this Thread
There are currently 3 users browsing this thread. (0 members and 3 guests)
Bookmarks