To track playtime for a modified game on Steam and have it count towards the Steam version of the game, as well as allow friends to see you playing, you'll need to follow these steps:
-
Ensure the modified game is compatible with Steam's Workshop. If it isn't, you may need to find a Steam-compatible version of the game or modify the game to work with Steam.
-
Upload the modified game to Steam Workshop. This will make the game available to your Steam friends.
-
Play the game through Steam. As you play, Steam will automatically track your playtime.
-
To allow friends to see you playing, make sure you have added them as friends on Steam and that they have also subscribed to the modified game on Steam Workshop.
-
If you're playing a non-Steam game, you won't be able to track playtime or have friends see you playing through Steam. In this case, you might consider using a third-party service that allows you to track playtime and share it with friends, such as OpenBroadcasterSoftware (OBS) or Raptr.
Here are some references for further reading: