Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locally compiled version requires a stacked item at level 15 without a stacker, seems to think it's the demo version #1500

Open
stuartlangridge opened this issue Dec 6, 2022 · 11 comments
Labels

Comments

@stuartlangridge
Copy link

I'm running a compiled version of this github repo of Shapez, on Ubuntu 20.04 and node 16. It built and ran fine, and I have played it up until level 15. However, at level 15 I've been presented with a shape to build which is not possible to build, because it requires stacking, and I have not been given a stacker.
image
I did notice that the game seemed to "skip through" some levels -- perhaps levels 11-14? but it happened quickly, so I'm not sure.
In addition, opening the settings screen shows "fullscreen mode" being disabled with the legend "not available in the demo".
Is downloading and running this repo equivalent to running the demo of the game, and playing the full game requires purchase? If not, is there some setting somewhere I need to poke so that the downloaded version runs in "full game mode" rather than "demo mode"?

@EmeraldBlock
Copy link
Collaborator

Firstly, that's definitely a freeplay (post-story) shape, so this is definitely the demo but with the level restriction somehow passed.

Just making sure, did you build with yarn gulp? If so, I'd guess that the recent demo changes weren't checked properly.

Anyway, you can build the standalone with

yarn gulp build.standalone-steam
yarn gulp standalone.standalone-steam.prepare
yarn gulp standalone.standalone-steam.package.linux64

@dengr1065 dengr1065 added the bug label Dec 7, 2022
@dengr1065
Copy link
Collaborator

Marking as a bug because while some differences between localhost and production demo are ok, this is quite broken.

@stuartlangridge
Copy link
Author

Just making sure, did you build with yarn gulp? If so, I'd guess that the recent demo changes weren't checked properly.

I did indeed. yarn in the top-level directory, then yarn and yarn gulp in the gulp directory, and that's it, with the results you see. I can provide any log files that might be useful if you can tell me what to provide!

Just to confirm: even ignoring this bug, when I build this open source version, am I meant to get the demo (and so to get the full game I should buy it from Steam) or am I meant to get the full game?

@stuartlangridge
Copy link
Author

Anyway, you can build the standalone with

sadly, the final step of this fails:

yarn run v1.22.11
$ gulp standalone.standalone-steam.package.linux64
Unset environment variable, might cause issues: SHAPEZ_CLI_SERVER_HOST
Unset environment variable, might cause issues: SHAPEZ_CLI_ALPHA_FTP_USER
Unset environment variable, might cause issues: SHAPEZ_CLI_ALPHA_FTP_PW
Unset environment variable, might cause issues: SHAPEZ_CLI_STAGING_FTP_USER
Unset environment variable, might cause issues: SHAPEZ_CLI_STAGING_FTP_PW
Unset environment variable, might cause issues: SHAPEZ_CLI_LIVE_FTP_USER
Unset environment variable, might cause issues: SHAPEZ_CLI_LIVE_FTP_PW
Unset environment variable, might cause issues: SHAPEZ_CLI_APPLE_ID
Unset environment variable, might cause issues: SHAPEZ_CLI_APPLE_CERT_NAME
Unset environment variable, might cause issues: SHAPEZ_CLI_GITHUB_USER
Unset environment variable, might cause issues: SHAPEZ_CLI_GITHUB_TOKEN
[12:36:09] Using gulpfile ~/Programs/Others/shapez.io/gulp/gulpfile.js
[12:36:09] Starting 'standalone.standalone-steam.package.linux64'...
Packaging error: Error: Cannot find module 'electron' from '/home/aquarius/Programs/Others/shapez.io/build_output/standalone-steam/built'
    at /home/aquarius/Programs/Others/shapez.io/gulp/node_modules/resolve/lib/async.js:115:35
    at processDirs (/home/aquarius/Programs/Others/shapez.io/gulp/node_modules/resolve/lib/async.js:268:39)
    at isdir (/home/aquarius/Programs/Others/shapez.io/gulp/node_modules/resolve/lib/async.js:275:32)
    at /home/aquarius/Programs/Others/shapez.io/gulp/node_modules/resolve/lib/async.js:25:69
    at FSReqCallback.oncomplete (node:fs:202:21)
    at FSReqCallback.callbackTrampoline (node:internal/async_hooks:130:17) {
  code: 'MODULE_NOT_FOUND'
}
[12:36:09] Finished 'standalone.standalone-steam.package.linux64' after 15 ms
Done in 0.70s.

I don't know whether I need to manually yarn install electron or similar first? (But I would expect that since there are specific commands to prepare and build a standalone, that those commands would also pull in all needed dependencies?)

@DJ1TJOO
Copy link
Collaborator

DJ1TJOO commented Dec 7, 2022

I think you also need to do yarn in the electron folder. And you need to remove the greenworks package if that gives an error

@stuartlangridge
Copy link
Author

I think you also need to do yarn in the electron folder. And you need to remove the greenworks package if that gives an error

$ cd ../electron
electron (master) $ yarn
yarn install v1.22.11
[1/4] Resolving packages...
[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads ssh://git@github.com/tobspr/shapez.io-private-artifacts.git
Directory: /home/aquarius/Programs/Others/shapez.io/electron
Output:
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

That looks like it's trying to read from a private-artifacts repo that I don't have access to, so maybe building a standalone electron version is a thing that only the core team need to be able to do?

@EmeraldBlock
Copy link
Collaborator

run yarn --ignore-optional

@stuartlangridge
Copy link
Author

run yarn --ignore-optional

ok, confirmed, once I've done that in the electron directory, building the standalone version with the three commands above works! And the standalone version doesn't seem to be a demo: fullscreen works, for example!

@Henrycious
Copy link

Having the same problem on my Mac. Tried everything that was mentioned so far
first yarn --ignore-optional in the electron-folder
and then the three commands:
yarn gulp build.standalone-steam
yarn gulp standalone.standalone-steam.prepare
yarn gulp standalone.standalone-steam.package.linux64
but I still only get the demo-version. Looked through the corresponding .js-file including the standalone.standalone-steam.package.linux64 and I saw that there are only the versions for windows and linux.

Also tried locally on my Mac and on Gitpod via the link in the Repo on this repo and on the shapez-community-edition-Repo. All tries only got me the demo-mode.

Is it even possible to run the full-version on Mac? May anyone has an idea on what else I can try?

@daniel-richter
Copy link

daniel-richter commented Apr 11, 2023

Is it even possible to run the full-version on Mac? May anyone has an idea on what else I can try?

There is the target standalone.standalone-steam.package.darwin64. After running it (ignore Signing steam_appid.txt error: The specified item could not be found in the keychain), you can find the app in "build_output/standalone-steam/shapez-darwin-x64".

Build commands at a glance:

  • in repo root:
    yarn
  • in ./electron:
    yarn --ignore-optional
  • in ./gulp:
    yarn
    yarn gulp
    yarn gulp build.standalone-steam
    yarn gulp standalone.standalone-steam.prepare
    then choose one:
    Linux: yarn gulp standalone.standalone-steam.package.linux64
    Windows: yarn gulp standalone.standalone-steam.package.win64
    Mac: yarn gulp standalone.standalone-steam.package.darwin64

@TristonStuart
Copy link

None of the above worked for me.

What I was able to do was change a line of code so the game thinks I am running the full version (this works for the web version at least).

You need to go into this file: \src\js\core\steam_sso.js
And change line 4 from

export let WEB_STEAM_SSO_AUTHENTICATED = false;

to

export let WEB_STEAM_SSO_AUTHENTICATED = true;

The game then thinks you are playing a full version and will not skip levels 9-14. Also if you already have a game save and want to change the levels you want to go into this file src\js\game\hub_goals.js. That file is the class that controls the hub level. You can then add some code to the constructor for example that makes the class instance globally accessible. For example:

constructor(root) {
  super();
  
  // Make global
  window.hubControl = this;
  
...}

Then in game you can start your game, open dev tools and set the level using window.hubControl.level = 8 then to update (which will go to the level higher than set) you do window.hubControl.computeNextGoal().

Hopefully this helps someone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants