PDA

View Full Version : NPC character sheet attacks



Stv
June 21st, 2020, 15:00
WHen you look at the NPC character sheet, under the 'actions' tab it shows (for example) the weapon attack and damage for the NPC, with an active mouseover for dragging/double clicking to activate said attack or damage.

How feasible/simple is it to be able to populate a new window with this text and keep the mouseover click/drag functionality?

I'm guessing not that simple tbh, but I thought I'd ask :)

Cheers, Steve.

Valyar
June 21st, 2020, 15:13
Which ruleset you refer to?

Stv
June 21st, 2020, 15:19
My apologies, I always forget to add that in :)

It's for the 5e ruleset.

Cheers, Steve.

superteddy57
June 24th, 2020, 03:40
What you are referring to is the text parsing of the attack line. It wouldn't be too hard if you want the same functionality, you would simply re-use the same script that field uses. It would use the same functionality, but you are restrained to the same rules as well

Stv
June 24th, 2020, 15:56
That is exactly what I would need. Can you point me to the script/function I need to invoke for that?

Cheers, Steve.

superteddy57
June 24th, 2020, 20:31
I would check out the record_npc.xml file for those clues and try following the thread that is there. The actions list can be seen to use the npc_power class. Then search for that and it will point to a windowclass that provides how its displayed on the NPC sheet. It looks like the campaign/scripts/string_powerdesc.lua file will have some answers for this discussion. Hope this helps get you started, this will continue leading you further down the line of the script and how it interacts with FG if you plan on changing the script file. This one might get a bit complicated as 5E parses both attack and spells from what I can see. So you may get lost in the code. If this is for something custom that doesn't use the same functionality as 5E's rules, it might be best to look at 3.5E and how that line is parsed for an easier time.

Stv
June 24th, 2020, 21:55
Awesome, Thanks for the pointers.
I'll see what I can come up with.

Cheers, Steve.