Create account / Log in

Add deck permissions to new sides

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Add deck permissions to new sides

Postby ClayTon1 » October 1st, 2019, 9:21 pm

I'm trying to edit an existing module called Paths of Glory for my own use. The end goal is to take a two-player game, where both players have their own decks of cards, and make it so four players can join, where two players take each side and have access to the decks.
I have been able to easily create new sides (simply named Allied Powers 2 and Central Powers 2), and I can allow them to see the correct card hands, but I can't get them to be able to move the cards or interact with them or the decks in any way. The individual cards all have a prototype that contains the "restricted access" property in the definitions. I have tried adding the new sides to the restricted access property, unchecking the "prevent non-owning players from moving the piece" box, and I have even deleted the property from the prototypes altogether. None of those have worked. The decks themselves have no such restrictions, and I cannot figure out why I cannot connect the sides to the right cards. I can't even remove those restrictions overall, which would also be suitable.
If anyone could give some advice as to how to handle card restrictions, or where to look for them, I would greatly appreciate it.
Thanks in advance!
ClayTon1
 
Posts: 2
Joined: October 1st, 2019, 9:09 pm

Re: Add deck permissions to new sides

Postby ClayTon1 » October 2nd, 2019, 4:54 am

I figured out the problem; I was testing my changes with an existing scenario in the game, which was using the outdated code. I needed to refresh the counters in the game to get the changes to take place for the cards because the scenario had already dealt them into the decks. If I were to start a fresh new game and do the setup myself, that also fixes it.
I feel pretty dumb, but I certainly learned something from it and got what I wanted in the end.
ClayTon1
 
Posts: 2
Joined: October 1st, 2019, 9:09 pm

Re: Add deck permissions to new sides

Postby kerkael » October 2nd, 2019, 1:32 pm

hi ClayTon1. If I understand your needs, you wanted 2 players to play with the same side. But in Vassal, a Side is a player identity.

Let's say you have 4 colors defined as sides (Vassal term), and you want 2 Teams.

The cards from each deck will have a proto linked to its team colors:

Proto: Team A: Restricted Access: Red and Blue (Green and Black won't be able to move the cards)
Proto: Team B: Restricted Access: Green and Black (Red and Blue won't be able to move the cards)

When a player joins the game, they choose their color ... so their team.
If you want to make it possible to choose the team later, then you need to give a Global Property for each player, when they join, maybe randomly, and define your protos based on these GP, and not on the colors, which is not possible for Restricted Access. Instead, you'll need to define Restricted Commands. With a matching property ... but then I don't see how you can restrict the moves ...
Maybe you prevent ALL cards from being moved, and you only commands to : play, draft, draw, replace, turn, send to location ... and act on these to restrict commands ...
kerkael
 
Posts: 119
Joined: December 1st, 2017, 3:03 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 1 guest