Renpy Live2D Tutorial for Renpy 7.4.0

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
MaxLib
Newbie
Posts: 6
Joined: Sat Feb 13, 2021 3:25 pm
Completed: none yet.
Projects: Under Development
Deviantart: MaximumLiberty
Contact:

Re: Renpy Live2D Tutorial for Renpy 7.4.0

#16 Post by MaxLib »

Hello!

Yes it can be a hardware incompatibility on my side, but I would emphasize I only have experienced that with renpy so far. Yes it is obvious this error does not affect all users fortunately. :wink: I am currently working with unity + live2d and the two are working perfectly together.

I recently learned that next renpy update is on the way which will fix bugs related to live2d. :D

I have already know how to use live2d in renpy all thanks to you, so keep those tutorials coming they are very helpful! 8)

galatra303
Newbie
Posts: 12
Joined: Fri Jan 22, 2021 2:31 pm
Completed: 1
Organization: Galatra Games
Github: galatra303
Soundcloud: galatra303
itch: galatra303
Location: Houston, TX
Contact:

Re: Renpy Live2D Tutorial for Renpy 7.4.0

#17 Post by galatra303 »

PSA for all NVIDIA graphics card users:

Renpy 7.4.4. was recently released this month that contains an update where Renpy has disabled the threaded optimization option for all NVIDIA graphic cards, including the older chipset models like the GTX 765m, etc. This would stop playing the Live2D animations completely when playing any Renpy Live2D game.

I highly recommend you stick with Renpy version 7.4.2 or earlier for those who want to stick with NVIDIA graphic card options.

On the other hand, for those with AMD graphic chipsets or Intel internal graphics cards, you should be fine.

Thank you for your understanding.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Renpy Live2D Tutorial for Renpy 7.4.0

#18 Post by PyTom »

I don't believe this is the case. Threaded optimizations and Live2D have nothing to do with each other.
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
Demetriusz
Newbie
Posts: 4
Joined: Fri Apr 05, 2024 5:50 pm
Github: https://github.com/Dimetriy755/Night_stranger_12/
Contact:

Re: Renpy Live2D Tutorial for Renpy 7.4.0

#19 Post by Demetriusz »

Hello everyone!) I installed Renpy Live2D Tutorial for Renpy 7.4.0. I just wanted to check (test) how this whole thing works. Video from YouTube: (https://www.youtube.com/watch?v=nbAgxfdukaY). Code in GiyHub: (https://github.com/galatra303/RenpyLive2DTutorial). I did everything as shown in the video and screenshots, but the python code does not work for some reason unknown to me. I'm new to scripting visual novels and maybe someone knows what the problem is here. Here's what's in the logs:

2024-04-03 18:04:35 UTC
Windows-10-10.0.19044
Ren'Py 8.2.1.24030407

Early init took 0.47s
Loading error handling took 0.18s
Loading script took 10.99s
Loading save slot metadata took 0.03s
Loading persistent took 0.00s

Full traceback:
File "game/script.rpy", line 19, in script
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\ast.py", line 922, in execute
img = renpy.python.py_eval_bytecode(self.code.bytecode)
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\python.py", line 1202, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/script.rpy", line 19, in <module>
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 587, in __init__
common = self.common
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 538, in common
return self.create_common()
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 526, in create_common
rv = Live2DCommon(self.filename, self.default_fade)
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 188, in __init__
init()
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 95, in init
onetime_init()
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 67, in onetime_init
if not renpy.gl2.live2dmodel.load(dll): # type: ignore
File "live2dcsm.pxi", line 243, in renpy.gl2.live2dmodel.load
TypeError: can only concatenate str (not "bytes") to str

While running game code:
File "game/script.rpy", line 19, in script
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "game/script.rpy", line 19, in <module>
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
TypeError: can only concatenate str (not "bytes") to str

Full traceback:
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\bootstrap.py", line 359, in bootstrap
renpy.main.main()
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\main.py", line 526, in main
renpy.game.context().run(node)
File "game/script.rpy", line 19, in script
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "lib/python3.9/future/utils/__init__.py", line 444, in raise_
File "game/script.rpy", line 19, in script
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\ast.py", line 922, in execute
img = renpy.python.py_eval_bytecode(self.code.bytecode)
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\python.py", line 1202, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/script.rpy", line 19, in <module>
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 587, in __init__
common = self.common
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 538, in common
return self.create_common()
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 526, in create_common
rv = Live2DCommon(self.filename, self.default_fade)
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 188, in __init__
init()
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 95, in init
onetime_init()
File "C:\VERY NECESSARY\2\game-dev\drafts\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 67, in onetime_init
if not renpy.gl2.live2dmodel.load(dll): # type: ignore
File "live2dcsm.pxi", line 243, in renpy.gl2.live2dmodel.load
TypeError: can only concatenate str (not "bytes") to str

While running game code:
File "game/script.rpy", line 19, in script
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "game/script.rpy", line 19, in script
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "game/script.rpy", line 19, in <module>
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
TypeError: can only concatenate str (not "bytes") to str

User avatar
Demetriusz
Newbie
Posts: 4
Joined: Fri Apr 05, 2024 5:50 pm
Github: https://github.com/Dimetriy755/Night_stranger_12/
Contact:

Re: Renpy Live2D Tutorial for Renpy 7.4.0

#20 Post by Demetriusz »

1. The tutorial was able to run on Ren'Py 7.4.2 (That is, the first
thing to do to run it is to download and install Ren'Py 7.4.2).

2. Then I forcibly enabled GL rendering in the settings menu: [Shift] + [G].

3. Next, I copied the "gui" folder from the game:
"the_question" to the folder ...\Live 2D Tutorial\game.

4. And in the folder "gui" I also copied from "the_question" copied two
files game_menu.png and main_menu.png (+ I changed the resolution
of these files to 1920 & 1080).

5. I had to download the BalooTamma2.ttf fonts and put them in a folder:
.../Live 2D Tutorial/game/gui/font/... And in the script gui.py (in "Fonts
and Font Size") specify the full paths to BalooTamma2.tff.

6. The options.rpy script should have: define config.gl2 = True.

All this helped me to launch the test tutorial "Live2D Tutorial",
unfortunately it didn't work on versions Ren'Py 8.1.0 & 8.2.1 anyway.

So maybe someone will need all this for a test run of the tutorial on Ren'Py 7.4.2.

And here's what he writes in the logs on the latest version of Ren'Py 8.2.1:

I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 19, in script
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "game/script.rpy", line 19, in <module>
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
TypeError: can only concatenate str (not "bytes") to str

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "game/script.rpy", line 19, in script
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "C:\VERY NECESSARY\2\game-dev\renpy-8.2.1-sdk\renpy\ast.py", line 922, in execute
img = renpy.python.py_eval_bytecode(self.code.bytecode)
File "C:\VERY NECESSARY\2\game-dev\renpy-8.2.1-sdk\renpy\python.py", line 1202, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/script.rpy", line 19, in <module>
image Epsilon = Live2D("Resources/Epsilon", base=.8, loop=True,)
File "C:\VERY NECESSARY\2\game-dev\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 587, in __init__
common = self.common
File "C:\VERY NECESSARY\2\game-dev\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 538, in common
return self.create_common()
File "C:\VERY NECESSARY\2\game-dev\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 526, in create_common
rv = Live2DCommon(self.filename, self.default_fade)
File "C:\VERY NECESSARY\2\game-dev\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 188, in __init__
init()
File "C:\VERY NECESSARY\2\game-dev\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 95, in init
onetime_init()
File "C:\VERY NECESSARY\2\game-dev\renpy-8.2.1-sdk\renpy\gl2\live2d.py", line 67, in onetime_init
if not renpy.gl2.live2dmodel.load(dll): # type: ignore
File "live2dcsm.pxi", line 243, in renpy.gl2.live2dmodel.load
TypeError: can only concatenate str (not "bytes") to str

Windows-10-10.0.19044 AMD64
Ren'Py 8.2.1.24030407
1.0
Sat Apr 6 19:21:54 2024

That is, again this is an uncaught exception...

Post Reply

Who is online

Users browsing this forum: Bing [Bot]