Thread: Writing a DMGX extension for 5E?
-
March 24th, 2021, 02:26 #1
- Join Date
- Mar 2020
- Posts
- 494
Writing a DMGX extension for 5E?
I found Celestian’s DMGX code for 2E. I unpacked 2E.pak to search for references to DMGX with notepad++. I immediately noticed variable naming conventions involving a prefix like “n” or “a”. I assumed they were meant to represent some aspect of the variable, so I searched in refdoc and the wiki, but I could find no coding style documentation for FGU code. Is that written down somewhere?
Ah. I found Moon's comment on variable naming at https://www.fantasygrounds.com/forum...trol-questions .
I imagine that I will need to extract a small part of Celestion's 2E ruleset to build my 5E extension.
I wrote lots of lisp code many moons ago, so there will be lots to learn. Do I start with one of the "hear is an easy way to write an extension" explanations? I imagine the complexities will involve the order of instantiation and invocation of my manager_action_damage.lua code relative to the 5E manager_action_damage.lua code and I suspect that the specifics of that won't necessarily be covered in the "writing an extension" intros.Last edited by webdove; March 24th, 2021 at 06:24.
-
March 24th, 2021, 17:53 #2
- Join Date
- Mar 2020
- Posts
- 494
@celestian is it ok for me to do this? It seems that I would start by comparing the 5E and 2E Lua files looking for differences related to DMGX or nDamageModifier. I would strip out all the code from 2E that already exists in 5E and make that into a manager_action_damage.lua file.
-
March 24th, 2021, 18:03 #3---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
March 26th, 2021, 03:35 #4
- Join Date
- Mar 2020
- Posts
- 494
I noticed that in 2E "DMGX" is included in the tables bonuscomps and targetableeffectcomps.
The only reference in 5E to either of those tables is TokenManager.addEffectTagIconBonus(DataCommon.bonu scomps); in \5E\scripts\Manager_token2.lua.
Do I need to add DMGX to those tables during my init() in order for DMGX to be recognized?
I not been able to find a small extension which adds a damage modifier as an example to follow for what I should do.Last edited by webdove; March 26th, 2021 at 06:25.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks