Thread: New Critical Hit
-
March 26th, 2018, 14:13 #1
- Join Date
- Mar 2017
- Posts
- 11
New Critical Hit
I have an idea to incorporate a crit table I found on sterlingvermin.com. As I am someone who is not familiar with coding/scripting; I figured that speaking with someone who is, would be a good start. I understand that the project I want to undertake is extensive and will take a long time but it's interesting enough for me that I opted to enroll into college for computer programing to help me. I would like to get a jump on this though and was wondering if you would be able to point me in the right direction? Namely, where do I start? I'll attach a hyperlink so you can see what it is that I want to create in FG.
I don't know if this is able to be done as a module or an extension. I have already created the tables (I've added, I think...) in FG although, there are no automations to apply effects or damage. Any ideas?
Dport
-
March 26th, 2018, 17:56 #2
Firstly you'd need to mention for what ruleset.
There already exists (for 5e; I don't know if it works in other rulesets) a module called Default Fumble and Critical hit Tables. You could amend those tables to include whatever you want to do I think.If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
March 26th, 2018, 23:08 #3
I believe you name the module the same, turn it on in options, and load your module instead of the default one.
-
March 27th, 2018, 02:29 #4
- Join Date
- Mar 2017
- Posts
- 11
I'm sorry, this would be for 5e. I understand that there is already a table built in. However, the tables I have listed are broken down by damage type. e.g. bludgeoning, fire, acid, etc. Would the tables automatically adjust by the type? Or, would I have to select the table and roll?
-
March 28th, 2018, 19:00 #5
Some info about how the base critical hit table works here: https://www.fantasygrounds.com/forum...l=1#post382689
In 5E the ruleset sets which table to roll at the end of the onAttack function in scripts\manager_action_attack.lua At this point the damage type is not easily available - as this is all worked out in a different action - the damage action in manager_action_damage.lua. Damage type has nothing to do with the attack action. So potentially complex code would have to be added to the attack action code that gets the damage type from the weapon DB record - or maybe move the critical table rolling code to the damage action code (there's a handle critical section in the modDamage function).Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
March 29th, 2018, 13:36 #6
- Join Date
- Mar 2017
- Posts
- 11
Uuuuhhhhhh..... I know nearly nothing about scripting.. Lol. However, if I understand you correctly, you're saying that when FG rolls attack, it doesn't care about the damage type. So, when (using the core crit tables) it just thinks, "crit hit, roll on crit table". And, to change that would be to fundamentally change the scripting. Right?
Is there a way to insert a sliver of code to 'pull' or look up the damage type prior to getting to the crit table? Would that be easier than moving the crit table look up?
Also, with these tables, they can apply conditions to characters. Would that be something that can be auto applied? What about conditions that are not pre-built, how do I make those?
I'm sorry for all the questions, I am a lot a bit behind in the scripting world and I'm trying to catch up.
-
March 29th, 2018, 17:18 #7
This would be more difficult than moving the code to the damage handler. The downside of the critical code in the damage handler is that you actually have to roll damage to see the critical effect.
These can't be applied automatically from a table. You could link effects in the table and then these could be manually applied.
Create them manually, then export them with your crit table module. Info on creating effects here: https://www.fantasygrounds.com/wiki/index.php/Effects and in the specific RPG system user guide.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
March 30th, 2018, 00:32 #8
- Join Date
- Mar 2017
- Posts
- 11
-
March 30th, 2018, 11:00 #9Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
April 3rd, 2018, 23:38 #10
- Join Date
- Mar 2017
- Posts
- 11
Ok. Next question. And, I'm sure that this shows how beginner I am, what is the lua and how do I find it?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks