Steam and non-Steam distributions

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Obscura
Eileen-Class Veteran
Posts: 1431
Joined: Fri Mar 09, 2012 6:58 pm
Projects: Coming Out On Top
Location: United States
Contact:

Steam and non-Steam distributions

#1 Post by Obscura »

Is there a way to use the game files for a Steam distribution usable for the non-Steam version?

To be more specific, I'd love to be able to use the same script for both Steam and non-Steam builds, and not have to yank "achievement.grant(name)" from the script for the non-Steam build. (So far achievements happens to be the only real difference between the the data for both builds.)

Can I leave these in for the non-Steam builds? What happens if "achievement.grant(name)" gets compiled into non-Steam builds?

I recall seeing another thread about this somewhere, but haven't been able to find it.

Appreciate any advice.
Coming Out On Top - An Adult Gay Dating Sim
website

mikolajspy
Regular
Posts: 169
Joined: Sun Jun 04, 2017 12:05 pm
Completed: Too many, check signature
Deviantart: mikolajspy
Location: Wrocław, Poland
Contact:

Re: Steam and non-Steam distributions

#2 Post by mikolajspy »

I think engine just throws "steam not initialized" into log.txt, but I don't think it's a very big issue.

User avatar
Obscura
Eileen-Class Veteran
Posts: 1431
Joined: Fri Mar 09, 2012 6:58 pm
Projects: Coming Out On Top
Location: United States
Contact:

Re: Steam and non-Steam distributions

#3 Post by Obscura »

Great, thanks for the response, mikolajspy.
Coming Out On Top - An Adult Gay Dating Sim
website

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Steam and non-Steam distributions

#4 Post by PyTom »

The problem with the steam (being renamed to store in 6.99.13) build is that it's unlikely to work on a Mac without being launched by an app store like Steam or Itch. If you're fine with that, you can use it - it will work just as well. But you probably need to test on the mac.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Steam and non-Steam distributions

#5 Post by Imperf3kt »

You can always just use conditionals.

A

Code: Select all

define config.steam_build = True

----------

    if config.steam_build:
        $ achievement.grant
Then you only need change a single variable when switching builds.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Steam and non-Steam distributions

#6 Post by PyTom »

The achievement stuff is meant to work even if Steam isn't present.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Obscura
Eileen-Class Veteran
Posts: 1431
Joined: Fri Mar 09, 2012 6:58 pm
Projects: Coming Out On Top
Location: United States
Contact:

Re: Steam and non-Steam distributions

#7 Post by Obscura »

The problem with the steam (being renamed to store in 6.99.13) build is that it's unlikely to work on a Mac without being launched by an app store like Steam or Itch. If you're fine with that, you can use it - it will work just as well. But you probably need to test on the mac.
Hmmm...I was planning to build separate Windows, Mac, and Linux packages for the non-Steam version, and not use the same Steam build. I just meant I'd use the same main scripts so I could avoid having two different script files (one that grants achievements and one that doesn't.) But I'd ask Renpy to build separate distributions for everything.

So hopefully that circumvents the issue above?
Coming Out On Top - An Adult Gay Dating Sim
website

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Steam and non-Steam distributions

#8 Post by PyTom »

Yes, that will work. The mac stuff really only works outside of the stores if you have a mac to sign it, and an apple issued key. Blame apple.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: Steam and non-Steam distributions

#9 Post by jack_norton »

This is one of the main reasons why in future games I'll use only Steam or Itch.io. Blame Apple and MS (though at least on Windows is less annoying). I wrote about this in my latest blog: http://www.winterwolves.net/blog/2017/1 ... amenities/
follow me on Image Image Image
computer games

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Kocker