-
April 14th, 2021, 16:09 #1
- Join Date
- Jan 2013
- Posts
- 5
Allowing usage of customdie in effect
Hi,
I have added a custom die "d5" via an extension. It can be selected via rightclick->customdie in the standard "d10" and works as it should there.
Now I want to be able to use this custom die in an effect like "HEAL: 1d5" so that whenever a healing action/roll is done an additional d5 is rolled and added to the result.
However I can not find a starting point where to do this.
Can anyone give me a hint where I should be looking at?
Best regards,
-
April 16th, 2021, 05:29 #2
MOD: moved to Workshop from CoreRPG forum. I think you will get better visibility here and since you are really talking about extensions and coding, this is an appropriate place.
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
April 16th, 2021, 12:22 #3
- Join Date
- Jan 2013
- Posts
- 5
Thanks for the guiding.
I will also take the chance to elaborate a bit more on what I already have and what I want to achieve.
So I have created an extension with the following code:
Code:<icon name="d5" file="graphics/radial/icon_dice_d5.png" /> <customdie name="d5"> <model>d10</model> <menuicon>d5</menuicon> <script> function onValue(result) local msg = {sender = "", font = "emotefont"}; msg.text = "Rolled " .. result .. " on d10! Converting to d5 via division by 2."; Comm.deliverChatMessage(msg); return math.ceil(result/2); end </script> </customdie>
That way I can also add it into a dice field of an action(e.g. a heal action). This works fine and the correct d5 is rolled once the heal action is triggered.
Now I also want to be able to add the new d5 as a modifier via an effect. E.g. in an effect "more heal; HEAL: 1d5". The intention is that whenever a heal action is performed by someone who is having this effect an additional 1d5 is rolled and added to the heal amount.
Though this is not working. I can only add the standard dice in the effect like d6, d8 and so on. But not my newly generated d5.
I also had a look around in the CoreRPG.pak ruleset but I could not find any place where I need to register my d5 so that it will work as I want.
Hopefully someone can give me a hint how I can solve this problem.Last edited by Zwikkel; April 16th, 2021 at 12:26.
-
April 16th, 2021, 16:22 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,559
As far as I know, CoreRPG doesn't support adding any dice by effect. In CoreRPG, the effects are only informational (except for upcoming LIGHT/VISION effects).
In other rulesets, the code that adds dice via effects uses the StringManager.convertStringToDice function to convert the effect string to dice; and that function uses Interface.getDice API to grab the possible dice. This is exactly how d2/d3 are implemented and used in 5E and Pathfinder.
Regards,
JPG
-
April 17th, 2021, 09:53 #5
- Join Date
- Jan 2013
- Posts
- 5
That sounds good.
I'll have a look into these functions and see how I can add my changes with that.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks