PDA

View Full Version : Rules Cyclopedia, any thoughts on issues?



tdewitt274
April 5th, 2020, 18:01
Hello, All

With the whole COVID-19 thing, I think I finally have our group agreeable to trying FG. Currently, we are playing a Basic game using the Rules Cyclopedia. I've done some messing around, but I think I may have it (kinda) working.

Before I spend too much time, I was wondering if anyone out there could think of any reasons why the 2e rules would be incompatible with Basic. I'm leaning toward an extension due to the fact that the DM wants to use 2e monsters and adventures.

I've identified there will need to be changes to the Ability modifiers, expanding for additional levels, turning mechanics may need to be adjusted, item adjustments for weight from coins to lbs, and the whole Class/Race thing (I have a couple of ideas on that). Of course, Kits would be removed.

My DM is an extreme newbie to FG, I've only run it a few times. So, it's likely going to be a "use what you need, then expand" experience.

Any help is appreciated!

Thanks,

Todd

Talen
April 5th, 2020, 18:15
I know it's possible to jury rig celestian's excellent 2e ruleset as you've described, but still holding out hope for a rulescycpopedia ruleset or extension. Good luck with your game!

celestian
April 5th, 2020, 18:57
Hello, All

With the whole COVID-19 thing, I think I finally have our group agreeable to trying FG. Currently, we are playing a Basic game using the Rules Cyclopedia. I've done some messing around, but I think I may have it (kinda) working.

Before I spend too much time, I was wondering if anyone out there could think of any reasons why the 2e rules would be incompatible with Basic. I'm leaning toward an extension due to the fact that the DM wants to use 2e monsters and adventures.

I've identified there will need to be changes to the Ability modifiers, expanding for additional levels, turning mechanics may need to be adjusted, item adjustments for weight from coins to lbs, and the whole Class/Race thing (I have a couple of ideas on that). Of course, Kits would be removed.

My DM is an extreme newbie to FG, I've only run it a few times. So, it's likely going to be a "use what you need, then expand" experience.

Any help is appreciated!

Thanks,

Todd

It is certainly possible to put together an extension for the Rules Cyclopedia using the AD&D ruleset. Infact, I put together a skeleton extension (https://gitlab.com/FGProjects/public/extensions/becmi) so that someone could take it to do the serious work. It contains the very basics to get started with an example matrix entry (all the rest will need to be filled in) and removal of races (since class is your race). I've added the hooks needed for it into the AD&D 2E ruleset already for the matrix tweaks.

scottgeg
April 12th, 2020, 21:40
This is great, I had been toying with the idea of switching our Old School Essentials game to the 2E setup (from morecore) if it was possible and I think that extension might do the trick.

FlynnTheAvatar
May 10th, 2020, 21:55
Thank you celestian, I entered all the matrix entries, from 0 (Normal Man) to 36+.

Do you have some more pointers what needs to be changed to make the extension work? Besides from the oblivious like changing the character and NPCs sheets. I guess something similar as the matrix is needed for saving throws. And a way to reference them from the NPCs sheets. BECMI is using rather cryptic entries like "saves like F1" and such.

esmdev
May 10th, 2020, 22:08
It would be awesome to see a functioning Cyclopedia extension built on top of 2E and all the cool things that 2E already does so well. :)

celestian
May 11th, 2020, 01:13
Thank you celestian, I entered all the matrix entries, from 0 (Normal Man) to 36+.

Do you have some more pointers what needs to be changed to make the extension work? Besides from the oblivious like changing the character and NPCs sheets. I guess something similar as the matrix is needed for saving throws. And a way to reference them from the NPCs sheets. BECMI is using rather cryptic entries like "saves like F1" and such.

Far as I know the saves in basic and AD&D are the same. The values might vary but those are set by class. Monsters might need a tweak and that data is avalable from the 2E ruleset (crack it open and look at the data_common_adnd.lua. The "aWarriorSaves" array is the one that contains the current save values for NPCs based on their HD.

FlynnTheAvatar
May 14th, 2020, 22:26
I am not sure if the attack matrix is working. I filled out the attack matrix up to level 36 (ac 19 to -20) and created a sample giant rat with 0 HD (THACO 20). But it keeps hitting a char with AC 10 every time.

You can see my version of the script at https://gitlab.com/FlynnTheAvatar/becmi. I will recreate the fork in a few days - until then I hope I have the saves for all classes entered.

Sterno
May 15th, 2020, 02:16
I am not sure if the attack matrix is working. I filled out the attack matrix up to level 36 (ac 19 to -20) and created a sample giant rat with 0 HD (THACO 20). But it keeps hitting a char with AC 10 every time.

You can see my version of the script at https://gitlab.com/FlynnTheAvatar/becmi. I will recreate the fork in a few days - until then I hope I have the saves for all classes entered.

I recently implemented attack matrixes (for npcs) for a Hackmaster 4E mod and at least for me, just flipping the version flag to “1e” and changing aMatrix wasn’t enough. I made a ton of changes in the last three weeks so I can’t be sure, but I think there was an issue with getThaco in manager_action_attack not trying to use the matrix for npcs. You might need to look at that.

I also know becmi has a “wider” range of acs on the matrix than 1e, so it might be worth double-checking that the indexing is trying to operate on that wider range.

If it helps, you can take a look at my commits on https://github.com/drplote/FantasyGroundsHackmaster . I should have commit messages about editing attack matrixes which would help you narrow down my changes. It was a little different case though, too, because I wanted to use matrixes but not flip the version off of “2e”

celestian
May 15th, 2020, 02:53
I recently implemented attack matrixes (for npcs) for a Hackmaster 4E mod and at least for me, just flipping the version flag to “1e” and changing aMatrix wasn’t enough. I made a ton of changes in the last three weeks so I can’t be sure, but I think there was an issue with getThaco in manager_action_attack not trying to use the matrix for npcs. You might need to look at that.

I also know becmi has a “wider” range of acs on the matrix than 1e, so it might be worth double-checking that the indexing is trying to operate on that wider range.

The code is setup to handle the 31 or so entries that becmi uses (1e has 21). If there is a bug around that someone will have to point me where the problem is.

Sterno
May 15th, 2020, 05:37
There's a small bug in CombatManagerADND.getACHitFromMatrixForNPC that was starting at the wrong index for BECMI. This seemed to fix the killer rat problem, though I didn't test any more beyond that:

celestian
May 15th, 2020, 06:47
I've tweaked it in the ruleset, it wont be out until the 25th as I've already submitted for next week.

FlynnTheAvatar
May 15th, 2020, 20:47
There's a small bug in CombatManagerADND.getACHitFromMatrixForNPC that was starting at the wrong index for BECMI. This seemed to fix the killer rat problem, though I didn't test any more beyond that:

Thank you very much, this indeed fixed the killer rat issue. I will remove the fix once the new ruleset is out.

I got a bit further and was able to set the correct saving throws, too. But I need to extend the NPC data model and sheet to add a "saves As" field.

celestian
May 15th, 2020, 20:59
Thank you very much, this indeed fixed the killer rat issue. I will remove the fix once the new ruleset is out.

I got a bit further and was able to set the correct saving throws, too. But I need to extend the NPC data model and sheet to add a "saves As" field.

Saves are calculated based on the HD and "save" table, not "save as". You certainly can make an extension do that but unless I am mistaken the monsters in Basic work the same as AD&D and they have a "save table" for monsters based on hit dice.

FlynnTheAvatar
May 15th, 2020, 22:01
No, that is sadly not the case for BECMI. This part is from Chapter 14 of the D&D Basic Rules Cyclopedia:


Save As (Save)
This line shows you the character class and
level at which the monster makes saving throws.
For example, if the description says "Save: F7 ,"
then the monster saves as a 7th level fighter.
C: Cleric
F: Fighter
M: Magic-User
T: Thief
D: Dwarf
E: Elf
H: Halfling
Refer to the applicable character class description to find the exact saving throws the monster
uses. As a rule of thumb, unintelligent monsters
usually save as fighters of half their monster
level. Some monsters may have special adjustments to some saving throws, as given in their
descriptions.

celestian
May 15th, 2020, 22:59
No, that is sadly not the case for BECMI. This part is from Chapter 14 of the D&D Basic Rules Cyclopedia:

Oh, yeah, wow. Yup, you're going to need to enter all the save tables and then reference them for saves. It will require changing the function that gets the saves for a npc but the basic structure can be used... just need to add the options to select it and then point to that one instead of the more generic form used now.

FlynnTheAvatar
May 16th, 2020, 08:16
Oh, yeah, wow. Yup, you're going to need to enter all the save tables and then reference them for saves. It will require changing the function that gets the saves for a npc but the basic structure can be used... just need to add the options to select it and then point to that one instead of the more generic form used now.

Thanks for the infos. And no worries, I already entered the Cleric‘s and Fighter‘s saving throws. And changed the mapping of individual saves (as death, petrification, rod, and so on) to the correct column in the entry (they are different to AD&D).
I also created a function that should look up the correct saving roll.
As I said I need a new field in NPCs to make it work, but I should be able to figure it out myself.

Talen
May 16th, 2020, 11:17
FlynnTheAvatar - good luck with your project - I'm (like many people I suspect) are looking forward to seeing where your project winds up - BECMI has a soft spot in my heart...lots of great gaming as a kid.

FlynnTheAvatar
May 16th, 2020, 21:29
Okay, this is a snapshot of what I done so far: 35572.

It is far from finished, but the attacks and saves are all entered. And the NPC sheet has now a field "Saves As". If you enter a valid shortcut (NM = Normal Man, F1 = Fighter 1, ...), it calculates the correct saves. But you need to update a different field also to force a refresh.

Could somebody please tell me what is needed to force a recalculation/refresh of the NPC sheet after changing the "Saves As" field?

Thanks!

Sterno
May 17th, 2020, 02:24
I haven’t looked at your code but it sounds like you need to add a Db handler for when your new property updates. If you open up the 2E or CorrRPG ruleset, look through the code for how it does this for the other fields. Search for DB.addHandler or even just “onUpdate” to kind of see how it works, and narrow it down by focusing on one of those properties you can change to force an update and make sure your property’s handler calls the same thing

FlynnTheAvatar
May 17th, 2020, 16:32
I haven’t looked at your code but it sounds like you need to add a Db handler for when your new property updates. If you open up the 2E or CorrRPG ruleset, look through the code for how it does this for the other fields. Search for DB.addHandler or even just “onUpdate” to kind of see how it works, and narrow it down by focusing on one of those properties you can change to force an update and make sure your property’s handler calls the same thing

Thank you, found the missing part. Updating my new "Saves As" field now also updates the Saving throws. Now I have to dig deeper into the code to set it R/O when you lock the NPC sheet.

FlynnTheAvatar
May 18th, 2020, 21:11
Sorry, I am not a Lua programmer, and I do not have a lot of experience writing extensions for FG.

It seems that locking the NPC sheet is done by the function "update()" in npc_main.lua. Is there a way to extend this function, or do I need to include the complete npc_main.lua file from the 2e ruleset + my changes in the extension?

Sterno
May 19th, 2020, 02:03
Yeah, it's a little harder for a file like npc_main.lua that's referenced in the campaign xml rather than in base.xml, because you can't replace it as easily. What you basically need to do is create your own record_npc.xml, create a windowclass for npc_combat (the window in record_npc.xml in CoreRPG that references that lua file), use merge="join", and then add a script tag to point at your script. The rest of your xml file should be pretty much empty... you just need to build enough structure to get you down to where your script is defined so you can override that. By using the merge tag, you don't have to replace everything. I don't have the link but I known "damned" on these forums has a link to a short tutorial vid on how to do this in his signature

Then your script that you point it at can define an "update" function and within it you can do something like



function update()
super.update();
myThingToDo();
end


At least, that's the broad strokes of how you'd do it. It's a lot easier if it's a file that's specified in base.xml because if it had a name like "NpcMain" or something, you could do create your own file and in it's onInit do:


local fOldUpdate;
function onInit()
fOldUpdate = NpcMain.update;
NpcMain.update = myNewUpdate;
end

function myNewUpdate()
fOldUpdate();
doMyNewStuff();
end


I recently made an Armor Damage for 2E extension where I needed to override some scripts that were defined in the UI xml files, just like you're trying to do. It might help to look at that as an example. It should still be on the first page of these forums somewhere. My extension wasn't super complicated, so there's not a ton of code to wade through.

celestian
May 19th, 2020, 03:26
Sorry, I am not a Lua programmer, and I do not have a lot of experience writing extensions for FG.

It seems that locking the NPC sheet is done by the function "update()" in npc_main.lua. Is there a way to extend this function, or do I need to include the complete npc_main.lua file from the 2e ruleset + my changes in the extension?

Thats a complicated question to answer. There are various ways to do it and really depends on exactly what you want. You could insert code into you xml on the specific controls you're changing, you could add a new function, you could replace the entire item_main.lua with your own.

It really depends on what you need and what you know how to do.

You might try and pose the question in the Work Shop forum with sample bits of code you're trying to use.

FlynnTheAvatar
May 20th, 2020, 20:53
Yeah, it's a little harder for a file like npc_main.lua that's referenced in the campaign xml rather than in base.xml, because you can't replace it as easily. What you basically need to do is create your own record_npc.xml, create a windowclass for npc_combat (the window in record_npc.xml in CoreRPG that references that lua file), use merge="join", and then add a script tag to point at your script. The rest of your xml file should be pretty much empty... you just need to build enough structure to get you down to where your script is defined so you can override that. By using the merge tag, you don't have to replace everything. I don't have the link but I known "damned" on these forums has a link to a short tutorial vid on how to do this in his signature

Then your script that you point it at can define an "update" function and within it you can do something like



function update()
super.update();
myThingToDo();
end




Thank you very much, this was exactly what I was searching for. I reduced my custom npc sheet to the following:


<root>
<windowclass name="npc_combat" merge="join">
<script>
function update()
super.update();
local nodeRecord = getDatabaseNode();
local bReadOnly = WindowManager.getReadOnlyState(nodeRecord);

updateControl("savesAs", bReadOnly);
savesAs.setReadOnly(bReadOnly);
end
</script>
<sheetdata>
<label_column name="savesas_label">
<!-- anchored to="hitDice_label" position="bottom" offset="-10" / -->
<static textres="npc_label_savesas" />
</label_column>
<string_columnh name="savesAs">
<!-- anchored to="hitDice" position="bottom" offset="-10" / -->
<script>
function onValueChanged()
local node = getDatabaseNode();
local nodeNPC = node.getChild("..");
CombatManagerADND.updateNPCSaves(nodeNPC, nodeNPC, true);
window.onSummaryChanged();
end
</script>
</string_columnh>
</sheetdata>
</windowclass>

</root>


Locking and unlocking the sheet works correctly. But I am not sure how I can insert the label and string text field correctly into the NPC sheet. The two controls are simply added to the bottom, overlaying the powers fields. I guess using <anchored to="ANOTHER OBJECT"/> might be the solution?

celestian
May 21st, 2020, 04:11
Look at "insertbefore" and that should get ya where you want.


<label_encounter_weaponlist name="label_weapons" insertbefore="maplinks_label" />

FlynnTheAvatar
May 21st, 2020, 09:03
Look at "insertbefore" and that should get ya where you want.


<label_encounter_weaponlist name="label_weapons" insertbefore="maplinks_label" />

Thank you very much. So, the saves are done, too:
35835

I created a pull request with my changes.

celestian
May 21st, 2020, 15:03
I created a pull request with my changes.

I'll check out the repo once the day job lets out ;)

FlynnTheAvatar
May 28th, 2020, 09:42
I'll check out the repo once the day job lets out ;)

Sorry, I am sure that you have a lot to do. But do you think you have time to check my pull request?

celestian
May 28th, 2020, 16:24
Sorry, I am sure that you have a lot to do. But do you think you have time to check my pull request?

I checked gitlab and did not see any. See it now and processed merge.

One thing you might want to check, I corrected the hook in the 2E ruleset that did not properly calculate the entire span of the matrix (was to small). You should not need the matrix fix bit of code any longer.

I'm going to try and have gitlab send me notices for these things so I can resolve them quicker for you.

FlynnTheAvatar
May 28th, 2020, 19:12
I checked gitlab and did not see any. See it now and processed merge.

One thing you might want to check, I corrected the hook in the 2E ruleset that did not properly calculate the entire span of the matrix (was to small). You should not need the matrix fix bit of code any longer.

I'm going to try and have gitlab send me notices for these things so I can resolve them quicker for you.

No worries. And thank you for merging my changes and fixing the hook. I will test and do another pull request for removing the workaround.

FlynnTheAvatar
May 31st, 2020, 13:14
Mmh, it seems that attack rolls are broken the other way round. I created a new Fighter (adding a class by hand, not dragging a 2e class the sheet), and he is missing every roll:


[ATTACK (M)] Longsword [THACO(19)]
Attack [17] ->[ATTACK (M)] [at Rat, Giant 2] [Hit-AC: 20 vs. 7 ] [AC: 20 ] [MISS]

He has a THAC0 of 19, and the attack matrix looks good:
36289

celestian
May 31st, 2020, 19:01
Mmh, it seems that attack rolls are broken the other way round. I created a new Fighter (adding a class by hand, not dragging a 2e class the sheet), and he is missing every roll:

He has a THAC0 of 19, and the attack matrix looks good:
36289

THACO isn't a thing for you guys. You use a matrix that doesn't follow the math for thaco... I get confused when it's mentioned in this context.

Are you saying the changes I made to the hooks are wrong, or you've run into a problem with what you've setup?

FlynnTheAvatar
May 31st, 2020, 19:54
Sorry, I have no idea of the inner workings of the 2e mod. So, I hope this will explain the issue:
First, I removed the workaround Sterno made from the extension and loaded up 2e mod + latest BECMI extension.

Then I added a Giant Rat both from the 2e MM and what I created from BECMI stat block to the Combat Tracker.
Afterwards I added a new character, added one level to it (I did not drag any class from PHB, just added one level), set the HPs to 8, dragged a Longsword into Attacks, set THAC0 to 19 and dragged him to the Combat Tracker.

The attacks from both rats were correct (before your fix monsters hit every time). But the char now never hits (he was hitting on a 12 before your change as expected).

So, monster attacks are working, but character attacks seem to be broken. Or I did miss somehting that needs to be done if I create a char with the BECMI extension.

celestian
June 1st, 2020, 04:21
Sorry, I have no idea of the inner workings of the 2e mod. So, I hope this will explain the issue:
First, I removed the workaround Sterno made from the extension and loaded up 2e mod + latest BECMI extension.

Then I added a Giant Rat both from the 2e MM and what I created from BECMI stat block to the Combat Tracker.
Afterwards I added a new character, added one level to it (I did not drag any class from PHB, just added one level), set the HPs to 8, dragged a Longsword into Attacks, set THAC0 to 19 and dragged him to the Combat Tracker.

The attacks from both rats were correct (before your fix monsters hit every time). But the char now never hits (he was hitting on a 12 before your change as expected).

So, monster attacks are working, but character attacks seem to be broken. Or I did miss somehting that needs to be done if I create a char with the BECMI extension.

When using the extension I originally created with a pc with a pre-built matrix it looks fine to me.

https://i.imgur.com/0kEdaVZ.png

FlynnTheAvatar
June 1st, 2020, 14:02
When using the extension I originally created with a pc with a pre-built matrix it looks fine to me.

You mean that you entered the correct values for all ACs in the Combat Matrix?

Setting the THAC0 or dropping a level of Fighter on the char did not change the values in the Combat Matrix; they are all still set to 20. That seems to be the reason the attacks did not work for me. After entering the correct values for all ACs from -20 to 19 fixed the issue. The char is now properly hitting the Rat with rolling a 12 or higher.

celestian
June 1st, 2020, 14:50
You mean that you entered the correct values for all ACs in the Combat Matrix?

Setting the THAC0 or dropping a level of Fighter on the char did not change the values in the Combat Matrix; they are all still set to 20. That seems to be the reason the attacks did not work for me. After entering the correct values for all ACs from -20 to 19 fixed the issue. The char is now properly hitting the Rat with rolling a 12 or higher.

To be clear, THACO is not a thing for BECMI or 1E when using the extensions I wrote.

THACO and Level doesn't alter the matrix for PCs. They get their "matrix" set through class. You can manually adjust it in the Combat details section as I am presuming you found ;)

When creating a class you'll need to configure the matrix for each level of the class when it changes.

FlynnTheAvatar
June 1st, 2020, 16:18
When creating a class you'll need to configure the matrix for each level of the class when it changes.

Okay, thanks. This would be the next thing I was going to work on. I have all matrixes already entered, I need to check if I can reference them from the classes.

FlynnTheAvatar
June 3rd, 2020, 22:14
Sorry, it seems I need some help for setting the values, please. It is a bit complicated, because there is a field called "Attack Matrix", and a "Combat Matrix" (if you click on the gear symbol right of "Combat" in the Actions tab).

Please correct me if I am wrong, but the "Combat Matrix" is the important part. I need to enter the correct values there for the rolls to work. So, how can I do this? I tried to look at campaign/scripts/char_matrix_thaco.lua, but I do not get it how the stuff works. I do not see any parts where you write to the "Combat Matrix". It is just read if the coreVersion is 1e (or not 2e).

My guess is that I need to enter special handling to createTHACOMatrix if coreVersion is becmi. In that case I iterate of the classes, take the first one (as BECMI has no multiclassing), short the class name (Fighter -> F, Magic User -> MU, ...), concat the level and see if I can find the entry in aMatrix. And then I have to set the values in each field in "Combat Matrix".

Is this correct?

Thanks in advance for your help.

celestian
June 4th, 2020, 00:23
Sorry, it seems I need some help for setting the values, please. It is a bit complicated, because there is a field called "Attack Matrix", and a "Combat Matrix" (if you click on the gear symbol right of "Combat" in the Actions tab).

Please correct me if I am wrong, but the "Combat Matrix" is the important part. I need to enter the correct values there for the rolls to work. So, how can I do this? I tried to look at campaign/scripts/char_matrix_thaco.lua, but I do not get it how the stuff works. I do not see any parts where you write to the "Combat Matrix". It is just read if the coreVersion is 1e (or not 2e).

My guess is that I need to enter special handling to createTHACOMatrix if coreVersion is becmi. In that case I iterate of the classes, take the first one (as BECMI has no multiclassing), short the class name (Fighter -> F, Magic User -> MU, ...), concat the level and see if I can find the entry in aMatrix. And then I have to set the values in each field in "Combat Matrix".

Is this correct?

Thanks in advance for your help.

Not sure what you're trying to do but...you just set the values here for the levels it changes.

https://i.imgur.com/vrRJph0.png

FlynnTheAvatar
June 4th, 2020, 20:37
Not sure what you're trying to do but...you just set the values here for the levels it changes.

Ah, sorry. I will create a module with a bit of data (classes, monster, items) from D&D Basic and/or Rules Cyclopedia and check if everything works as expected. Thanks again for you help.

FlynnTheAvatar
June 10th, 2020, 21:46
Just a short update and question:
I started entering the data from the D&D Basic Set:
- Spells seem to be okay, although BECMI seems to have no casting time. Also spell blocks do not have a Save entry; the spell parser might need some tweeking, but it is useable. You just need to update the spell later.
- Monster seem to be okay so far
- Entered the Cleric, and it seems the automatic turn undead feature needs to be updated as BEMCI uses 2d6, and a lot longer turning table (up to level 36). And it has different Undead monsters. Additionally, it not only has a D+ (additional 1d6 HD destroyed) but also D# (additional 2d6 HD destroyed).

And here comes my question:
What changes are needed to make turning work? My guess is:
- update turn_name_index
- set nDefaultTurnUndeadMaxHD to 14
- set nDefaultTurnUndeadMaxLevel to 36
- set nDefaultTurnDice to 2d6?
- update aTurnUndead
- code changes?

Any pointers would be much appreciated. Thank you!

celestian
June 10th, 2020, 23:46
- Spells seem to be okay, although BECMI seems to have no casting time. Also spell blocks do not have a Save entry; the spell parser might need some tweeking, but it is useable. You just need to update the spell later.

- Entered the Cleric, and it seems the automatic turn undead feature needs to be updated as BEMCI uses 2d6, and a lot longer turning table (up to level 36). And it has different Undead monsters. Additionally, it not only has a D+ (additional 1d6 HD destroyed) but also D# (additional 2d6 HD destroyed).

And here comes my question:
What changes are needed to make turning work? My guess is:
- update turn_name_index
- set nDefaultTurnUndeadMaxHD to 14
- set nDefaultTurnUndeadMaxLevel to 36
- set nDefaultTurnDice to 2d6?
- update aTurnUndead
- code changes?

Any pointers would be much appreciated. Thank you!

Re: Turn Undead
You can try and use the built in system and make an extension to manipulate it or... use Tables. Tables will probably be easier in the long run. Speaking without looking at the code right now what you've listed sounds about right.

"Spells seem to be okay, although BECMI seems to have no casting time." Not sure what you mean here. The parser is intended for AD&D style entries. I don't mind tweaking it if you can tell me the parameters that are the same but are listed differently... assuming it's as simple as that. Look at the previous dump of values I am looking for and compare that to what the RC is using and tell me what will work for ya. Keep in mind, the limits of that system and it's intended source.

FlynnTheAvatar
June 11th, 2020, 14:19
Re: Turn Undead
You can try and use the built in system and make an extension to manipulate it or... use Tables. Tables will probably be easier in the long run. Speaking without looking at the code right now what you've listed sounds about right.

Thanks, but I seem to have trouble with the turning dice. I thought it might be just as simple as replacing the d20 turning dice with 2d6. But the code does not like it:


-- default turn dice size
nDefaultTurnDice = {"2d6"};
DataCommonADND.nDefaultTurnDice = nDefaultTurnDice;


Double clicking on the Turn icon does not work anymore. Dragging the turn icon will change to a small weapon token instead of a dice:
36764


"Spells seem to be okay, although BECMI seems to have no casting time." Not sure what you mean here. The parser is intended for AD&D style entries. I don't mind tweaking it if you can tell me the parameters that are the same but are listed differently... assuming it's as simple as that. Look at the previous dump of values I am looking for and compare that to what the RC is using and tell me what will work for ya. Keep in mind, the limits of that system and it's intended source.

This is an example to show you what I mean. This is the spell entry for lightning bolt:

Lightning Bolt
Range: 180'
Duration: Instantaneous
Effect: Bolt 60' long. 5' wide
This spell creates a bolt of lightning. starting up to 180' away from the caster and extending 60' in a straight line further away. All creatures within the area of effect take ld6 points of damage per level of the spellcaster. (Thus a 6th level elf would cast a lighcning bole doing 6d6 points of damage.)
Each victim may make a saving throw vs. spells; if successful. he takes only half damage.
If the lightning bole mikes a solid surface (such as a wall). it will bounce back toward the caster until the total length of the bolt is 60'.

And this is the resulting spell:
36765
36766

It would be great if the importer could just omit the Cast Time and Save from the Summary block and the "Save: Spell" default in Actions. That would speed up importing BECMI spells a lot.

Thanks again for your help.

celestian
June 11th, 2020, 15:20
Thanks, but I seem to have trouble with the turning dice. I thought it might be just as simple as replacing the d20 turning dice with 2d6. But the code does not like it:


-- default turn dice size
nDefaultTurnDice = {"2d6"};
DataCommonADND.nDefaultTurnDice = nDefaultTurnDice;


Double clicking on the Turn icon does not work anymore. Dragging the turn icon will change to a small weapon token instead of a dice:
36764



This is an example to show you what I mean. This is the spell entry for lightning bolt:

Lightning Bolt
Range: 180'
Duration: Instantaneous
Effect: Bolt 60' long. 5' wide
This spell creates a bolt of lightning. starting up to 180' away from the caster and extending 60' in a straight line further away. All creatures within the area of effect take ld6 points of damage per level of the spellcaster. (Thus a 6th level elf would cast a lighcning bole doing 6d6 points of damage.)
Each victim may make a saving throw vs. spells; if successful. he takes only half damage.
If the lightning bole mikes a solid surface (such as a wall). it will bounce back toward the caster until the total length of the bolt is 60'.


It would be great if the importer could just omit the Cast Time and Save from the Summary block and the "Save: Spell" default in Actions. That would speed up importing BECMI spells a lot.

Thanks again for your help.


Try {"d6","d6"}

The reason there is no cast time or save is because neither are mentioned in the spell. Without the data there I can't capture to add it and based on AD&D formatting I apply a default save of "Spell".

FlynnTheAvatar
June 11th, 2020, 18:55
Try {"d6","d6"}
Thank you, that did the trick. The new table works, but I may still need to change the automatic turning function a bit to support the BECMI quirks.

Also, could you please tell me how the targeting feature of turning undead works? Draging and dropping the Turn icon on an undeat monster does not seem to do anything.


The reason there is no cast time or save is because neither are mentioned in the spell. Without the data there I can't capture to add it and based on AD&D formatting I apply a default save of "Spell".
That is okay, it is not a big issue.

celestian
June 11th, 2020, 19:49
Thank you, that did the trick. The new table works, but I may still need to change the automatic turning function a bit to support the BECMI quirks.

Also, could you please tell me how the targeting feature of turning undead works? Draging and dropping the Turn icon on an undeat monster does not seem to do anything.


That is okay, it is not a big issue.

Turn undead requires targetS so drag/drop will not work. If you drag/drop on each npc it wont work how the rules say it should. You'll turn more than you should be able to/etc. You need to target the npcs you wish to turn and then roll the turn attempt.

FlynnTheAvatar
June 12th, 2020, 12:06
Okay, I created another pull request with my changes to automatic turn undead. Not sure if turn_name_index makes any sense, I entered the HD of all undeads in the Cleric's Turn Table. There are a lot of overlaps, not sure if they will cause any issues.

It would be great if you could maybe update onRoll function in that way that both 1e/2e and BECMI are both working with the same code. You need to add support for D# (that is not used in 1e/2e, so it would not hurt) and make the extra rolls configurable (instead of hard coding them for each ruleset).

Thanks,
Josef

celestian
June 12th, 2020, 15:50
Okay, I created another pull request with my changes to automatic turn undead. Not sure if turn_name_index makes any sense, I entered the HD of all undeads in the Cleric's Turn Table. There are a lot of overlaps, not sure if they will cause any issues.

It would be great if you could maybe update onRoll function in that way that both 1e/2e and BECMI are both working with the same code. You need to add support for D# (that is not used in 1e/2e, so it would not hurt) and make the extra rolls configurable (instead of hard coding them for each ruleset).

Thanks,
Josef

This will not work.

https://i.imgur.com/1nyRd9W.png

The entries need to all have the same array length.

aTurnUndead[ 1] = { 7, 9,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

14. If the values are all the same for every level, use that number for each.

In AD&D those are "ranks" for level ranges (14)

https://i.imgur.com/1Z69cUb.png

FlynnTheAvatar
June 12th, 2020, 16:35
I tested it, and using the style aMatrix[x] = aMatrix[y] works. But if you do not like this then I will update the code and duplicate the arrays.

celestian
June 12th, 2020, 20:05
I tested it, and using the style aMatrix[x] = aMatrix[y] works. But if you do not like this then I will update the code and duplicate the arrays.

Not sure how it's working properly.

DataCommonADND.nDefaultTurnUndeadMaxHD is 14;



for i=1, nMaxTurnHD,1 do
local rTurn = {};
local nTurnValue = DataCommonADND.aTurnUndead[nClericLevel][i];
...


That will flip through array[Cleric Level][Rank] where Rank is 1 to 14. The only valid entry would be 1 with those arrays you had.

FlynnTheAvatar
June 12th, 2020, 22:18
Not sure how it's working properly.

DataCommonADND.nDefaultTurnUndeadMaxHD is 14;



for i=1, nMaxTurnHD,1 do
local rTurn = {};
local nTurnValue = DataCommonADND.aTurnUndead[nClericLevel][i];
...


That will flip through array[Cleric Level][Rank] where Rank is 1 to 14. The only valid entry would be 1 with those arrays you had.

Okay, I am not sure if I got your issue.

BECMI has 14 entries in the turn table:
36814

I set nDefaultTurnUndeadMaxHD to 14 as the comment ("this is actually the number of turn_name_index entries") suggested.
I created 36 entries in aTurnUndead, one for each Clerice Level (as improvement goes up to level 33/36).
Each entry has an array with 14 entries, one for each type of undead.

I looked at your turn table, it has 14 lines (one for each turn improvement/cleric level) and 13 colums (one for each undead type).

So, what is the problem?

celestian
June 12th, 2020, 22:29
You are right, you're just referencing a array value and using it. What you've done isn't incorrect I just saw "different" and assumed it was a single value. I shouldn't scan as quickly as I did.

FlynnTheAvatar
June 12th, 2020, 23:03
You are right, you're just referencing a array value and using it. What you've done isn't incorrect I just saw "different" and assumed it was a single value. I shouldn't scan as quickly as I did.

No worries. It is a bit hard to understand what I was doing. Clever, maybe, but hard to read. I did another commit and replaced everything with proper arrays.

Asterionaisien
June 21st, 2020, 08:41
@Flynn:
Do you plan to release an extension/module with monsters, items, etc? Or maybe even a full ruleset?
Dark Dungeon (not the new X edition) is functionally identical to Rules cyclopedia while OSE (Old School Essentials) is the same as B/X, but they shouldn't have any problem attached to implement them on FG.
I admit I would buy a b/x or, even better, an RC ruleset in a heartbeat :)

Cheers

FlynnTheAvatar
June 21st, 2020, 15:55
@Flynn:
Do you plan to release an extension/module with monsters, items, etc? Or maybe even a full ruleset?
Dark Dungeon (not the new X edition) is functionally identical to Rules cyclopedia while OSE (Old School Essentials) is the same as B/X, but they shouldn't have any problem attached to implement them on FG.
I admit I would buy a b/x or, even better, an RC ruleset in a heartbeat :)

I am sorry to disappoint you. But no, I do not have a plan to release anything. I just stumbled on this thread because I tried to run the solo adventure of the Basic Set (red) with the help of Fantasy Grounds.

Currently I am entering all classes, items and spells from the Basic Set to check if the extension is working correctly. If I am done, I might take a look at B/X and/or 0e and create a basic extension for that. I have no plans to do something more than create the extensions and creating some modules for private use.