PDA

View Full Version : Can I create this extension?



rob2e
August 24th, 2018, 20:35
Ok, guys, I have never created an extension, I've done almost everything else in FG, but not that. I've decided to TRY to create one.

Before I start, I wanted to ask the VETERANS if my idea is even possible...

I want to create an extension that will identify a Sorcerer using Empowered Spell and allow the reroll automatically if they chose.

When you roll damage for a spell, you can spend 1 sorcery point to reroll a number of the damage dice up to your Charisma modifier (minimum of one). You must use the new rolls.

If they have empowered spell, maybe a yes/no prompt "Do you wish to spend a sorcery point to reroll the damage?" kind of a thing. and then the functionality to make that happen by choosing the number of dice.

I don't know, it seems crazy and very specific to this one option, but do people think it's POSSIBLE to write?

I guess I'm looking for either...

1) Yeah, seems doable.
2) You're crazy, give it up man!!

Bidmaron
August 24th, 2018, 23:28
It depends on what your definition of possible is.
You will never under FGC be able to keep some 3d dice and have the others reroll 3d.

If you don’t care about the 3d roll aspects, you could do what you want. However, it is dealing with rather advanced logic of the dragdata and die data structures. It might not be a good one to cut your teeth on.
I have made rolls do some cool things in generators but it was one of the hardest coding things I can ever remember doing. What you want is a lot easier but still not trivial.

Ikael
August 24th, 2018, 23:42
I agree, while it is very much doable, it will be daunting task if you don't have experience

rob2e
August 25th, 2018, 02:43
I'm out! lol ThanX for the advice.

Bidmaron
August 25th, 2018, 03:14
Rob, I think you could do it, but start by studying someone's extension, and see how it does whatever it is that it does. That is the best way to teach yourself. Look at some of the effects-oriented stuff and some of the MoreCore dice macros.

dulux-oz
August 25th, 2018, 03:30
Look at some... of the MoreCore dice macros.

Or the DORCore Dice Engine :)

Bidmaron
August 25th, 2018, 03:37
Dulux, you carefully designed your die-rolling engine to encompass all the use cases you could identify. I am thinking your code is much more complicated (and flexible) than MoreCore (although I haven't studied either). As a study in great software design, it is probably very apropos, but for someone trying to learn to write extensions....