PDA

View Full Version : Cohorts and Companions



MostTornBrain
February 19th, 2022, 20:11
NOTE: this extension supports D&D 2E, 3.5, 4E, Pathfinder 1, Pathfinder 2, and Old School Essentials (OSE).

This is an extension that allows NPCs to be assigned to a PC character sheet, granting that player control of the NPC in the combat tracker and on a map. This eliminates the need for the GM to turn on "party vision" in the settings, preserving the individual player map discovery and line-of-sight. NPC's can also be assigned ownership of NPCs via a new tab on the NPC sheet (it's NPCs all the way down!) and this chain of ownership will allow a player to control the NPCs that their NPC owns.

The extension is currently on github: https://github.com/MostTornBrain/CohortsAndCompanions
The extension is also available for free on the Forge: https://forge.fantasygrounds.com/shop/items/518/view
NOTE: the version on github is sometimes one revision ahead of the Forge version.

Current features:

Support for 2E, 3.5/PFRPG, PFRPG2, 4E, and OSE rulesets
Drag and Drop NPC to the "Cohorts and Companions" section on the PC's character sheet on "Notes" tab to assign ownership of an NPC
NPC sheet has an extra tab called "Cohorts" to allow NPCs to own other NPCs and the controlling PC inherits the chain of ownership.
Any NPC assigned to a PC sheet will be controllable by the player that owns the PC
NPCs assigned to be PC become unique instances
When dragged onto the combat tracker, the NPC will be cross-linked back to the unique NPC sheet and key attributes will be sync'd between the two (similar to how a PC functions)
Player-controlled NPC tokens will display reach on hover, just like a PC token
Support for ringing bell for appropriate player notification on NPC turn in the combat tracker


I'm fairly new FG (just started tinkering with it in December) so I likely overlooked some things or didn't do things in the most ideal manner. Feel free to give any feedback on what could have been done better or what doesn't work right.

This extension is based on a subset of functionality of the D&D 5E extension called Friend Zone, by MeAndUnique. I did get the ok from MeAndUnique to make a spin-off extension. The main differences from the 5E extension are:

Support for rulesets other than 5E
instead of adding a new tab to the PC character sheet for assigning cohorts and companions, this extension adds a subsection to the Notes tab.
all the functionality of having NPCs inherit bonuses to certain skills and/or abilities from the PC was removed as trying to implement unique variations on this for several rulesets is beyond the scope of the intent of this extension.

I do not plan to add 5E support to this extension as the Friend Zone extension provides significantly more features specific to the 5E ruleset. If you are looking for 5E support, Friend Zone is the extension to use.


Thanks,
Brian

Kelrugem
February 20th, 2022, 11:32
This is an extension that allows NPCs to be assigned to a PC character sheet, granting that player control of the NPC in the combat tracker and on a map. This eliminates the need for the GM to turn on "party vision" in the settings, preserving the individual player map discovery and line-of-sight. NPC's can also be assigned ownership of NPCs via a new tab on the NPC sheet (it's NPCs all the way down!) and this chain of ownership will allow a player to control the NPCs that their NPC owns.

This is based on a subset of functionality of the D&D 5E extension called Friend Zone, by MeAndUnique. I did get the ok from MeAndUnique to make a spin-off extension. The main differences from the 5E extension are:

instead of adding a new tab to the PC character sheet for assigning cohorts and companions, this extension adds a subsection to the Notes tab.
all the functionality of having NPCs inherit bonuses to certain skills and/or abilities from the PC was removed as this did not seem to have a direct equivalent in the Pathfinder rules. (Yes, animal companions do get some adjustments based on the PC's level in Pathfinder, but this extension does not currently handle that.)


The extension is currently on github: https://github.com/MostTornBrain/CohortsAndCompanions

I'm fairly new FG (just started tinkering with it in December) so I likely overlooked some things or didn't do things in the most ideal manner. Feel free to give any feedback on what could have been done better or what doesn't work right.

Thanks,
Brian

Nice work :)

kevininrussia
February 20th, 2022, 21:09
Thanks for this! I have messed with your extension to try and get 4E compatibility. Changed to ActorManager4E. Adding the NPC to character sheet and moving NPC around on map are working. So far three errors I will try to pin down.

on campaign load>
[ERROR] windowcontrol: Database type mismatch on path (hp) in control (hp) in class (npc_combat_creature)
[ERROR] Script execution error: [string "campaign/scripts/npc_main.lua"]:32: attempt to index global 'hp' (a nil value)

on Damage Roll>
[ERROR] Script execution error: [string "ct/scripts/ct_entry.lua"]:27: attempt to index global 'hp' (a nil value)

MostTornBrain
February 20th, 2022, 23:23
Thanks for this! I have messed with your extension to try and get 4E compatibility. Changed to ActorManager4E. Adding the NPC to character sheet and moving NPC around on map are working. So far three errors I will try to pin down.

on campaign load>
[ERROR] windowcontrol: Database type mismatch on path (hp) in control (hp) in class (npc_combat_creature)
[ERROR] Script execution error: [string "campaign/scripts/npc_main.lua"]:32: attempt to index global 'hp' (a nil value)

on Damage Roll>
[ERROR] Script execution error: [string "ct/scripts/ct_entry.lua"]:27: attempt to index global 'hp' (a nil value)

Ah, I went through something similar porting the original extension from 5E to Pathfinder. If you are familiar with extracting/viewing the lua code for your ruleset (in this case 4e) there should be an equivalent script that does the linking of some of the NPC values on the combat tracker to the NPC character sheet. Each ruleset seems to use slightly different names or formats for some of the items. Actually, now that I think about it, you might have better luck with the original 5E extension - I'm not familiar with 4E and 5E and how much they've diverged.

If you aren't familiar with what I described above, I'll take a look at it. Likely either later today or tomorrow night.

Cheers,
Brian

MostTornBrain
February 20th, 2022, 23:28
Ah, I went through something similar porting the original extension from 5E to Pathfinder. If you are familiar with extracting/viewing the lua code for your ruleset (in this case 4e) there should be an equivalent script that does the linking of some of the NPC values on the combat tracker to the NPC character sheet. Each ruleset seems to use slightly different names or formats for some of the items. Actually, now that I think about it, you might have better luck with the original 5E extension - I'm not familiar with 4E and 5E and how much they've diverged.

If you aren't familiar with what I described above, I'll take a look at it. Likely either later today or tomorrow night.

Cheers,
Brian

Sorry, as I stepped away from the computer, I realized I may have misremembered. The original rulesets don't link the NPC data between the CT and the NPC sheet - that's new functionality from the extension. But, looking at the original ruleset code for how it pulls in both PC and NPC values into the CT and links the PC data can be used as a helpful reference for finding out the proper names of the variables.

Cheers,
Brian

kevininrussia
February 21st, 2022, 00:18
Sorry, as I stepped away from the computer, I realized I may have misremembered. The original rulesets don't link the NPC data between the CT and the NPC sheet - that's new functionality from the extension. But, looking at the original ruleset code for how it pulls in both PC and NPC values into the CT and links the PC data can be used as a helpful reference for finding out the proper names of the variables.

Cheers,
Brian

Thanks for the info. I was able to stop the previous errors. I am still getting an error on damage rolls by the PC from their controlled NPC.

[ERROR] Handler error: [string "scripts/manager_action_damage.lua"]:1393: attempt to concatenate local 'nDamage' (a nil value)


Attempting to resolve that now :-)

MostTornBrain
February 21st, 2022, 03:05
Thanks for the info. I was able to stop the previous errors. I am still getting an error on damage rolls by the PC from their controlled NPC.

[ERROR] Handler error: [string "scripts/manager_action_damage.lua"]:1393: attempt to concatenate local 'nDamage' (a nil value)


Attempting to resolve that now :-)

I've taken a look to try to duplicate the error on damage rolls, but the 4E ruleset for NPCs is something with which I am unfamiliar. I don't own any 4E content, so when creating an empty 4E campaign I don't have any example NPCs to test. I'm somewhat embarrassed to say, I'm stumped at how to actually add attack info to a 4E NPC sheet creating an NPC from scratch trying to test this. The NPC format for 4E seems very different from a Pathfinder NPC statblock.

If you are still stuck on this, do you have a simple NPC you could share? Just the XML snippet of the NPC definition should be enough to get me started, as I should be able to then insert the XML into my campaign.

Cheers,
Brian

MostTornBrain
February 22nd, 2022, 02:50
Thanks for the info. I was able to stop the previous errors. I am still getting an error on damage rolls by the PC from their controlled NPC.

[ERROR] Handler error: [string "scripts/manager_action_damage.lua"]:1393: attempt to concatenate local 'nDamage' (a nil value)


Attempting to resolve that now :-)

I sent you an email with what is hopefully a working 4E version of the extension. Check your spam box in case it was flagged given it had a zip file attachment. :-)

Cheers,
Brian

kevininrussia
February 22nd, 2022, 03:16
I sent you an email with what is hopefully a working 4E version of the extension. Check your spam box in case it was flagged given it had a zip file attachment. :-)

Cheers,
Brian

The version you send seems to be working great! I will do more testing in our next game as a few of the players have pets.

Thank you!

MostTornBrain
February 22nd, 2022, 03:41
The version you send seems to be working great! I will do more testing in our next game as a few of the players have pets.

Thank you!

Since the differences between supporting Pathfinder 1e and D&D 4E are so minor for this extension, I'll see if I can make a single extension that supports both rulesets. Eventually, I'll put it on the Forge for easier updates if/when more changes need to be made in the future. Of course, I'll also keep the github version in sync.

Cheers,
Brian

kevininrussia
February 22nd, 2022, 03:55
Since the differences between supporting Pathfinder 1e and D&D 4E are so minor for this extension, I'll see if I can make a single extension that supports both rulesets. Eventually, I'll put it on the Forge for easier updates if/when more changes need to be made in the future. Of course, I'll also keep the github version in sync.

Cheers,
Brian

Sounds good! I will link the extension to my 4E extensions page when you get the single extension posted or on Forge. :-)

MostTornBrain
February 22nd, 2022, 04:06
Changes to integrate support for the 4E ruleset are now in github: https://github.com/MostTornBrain/CohortsAndCompanions

The extension will now detect if you are running 3.5/PFRPG or 4E and do the appropriate thing.

I'll try to figure out how to put it on the Forge in the next day or two. I have the creator account activated - just haven't used it yet.

Cheers,
Brian

kevininrussia
February 22nd, 2022, 05:17
I noticed using the Winter theme the text Cohorts and Companions in the Notes panel is a light gray making it hard to read. Is it possible to make it black text?

https://i.imgur.com/VjHIS1e.jpg

MostTornBrain
February 22nd, 2022, 17:35
I noticed using the Winter theme the text Cohorts and Companions in the Notes panel is a light gray making it hard to read. Is it possible to make it black text?

https://i.imgur.com/VjHIS1e.jpg

Ah, thanks for the heads up. Looks like I have some more learning to do. I have no idea how themes get applied, so I need to investigate what I did wrong. I can easily reproduce the issue - especially with the "dark" theme. Hopefully I'll figure it out later tonight after my day job. :-)

Cheers,
Brian

bmos
February 22nd, 2022, 17:57
Ah, thanks for the heads up. Looks like I have some more learning to do. I have no idea how themes get applied, so I need to investigate what I did wrong. I can easily reproduce the issue - especially with the "dark" theme. Hopefully I'll figure it out later tonight after my day job. :-)

Cheers,
BrianFont definitions include a default color, but can overrode by specifying <color> xml tags within the control.
Ideally it should use a font defined in CoreRPG since more themes will have changed the color.
Overriding with the <color> tag is a last resort as it can hurt theme compatibility.

MostTornBrain
February 22nd, 2022, 18:34
I figured it out on my lunch break. I had the "label_frametop" defined before the "frame_char" element. Swapping the order allows it to inherit theme coloring properly. The update is on github.

Cheers,
Brian

kevininrussia
February 22nd, 2022, 21:13
could you add to extension.xml

<ruleset><name>4E</name></ruleset>

Looking further in the code I think you might have rolled back when fixing the font issue as 4E compatibility is not in the extension.

Thanks!

EDIT: oops, I downloaded from the installation link on GitHub for the .ext which is old version.

MostTornBrain
February 22nd, 2022, 21:35
EDIT: oops, I downloaded from the installation link on GitHub for the .ext which is old version.

Thanks for the reminder - I had forgotten to make a new rev of the .ext on github. I'll do that shortly.

EDIT: new .ext rev is 1.0.1-beta on gihub.

MostTornBrain
February 23rd, 2022, 17:25
This extension is now available on the Forge, assuming I enabled it correctly. :-)

https://forge.fantasygrounds.com/shop/items/518/view

Cheers,
Brian

kevininrussia
February 25th, 2022, 05:08
I noticed the Cohorts tab is being added to NPC/Pet panel. Is this intended?

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

MostTornBrain
February 25th, 2022, 13:13
I noticed the Cohorts tab is being added to NPC/Pet panel. Is this intended?


Yes, that is intentional - and is behavior that came fom the original Friend Zone extension. This allows NPC to have companions or "pets" that they own, and the top-level controlling PC will be able to control the companions of companions, all the way down the series of ownerships.

I need to adjust the default spacing of the "+" and "edit" buttons - they overlay the text of the title on the NPC sheet when it is at the default width.

MostTornBrain
March 2nd, 2022, 17:46
I updated this extension to incorporate the latest changes made to Friend Zone for 5E. The sole change is a new feature to support bell notification for the player when a controlled NPC's turn comes up in the combat tracker.

Cohorts and Companions is now v1.0.4 on github. The same version is also updated on the Forge.

Cheers,
Brian

MostTornBrain
March 11th, 2022, 04:16
Per a request, I've added support for D&D 2E. It was a fun process. The combat tracker for 2E is a lot different internally from 3.5/PFRPG as is the character sheet. I want to do a bit more testing before putting it on the Forge, but the change (just the source code, not a packaged release) is on Github now.

I plan to wrap in support for the OSE ruleset as well (as someone asked for that as well). It looks like it should all mostly "just work" with a few minor adjustments, so hopefully I'll have a chance to add it in the next few days.

If anyone else has any other ruleset requests for this extension - send me a message and I'll see if I can get it added.

Cheers,
Brian

MostTornBrain
March 12th, 2022, 16:31
Latest version on github (https://github.com/MostTornBrain/CohortsAndCompanions/releases/tag/v1.0.6b) now supports OSE.

Also, I added NPC token reach display on hover for player-controlled NPCs (same as how PC token reach display works). If you notice any oddities with it, please let me know.

Thanks,
Brian

MostTornBrain
April 5th, 2022, 13:33
Added support for Pathfinder 2 (PFRPG2) ruleset. Current version is now v1.0.7.

anstett
April 15th, 2022, 02:08
https://cdn.discordapp.com/attachments/740730682946486292/964305364914958356/Screenshot_2022-04-14_192423.jpg
Getting this error when we try to use. 2E with all the updates through last night.

MostTornBrain
April 15th, 2022, 02:46
Getting this error when we try to use. 2E with all the updates through last night.

Sorry it’s throwing an error. I’ll investigate. Had the extension been working previously and stopped with this update, or was this your first attempt at using it?
[EDIT: I can reproduce the error. Hopefully should figure it out tonight…]

Thanks,
Brian

anstett
April 15th, 2022, 13:46
This is our first attempt at using.

Took a standard wolf from the NPCs, dragged it over and it looked good in set up.

Player logged in to try and gets that error.

Double checked for updates to be certain.

Have not checked other extensions for potential interference yet.

I do leave my game up 24/7 for the players to check things. Can do more testing for you as needed this weekend.

Thanks

BOB

MostTornBrain
April 16th, 2022, 02:15
This is our first attempt at using.

Took a standard wolf from the NPCs, dragged it over and it looked good in set up.

Player logged in to try and gets that error.

Double checked for updates to be certain.

Have not checked other extensions for potential interference yet.

I do leave my game up 24/7 for the players to check things. Can do more testing for you as needed this weekend.


Thanks for the detailed explanation. I believe I have resolved the issue - it was something unique to the 2E ruleset. The fixed version will be labeled v1.0.8. The update is on github now and is pending review on the Forge - likely will become available on Monday.

https://github.com/MostTornBrain/CohortsAndCompanions/releases/download/v1.0.8/CohortsAndCompanions.ext

Cheers,
Brian

anstett
April 16th, 2022, 17:51
Thanks!

Weissrolf
April 18th, 2022, 08:45
Using PF2 I cannot switch back to the Main tab of an NPC once I switch away from it, unless I close and reopen the whole NPC window. Tried with an empty campaign and no other extensions installed. I also don't see any extra tab, which should be there?!

MostTornBrain
April 18th, 2022, 22:12
Using PF2 I cannot switch back to the Main tab of an NPC once I switch away from it, unless I close and reopen the whole NPC window. Tried with an empty campaign and no other extensions installed. I also don't see any extra tab, which should be there?!

Hmmm.... looks like I didn't quite get the PF2 NPC sheet working properly. I'll take a look at it tonight.

MostTornBrain
April 19th, 2022, 02:37
Using PF2 I cannot switch back to the Main tab of an NPC once I switch away from it, unless I close and reopen the whole NPC window. Tried with an empty campaign and no other extensions installed. I also don't see any extra tab, which should be there?!

Thanks for providing the feedback.

This is fixed in v1.0.9. Update can be found now on github: https://github.com/MostTornBrain/CohortsAndCompanions/releases/download/v1.0.9/CohortsAndCompanions.ext

The Forge version contains this update as well.

Cheers,
Brian

bayne7400
May 5th, 2022, 14:38
Ok this is awesome. I thank both you and MeandUnique. Works perfectly with OSE.

MostTornBrain
May 5th, 2022, 23:54
Thanks to an update from bayne7400, this extension should now support the "Swords and Wizardry" ruleset. The v1.2 tagged version on github includes the changes.

https://github.com/MostTornBrain/CohortsAndCompanions/releases/tag/v1.2

I'll post an update once the Forge has the proper change.

Cheers,
Brian

rmilmine
June 18th, 2022, 16:54
Would it be possible to get this working with MoreCore in some way?

Morenu
August 21st, 2022, 18:26
Cohorts are coming in as hostile NPCs and once switched to friendly, the DM cant give us control. we hadnt updated since the June 12 update and it was working until we updated a week ago. Not sure how to demo it but if you can't recreate it just let me know what you need. working on loading it up as the only extension to test

MostTornBrain
August 21st, 2022, 19:37
Cohorts are coming in as hostile NPCs and once switched to friendly, the DM cant give us control. we hadnt updated since the June 12 update and it was working until we updated a week ago. Not sure how to demo it but if you can't recreate it just let me know what you need. working on loading it up as the only extension to test

Thanks for the heads up on this. It looks like a function this extension uses got deprecated in the Aug. 16th update. I'll see if I can fix it today. I haven't use FG since early May, so I need to refresh my memory on how everything works. Unfortunately my game group never migrated to FG like I had hoped, so I haven't been using FG in months, but I'll do my best to fix this.

Cheers,
Brian

MostTornBrain
August 21st, 2022, 20:42
I belive I have fixed the issue. Latest version (v1.3) is on Github. I also have an update for the Forge pending.

https://github.com/MostTornBrain/CohortsAndCompanions/releases/tag/v1.3

Please let me know if you continue to see issues with v1.3.

Thanks,
Brian

Morenu
August 21st, 2022, 21:45
Wow thanks! Sorry they didn’t migrate over. Hope your still playing. Do you want to see if someone would take over the ext?

DunMas
September 5th, 2022, 00:37
Reporting that even while on version 1.3 of the extension, I am still having the same issue Morenu reported two weeks ago.

MostTornBrain
September 5th, 2022, 01:25
Reporting that even while on version 1.3 of the extension, I am still having the same issue Morenu reported two weeks ago.

What rules set are you using?

MostTornBrain
September 5th, 2022, 02:06
I think I have fixed the issue someone reported with PF2E. There was still something broken with PF2E (and perhaps other rulesets that haven't migrated to the newer onNPCPostAdd() stuff).

Now available on Github: https://github.com/MostTornBrain/CohortsAndCompanions/releases/tag/v1.4

If you continue to see issues please let me know. If I don't hear back, I'll assume this addresses the issue reported above and will update the Forge as well shortly.

As I mentioned in a prior post, I haven't been using FGU in several months. Keeping this extension compatible as newer changes are made to the core rules code will become harder and harder for me to maintain as I slowly forget all my extension programming knowledge. If someone else wants to take this over, feel free. I'll do my best to keep up with the changes, but at some point I, if I can't get my game group to move to FGU, I will become more and more out of touch with things here.

Cheers,
Brian

HeckoX
September 6th, 2022, 04:57
Any chance of getting SFRPG added to this?

DunMas
September 9th, 2022, 02:42
The extension seems to be working without issue for PF2e as of my group's session yesterday. I apologize for being slow in responding, I check the fantasy grounds forums infrequently.

Thanks for taking the time to keep the extension up to date as you are now though.

amanwing
August 13th, 2023, 15:20
The extension seems to be working without issue for PF2e as of my group's session yesterday. I apologize for being slow in responding, I check the fantasy grounds forums infrequently.

Thanks for taking the time to keep the extension up to date as you are now though.

Will I be able to use this extension for Shadows of the Demon Lord ruleset somehow?

ScribblingRambler
September 17th, 2023, 21:20
I know that MTB has probably moved away from this now, but it seems to be having issues again in Pf2.

s'frame_ctsub = DEPRECATED - date - Use new CT format and templates
Script Execution error; [string "CohotsAndCompanions:..scripts/ct_entry.lua"];84: attempt to index global 'init' (a nil value)

webdove
September 29th, 2023, 18:40
Hi,
Using version 1.4 and all other things up to date I am getting the following error.
[9/29/2023 1:35:56 PM] [ERROR] Script execution error: [string "CohortsAndCompanions:..scripts/ct_entry.lua"]:84: attempt to index global 'init' (a nil value)

As far as I can tell it is working. The PC has control after the NPC is dragged from it to the CT. The NPC is friendly. The PC can make attacks, apply effects and end the NPC's turn.

hawkeyepearce1066
December 16th, 2023, 15:04
Since the most recent update to FGU (13/12/23?) the Cohorts and Companions extension entry box appears at the top of NPC "character sheets", obscuring the top few lines of creature information. Also the green and red buttons for adding/editing entries are sitting on top of the cohorts and companions header text in the entry box itself, probably due to some alignment changes for NPC character sheets, just letting y'all know.

spencerg
December 19th, 2023, 03:51
Confirm the above (2e - Classic D&D ruleset) -

hawkeyepearce1066
December 19th, 2023, 04:18
Apologies, should have stated the ruleset, you're right, it's 2e ad&d.

brandonjames85
January 5th, 2024, 22:52
Just noticed with the current FGU update that the Cohorts & Companions box now appears over NPC stats and things.

TheJayde
January 10th, 2024, 05:37
Im not seeing it in mine. Is it still on the Note page for character or something wholly different?

TheJayde
January 12th, 2024, 14:21
Im not seeing it in mine. Is it still on the Note page for character or something wholly different?

So it looks like the issue I'm having is that I'm using a legacy campaign for this and this is why its not showing as present. It shows up in other Pathfinder campaigns but the legacy campaign is an issue.

JohnD
January 12th, 2024, 14:34
Just noticed with the current FGU update that the Cohorts & Companions box now appears over NPC stats and things.

Yes, same experience here. It super imposes over each tab at the top - player sheets and npc sheets. If you toggle back and forth, it removes it while you have the entity open but when you close the sheet and open it again, the box is back.

I sent the person who wrote the extension a PM about this about 3 weeks ago now, have not received a response. Unfortunate as this was a very handy extension.

webdove
January 12th, 2024, 15:31
Hi,
As GM I add a "wolf" as a cohort on the PC notes tab.
I drag the wolf from the PC notes/cohorts section to the combat tracker
I get the error
[1/11/2024 11:58:40 PM] [ERROR] Script execution error: [string "CohortsAndCompanions:..scripts/ct_entry.lua"]:84: attempt to index global 'init' (a nil value)
If I change the title of the wolf in the PC notes section it properly changes in the combat tracker.
I drag the left icon of the wolf onto the map.
as the client I open the PC and can see the wolf cohort.
As the client/PC I can move the wolf. (the option for party shared movement and vision is off)

Is this normal?
Thx
Web

DonE66
March 1st, 2024, 14:24
For those interested, I have updated the extension so it works in the PFRPG2-Legacy ruleset.

DonE66
March 1st, 2024, 15:58
Hi,
As GM I add a "wolf" as a cohort on the PC notes tab.
I drag the wolf from the PC notes/cohorts section to the combat tracker
I get the error
[1/11/2024 11:58:40 PM] [ERROR] Script execution error: [string "CohortsAndCompanions:..scripts/ct_entry.lua"]:84: attempt to index global 'init' (a nil value)
If I change the title of the wolf in the PC notes section it properly changes in the combat tracker.
I drag the left icon of the wolf onto the map.
as the client I open the PC and can see the wolf cohort.
As the client/PC I can move the wolf. (the option for party shared movement and vision is off)

Is this normal?
Thx
Web

I usually do it the other way around in that the PC summons a creature, I add it to the combat tracker and then to the PC cohorts section. I do not get the error when I do it in this order. However, I get the same error if I do it as you indicated. When I get a chance, I'll look at the script and see why its giving a null value.

DonE66
March 6th, 2024, 17:58
I found the issue with the script. If you drag the cohort to the combat tracker, the script is trying to get the initiative value to set it. However, since the initiative is set after the drag, it is not valued yet so you get the error. I have fixed that by checking the value first before assigning it. That is why the other direction worked without error as the creature already had and initiative value and hence was able to set it without error. I'm going to check to see if this is the case for anything else and then post here an updated version that fixes that and any other problems.

Here is the updated extension:

DonE66
March 8th, 2024, 19:05
Looks like the update broke the NPC sheet. While I have not been able to determine what is causing the positioning error for anchoring and definition, I was able to make it functional so the NPC stats window is working. Here is the fix so you can at least use it in PF2.

ScribblingRambler
March 9th, 2024, 04:12
Yes, I had to do a "/console skip" tonight to be able to run a Pf1 game due to the script errors. At least until I was able to troubleshoot extensions after the session.
Great appreciation if some kind programming soul were able to also do a Pf1 fix.

DonE66
March 9th, 2024, 04:40
Yes, I had to do a "/console skip" tonight to be able to run a Pf1 game due to the script errors. At least until I was able to troubleshoot extensions after the session.
Great appreciation if some kind programming soul were able to also do a Pf1 fix.

I'm looking into it and will see if I can resolve the NPC tab issue. It is playable if you are only assigning a cohort to a PC but no NPC to NPC cohorts.

DonE66
March 9th, 2024, 19:15
Here is a version of the extension that gets rid of console errors and works for PC having NPC cohorts but removes cohorts having cohorts. I'm working on trying to figure out the NPC window issue but not sure how long that will take.

ScribblingRambler
March 9th, 2024, 19:59
Thanks so much!

DonE66
March 9th, 2024, 20:50
Ok, figured out what to change to work with 4.5. I have done light testing on D&D 2E,3.5 and 4 and Pathfinder 1 and 2. All works as it did previously. Let me know if you find something and I'll do my best to see what can be done.

epithet
March 11th, 2024, 21:27
Here are the errors I get with Old School Essentials. I haven't seen the ruleset mentioned with the errors, and I don't know if they're different from the errors with other rulesets, but just in case this is helpful, here it is.

Edit: Your updated version seems to work as described for OSE, eliminating the error spam. Thanks for that.

DonE66
March 11th, 2024, 22:49
It looks like the attachment was missing on my fix post. I have posted that so use that version which also includes an update to the version in the announcement on the console. It is now 1.5.

epithet
March 12th, 2024, 00:10
It seems to work, thank you.

Laergulon
March 14th, 2024, 20:42
Hello. I'm running a weekly 3.5 campaign and we've been using C&C since we started. It is one of the best, thanks for creating it. I have an Ultimate license.

I and my players all are getting an error now. The first line is [ERROR] window: Control (cohorts) anchoring to an undefined control (contentframe) in windowclass (npc)

All of my guys but one has at least one and two have a whole stable. Since the most recent update I have been getting an error every time a new NPC is opened or an NPC tab is changed, as you see in the screen shot here. Thought you should know. I have done some testing, too. I can turn the extension on and off in the game, have players take actions and all, and turn it back on, without losing the information for their cohorts. The error relates to anchoring in the NPC window, seems to be not a serious bug but I'm hardly a pro.

60171

DonE66
March 14th, 2024, 20:51
Hello. I'm running a weekly 3.5 campaign and we've been using C&C since we started. It is one of the best, thanks for creating it. I have an Ultimate license.

I and my players all are getting an error now. The first line is [ERROR] window: Control (cohorts) anchoring to an undefined control (contentframe) in windowclass (npc)

All of my guys but one has at least one and two have a whole stable. Since the most recent update I have been getting an error every time a new NPC is opened or an NPC tab is changed, as you see in the screen shot here. Thought you should know. I have done some testing, too. I can turn the extension on and off in the game, have players take actions and all, and turn it back on, without losing the information for their cohorts. The error relates to anchoring in the NPC window, seems to be not a serious bug but I'm hardly a pro.

60171

Please use the version of the extension in my post on March 9th. It has the fix for your issues.

Don

Laergulon
March 14th, 2024, 20:53
Ah, did not see it. Thank you for replying so quickly.

DND Nerd 1995
March 18th, 2024, 03:18
Will this be Updated on the Forge Soon?

DND Nerd 1995
March 18th, 2024, 03:33
Also Doesn't Show up for me in the load screen for campaigns

Trenloe
March 18th, 2024, 03:34
Also Doesn't Show up for me in the load screen for campaigns
Have you restarted FG after installing the extension?

What ruleset are you using?

DND Nerd 1995
March 18th, 2024, 03:35
5e and yes I have Updated FGU after getting this EXT

Trenloe
March 18th, 2024, 03:35
5e and yes I have Updated FGU after getting this EXT
Referring to the supported rulesets in post #1 - 5E isn't supported.

DND Nerd 1995
March 18th, 2024, 03:38
Damn so am stuck with the bugged 1 for now

Trenloe
March 18th, 2024, 03:52
Damn so am stuck with the bugged 1 for now
From post #1: "This extension is based on a subset of functionality of the D&D 5E extension called Friend Zone, by MeAndUnique." I don't know the status of that extension, but I recommend you look into that as Cohorts and Companions specifically doesn't support the D&D 5E ruleset, as the agreement with using the Friend Zone code was that it wouldn't do so.

Whitsend
March 20th, 2024, 00:27
Thanks greatly for the patch

However, I am now getting a different error pop up. This on when I first open an NPC Window....

[ERROR] Graphic: Unable to load file (campaign/) (modules/3.5-monsters.mod)

now I find that odd as I don't use 3.5 rules.....only Pathfinder 1.0 and CoreRPG (For shadowrun)
Anyhow, here's hoping DonE66 will track this down!
Aha---3.5 monsters are in the NPC folder by default and I opened one that had no pictures set!
Checking- and others have the pictures set, and some don't.
All the Pathfinder ones look ok.

That said I'll play with the extension to see if I can generate other bug reports.
I'm also slowly parsing the code to try and see what DonE66 did with it and if I have any usefull inputs.

Thanks
Whitsend

DonE66
March 20th, 2024, 01:57
Thanks greatly for the patch

However, I am now getting a different error pop up. This on when I first open an NPC Window....

[ERROR] Graphic: Unable to load file (campaign/) (modules/3.5-monsters.mod)

now I find that odd as I don't use 3.5 rules.....only Pathfinder 1.0 and CoreRPG (For shadowrun)
Anyhow, here's hoping DonE66 will track this down!
Aha---3.5 monsters are in the NPC folder by default and I opened one that had no pictures set!
Checking- and others have the pictures set, and some don't.
All the Pathfinder ones look ok.

That said I'll play with the extension to see if I can generate other bug reports.
I'm also slowly parsing the code to try and see what DonE66 did with it and if I have any usefull inputs.

Thanks
Whitsend

Yes, PF1 uses 3.5 monster stat blocks but did not open any of those. I have an old campaign when I was playing PF1 and I'll see if its anything around the extension is causing that error.

DonE66
March 20th, 2024, 02:36
This appears to be an issue with the 3.5E-Monsters module. Some of the monsters in that module (as you found) do not have images so it is causing an issue the first time that creature is loaded. This is without any other modules loaded. This error also appears if loading a 3.5 campaign once again without any other modules loaded but base. You don't really need to load 3.5 modules as either PF core and bestiary or PFRPG Essentials (its 4 modules) have the content need to run PF1.

Whitsend
March 20th, 2024, 12:33
This appears to be an issue with the 3.5E-Monsters module. Some of the monsters in that module (as you found) do not have images so it is causing an issue the first time that creature is loaded. This is without any other modules loaded. This error also appears if loading a 3.5 campaign once again without any other modules loaded but base. You don't really need to load 3.5 modules as either PF core and bestiary or PFRPG Essentials (its 4 modules) have the content need to run PF1.

I agree....I've made sure the 3.5 modules are uninstalled now and the issue is now moot.
I'd make the assumption they are in the process of updating the pictures???

Thanks for the good work DonE66
Whitsend

bmos
March 21st, 2024, 00:10
I just checked in with Brian (MostTornBrain) and since his group never ended up playing in FG this extension is no longer supported. If someone wants to take it over (DonE66?), reach out to him and the two of you can contact SmiteWorks to get the Forge listing transferred.

DonE66
March 21st, 2024, 13:16
I'll send him another email and would be happy to support the best I can.

DonE66
March 27th, 2024, 21:29
I have updated Forge with the fix extension. If you placed the extension file manually to the Fantasy Grounds Folder, you should remove it and let the forge manage the extension file so that any updates are automatically applied. Also note the first post information about github is no longer the source of truth for the code. When I get a chance, I will create and new GitHub project and put the code there and post its location.

spencerg
March 27th, 2024, 21:54
I was going to suggest you take control of the forge item to save yourself massive headache. I went through the same thing. Glad you got to use the force deployment vs manually uploading.

Good work.

Whitsend
March 27th, 2024, 22:02
I second that, Good Work
Thanks DonE66

Whitsend.

bmos
March 27th, 2024, 22:24
I have updated Forge with the fix extension. If you placed the extension file manually to the Fantasy Grounds Folder, you should remove it and let the forge manage the extension file so that any updates are automatically applied. Also note the first post information about github is no longer the source of truth for the code. When I get a chance, I will create and new GitHub project and put the code there and post its location.MTB could add you as a collaborator and then transfer ownership (https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository). That would set up an automatic forwarding rule pointing to the repo in your account.

DonE66
March 28th, 2024, 13:28
Thanks all. I'll see if he will do that as it would be nice to have the history.

DonE66
March 28th, 2024, 18:03
I now have updated GitHub with latest code. It is now located at https://github.com/DonE-66/CohortsAndCompanions.

snupy
April 8th, 2024, 21:36
I've never managed to get this extension to work. I can add an NPC to a PC sheet in the cohort part of the notes tab, that works and the PC can roll stuff from the NPC sheet. However this only works if the NPC faction is set to friendly and in any case the PC cannot move the NPC token unless I also turn on the shared party vision option - but at that point I may as well do without the extension. I am using the PFRPG ruleset, and yes I have other extensions so it could be a conflict. But before I go on extension hunting, could anyone tell me what are the precise steps to give a PC control of an NPC, and in what order? Thanks!

Whitsend
April 8th, 2024, 22:33
I've never managed to get this extension to work. I can add an NPC to a PC sheet in the cohort part of the notes tab, that works and the PC can roll stuff from the NPC sheet. However this only works if the NPC faction is set to friendly and in any case the PC cannot move the NPC token unless I also turn on the shared party vision option - but at that point I may as well do without the extension. I am using the PFRPG ruleset, and yes I have other extensions so it could be a conflict. But before I go on extension hunting, could anyone tell me what are the precise steps to give a PC control of an NPC, and in what order? Thanks!

Actually, for NPC's controlled by a player (COHORTS), I have reverted to creating a full character in FG and then putting it on the combat tracker but not on the Party Sheet....that way it gets no loot and no xp but can be assigned to the player..
I am using Cohorts and companions to add Monster Summoning NPC's to the Spellcasters that summon. (Saves time from having to dig them up from NPC Menu).
In which case as a DM, I drag the NPC from the character sheet to the combat tracker, and from Combat tracker to Map, and that seems to do the trick.
NPC shows up as friendly automatically and the Player can move and control the NPC from the link in their character sheet.
I just tested the functionality and it works as above.

DonE66
April 9th, 2024, 00:40
I've never managed to get this extension to work. I can add an NPC to a PC sheet in the cohort part of the notes tab, that works and the PC can roll stuff from the NPC sheet. However this only works if the NPC faction is set to friendly and in any case the PC cannot move the NPC token unless I also turn on the shared party vision option - but at that point I may as well do without the extension. I am using the PFRPG ruleset, and yes I have other extensions so it could be a conflict. But before I go on extension hunting, could anyone tell me what are the precise steps to give a PC control of an NPC, and in what order? Thanks!

As Whitsend indicated, the preferred method is as he indicated. In PFRPG2 and PRRGP rulesets, I have also successfully added a creature to the combat tracker and then to the cohorts window but that requires you to set the NPC to friendly, so the preferred method is the better way to go. Which ruleset are you using BTW? There are variations in the code to deal with differences in the character sheets for different rulesets so let me know and I can check it out to be sure.

Whitsend
April 9th, 2024, 00:51
As Whitsend indicated, the preferred method is as he indicated. In PFRPG2 and PRRGP rulesets, I have also successfully added a creature to the combat tracker and then to the cohorts window but that requires you to set the NPC to friendly, so the preferred method is the better way to go. Which ruleset are you using BTW? There are variations in the code to deal with differences in the character sheets for different rulesets so let me know and I can check it out to be sure.

I am GM and also playing with PFRPG. My group also games in Amber, Call of Cthulhu and Shadowrun. But only use the cohort in PFRPG.
Mainly using the Cohorts and Companions for frequently called up NPC's like summoned monsters.
We were using it for Cohort NPC's but found that having a complete character sheet was easier when updating levels and handing off magic items.

ScribblingRambler
April 9th, 2024, 02:44
Like others, I have always found that for Pf1, you must drag the npc on to the character sheet first. Then drag from there to the Combat Tracker, then from the CT to the map.
Even with that, there are sometimes issues like hp resetting, if the npc is a familiar that levels up, for example. I think this can be avoided by redoing the entire process after the level up, but I'm not the GM for that game, so it's harder for me to experiment.

Laergulon
April 9th, 2024, 03:44
I am playing a 3.5 game and have been using C&C for some time. It has been one of the most useful extensions I've found. The instructions for the extension say (I know I read this somewhere) that a cohort NPC must be put onto the controlling player's sheet first, then moved from there to the combat tracker and, as with all CT occupants, placed on the map from the tracker, at which point the NPC becomes the player's to control in combat. It has always worked for me, both for hirelings/followers and for summoned creatures. Very well, actually. But keep in mind that any changes made to an NPC in the master list will not be adjusted on the cohort. You must replace the cohort or edit it as well. This means you can customize your player's NPC without making ALL of the same creatures super powered, too, because mods on the cohort are only to that NPC. The DM can create a copy of a modified NPC cohort back into the NPC list, too. I have not used C&C to give NPCs cohorts but I presume it works the same way - add to the controlling NPC first, then from there to the Combat Tracker, then to the map. Making an actual character can be a way to make a more detailed follower and I've done it, too, but monster NPCs are problematic that way. Much easier to just drag and drop the umber hulk the wizard successfully charmed onto your player's sheet, then onto the CT, then to the map. Rahr!

snupy
April 9th, 2024, 09:41
Thanks everyone for the replies! What I was missing is that you need to drag to the combat tracker the NPC link in the Cohorts part of the PC sheet, rather than the one in the NPC list, as I was doing. I thought both links pointed to the same thing, but I guess the one on the Cohort PC sheet actually creates a copy of the NPC. Works perfectly if I drag from the PC sheet.