Most of the games are in the Studio, but I don't see that one, 7 Wonders, or Stone Age, all of which have bits of code that I'd like to look at.
Where's the code for Sushi Go?
- Victoria_La
- Posts: 620
- Joined: 28 December 2015, 20:55
Re: Where's the code for Sushi Go?
Games written by bga owners are not on studio, that includes most of premium games.
If you want something specific to look at ask on forum and we give you some recommendation on where to look inside games that are on studio.
If you want something specific to look at ask on forum and we give you some recommendation on where to look inside games that are on studio.
- admiralspunky
- Posts: 40
- Joined: 06 September 2013, 23:18
Re: Where's the code for Sushi Go?
In 7 Wonders, you can swap out the deck for one that uses new artwork; are there any other games that do that? e: games that are on the Studio?
- RicardoRix
- Posts: 2109
- Joined: 29 April 2012, 23:43
Re: Where's the code for Sushi Go?
Define the 2 different decks in css, and just change the css class.admiralspunky wrote: ↑24 January 2021, 16:12 In 7 Wonders, you can swap out the deck for one that uses new artwork; are there any other games that do that? e: games that are on the Studio?
Likely if you're adding the cards via dojo.place you can set the class accordingly then.
Alternatively, dojo.query and toggleClass if the divs are already in place.
Re: Where's the code for Sushi Go?
You can check out "frenchtarot" on the studio for example.
- admiralspunky
- Posts: 40
- Joined: 06 September 2013, 23:18
Re: Where's the code for Sushi Go?
Oh, wow, there it is. It took me a while to find the option to switch your decks. Turns out that, while most games only have generic in-game preferences, some, like French Tarot and Can't Stop, actually have additional preferences. Although I'm curious: in 7 Wonders, the different deck is under Options, and it can be set before the game; why the difference? Isn't it just a cosmetic change?
- Alex_erson
- Posts: 8
- Joined: 22 October 2015, 20:37
Re: Where's the code for Sushi Go?
In 7 wonders the 2 deck are actually 2 variant of the game. Some cards and wonders are slightly different and it's therefore not just a cosmetic change.
- admiralspunky
- Posts: 40
- Joined: 06 September 2013, 23:18
Re: Where's the code for Sushi Go?
It took me a while to figure out how to hook up a preference. It turns out that, after you create the preference in gameoptions.inc, you then have to go over to name.js and modify the code in two places. That's... not how that's supposed to be done. I think I figured it out, though. TutorialHeartsAdmiral now has a working Preference that switches between a 2-color and a 4-color deck.
- admiralspunky
- Posts: 40
- Joined: 06 September 2013, 23:18
Re: Where's the code for Sushi Go?
Oh hey, that's neat. And not very well advertised. The options for some games come with nice little tooltips; that's the kind of thing that I could put into other games, like 7 Wonders if it were on the Studio.Alex_erson wrote: ↑25 January 2021, 07:03 In 7 wonders the 2 deck are actually 2 variant of the game. Some cards and wonders are slightly different and it's therefore not just a cosmetic change.
What I'd really like to see is the Cities expansion for 7W. There are a few expansions, but that one seems like it'd be pretty easy to add; it's mostly just new cards, right?
Re: Where's the code for Sushi Go?
As with many big license, the problem is to have the publisher grant the license.admiralspunky wrote: ↑25 January 2021, 21:39Oh hey, that's neat. And not very well advertised. The options for some games come with nice little tooltips; that's the kind of thing that I could put into other games, like 7 Wonders if it were on the Studio.Alex_erson wrote: ↑25 January 2021, 07:03 In 7 wonders the 2 deck are actually 2 variant of the game. Some cards and wonders are slightly different and it's therefore not just a cosmetic change.
What I'd really like to see is the Cities expansion for 7W. There are a few expansions, but that one seems like it'd be pretty easy to add; it's mostly just new cards, right?