Hierarchical numbering of figures by chapter

I am working on a book in which figures need to be numbered, e.g., 6.1, 6.2, 6.3, etc., where the number before the period is the chapter number. I’d like to leave the chapter numbers for later, since the chapters will move, and have the number be added during Compile. Equations are to be similarly numbered. I need a tag that gives the chapter number. I’ve perused the various tags, including <$hn>, and don’t see how to do this. Can it be done?

Here is one recent discussion on this very topic: Hierarchical numbering for cross-references. There have been a number of discussions along these lines over the years however, the search feature at the top of the page here should help.