Interactive Director: Removing Attributes from a Layered Image

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
Jackkel Dragon
Veteran
Posts: 283
Joined: Mon Mar 31, 2014 7:17 pm
Organization: Nightshade, Team Despair
itch: jackkel-dragon
Location: USA
Contact:

Interactive Director: Removing Attributes from a Layered Image

#1 Post by Jackkel Dragon »

I've been trying to get the hang of using the interactive director to make doing a first draft of portrait placement in my games easier, but I've run into a bit of a snag. While a lot of the layered image functionality is really well done in the director, I can't seem to figure out how to remove an attribute (image -attribute). Is there a way to do this that I'm just not noticing, or is there no way to remove an attribute once it's been added?
Main Website
Includes information about and links to many of my current and past projects.

Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series

User avatar
Jackkel Dragon
Veteran
Posts: 283
Joined: Mon Mar 31, 2014 7:17 pm
Organization: Nightshade, Team Despair
itch: jackkel-dragon
Location: USA
Contact:

Re: Interactive Director: Removing Attributes from a Layered Image

#2 Post by Jackkel Dragon »

I was about to ask this question again, so I did a search to make sure it hadn't been answered already. This was the most recent related post, which makes me think there has been no answer.

So, is there no way to remove an attribute within the director? Perhaps due to some kind of limitation? It seems like, at least for now, removing attributes can only be done with a text editor.
Main Website
Includes information about and links to many of my current and past projects.

Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series

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: Interactive Director: Removing Attributes from a Layered Image

#3 Post by PyTom »

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
Jackkel Dragon
Veteran
Posts: 283
Joined: Mon Mar 31, 2014 7:17 pm
Organization: Nightshade, Team Despair
itch: jackkel-dragon
Location: USA
Contact:

Re: Interactive Director: Removing Attributes from a Layered Image

#4 Post by Jackkel Dragon »

Thanks for looking into this. I actually didn't even realize my comment had been noticed, and was about to ask if I could look at the code for the director to take a look myself.

Speaking of which, I did look into the code after I saw it on GitHub. And I've hacked together a system that will hopefully work for me for a bit: [my 00director.rpy file]

It's probably far from being ideal, due to how I had to circumvent a safety measure regarding the allowed attributes in a line. But I figured I'd share my hack-around, just in case it helps find the real solution.

What my code changes do:
- Right-clicking an attribute will remove the attribute if it exists in the line, then add a "-" version of it.
- Left-clicking an attribute will remove the "-" version if it is in the line
- The code preventing bad show statement attributes has been subverted to allow "-attribute" to get through

I haven't done a difference check on the file with the original version from the current Ren'Py build, so there may be more changes that I don't recall... Anyway, I hope this helps. (And that it doesn't cause more problems than I solved in my own use for it.)
Main Website
Includes information about and links to many of my current and past projects.

Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series

Post Reply

Who is online

Users browsing this forum: Semrush [Bot]