config.automatic_images and config.automatic_images_strip can cause Ren'Py to automatically define images.
But composite images aren't defined by this.
I added two config variables config.automatic_images_parts and config.automatic_images_not_necessary_parts which cause Ren'Py to automatically define composite images.
# config.automatic_images_parts = None
#
# If this and `config.automatic_images` are not None, this causes Ren'Py
# to automatically also define composite images.
#
# When not set to None, this should be set to a list of strings giving
# directories that include images which are parts of composite images.
#
# Parts are composited from left to right and all parts must be same size.
#
# config.automatic_images_not_necessary_parts = []
#
# A list of strings giving directories including images which are not
# necessary parts for composite images.
#
# For example, if relative variables are set like below:
#
# * config.automatic_images = ["/"]
# * config.automatic_images_parts = ["body", "face", "sweat", "surplus"]
# * config.automatic_images_not_necessary_parts = ["sweat"]
#
# and your game directly contains, :
#
# * eileen/body/b1.png
# * eileen/body/b2.png
# * eileen/face/f1.png
# * eileen/face/f2.png
# * eileen/sweat/sweat.png
#
# then below images are defined :
#
# * eileen b1 f1
# * eileen b1 f1 sweat
# * eileen b1 f2
# * eileen b1 f2 sweat
# * eileen b2 f1
# * eileen b2 f1 sweat
# * eileen b2 f2
# * eileen b2 f2 sweat
I tried this by Ren'Py v6.17 and this code is public domain.
Automatically composite images define
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.
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.
- akakyouryuu
- Regular
- Posts: 162
- Joined: Fri Nov 30, 2012 10:29 am
- Contact:
Automatically composite images define
- Attachments
-
- auto_image_define.rpy
- (4.54 KiB) Downloaded 189 times
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: Automatically composite images define
With indentations.akakyouryuu wrote:Ren'Py v6.17 -- public domain.Code: Select all
# config.automatic_images_parts = None # # If this and `config.automatic_images` are not None, this causes Ren'Py # to automatically also define composite images. # # When not set to None, this should be set to a list of strings giving # directories that include images which are parts of composite images. # # Parts are composited from left to right and all parts must be same size. # # config.automatic_images_not_necessary_parts = [] # # A list of strings giving directories including images which are not # necessary parts for composite images. # # For example, if relative variables are set like below: # # * config.automatic_images = ["/"] # * config.automatic_images_parts = ["body", "face", "sweat", "surplus"] # * config.automatic_images_not_necessary_parts = ["sweat"] # # and your game directly contains, : # # * eileen/body/b1.png # * eileen/body/b2.png # * eileen/face/f1.png # * eileen/face/f2.png # * eileen/sweat/sweat.png # # then below images are defined : # # * eileen b1 f1 # * eileen b1 f1 sweat # * eileen b1 f2 # * eileen b1 f2 sweat # * eileen b2 f1 # * eileen b2 f1 sweat # * eileen b2 f2 # * eileen b2 f2 sweat
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
- akakyouryuu
- Regular
- Posts: 162
- Joined: Fri Nov 30, 2012 10:29 am
- Contact:
Re: Automatically composite images define
I improved performance.
I added default transforms.
If you define 'default_<image tag name>', the transform is applied to the composite images with the tag. For example, if you define default_eileen transform like below,
this transform is applied to composite images with 'eileen' tag.
I added default transforms.
If you define 'default_<image tag name>', the transform is applied to the composite images with the tag. For example, if you define default_eileen transform like below,
Code: Select all
transform default_eileen:
xanchor .5
- Attachments
-
- auto_image_define.zip
- (2.28 KiB) Downloaded 133 times
Who is online
Users browsing this forum: No registered users