-
February 5th, 2021, 08:03 #301
- Join Date
- Mar 2020
- Location
- Sydney, Australia
- Posts
- 247
Great thanks.
I run an Intel Mac so I also run parallels - however I always find native apps faster.
Would love to help out if you ever decide to migrate to the Mac.Thanks In Advance,
D
-
February 7th, 2021, 20:34 #302
- Join Date
- Aug 2014
- Posts
- 8
Hello,
the Ruleset Wizard is amazing. I like to use it.
I have one question on using rolls. Is it possible to bring the name oder databasenode of the field to the ActionHandler? Maybe by using something like self.getName() in the Additional data? I would like to give more Information to the players: “John attacks using xy (= the Name of the weapon) … “. Writing the field name manually in the additional data works but I would like to use this for a List of weapons / a list of abilities. And there seems no way to transfer the information from list entries.
Ingo
P.S. Sorry for posting the question in your blog too. I found this thread later.
-
February 7th, 2021, 20:53 #303
No problem, I answer here too.
You can use the AdditionalData struture to pass your own custom data to the action handler function from the onBeforeDiceRoll() function.
You could do something like this:
Code:function onBeforeDiceRoll() local nodeWin = window.getDatabaseNode(); DiceRollAdditionalInfo[“attackname”] = DB.getValue(nodeWin, “attackname”); end
Code:local attackname = rRoll[“attackname”];
Code:attacking with {attackname}
Last edited by psicodelix; February 7th, 2021 at 21:00.
Ruleset Wizard
The Ruleset Development Environment
www.rulesetwizard.com
Ruleset Wizard Tutorials
Damned's Ruleset Wizard Tutorials
-
February 7th, 2021, 21:19 #304
Here is a pic of how to do it very easily in the GUI.
weapon-name.jpg
-
February 7th, 2021, 21:49 #305
- Join Date
- Aug 2014
- Posts
- 8
Thanks to both of you for the answers. The code from psicodelix works great for me! Haven't had the time to try the other way. Maybe in the nearer future i'll try to get that running for me!
Ingo
-
February 14th, 2021, 13:23 #306
- Join Date
- Mar 2014
- Location
- Staffordshire, UK
- Posts
- 337
Hi,
Just purchased yesterday and its working great.....
A couple of minor thoughts:
- How about a dark mode? (or even custom themes?)
- When the contents of a object/tab has been amended, highlight this (small icon on the tab or maybe just bold the name on the tab). Obviously clear/unbold upon saving.
- An option to disable CTL+G popping up a save dialog. Just save the .ext file.Ultimate License
UK Time Zone (GMT/BST)
DM'ing since 1977 (Basic D&D)
Currently Playing:
Empire of the Ghouls 5E Campaign
Tales from the Yawning Portal 5E Campaign
Rise of the Runelords Pathfinder 1e
Amazing Adventures 5E Campaign"Some are born to move the world, to live their fantasies
But most of us just dream about the things we'd like to be."
Rush - Losing It
Currently DM'ing
Princes of the Apocalypse 5E Campaign
Waterdeep: Mad Mage 5E Campaign
The Blight 5E Campaign
-
February 14th, 2021, 17:42 #307
Hi Colin, and welcome.
Dark mode is already on the wish list, I often miss it too. It's not at the top of the list, but it will come soon.
Rright now I'm modifying the internal structure of the archive, to allow collaboration of different users on the same project, versioning and source code control, git integration, etc, which will take some time.
About tracking changes in properties (including undo action) will come right after this.
The option about ctrl+G is fine, I will add it in the next revision.Ruleset Wizard
The Ruleset Development Environment
www.rulesetwizard.com
Ruleset Wizard Tutorials
Damned's Ruleset Wizard Tutorials
-
February 19th, 2021, 04:47 #308
- Join Date
- Dec 2013
- Posts
- 69
Error when using a script file
Okay, I have some code I want to run that relies on two different inputs, a Dropdown List and a Number Field. I've tried two approaches with this:
I created a scripts folder, and added the code to a script file, class_handler
I added a Custom Property, as provided in earlier examples with a Property Name: script and Attributes: file="scripts/class_handler.lua". I also tried file="../scripts/class_handler.lua" just because it's not a subfolder of campaign.
The second approach was that I copied the function into the Window itself, so that it would be available in the compiled file.
Both approaches yielded an error of: Script execution error: [string "combo_class"]:28 attempt to call global 'onClassLevelChange' (a nil value)
The function is as follows:
function onClassLevelChange()
local nodeWin = window.getDatabaseNode();local sClass = nodeWin.getChild("combo_class").getValue();Debug.chat("combo_class", sClass);end
And the code I'm using in my DropDown List is:
function onValueChanged()
onClassLevelChange();end
Any idea how to get this to work, as I do not want duplicated code if I can prevent it.
-
February 19th, 2021, 04:54 #309
Do something like this on each element:
Code:<script> function onValueChanged() local nodeWin = window.getDatabaseNode(); CharacterUpdate.updateSomething(nodeWin); end </script>
Code:<script name="CharacterUpdate" file="scripts/manager_characterupdate.lua" />
Code:function updateSomething(nodeWin) local nPerception = nodeWin.getChild("abilities.perception.tempmodifier").getValue(); local nStealthMod = nodeWin.getChild("def.stealth.mod").getValue(); nodeWin.getChild("def.stealth.score").setValue(nDefenceStealth); end
-
February 19th, 2021, 07:33 #310
your first definition of the script is correct (script/class_handler.lua), however I've found a strange behaviour testing it that makes your approach not work.
the final code for your control would be something like this:
Code:<script> function onValueChanged() onClassLevelChange(); end </script> <script file="scripts/class_handler.lua"></script>
If you change the code to
Code:<script file="scripts/class_handler.lua"></script> <script> function onValueChanged() onClassLevelChange(); end </script>
This change is not possible with the wizard, only by editing the final code, but since it is quite requested I will add a script file property in the controls in the next update.
meanwhile you can use a global script as Damned suggested.Ruleset Wizard
The Ruleset Development Environment
www.rulesetwizard.com
Ruleset Wizard Tutorials
Damned's Ruleset Wizard Tutorials
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks