manuelVo / foundryvtt-drag-ruler

A Foundry VTT module that shows a ruler when dragging tokens so you can see how far you've dragged them
MIT License
40 stars 55 forks source link

Assistance with the "Speed Attribute" for the Fallout system? #347

Closed theMagius0 closed 1 month ago

theMagius0 commented 1 month ago

Foundry: 12 v331 Fallout: 11.13.0 Drag Ruler: 1.14.2

Good afternoon. I'm using your Drag Ruler module with the "Fallout" game system in Foundry.

It used to work for me (several versions ago), but I think the class hierarchy has changed--in either Foundry, or the Fallout module, or both. I'm a developer, but not so much with JS. So, I was wondering if you could help me find out what to put in the Speed Attribute field so that "Drag Ruler" could access the AGI stat?

I have tried:

But each of those seems to give different variants of the same error:

Error: You are accessing TokenDocument#actorData which has been migrated to TokenDocument#delta Deprecated since Version 11 Backwards-compatible support will be removed in Version 13

And

Error: You are accessing globalThis.mergeObject which must now be accessed via foundry.utils.mergeObject Deprecated since Version 12 Backwards-compatible support will be removed in Version 14

However, when I use the browser console to access this attribute using:

game.actors.getName(<my character's name here>).system.attributes.agi.value

It works just fine.

Can you help me to understand if there is another way to call the AGI attribute?

Thx,

theMagius0 commented 1 month ago

Please disregard.

I was able to create my own module using your API notes.

Thx,