PDA

View Full Version : Changing initiative die roll for Pathfinder



rickyhunt
November 23rd, 2017, 05:36
I would like to change the die roll for initiative from a d20 to a d10 in Pathfinder. I thought I found the code in the 3.5 ruleset and modified it to d10, but it didn't work. I made copies and backups and am pretty sure I was using the right file. Would this be a job for a small extension?

Bidmaron
November 23rd, 2017, 05:46
If you cannot get it to work directly editing the ruleset, you are not going to get it to work in an extension either. However, unless you are planning on doing a ruleset it is better to work in an extension. I recommend you post what the original code was, where it was, and the changes you made.

damned
November 23rd, 2017, 07:59
If it didnt work you probably were not editing the right stuff...

Nickademus
November 23rd, 2017, 08:42
I would assume in manager_action_init.lua in the scripts folder, you would change line 42 from 'rRoll.aDice = { "d20" };' to 'rRoll.aDice = { "d10" };'. Not sure if that would catch all the instances where initiative is rolled, but it's a place to start.

rickyhunt
November 24th, 2017, 00:55
That is exactly what I tried. My suspicion was that it isn't the only place it was rolled, but I couldn't find anything else. I edited the 3.5 ruleset because it looked like Pathfinder pointed almost everything to that.

Trenloe
November 24th, 2017, 04:25
Put a Debug.console command just before your modified code, something like Debug.console("About to roll init with d10"); And then open the console window with the chat command /console

See if the debug command is displayed in the console - if not, then your code isn't running.

Note: manager_action_init.lua is only triggered for PC rolls from the character sheet. manager_combat2.lua handles the NPC init tolls, and PC init rolls made by the GM from the combat tracker.


More info on the Debug.console command here: https://www.fantasygrounds.com/refdoc/Debug.xcp#console

damned
November 24th, 2017, 06:45
Good catch Trenloe I dont think his players will be thrilled using d10s while everyone else uses d20s!

rickyhunt
November 24th, 2017, 14:27
Thanks for the pointers. I went through the combat2 code and replaced all the random(20)'s with random(10)'s when it was in code that looked like it modified init. For some reason, when I "roll all initiatives", none of them are called. Only when I rolled from the player sheet did it call the init.lau code and send something to the debug console.

I am missing something fundamental. I am nervous about making so many changes to a ruleset and unintended consequences. I think I will try to learn how to make this work with an extension.

rickyhunt
November 24th, 2017, 14:29
Not my players. They never seem to roll above a 5 on the initiative d20 anyway. :-)

Andraax
November 24th, 2017, 14:45
If you have the Castles and Crusades ruleset, you can look at how it does initiative. It has options to roll d10, d20, or d% for initiative.

JohnD
November 25th, 2017, 02:42
Good catch Trenloe I dont think his players will be thrilled using d10s while everyone else uses d20s!

Not a bad idea though. [/evilDMlaugh]