Tabletop Simulator

Tabletop Simulator

Counter Stack Exploder
32 Comments
SAS Mar 15 @ 10:16am 
I got it to load as an Additive to a mod, is that correct?
SAS Feb 25 @ 7:22pm 
Anyone else getting a Steam download error in game start when this is subscribed to?
[-HEL-] Ragnar Aug 6, 2024 @ 4:40am 
lol. Just ran into the same issue as @Heikai.
If there ever is an update, Make it so that the use_snap_points object variable is saved for each counter. At present, it sets it to "true"when the stack explodes and to "false" on repack. That wipes the use_snap_points property from anything that is repacked.
Heikai Nov 12, 2022 @ 8:17pm 
Just to note that repacking disables the snapping from the units when repacking. This is a problem if you're using snap points instead of the grid. I managed to edit the script so it doesn't do that anymore. In "function repack", I commented out the "o.use_snap_points = false".
MangoFeet  [author] Dec 17, 2021 @ 8:39pm 
@mmcdaniel171717 it is used for war games that deal with stacks of counters. Just drop the cube into a save and then save and reload. All the counters should then have a right click option to "Explode" and put the counters out on a tray for easier viewing/manipulation
mmcdaniel171717 Dec 17, 2021 @ 10:52am 
I am very stupid and new to TTS what does this do?
evildrganymede Sep 27, 2021 @ 9:50pm 
I'm trying to add this to my save of the Peloponnesian War mod ( https://steamcommunity.com/sharedfiles/filedetails/?id=2059288961 ) and I got it to work on the tiles by changing the colour but when it explodes the stack, the exploded version appears under the table, and isn't accessible (and the counters then collapse to the floor below the table). I think it's because the PW mod designer used a table that for some reason is on a 3D raised platform but I'm not sure what I'd need to change in the Exploder script to get around this? Would you be able to point me in the right direction (assuming it's actually possible to fix?). Thanks!
MangoFeet  [author] Aug 16, 2021 @ 7:37am 
@happy can you send me a link to a mod you're using it in where it has this issue (or a place to download your mod if you haven't published it)? Have you altered the code at all to make it compatible with these mods?
Happy Wanderer Jul 30, 2021 @ 11:59pm 
I'm using it in a number of TTS modules I've made ie boardgames. It didn't make sense to me that it would randomly restack counters but that is what it is doing. Any ideas how i can make it behave properly?

Cheers
MangoFeet  [author] Jul 27, 2021 @ 9:25pm 
@happy that is not intended, it should restack from left to right == top to bottom

what is the mod you are trying to use it in?
Happy Wanderer Jul 23, 2021 @ 1:05am 
I'm not sure if this is an intended design element or not but when I stack/restack my counters they are returned back into the stack in a random order. This makes for organising yoru counters by size/type/ability, etc a one off affair until the exploder is used again. Is it possible to make the exploder simply explode and restack in the same order as the original stack please? I would think this very important in games like ASL so not sure what the thinking is here. Thanks for a great mod.
delta61 Apr 18, 2021 @ 4:35am 
MangoFeet any chance you could give me some step by step instructions on how to add this to mod?
paolo.dulisse Jan 21, 2021 @ 7:45am 
Thanks from me too ... this mod improved in a very big way my playing time in TTS ... I hope you can find some fix for the hotseat mode ... :)
Eric963 Jan 18, 2021 @ 5:02pm 
Thanks!!
MangoFeet  [author] Jan 17, 2021 @ 7:49am 
I've not tested it with hotseat mode, I'll check this out and see what I can find
Eric963 Jan 15, 2021 @ 5:37pm 
Get the same error with hotseat play.
paolo.dulisse Jan 15, 2021 @ 7:31am 
This is a great script for any wargamer! Thanks ...
I have a problem though ... If I play solo everything works fine ... If I play a mod hotseat with 2 persons, the script doesnt work good. It gives this error in the script: "Object reference not set to an instace of an object"
When I play solo I never receive this error and everything works great
MangoFeet  [author] Aug 28, 2020 @ 9:27pm 
It does remove the snap point stuff, yes (the mod this was originally designed for uses the grid for snapping, snap points only on the tray)

If just comment/remove that bit if you don't want it to disable snapping
crender460 Aug 25, 2020 @ 2:45pm 
Specifically, it is the 'repack' function on your mod that toggles 'snap' to 'off' on the counters. Dragging counters to move them does not cause this to happen.
crender460 Aug 25, 2020 @ 2:09pm 
Hi
I noticed that if I have counters set to 'snap' in their context menu because I am using a grid or snap points, when I use stack exploder on those counters the setting to 'snap' is removed. This makes using your mod difficult in combination with snap points or grids. I wonder if I am doing something wrong or if there is a fix I can apply to get round this? Thanks
noypi53 Jul 11, 2020 @ 4:42pm 
Great mod!! Really enjoyed their implementation in the LnL modules. Am not really very knowledgeable about scripting. Hope Beserk Games could make a YouTube video on how to implement your great mod into a game.
Caprica55 Jul 7, 2020 @ 1:51pm 
Awesome -- thank you very much. I will try tweaking the settings.
MangoFeet  [author] Jul 7, 2020 @ 10:57am 
@Caprica55 I see that happening and it looks like the counters are getting mixed up when they get put back in a stack and then unlocked. Perhaps try tweaking the distance they are placed from one another when they are re stacked.

Alternatively try staggering the unlocks more so that the bottom one is down before the next one is unlocked?
MangoFeet  [author] Jul 7, 2020 @ 10:28am 
The method by which the exploder repacks the counters compares the `x` and `y` values on their position. It arranges them top to bottom first by the `x` position (lowest on top) then by the `y` position (highest on top). A lower `x` value is higher regardless of the `y` values, the `y` value only comes into play if the `x` values match (by a margin of 0.01 IIRC). I'll have to sub to one of those mods and see what's happening there
Caprica55 Jul 7, 2020 @ 4:58am 
The LNL Tactical modules are using the counter stack exploder functionality and noticed something strange in stacks of counters greater than 3. If I explode the stack and then repack, the 2nd counter will move to the bottom. If I keep exploding the counters, the second counter will always move to the bottom of the stack (it is like counters 2, 3, and 4 move in a clockwise rotation). This is a strange one because it does not seem to occur in the ASL Starter Kit mod regardless of the stack size. An example of this behavior can be found in the Heroes In Defiance mod.
OJsDad Jul 6, 2020 @ 3:52pm 
Excellent mod MangoFeet. Big game changer.
Caprica55 Jul 3, 2020 @ 11:01am 
Piece of advice for anyone using this great functionality. Some mods have larger sized counters that may partially block the numerical identifier of the source location of the exploded counters and the “Repack/Drag To Move” buttons. Within the script module: module_exploder, there is the following function: function spawnRepackButton. Within this function, go to o.UI.setXmlTable and change the 2nd value of the position parameter to move the indicator and buttons further away from the box holding the counters.

As an example, the Lock N Load mods should change the value from -90 to -180 (position = "0 -180 0"). A person will have to use some trial and error for the position value to determine the best setting for their mod.
MangoFeet  [author] Jun 19, 2020 @ 3:03pm 
@Happy Wanderer You can expand this game and drop in the two module objects. Then in the scripting editor you can set them to be non interactive and move them somewhere out of the way

Then you'd edit the `module_util` script to change the `isCounter` function if it does not detect your counters by default.
Caprica55 Jun 19, 2020 @ 7:51am 
That is awesome!
Happy Wanderer Jun 19, 2020 @ 3:29am 
Legend...a brilliant mod. This should be standard in the next update!...Berserk Games take note please!!

Now, sorry for my ignorance...but how do I make this work on my own game module and the counters in it?

Thanks for a great community mod - 10 out of 10.
MangoFeet  [author] Jun 18, 2020 @ 10:29pm 
@Caprica55 It's already hotkeyed, but you have to assign the shortcut yourself. Look under "Options => Game Keys"
Caprica55 Jun 18, 2020 @ 6:10pm 
This is pretty amazing and could bea bit of a game changer. This is a feature that has been asked for to mimic Vassal's functionality for wargaming (exploding stacks). It would be great if this could also be hotkeyed. I have downloaded your great ASLSK mod but did not notice that feature.