#Tabletop Games
1 messages · Page 5 of 1
lol
https://www.youtube.com/shorts/WgI3Xrgdl14
Make this as a way to add depth
what
how
Watch in slow motion
But what he did was he replicated a bunch of cards on Y and them seperated them by individual cards and finally randomised transform on Z but can add X
It's not to model but to randomise the position of cards on X and Z angles for a organic way to play the cards
I think the suggestion was just to add a bit of random rotation so the stack isn't so perfect looking.
Like that?cs float rotation = slotId % 2 == 0 ? 0.1f : -0.1f; containedMesh = containedMesh.Translate(-0.5f, -0.5f, -0.5f); containedMesh = containedMesh.Rotate(Vec3f.Half, 0, rotation, 0); containedMesh = containedMesh.Translate(0.5f, 0.5f, 0.5f);
I have no idea.
lol
It doesn't have a random rotation
It's telling that each one has to move to only two positions
How to get consistent list of random numbers from specific seed?
Why do you want it to always be specific?
And, uhh... I believe you can do that in a few specific ways.
To avoid ugly random rotations when stacking cards
You could possibly set the specific seed, that might work.
You could pregenerate all the numbers you need and just put the list in the code.
Also sandwiches when stacked are rotating like they have seizures
Damn I don't know how to do that
private float[] predefinedRotations = new float[64] {
-0.0167f, -0.0980f, 0.0650f, -0.0403f, -0.0263f, -0.0613f, 0.0132f, -0.0677f,
-0.0751f, -0.0134f, 0.0124f, -0.0651f, 0.0106f, -0.0290f, 0.0916f, -0.0817f,
0.0957f, -0.0176f, 0.0008f, -0.0704f, 0.0438f, -0.0620f, -0.0317f, -0.0953f,
-0.0321f, 0.0935f, 0.0958f, 0.0489f, -0.0993f, 0.0880f, 0.0742f, 0.0542f,
-0.0642f, -0.0801f, -0.0171f, 0.0771f, 0.0156f, 0.0473f, -0.0535f, 0.0047f,
0.0419f, 0.0650f, 0.0614f, -0.0535f, 0.0746f, -0.0567f, 0.0604f, 0.0110f,
-0.0628f, 0.0177f, 0.0036f, 0.0917f, -0.0917f, -0.0672f, 0.0967f, 0.0664f,
-0.0699f, -0.0542f, 0.0078f, -0.0686f, -0.0352f, -0.0901f, 0.0423f, -0.0843f
};```
Like that?
You need 52 numbers, so you just have a random generator give you 52 rotation offsets and then add them all to an array in your code.
Or however many.
Then you just have it check the rotation for the array given the number it is in the stack.
Completely consistent rotations for every stack.
@bitter kayak
Not bad!
Okay.
Now you have to make it move randomly slightly to immitate people who play cards without making them flat
no
The rotation can be more exagerated to make it more believable with multple players
It's just to add immersion
On uno people don't care to position their cards corrects as well with any card game
Too much work
It's just to adjust the parameters as it should since that cards look almost the same to me in location
Still too much work
It isn't worth the hassle
Well it's more of a wasted feature
I think there comes a point where you're adding too much code for too little reward.
And it sounds like for Dana this is that point.
Little details matter if you want to impress players
I don't care the difficulty as long as it's rewarding
I don't disagree.
I'm just saying.
There's a balance to everything.
Believe me, I know about little details. I added such a thing to how the fruitpress works, haha.
The thing I hate about gaming is that a lot of gamers don't care about small details
When I was messing with the fruitpress one thing that I did was make it so that you could release the screw at any point, but in order to maintain that same "screw it all the way down to juice it" functionality I made it so that it will only squeeze out as much juice as you have screwed it down. So, say, 50% screwed down gives only 50% juice.
But I went a couple steps farther, and made it so that when you unscrew it will stop squeezing, but for a second or two a bit of extra juice will keep dripping out.
And I made it so that the rate at which juice flows out of the mash is dependent on how much juice can flow out of the mash.
Think of how wringing out a rag gets a lot at first but a little after a moment.
So effectively it rushes out quickly but slowly the amount lowers until it's only dripping out near the end.
I'm even using the same colors as actual pigments from the game
All this to say, I get that little details can be important.
And I think Dana does as well, honestly.
Red is cinnabar and black is carbon black (coke, charcoal)
But I can imagine various code and design reasons why the random rotation might be a bad idea and only the one reason why it's good.
I'm yet to add different shapes for held cards
I will probably do that through code somehow
It could be a bit more chaotics like this
It's quite straight up and slighty that doesn't compesate the messiness the players play
It is too much work
Maybe I could do test about tweaking the values for you want to avoid it
Here is the most cursed thing that I could add too
Playing card interactions are implemented through ground storage
Any card game is played inside ground storage, no exceptions
The only problem is I have no idea how to rotate first placed card
You don't
why
It's unnecessary
I mean rotate it facing to player
Nvm
I forgot to write that I fixed this issue
Now I need to implement logic for placing cards upside-down
lol
Minimalistic description
Nice
The first card has too much cards
I probably better remove both symbols
I think for a lot of cards i could also remove rank and suit and show only pack instead
"tabletopgames:itemdesc-playingcard-symbol-rank-{rank}-{color}",
"\t",
"tabletopgames:itemdesc-playingcard-symbol-suit-{suit}-{color}",
"<br>",
Card symbols (for discord search)
perfect
For crafting recipe I would need to add a pack of cards
It would disappear and give deck of cards on right-click like scrap weapon kit
Also shuffler
So three new items, playing cards are one of them (because it is technically a single item)
@bitter kayak The main problem with random rotation is possible cheating like this
I have yet to figure out how to make your own cards render as blank cards for other players
Because third person view exists
@manic topaz Do you know where I can find inventory server events?
No, sorry.
Yes but you could a function n where the player can adjust the alignment on the cards but why the worry
Is there a game that benefits this type of cheating
alignment what
Explain the process of cheating with the image
no idea
You should have any idea about the concerns and concepts when it comes to debugging (hopefully)
I can't find a way to place flipped card
I can do that when you stack cards on each other though
Can you reuse the model of the stack of cards you made in 180º of Y
I already did
Why it didn't work
Flipped card will have no front textures
What is more intuitive for tool modes?
- Left / right mouse click for adding card before or after another card (52 cards = 52 slots)
- Empty slot between every card (52 cards = 104 + 2 slots)
X is card
O is "empty" tool mode
XXXXXXXXXXXXXOXOXOXOXOXOX
.
Less slots
ok
I have no idea.
I think traditional card art is fine. As far as cheating, have you considered a “hand” item? A special group of cards a player holds could hide the cards. Then you don’t need to add any more logic to the cards themselves to make them hidden. (I don’t know how viable this is.) SS13 does a similar thing with card “hands” to obfuscate contents and make drawing/playing cards less cumbersome.
Also how do you switch cards to all of the suits/values? I feel like using tool modes as chess pieces do will let players cheat by changing their own cards.
Also would it be possible to eschew a shuffler item and just allow players to shuffle decks with ctrl(or shift)+mb2?
Cards are created in a barrel from blank cards
It is on todo list already
Ah, cool, okay.
Why would I add separate item?
Cards are just one item
well, depending on the game you're playing, you could have a hand bigger than the size of the quickbar
however I understand it might not even be necessary
my thought was that the cards could be obfuscated in the hand and the player holding it could right-click to see the cards
or something
¯_(ツ)_/¯
I apologize if the idea isn't helpful
You can combine cards
ah ok
@bitter kayak
👍
Have you tried to test it with a friend to sit on 90º to test the placement of the cards when the player is on vertical or diagonal
What do you mean by vertical and diagonal?
It's more if the cards you play no matter the direction it will always play be faced on you
No idea what that means
Insane hack to make flipping of cards work ```cs
[HarmonyPatch(typeof(BlockEntityGroundStorage), nameof(BlockEntityGroundStorage.putOrGetItemSingle))]
public static class putOrGetItemSinglePatch
{
[HarmonyPrefix]
public static void Prefix(BlockEntityGroundStorage __instance, ItemSlot ourSlot, IPlayer player, BlockSelection bs)
{
if (!player.Entity.World.Side.IsServer())
{
return;
}
bool flipCard = player.Entity.Controls.CtrlKey;
ItemSlot hotbarSlot = player.InventoryManager.ActiveHotbarSlot;
if (flipCard && hotbarSlot?.Itemstack?.Collectible is ItemPlayingCard card)
{
PlayingCardInventory cardInventory = card.GetInventory(hotbarSlot.Itemstack);
if (cardInventory.Empty)
{
hotbarSlot.Itemstack.Attributes.SetBool("flipped", true);
}
}
}
}```
When you take flipped cards from table, cards become un-flipped
If card has other cards on top of it, you get them the same way as if they were placed on table
It's not facing to you
Why not
Just another small detail
Too much work
Could you make the cards sit straight if you put them in the center spot of the ground item? It seems fine as it is, I'm just wondering.
No idea how to do it
understandable
this looks great holy crap! I can't wait for our first server poker night
@bitter kayak ```cs
public MeshData GenContentMeshForHand(ItemStack itemstack, ITextureAtlasAPI targetAtlas)
{
MeshData contentMesh = null;
PlayingCardInventory inventory = GetInventory(itemstack);
if (inventory.Empty)
{
return contentMesh;
}
float translationX = 0;
float translationY = 0;
float translationZ = 0;
float rotation = 0;
foreach (ItemSlot slot in inventory)
{
if (slot.Empty) continue;
if (slot.Itemstack.Collectible is not ItemPlayingCard otherCard)
{
continue;
}
if (otherCard.GetOrCreateMesh(slot.Itemstack, targetAtlas, EnumCardPlacement.Hand) is not MeshData containedMesh)
{
continue;
}
int slotId = inventory.GetSlotId(slot);
rotation -= 0.1f;
Vec3f rotationOrigin = new Vec3f(0.2f, 0, 1.2f);
containedMesh = containedMesh.Translate(-0.5f, -0.5f, -0.5f);
containedMesh = containedMesh.Rotate(rotationOrigin, 0, rotation, 0);
containedMesh = containedMesh.Translate(0.5f, 0.5f, 0.5f);
translationX += (slotId / 1000) + 0.01f;
translationY += GetStackingTranslation(slot.Itemstack);
translationZ += (slotId / 1000) + 0.01f;
containedMesh = containedMesh.Translate(translationX, translationY, translationZ);
if (contentMesh != null)
{
contentMesh.AddMeshData(containedMesh);
}
else
{
contentMesh = containedMesh;
}
}
return contentMesh;
}```
Is there a cap to holding cards
No
5 cards
4
Anything lower is meh (3, 2)
wtf (5 and 6)
@bitter kayak look at this mess
Have you tried to make a experience of you holding cards
And convert it into a function
what
This is not how it works
The holding cards should narrow the visibility of the symbols when you have many cards.
what
Look at the meme on the top the way it holds hards
lolcs float GetRotationStepForHand(int total) { switch (total) { case 1: return 0; case 2: return (float)total / 7f; case 3: return (float)total / 11f; case 4: return (float)total / 15f; case 5: return (float)total / 20f; case 6: return (float)total / 26f; case 7: return (float)total / 30f; default: return (float)total / 25f; } }
Damn
Can't convert into function
Card code is way too complex
@bitter kayak
FPS
Nah
You must worry about FPS issues
It's when you open creative inventory
It is caused by debugging
16 cards
look
Better but I think you have to release another version if you give them the update to optimise the cards as they can be FPS hungry
No idea what do you mean
Can you hold at least 500 cards without FPS issues
You can't hold 500 cards
Limit is 64
There's 10 slots.
Try to hold them with each slot
what
They are cached
Mesh is constructed only one time
Once you have it in any slot or placed
It is very fast
64 cards is just 64 cubes
Vanilla shingle pile has much more cubes
52 cards
look
@bitter kayak
Will you just add the cards you have without the ability to make our own cards
What
Chiseled cards
No
No UNO?
Uno is copyrighted
As well as your tabletop game you showed
No
Are you sure?
Yes
What tabletop game
Carcassonne
It is chiseled
Also cards can be chiseled
no
Reasons?
Too hard to implement
You already implemented the chiseled boards with custom hitboxes
Be specific with the implementations
I have no idea what that means
Pin point the key ideas of what makes it hard
No idea
I think there's more ways to use cards
No idea what do you mean by this
The way the cards are positioned not in straight but in slightly vertical offset
I don't know how to do that
What exactly
The cards being complex since it needs many features to compesate the amount of way you can play with cards
Some things are not possible with VS engine
Like stacking them like in mahjong?
mahjong is not possible with VS engine
I tried
Not technically possible
Domino too
Scratch that
Why
If you can't currently why bother having it in the roadmap
Because if VS roadmap can contain "in far future", then my roadmap can too
Make it clear to the users
Does it work when you don't take cards not in order
Like remove 40, 12, 34, 28
No, it crashes
@manic topaz
💀
Huh?
Neat!
:D
@hardy adder Could you help with brainstorming card code
What are you trying to do?
I need help with imlementing AddPrev and AddNext```cs
public enum EnumCardModeAction
{
None,
/// <summary>
/// Take card if mouse slot is empty
/// </summary>
Take,
/// <summary>
/// Replace card if mouse slot is not empty
/// </summary>
Replace,
/// <summary>
/// Add new card before current card if mouse is not empty and Ctrl key is pressed
/// </summary>
AddPrev,
/// <summary>
/// Add new card after current card if mouse is not empty and Shift key is pressed
/// </summary>
AddNext
}
private void ProcessToolMode(ItemSlot slot, IPlayer byPlayer, int modeIndex, ItemPlayingCard mainCard)
{
//bool ctrlClick = byPlayer.Entity.Controls.CtrlKey && !byPlayer.Entity.Controls.ShiftKey;
//bool shiftClick = byPlayer.Entity.Controls.ShiftKey && !byPlayer.Entity.Controls.CtrlKey;
PlayingCardInventory cardInventory = mainCard.GetInventory(slot.Itemstack);
if (cardInventory.Count + 1 <= modeIndex) return;
if (cardInventory.NonEmptyCount == 0) return;
ItemSlot mouseslot = byPlayer.InventoryManager.MouseItemSlot;
// clone main stack because it is dangerous to manipulate with it
// also kill inventory to avoid duping whole deck and possible stack overflow
// main slot should ALWAYS be first slot
ItemStack firstStack = slot.Itemstack.Clone();
firstStack.Attributes.RemoveAttribute("slots");
DummySlot firstSlot = new DummySlot(firstStack);
ItemSlot[] slots = new ItemSlot[] { firstSlot }.Append(cardInventory.Slots).Select(x => new DummySlot(x?.Itemstack?.Clone())).ToArray();
int prevIndex = modeIndex - 1;
int nextIndex = modeIndex + 1;
EnumCardModeAction action = EnumCardModeAction.None;
.....
}
.....
for (int slotIndex = 0; slotIndex < slots.Length; slotIndex++)
{
bool isActualIndex = modeIndex == slotIndex;
// Take action
if (isActualIndex && !slots[slotIndex].Empty && mouseslot.Empty)
{
if (slots[slotIndex].TryPutInto(api.World, mouseslot) > 0)
{
action = EnumCardModeAction.Take;
}
}
// Replace action - swap mouse with target slot
else if (isActualIndex && !slots[slotIndex].Empty && !mouseslot.Empty)
{
ItemStack temp = slots[slotIndex].Itemstack.Clone();
slots[slotIndex].Itemstack = null;
slots[slotIndex].Itemstack = mouseslot.Itemstack.Clone();
mouseslot.Itemstack = null;
mouseslot.Itemstack = temp;
action = EnumCardModeAction.Replace;
}
switch (action)
{
case EnumCardModeAction.Take:
{
if (slotIndex > 0 && !slots[slotIndex].Empty && slots[slotIndex - 1].Empty)
{
slots[slotIndex - 1].Itemstack = slots[slotIndex].Itemstack.Clone();
slots[slotIndex].Itemstack = null;
}
}
break;
}
}
.....
.....
switch (action)
{
case EnumCardModeAction.Take:
{
if (slots.Length > 0 && !slots[0].Empty)
{
ItemStack newFirstStack = slots[0].Itemstack.Clone();
// Shift slots left
for (int i = 0; i < slots.Length - 1; i++)
{
slots[i] = slots[i + 1];
}
slots[slots.Length - 1].Itemstack = null;
// Update inventory
for (int i = 0; i < cardInventory.Count && i < slots.Length; i++)
{
cardInventory[i] = slots[i];
}
slot.Itemstack = newFirstStack;
cardInventory.ToTreeAttributes(slot.Itemstack.Attributes);
}
break;
}
case EnumCardModeAction.Replace:
{
if (slots.Length > 0 && !slots[0].Empty)
{
ItemStack newFirstStack = slots[0].Itemstack.Clone();
ItemSlot[] newSlots = slots.Skip(1).ToArray();
// Update inventory
for (int i = 0; i < cardInventory.Count && i < slots.Length; i++)
{
cardInventory[i] = newSlots[i];
}
slot.Itemstack = newFirstStack;
cardInventory.ToTreeAttributes(slot.Itemstack.Attributes);
}
break;
}
default:
break;
}
slot.MarkDirty();
mouseslot.MarkDirty();
byPlayer.InventoryManager.BroadcastHotbarSlot();```
I have implemented only Take and Replace currently
How would you implement AddNext action here?
One sec
public enum EnumCardModeAction
{
None,
/// <summary>
/// Take card if mouse slot is empty
/// </summary>
Take,
/// <summary>
/// Replace card if mouse slot is not empty
/// </summary>
Replace,
/// <summary>
/// Add new card before current card if mouse is not empty and Ctrl key is pressed
/// </summary>
AddPrev,
/// <summary>
/// Add new card after current card if mouse is not empty and Shift key is pressed
/// </summary>
AddNext
}```
So you want to add a card in the first empty slot?
No, I want to add it between two cards
In both AddPrev and AddNext
Oh
You can see comments mention Ctrl and Shift keys
So you have to get to the next slot, replace it and copy each other card to the next one over
Same for addprev but with the previous slot
Also checking for edge cases like being in the first or last slot
yeah
Maybe I should also check if last slot is empty
Because it would make no sense to move whole inventory if last slot is empty
Ah yeah you could move the slots starting from the last
stacks, not slots
idk actually
I thought you were manipulating an inventory, like moving the cards between different slots
I do
I just don't know how to do it better
@scenic hornet Do you know how to add item between slots?
Why not shift the position of the elements after it
how
Copy them and replace the next one
So start from the slot after the last full slot, bring in the item before
Stop at the insertion point and add the one you need to add
If last full slot is the last slot then do nothing
Then addprev and addnext need the same function really
One just adds before the other after
How to do that with arrays?
I probably should move all logic from first for to for in last switch statement
I meant you make a method that adds at a certain index, then addprev and addnext become addAt(prevIndex) and addAt(nextIndex)
right
Ok i made it work
Nice
Now it is mess```cs
for (int slotIndex = 0; slotIndex < slots.Length; slotIndex++)
{
bool isActualIndex = modeIndex == slotIndex;
// Take action
if (isActualIndex && !slots[slotIndex].Empty && mouseslot.Empty)
{
if (slots[slotIndex].TryPutInto(api.World, mouseslot) > 0)
{
action = EnumCardModeAction.Take;
}
}
else if (isActualIndex && !slots[slotIndex].Empty && !mouseslot.Empty)
{
// Add prev action
if (ctrlClick && slots.Last().Empty)
{
action = EnumCardModeAction.AddPrev;
break;
}
// Add next action
else if (shiftClick && slots.Last().Empty)
{
action = EnumCardModeAction.AddNext;
break;
}
// Replace action - swap mouse with target slot
else
{
ItemStack temp = slots[slotIndex].Itemstack.Clone();
slots[slotIndex].Itemstack = null;
slots[slotIndex].Itemstack = mouseslot.Itemstack.Clone();
mouseslot.Itemstack = null;
mouseslot.Itemstack = temp;
action = EnumCardModeAction.Replace;
break;
}
}
switch (action)
{
case EnumCardModeAction.Take:
{
if (slotIndex > 0 && !slots[slotIndex].Empty && slots[slotIndex - 1].Empty)
{
slots[slotIndex - 1].Itemstack = slots[slotIndex].Itemstack.Clone();
slots[slotIndex].Itemstack = null;
}
}
break;
}
}```
Are we talking inserting into an array? There is no simple operation for that. If you use a List<ItemSlot> instead, you can use Insert(item, index)
I solved it already
Just be aware that it is still an O(n) operation.
I'm laughing very loud from my own code comments sometimes
That happens.
I have no idea how many times I have thought "who the hell wrote this shit?" only for git blame to point at myself. 😄
I have two 'for' in process method
Oh, I meant that List.Insert in and of itself is O(n).
This has playing cards right?
I'm still working on them, there are a lot of things I need to add
@dark iron
I found perfect sound for unpacking box of playing cards
Magnus the Red: "Stop. Flicking. Your. Caaaaaaaaaaaards."
Tzeentch: <Long,pregnant pause.> "Flick flick fli-"
Magnus the Red: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRRRRRRRRRRRRRRRGH!"
what is this meme
If the Emperor Had a Text To Speech Device. Kitten and Tzeentch Play a Children's Card Game.
I only need to add ItemShuffler next
No idea how to implement solitaire
Unfortunate. I'll find other things to do with them,then.
I probably need to add molds for pouring metal pieces (omok, chess etc.)
Game of Ur?
Chisel it
I implemented lower parts of chiseled pieces exactly for this (ok i did it for hounds and jackals)
You can chisel whole board and then place chiseled pieces on it
In the same way as I did here
Once I add shuffler, it will accept only chiseled pieces, chiseled boards and playing cards
If you could make your own cards of monopoly
I can allow to import them
But it is incredibly hard to do
---ENG---Mod that adds the ability to insert any image into the world.
The frame can accept links to:* Bmp* Gif (only the first frame will be shown)* Jpeg (jpg)* Pbm* Png* Tiff* Tga* WebP
Fram setup:Enter a link to the imageSpecify the anchor point (start) (ideally, if auto image size is enabled, you should use
too hard
Also the cards are too big due of limitations
Why not
What limitations?
I can make them smaller, but I don't want to
An item pack with a lot of custom logic
I wonder how it will be for custom cards
What do you mean
The process to make our own cards
I don't know how to implement that
maybe store pixels as bytes in item stack attributes and have a custom renderer to render the image, then a ui to paint the card
I wanted to do something similar for a map item
No idea how to do renderer and ui for that
Me neither but I didn't know how to do a lot of things in my mods before I tried
Not saying you have to do it ofc, just that I think it's possible
vanilla work items have a more complicated renderer so maybe the renderer isn't that hard
While ui would be a very simplified version of the map ui, and you already made it so you can draw on a map
Can I use renderer inside MeshData?
idk I never played with meshes, only copy pasted code
I think work items and iron blooms are a good example of items with custom renderers, idk if there’s others
Iron blooms just use a flat image (weirdly enough, it’s not from the item model, anything with an iron bloom class willlook the same)
My cards are using meshes
i can't use renderer for that
Could be easier then idk
lol
Nice
Aren’t you already rendering textures on the cards then
With meshes
Maybe you can convert a set of pixels from whatever format you gather it into one
How to name a pack of cards?
It is a consumable
Contains a deck of 52x playing cards in Vintage Story style (no jokers)```
Are you asking what to name it?
This is description
Yes
Yes
I think using pack and deck distinguishes between the two well enough
Maybe other users have better feedback idk
"item-pack-playingcards_vs": "A pack of playing cards (Vintage Story)",
"itemdesc-pack-playingcards_vs": "Unpack it with <hk>rightmouse</hk>!<br><br>Contains a deck of 52x playing cards in Vintage Story style (no jokers)",```
Here are lang keys
I will add two jokers then
@cosmic egret
Do jokers look okay?
It looks a bit goofy, maybe you can get a better angle? Perhaps a different wolf color variant would make the face easier to see idk
Joker yes
Where to find this icon
I can't export it
They are in normal deck now
52 cards + 4 jokers by default
💀
would it be worth releasing playing cards as a separate module? that's alot of file...
Nope
Mod is lightweight by itself
The most heavy part in the mod is models and textures
ah ok
Although models are super simple, they are not heavy
Updated mod logo
Make comparison with bricklayers lol
Bricklayers is 1 billion times heavier than my tabletop games
I could make fork of Brikclayers that would be very lightweight
@drowsy ether Do you want to disable piece rotations?
my todo list:
- Card rotations in ground storage and on normal boards (calculate from player yaw)
- Shuffler as an item container that can store one set of items (no duplicates)
- IShuffleContainable for custom shuffler logic (e.g. cards)
- mesh rendering: EnumCardRenderType.StackFlipped (
attributes.GetString("forceRender") == "StackFlipped") - mesh rendering: EnumCardRenderType.StackFlippedExceptFirst
attributes.GetBool("forceFlipped") == trueto always keep card deck flipped until one card is left- Crafting in a barrel: 56 blank cards + 2L of green dye to make classic card deck
- Crafting in schematic tool modes: 64 blank cards per parchment
😈
How to name blank card item in the code?
i could name it as blankcard
loljson { "type": "item", "code": "blankcard", "attributes": { "types": { "material": "parchment" } } }
Here are dropped card from underneath btw
@bitter kayak If you can draw better card textures, then fork it and create PR
https://github.com/Craluminum-Mods/TabletopGames/tree/playing-cards-and-shuffler/TabletopGames
😂
@bitter kayak
[
{
"code": "tabletopgames:playing-cards-vs-pack-from-green-dye",
"sealHours": 24,
"ingredients": [
{ "type": "item", "code": "game:dye-green", "litres": 1 },
{ "type": "item", "code": "tabletopgames:blankcard", "quantity": 56, "attributes": { "types": { "material": "parchment" } } }
],
"output": { "type": "item", "code": "tabletopgames:pack", "attributes": { "types": { "type": "playingcards_vs" } } }
}
]
Because why not
What do you suggest?
Fake Money for Games
What
It's for games like monopoly
but why
Bcs of green dye and maybe a way to add how much it's worth
Spades is the only thing I could help due of the overlap of the pixels
what overlap
I love all textures I make
I like it this way
.
Literally nothing about barrel here
I mean it works but still
Shouldn’t the recipe require a more involved process than just dunking them in dye?
For example?
Just my opinion, but I would rather have a grid recipes with quill and some dyes. Of course, if there was in-world crafting that would be even better but I don’t have a good suggestion for that
Vanilla quill requires black dye
Dunking them in a dye looks like simple and working solution
@ionic rune What would you do
I don't want super complex playing card recipe
I want the recipe to be believable at least
And accessible
i can make in-world recipe, grid recipe, barrel recipe or tool mode recipe (in schematic)
Create an overly involved dyeing process to prepare the paper before you ever think about putting symbols on them. Then I'd create stamps that you use to put shapes and patterns on the cards.
Do you remember who you're asking? XD
I can invite you to github repo so you could help me code that
Because my mod already allows to do all of that
... LOL. Got my own projects under way, my dear woman.
Wait, why I did add pack of cards then
Maybe for traders
lol
I can make that pack be sold by traders
People would kill me for such recipe
I don't mind making complex recipes for everything in the mod
To implement what you suggested, I need to add support for liquid recipes inside in-world crafting recipes
To apply drifter image on a card, poke it with spear to collect blood, then pour it on a card from a bowl or what?
I could implement a deal with devil to get cards in the game
/// <summary>
/// A consumable item that summons devil when consumed.
/// </summary>
public class ItemDealWithDevil : Item
{
onConsumed()
{
summonDevil();
}
}
Paper is prepared already
So only stamps are left
I could choose stamp type through tool mode lol
epic
So you already have bowls that hold multiple items yeah?
Yes
Go bowls
They are canon
And chisel able boards?
yes
Is there a feasable way to combine those features, to allow players to make "bowls" on their game boards?
This would allow people to make games like Mancala without you needing to directly implement them
I don't know how you would go about detecting that within a chiseled block, maybe could do a material check and a tool where the player determines what material in a block counts as a "bowl"
However I don't know the extent that this is possible, I have no knowledge of the C# side of Vintage modding.
You can chisel Mancala already
I can apparently chisel myself a Royal Game of Ur board,and pieces.
Now,if only I knew how to play.
If you can read sandskrit there's some published tutorials from Irving Finkle. 
Ah I was unaware! I haven't had the chance to properly mess around with your mod yet sadly.
Playing cards are going to be the third most massive update after chiseled pieces and boards
It just doesn't properly understand how to display the recipe in the handbook or the barrel output?
Both
Look how popular old screenshots are
"Pre-historic screenshots"
Why you did have domino?
Because why not
Couldn't make it into the recent versions?
Too hard to implement
They were half-baked
They were never finished
look
It's a custom card or just a preset?
Preset, but I won't add it to the mod
I'm making it for advertising the new update
@bitter kayak
How players will do custom cards
No idea
@bitter kayak
it is
Cant wait to play poker with the boys during a blizzard
I can't wait to steal all my friend's gears in poker.
Trick is to always carry a hangun for when they get rowdy and you need to give them a choice 
Does it have to be uploaded manually through the files?
Uno? Yes
Documentation to upload your own cards?
Not yet
look at shuffling here
👍
"ingameerror-shuffle-empty-slot": "You don't have the cards right now. Can't shuffle emptiness!",
What's the keybind for it?
Ctrl + Shift + S
Can you add a tool mode for the cards to have alternative texture?
Why
Why
It's bcs of the way you can switch to another side of the card also keybinds are needed for it
Not needed
Maybe it's to being able to add more cards like UNO
But I don't know how it can be added
What shuffler should look like?
It can only shuffle chiseled things
not cards
Cards can be shuffled separately
Could be a mechanical one?
Give examples
A bag is shuffler too
I could add bag as shuffler
literally sack
I restore a 1950's Casino Card Shuffler. I wonder through all the rust how much black jack did this antique restoration play?
If you have something you would like me to restore send me an email at [email protected]
Watch Next:
I Restore A 125 Year Old Rusty Bread Maker!
https://www.youtube.com/watch?v=mbbOVXHKU2I&list=PLKBhLSKogW5-...
I'm adding shuffler not for cards
A bag can do the job
But it's mostly just using the bowl function and adding a rng system
Bowl is for completely different things
added everything except recipes and card rotations
Guys will see this and think “hell yeah”
what
(Badass playing cards)
Did you see joker card?
Is that the bell?
@dark iron
@bitter kayak
VariantGroups would just kill your PC if I did that
But I use attributes, so it isn't a problem
Yea
What to do if it is too big for a stamp
I think I have idea how to do that
I will rotate it
This is what it should look like
Can't you use scale on code
What do you mean
Using code to scale down visually?
Yes
But what clayform recipe to use for it?
Like those clay molds
I can make recipe for all of clay stumps
Then unpack them
Like a bundle
Make them unpackable until they are baked
Damn, I better just add one clayform recipe
Then choose letters, numbers etc. in tool modes
It may be cool to have 1000+ stamps for every single letter, number and symbol, but it is nighmare to maintain
I decided to not add complex card crafting for now
it already took me insane amount of time and I didn't even write logic for it
Planning card crafting is extremely hard
I better spend time on something much more productive and interesting
Can it include dye?
For example?
Red, Black for the cards symbols and numbers
These colors are very expensive
Any cheap alternatives?
Orange
yellow
pink
purple
green
Blue is 5nd most expensive
From most expensive to cheapest
- Red
- Black
- Gray
- White
- Blue
- Orange, yellow, pink, purple, green (cheapest)
If you don't count lapiz lazuli as it's the most expensive dye
Woad flower gives blue dye
I can add red and black dyes specifically for playing cards
That way they would be used for cards only
2
Okay
What's the top texture of the card?
What do you mean
The one that displays the logo instead of the one with the software
This image placeholder
Hansa banner
It can be a way to make new cards modular?
Yes
I tap two islands and Counterspell your Worldfire...
what
Magic the Gathering. Never heard of it?
I only heard the name, that's it
Wow. That's a first for me.
Card game,basically. One I know would be impossible to emulate in a VS mod.
Still,I see cards,I think MtG.
Why impossible
Because it's closer to RPG than something like poker or solitaire.
There are six "colours,"which are sorta analogous to suits. White,black,blue,green,red,and colourless. And,besides colourless,they can be mixed.
And then there's the literal thousands of unique cards.
The texture atlas and ground storage mechanics can't support a game.
What if I say that you could import cards later?
why
who said that I would use texture atlas
RE: Thousands of unique cards. Beyond that,standard play imposes no numeric limits on what can be on the board at any given time,besides what's printed on the cards.
What board
Also, what do you mean by limits here?
Aah,sorry. Generalized term. The game is played on a tabletop. Some people use play mats. As for limits,the game imposes no numeric limits beyond: No more than four copies of any specific card in a legal deck,besides cards known as Basic Lands (Plains,Swamps,Islands,Forests,and Mountains). Text printed on a card is treated as divine law and is explicitly allowed to override codified rules,permitting specific cards to tighten or loosen this limit,or impose limits on how many of what may be in play.
Also,a legal deck is no larger than sixty cards.
So what
It used to be unlimited,until someone showed up to a tournament with a deck so enormous it needed two porters to carry,to say nothing of the shuffling time. After that,it became, "No larger than handheld." That proved too fluid,so the maximum size was further reduced.
Playing cards in the mod have no game logic at all
They only have stacking behavior and that's it
Ten turns in,each player has,on average,ten basic lands and up to fourteen permanently in play cards.
There's no space on the table.
In VS,at least.
I can implement that space
Should I make cards rotate facing to player when placed on board etc.?
😒
what
MtG is a fun game.
I think it's out of scope of your mod.
I already suggested that a while back but no
I can't add it anyway because of copyright
So what
You changed ideas?
It was low priority
oh
You should have said it before
What do you mean
This one
What's the amount of rotation the cards can have when placed
What do you mean
How much rotation it can be turned to rotate the placed card
15-15, 30-30
I don't understand
First card is rotated at 0° degrees
What's the closest value for the Second card to rotate
First card is only rotated when it is not flipped
What if I placed on another slot of the table but not sure the rotation of the card.
:p
It will work normally
Can you show the code of the rotation when the first card is placed?
So it doesn't have a cap when it comes to individual rotations like.
I can place one card at 12° or 67°
Yeah
Only EnumCardRenderType.Stack doesn't rotate cards except first card
- Does no cap on rotation affect performance?
- Can it also apply when you play your own cards faced against the player?
No effect on performance
When I do a 360° does it reset to 0°?
Yes
Also
This is how much items the last update will add
Is there a easier way to have controls less dependant on keybinds?
How
I wrote network code specifically for hotkeys
Yes but it can also work but I'm figuring out to how make the controls more intuitive without adding keybinds
I have a idea when you want to play the cards.
Making the cards interact with your mouse with just clicks
Probably not your thing
How
I don't even know how to do that
Theory:
Make the cards have a invisible interactive UI where you can access a cards individually.
That's how card games are I think
I don't know how to do that
Does VS UI support alpha value?
You can do anything with UI, but I have no idea
Make each card have it's own UI hit detection, make it fully transparent
You say it as if it is super easy thing to do
It's not like that you have to do it but it can be a way to try decompose it of how it works
If someone makes PR with all the code for it, sure, but I won't do it myself
For me it's not even worth to add
Yeah
🤔 Can you switch the cards location while in your deck of cards?
What
To organize numbers and Colors
Did you not see the videos?
nvm
I recorded like 1000 videos with cards
I forgot damn
do i need to add poker tokens?
I can make them stackable like cards
Add a stackable property to pieces
Why
Tokens are a currency but they're pieces of the game
So
I can add them as separate item anyway
Sure but on checkers when the piece reaches to the end they stack one piece on top of the one that achieved the end
Adding that for checkers would only clutter the code unnecessarily
What's how you play checkers in real life
Why do you want to stack checkers
Did you ever play checkers in the mod?
No just in real life
You can flip checkers in the mod
Can't you add the flip mechanic to your mod and with chiseled pieces
What
No
No one would use it
Why
Because you are the first one who suggested it
And you didn't even play the mod
Do you even know someone who did
170 servers have the mod
You mean the version that include it
I test the mod for bugs and exploits
Like with the bowl being able to have any item
“Did you play this specific game in the mod?”
“No not this one.”
“So you don’t play the mod.”
Wild convo tonight.
sometimes
lol
This is so sad that I can't override maxStackSize in the item class
There is like literally nothing
So I tested every new item and I think it is ready for release
Isn’t it a field?
Just set the field value.
There is no access to itemstack
I see.
@bitter kayak
Shiny gold ingots instead rusty gears because they look much cooler
@bitter kayak I just released new version, go test it
Lunch
The mod is compatible with more alloys :D
Uh...
-The keybinds repeat twices
-The second keybind overlays the hitbox of the text
Shuffling breaks the textures of the cards
Combining all the cards with the broken shuffled cards and the ones you removed it only affects one slots but not all slots
It would be cool to make bits of metal, crystals and meteoric iron being accessible with chiselling or even when making boards
Vanilla bug
what
what do you mean broken shuffled cards
They don't display the texture of the card
They shouldn't
Flipped cards don't display textures to avoid cheating
How to even fix this
Which is when you have a card exposed but your deck is a shuffled one
But you can only do this to one slot
What do you mean
Shuffle it again
Ok
It worked but god you change stuff
Which I can't keep track of everything
What do you mean
Despite of the stuff you add you make adjustments that can be hard to even tell if it's a issue
For example?
I wrote all changes in changelog
I thought that when the cards faced the logo the other side would still be visible
Since there's some games that have that rule
I could add hotkey that adds "alwaysVisible" attribute to cards
@cosmic egret
It does now
Did you try new update
what else
I've not had the chance, I've been doing some IRL work in my workshop. I'll go load it up in SP and give it a try though 😄
Small bug I've noticed, when placing down a joker
Actually it appears to be for all cards
Also I think something is double calling the shuffle card thing
Other than that I'm loving the cards 😄
Vanilla bug
Ah all good
It was lovely though! Is there a way to roll multiple dice at once? Or should I place them down one at a time? For something like farkle
Place them down one at a time
I don't know how to make all of them roll all at once
🤔
Would it be possible to make a dice cup or tower, where you load an inventory and then right click it, and it'll place all the dice down (rolled) on the grid like in the dice trays?
Just a thought, totally fine if it's not something worth perusing
and it's a minor detail. it's not like I can't play dice games hahah
Maybe
The problem in adding that is that you can do the same thing without dice tower
True! I forgot about the hopper/chute
A lot of things that people suggest are either already possible in the mod, or require too much work
Also I didn't test hotkeys on servers
So if anyone can, please tell me if they work
I'm several weeks out on a new server probably, I'm still trying to get my head around the filestructure for the oregen stuff. Once that's done it's all relatively easy math but between work and hobby stuff I've been slow.
Do card rotations work for you when placed?
like here
Pretty much beyond the first card of a deck the all go invis
invisible what?
This is very strange
there's a card on the table i'm hovering over in the screenshot, and 4 or 5 on the right table
No other mods installed. 1.20.6 and superflat world
press Shift Ctrl S when hotbar slot empty
Can't reproduce
hm
I'll reload and test it again in 10-20 min
It... works just fine now
Okay. Well
Nope! Got it to work, it's to do with the Jokers
Yeah, joker related, then it causes all other cards to have an issue.
So strange
There are textures etc.
They don't have the suit
As long as rank is joker, textures should work
Okay
Time to play poker with the boys during winter
Note that there are no poker tokens
Or gears 😄
or coins from the coinage mod
that would probably work best, given they can stack on the ground like gears
Sure you can
Well thats what we can bet with
But for the actual chips, id say nuggets that correspond to different values would work more
Like copper for 5, bronze for 10, iron for 20 and so on
True, although using the Coinage mod might be a nicer implementation of that, especially if you can stack (the smallest) coins individually like on the dice tray! 😄
CANMarket is pretty dope
for what
it's the money/shop mod we use, really lean
it's where the copper gears rag mentioned come from
How is it related to tabletop games
Oh right
lol sorry I also didn't realize that rag mentioned it like two days ago
Dana how to even make pieces made of stuff that doesn't have blocks
Like minerals and crystals
What minerals
The ones that you can make dice and pieces
What pieces
Use schematic
What if I want the ones from chiseled
Chiseled what
What do you mean?
A mineral/crystal chiseled piece or board
If you can do it in vanilla, then you can do the same in the mod
If not, then not
I been contemplating making a ttrpg oneshot for peeps to larp through, utilizing the dice ftom here. I just don't know what to do for a plot.
I'd love some help from the more technical or lore-savvy if they're willing to give it?
Do you want to make custom board?
Nah, I understand the mod sufficiently 🙂
To be perfectly honest I don't know the appropriate channel to be workshopping my ideas.
Did you try cards too?
Couldn't quite figure out how to work the cards.
But really all I need are the dice and I think I have them handled.
Thank you for the mod.
There are guides
You can add custom cards in, no?
I'm loving the cards mod but I can't help but wonder if I'm doing something wrong. I've familiarized myself with the key combos to get it to do what I want, except I can't seem to figure out if you can draw a card face down. I could always tweak some poker rules but at the moment it seems like I can't have the dealer deal out cards without knowing what each card is. am I doing something wrong?
forgive me if this has already been addressed somewhere
You can't draw flipped card, I don't know how to implement it
🙁 i figured there was a technical limitation to it, wanted to make sure I wasn't missing something. it'll be a simple task to have a dedicated dealer for poker nights though, or just have people draw their own cards, it's effectively the same thing afterall
Does anyone need wildcraft trees compatibility?
omg
Press F while holding dice
Thanks
Planning to run Strixhaven in a server using this mod
@worthy sparrow i'm having trouble making custom boards, how do i set a scale with a second chiseled block?
I'm just very confused, I want to make a board at a 1x1 or a 2x2 scale
Like how do I define the hotbox with a chiseled block?
I can show you my custom board if you think that would help.
Left is the collsion board, right is the decorative board.
You can make each 'tile' on the board any height.
But to make it one space, it all needs to be the same material.
There is handbook guide
That really helped me, thanks
is the config supposed to be null? or is there supposed to be something there?
What exactly?
It shouldn't be null
well for some reason its null on my end, would removing the file and restarting the world work?
i had configlib mod on and tried editing the config from ingame but then it crashed, so i checked the config outside the game and there is nothing but the word null.
i'll see if removing the file works, if not then somethings wrong
doing so did not infact work
and without config lib its still null >.>
infact only having the tabletop mod on just gives a null config in modconfig folder
what is it supposed to have in it?
testing now~
there is a config now~
debug and client work
i say its working now and works with configlib :3
Hey! Does this mod contain d16? I know at one point you said you wanted to add it, but I wasn't sure if you ever got around to it. It's used in wargaming a good bit, and I was thinking about how with chiseled boards, one could chisel some sweet terrain to wargame on.
Not yet
Okay! Thanks for the quick response.
I saw your messages here about modelling the d10, and I saw you were having some... certain difficulties due to its unique geometry.
I think it'd be helpful to note that despite the somewhat-similar appearance the d16 shares with the d10, the d16 is a much simpler geometry since its faces are triangular instead of kite-like.
Triangular faces are made of the cubes too
I know, I've worked with the particular geometry myself in Blockbench instead of in VSMC. Still much better than the kite faces, and having to do extra to clean up the edges.
Can't find proper triangle
I'm sorry, I don't understand what you mean.
I can't find right proportions to make D16
I'll see what I can do.
There are simple shapes, including triangle, in archive on github
I was just gonna throw together a mockup on Blockbench, then show you the proportions.
I just have to have a few minutes to get off the phone and get set up at the computer. My monitor died a few weeks back and so I'm using my VR headset as my main display in desktop link mode.
I'll also check out that link you sent.
So what exactly are you struggling with?
tried to make D16
So I just did a very quick mockup in Blockbench.
Of course this looks messy, but you'll want to not texture the parts...
... - here in the red and blue triangles.
The width of a rectangle is 7 units, the height is 10.
The origin point is...
The angle is...
-53 Z
- but depending on the axis you are working on from, it could be +53, and in X instead of Z.
Then you could use more boxes to tidy up the edges to hide the jagged, pixelated UV from the rectangle.
Not how it works
Look at D10 model
just open it in VSMC or blockbench
I don't know how to navigate Git. Can you private message me the file?
I guess why I don't understand that it doesn't work this way, is that geometry is a universal aspect of all objects.
it is "public" archive so
What it looks like to me, what you're doing here is positioning all triangles along a perimeter, and then angling them in till their points meet.
Instead, do one face.
I made D10 in similar way
Although i made D10 with help of star shape
Angle it towards the center vertical axis, until the top point reaches the axis marker.
here is the shape that helped me with D10
If the triangle has too shallow of an angle, your triangle is too short.
Yeh, I see what you're doing. You're making it much harder on yourself. Let me eat, and I'll try and clear it up.
.
Oh, my word.
You've like... really gone the hard way.
Alright, so I can still help you get the right geometry.
I tried to make it look as real as possible
Do you want to see D4, D8, D12 and D20 too?
Also I made it this way because obj models didn't work
Right. It looks good, too.
You just have still taken a harder route in even establishing the geometry.
I'll adjust my idea, and then I can show you a trick, and you may consider trying to implement it.
You'll be able to continue your method of designing individual faces, but the trick will make it less work assembling the faces into a complete shape.
i suck at geometry
at math too
Yeh, that's fine. This is a trick that will help you.
It looks like the first thing you've done is work on the perimeter. The red line here. Right?
Yes
