PDA

View Full Version : Token directories vs token .mod bundles.



Pharo
October 5th, 2019, 05:38
Revisiting an old subject. I know having too many tokens will slow down fantasy grounds.

Mainly looking for anyone whose done testing. Would it improve performance if i was to manually create .mods of my token sets and compress them down? I'm going to test for myself but I was wondering if anyone has tried. I would expect it would help for my players having to download the shared ones.

Moon Wizard
October 5th, 2019, 06:29
It won't affect transfer rate or usage if you have them all loaded. However, by loading them in modules, you can load/unload modules as needed to add/remove tokens. Any tokens assigned from an unloaded module will still be loaded and shown correctly.

Regards,
JPG

Pharo
October 6th, 2019, 01:25
This one really has my efficiency bug going but some positive results so far -
Working with addon 62 token sets at 30 tokens a set so ~1800 tokens. I have the WOTC DMG, PHB, MM, and UA loaded as well.

Started with my token sets soft directory linked to a NAS device - trying to save space.
Load time - 1m8secs
Noticed a nasty pause after loadup that would sometimes hang Fantasy grounds but eventually cleared - 2m29secs

Moved all my tokens to my local drive no more soft directory links just everything on the NVMe.
Load time - 35 secs
Still nasty pause/hang before tokens are available - 56 seconds

I converted every tokenset I was using to basic modules with just tokens in it.
Note: PNG files really compress down well so saved alot of space on NVMe drive.
Load time - 35 secs (just as Moon Wizard said)
But NO nasty pause/hang before tokens available - immediately available and working

Continuing testing with some actual player use next.

Pharo
October 7th, 2019, 01:14
So even though you can go under token module activation and select the green check "player load allowed", the players can't actually load token modules. I assumed it would work the same way as the library modules but appearently not.

Am I missing something? Is the only way to share tokens with other players the "shared" folder?

Zacchaeus
October 7th, 2019, 01:18
Yes. Token modules are never shared with players. Causes too many memory issues when players get tokens. You shouldn't share tokens at all. If you really need to show them tokens rake a screenshot and send them that. Otherwise just allocate one to them.

Pharo
October 7th, 2019, 01:23
Understandable. I'm still calling this a success. Im at 2200+ tokens and its running smooth still. Plus the compressed mod files minimizes the space on my NVMe.

Rmartinezv
October 9th, 2019, 23:17
How I made the tokens visible to players? For example I have my tokens in a module. When I put one token in the map (npc or random enemy) they see the map but not the tokens. I kind confused about that. Thanks.

Pharo
October 9th, 2019, 23:23
Put the NPCs in the combat tracker first, then pull the token from the combat tracker to the map. The combat tracker will make them invisible to players when you first put them on allowing you to place without them seeing. Then you click on the little eye icon in the combat tracker to "show npc".

LordEntrails
October 9th, 2019, 23:29
You should be able to drag a token from a token bag to a map and the players see it by default. Note doing it that way should only be done for map dressings like furniture, spell effects etc. NPCs should be done through the CT.

Trenloe
October 9th, 2019, 23:37
And discussed in the exact same post here: https://www.fantasygrounds.com/forums/showthread.php?26924-FG-sharing-maps-and-tokens&p=456190&viewfull=1#post456190

@Rmartinezv - please don't post the exact same question in two different threads. It can lead to a lot of wasted time on all sides. Thanks.

Pharo
October 10th, 2019, 03:34
Ok so back to my original thread.

I've run into a fairly serious issue. Twice now, the game has completely froze without warning. I've tried waiting but it doesn't seem to fix itself. When I abort the process and reload, I find that my campaign database is corrupt and I have to restore from backup.

Is this a known issue with having too many tokens loaded at once?

LordEntrails
October 10th, 2019, 04:06
Is your FG Data folder stored on/in a shared location/folder? Such as One Drive, Drop Box, Google Drive?
What is happening with your process size?

Trenloe
October 10th, 2019, 05:06
Is this a known issue with having too many tokens loaded at once?
Loading any large amount of data, especially images (including tokens), will take up a lot of memory. As LordEntrails mentions - check the memory use of FantasyGrounds.exe

As Moon Wizard mentions - load up tokens modules just when you need them, then unload them once you've assigned tokens to NPCs/encounters - FG will still access those assigned tokens with the module closed. Putting tokens in modules but then opening them all is not any more efficient in terms of FG resource usage than just them in the tokens directory.

Pharo
October 11th, 2019, 03:11
All of the .mod files im building and loading are on the local device, NVMe. Process has me running at 2,785MB. I've been watching that to stay below 4GB for the 32bit app limit and I read somewhere else its actually 3.3GB for FG.

The freezes only seem to happen in the first minute or two of starting the application or only when I'm trying to add or remove token sets. I've taken a practice now of just letting the application settle when i first start up and not messing with the tokens in the first couple of minutes an that seems an acceptable workaround. It just caught my attention because this is the first time I've run into a campaign corruption and I've put a lot of work into this one so it was a little shock value at first. Thanks for the DB backups!

LordEntrails
October 11th, 2019, 03:42
FG "freezing" is because its busy loading all of those tokens into memory. Tokens in the tokens folder or in open token modules are all opened into memory. It's like opening a hundred of image windows in Gimp etc. If that only takes a couple minutes, your doing well. Unload all but the dozen or two tokens that you need and FG will start in seconds.

Pharo
October 11th, 2019, 03:49
I did extensive testing on loading this many tokens and I did experience the long "pause" sometimes when loading them from a directory. I documented those up above in the thread. That went away when I converted everything to modules. After the conversion the game ran alot better and without event, even with 2000 + tokens. In fact the first dozen or so times I started the game and worked on my campaign without any incident or "pause" in the game.

This freezing event I'm talking about is different from the token "pause", and even after waiting 20 minutes, the game does NOT recover at all. I pushed the game to background and went to the folder once and found the DB.xml at 0 bytes. So whatever is happening when it freezes is something different.

Trenloe
October 11th, 2019, 03:58
Process has me running at 2,785MB.
That's still pretty high for normal operation - you don't have much to play with and when gaming it's easy for memory use to jump by 400MB or more and you're into trouble territory.

As we've recommended - reduce the number of token modules you have open. This will reduce memory use - which is what you should be looking at now.

If that doesn't help, open the console window and see if there are any warnings, or if the freeze is caused when the auto save occurs (every 5 minutes) - you'll see this appear in the console, unfortunately there's not a time stamp, so you'll have to be aware of when the new auto save occurs.

Pharo
October 11th, 2019, 04:07
Thanks both of you. I do appreciate the feedback. That makes sense that memory usage might of jumped on me and caused the freeze.

I was planning on taking Moon Wizards advice and unloading the modules for the actual gaming session because it keeps the tokens used without the modules being loaded. I really like having all these tokens loaded while working on the campaign because its easier to search through them that way. After converting them to mods just made things run so much better but I may have pushed too far.

LordEntrails
October 11th, 2019, 05:03
Sounds like FG is trying to save the db.xml file and runs out of available memory when doing so. Task Manager is not a perfect representation of process size.

Pharo
October 22nd, 2019, 01:12
Additional problems. So do NOT put too many mod files in your module folder.... Even if you dont have them loaded. There is some kind of weird condition that tries to load them or eats up a ton of memory if they are in your modules folder. I could run FG solo and work on my campaign for hours with NO problems but when I was playing with the group I was getting constant freezes and each time it memory had shot up for 1.2GB to suddenly 3.7GB. I made sure all my modules where unloaded so I'm not sure what was causing it.

The fix was to completely remove all the extra modules that I had built and things stabilized out again.

donpaulo
April 20th, 2020, 07:13
I just want to say that this thread has been very helpful

knowing that FG will access tokens from closed modules just saved my bacon

Thanks everyone !

Temmpest
November 12th, 2020, 04:51
It won't affect transfer rate or usage if you have them all loaded. However, by loading them in modules, you can load/unload modules as needed to add/remove tokens. Any tokens assigned from an unloaded module will still be loaded and shown correctly.

Regards,
JPG

I don't see a way to load/unload token modules in Fantasy Grounds Unity.

Moon Wizard
November 12th, 2020, 04:53
FGU automatically loads references to all installed token/portrait/image assets. You don't need to load token modules in FGU.

Regards,
JPG

Temmpest
November 12th, 2020, 05:01
Is there a way to stop FGU from loading certain token modules or packs? I'm trying to improve loading times.

Zacchaeus
November 12th, 2020, 10:11
Is there a way to stop FGU from loading certain token modules or packs? I'm trying to improve loading times.

No. Unless you have control over the modules and can remove them from your modules folder. Otherwise if they are packs bought from the Store then they'll automatically get loaded.

Temmpest
November 12th, 2020, 10:42
Ok. Thank you!