View Full Version : Howto Hack the Modifiers window
sioc
November 21st, 2016, 10:59
Hello,
Sorry if I am not wright, it is my first post here and English is not my native language.
I am trying to modify the "Pavillon Noir" Ruleset.
In it the modifierstack has been hidden and there is now two modifierstacks instead (this game system use 2 parameters in resolve Rolls : one as Number of dice to roll and the second one as value to roll under for each dice, they are called Éfficacité (efficiency in french) and Facilité (easyness in french) and both can be modified by bonus/malus).
In the ruleset the mechanic invoking them is implemented, however the Modifier Window has been disabled. I succeed to put back the icon to open the Modifier window But the in it I need to do 2 changes :
First change is to change the input number association with the new modifierstackeff instead of modifierstack
Secondly, to add a second input number for the modifierstackcal.
The ruleset contains : modifierstackeff.lua, modifierstackfac.lua, modifierstackeff_base.lua, modifierstackeff_modifier.lua, modifierstackfac_base.lua, and modifierstackfac_modifier.lua
So I think nothing is missing on the lua part, it is more how to change and add to the Modifiers interface.
I think that has something to do with the desktop_classes.xml and utility_modifier.xml but I am not sure and I can't figure out how to alter it so it works.
Is someone could help with that ?
Thanks a lot.
damned
November 21st, 2016, 11:33
Welcome sioc
Sadly for you the changes you want to implement are easy for a human brain to manage and very hard to program.
You will need to actually pull apart the (quite complex) code and learn how it all works and how it interacts with other elements.
If you are not a programmer this is probably not a good first project for you.
sioc
November 21st, 2016, 12:13
Thanks for that answer damned,
I don't know if I qualify as programmer, I do some perl, php and bash.
I'd hope some help would suffice to point me to the right direction.
Could you tell me at least if the files I pointed are at the right ones ?
I think the only thing that is missing for ruleset/extension programming is an anatomy explanation of the CoreRPG (and some comments in the code).
I'll do some tries and errors while rereading the good "Jeff's Excruciatingly Simple Extension Tutorial for Fantasy Grounds".
Edit:
PS: just to see if I understood how things work : the LUA/XML in FG is like perl/TK, LUA for code allowing dynamic and interaction and XML for graphic 'object' code ?
damned
November 21st, 2016, 13:03
Hi sioc Id love to help but your already out of my depth.
The modifiers cose is already quite complex and many parts of the game system reference the modifiers.
Im totally unfamiliar with the gamesystem and the ruleset you are using and how it interacts with the modifiers.
I use notepad++ and i use find in files and I start with one thing that I know and I look for where that is used and then start tracking back.
Its possible you might be better off downloading MoreCore and having a look at some of the dice rollers there.
We have a couple that would be close and should be convertible.
Have a look for example at /successes this would need a new version /sioc (or whatever your system is called) that uses /sioc #d#y# where the last # is the number to roll under. Do you also need to add modifiers to teh total? if so there is a bit more coding there. If you write this extension (using the file \desktop\scripts\morecore_trenloe_countsuccesses.l ua as your example) I will include it in MoreCore. You will be able to create libraries of rolls and drag the to the Character Sheet etc.
sioc
November 21st, 2016, 14:43
hi,
All the rolling system, test and the 2 new Modifierstacks are already working in the ruleset (they can be invoked individually from an other part of the ruleset).
The thing is that the dev disabled the Modifiers window by removing the button that allow to 'open' it, but I already put back that button.
I just have to figure out how to modify the modifiers window to add a second input number and how from there make these 2 numbers interact with the 2 new modifierstacks already in place instead of the one given in the Core (and not used).
Edit:
Anyway, i'll look to the MoreCore (could be interesting).
LordEntrails
November 21st, 2016, 18:34
Hey Sioc, have you had a look at the ruleset modification guide? It has some into information and then links into reference documentation on the xml and lua.
I know next to nothing about coding myself, but I do know that these sources are often referred to by others;
https://www.fantasygrounds.com/modguide/
sioc
November 21st, 2016, 20:09
Hey Sioc, have you had a look at the ruleset modification guide? It has some into information and then links into reference documentation on the xml and lua.
I know next to nothing about coding myself, but I do know that these sources are often referred to by others;
...
thanks, but i stated with that.
I came to ask for help after hours of reading and testing...
Maspalio
November 21st, 2016, 20:35
Hi sioc,
Why don't you try asking on jdrvirtuel ? The author of the Pavillion Noir ruleset wanders there from time to time. Tu trouveras facilement son sujet dans FG3.
Trenloe
November 22nd, 2016, 02:28
Good FG development background, guidelines and links here: https://www.fantasygrounds.com/forums/showthread.php?20651-Modifying-the-CoreRPG-ruleset
Trenloe
November 22nd, 2016, 02:30
I came to ask for help after hours of reading and testing...
Sorry. But without having access to the ruleset itself we really can't help with the very ruleset specific questions you're asking. We have no idea how that ruleset has been developed and coded and so we can't help with your questions in post #1.
sioc
November 22nd, 2016, 10:08
Sorry. But without having access to the ruleset itself we really can't help with the very ruleset specific questions you're asking. We have no idea how that ruleset has been developed and coded and so we can't help with your questions in post #1.
Ok.
And any chance you could answer to #5 please ?
PS : here a direct link to the ruleset pibrac.baucent.net/storage/Pavillon%20Noir%20Reloaded.pak
sioc
November 22nd, 2016, 19:24
I am really not sure to have understood in what part of the CoreRPG the Modifier code is and where is and how is generate the content of that Modifier 'window'.
If you could point that to me and if you have the time explaining its code a minimum, that should help enough so i can resume my tries and errors.
Thanks in advance.
Trenloe
November 22nd, 2016, 19:48
I just have to figure out how to modify the modifiers window to add a second input number and how from there make these 2 numbers interact with the 2 new modifierstacks already in place instead of the one given in the Core (and not used).
I'd recommend creating two modifier windows (you can put them right next to each other so they appear joined). Otherwise you will be completely redesigning the modifier window as it is not designed to have two different entry areas.
To see how to interact with the modifier window, do a search through the 5E ruleset for "modifierstack" - you will see many occasions where ModifierStack.<function> is used to interact with the modifier window. The ModifierStack global package is defined in the CoreRPG file: desktop/scripts/modifierstack.lua you can review that to see what functions it contains.
Trenloe
November 22nd, 2016, 19:51
I am really not sure to have understood in what part of the CoreRPG the Modifier code is and where is and how is generate the content of that Modifier 'window'.
The base control definition is in CoreRPG, in desktop\desktop_panels.xml
See post #2 here for general locations of files in the CoreRPG ruleset: https://www.fantasygrounds.com/forums/showthread.php?20651-Modifying-the-CoreRPG-ruleset
sioc
November 22nd, 2016, 23:46
Thanks for the answers... Time to try again ;)
I'll let you know of my progress.
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.