Hey all-
I've been tearing my hair out over at this for awhile and finally broke down to ask for some assistance. It's entirely possible that it's something that I'm missing in my understanding of how something is supposed to work, or perhaps it doesn't work as written, or some combination thereof. But the main thing I'm referring to is this code on this page.
define e = Character("Eileen", image="eileen")
label start:
show eileen mad
e "I'm a little upset at you."
e @ happy "That's funny."
e "But don't think it gets you out of hot water."
The way I'm understanding it- if you have images defined for a specific character, as long as you've defined the image to use for that character, you can use the @ symbol while showing speech in order to make a temporary change.
In the game I'm working on, we've got multiple outfits, poses, and expression changes for each character. As such, presently, one such group of definitions for a character looks like:
image jack uniform flustered 1 = "JackFlustered1Uniform.png"
image jack uniform happy 1 = "JackHappy1Uniform.png"
image jack uniform neutral 1 = "JackNeutral1Uniform.png"
image jack uniform neutral 2 = "JackNeutral2Uniform.png"
image jack uniform sad 1 = "JackSad1Uniform.png"
So in my assumptions, jack is the image tag, and then uniform, flustered/happy/neutral/sad and 1/2 are attributes for jack.
With that being said, even if I define jack with-
define ja = Character("Jack", image="jack")
I cannot, for the life of me, get the @ thing to work.
I don't mind writing out
show jack uniform neutral 1
mc "blah blah"
show jack uniform neutral 2
ja "blah blah blah"
show jack uniform neutral 1
But man if I didn't have to I would really like to not, that would be fantastic.
Thank you all in advance for any ideas/help/tips/tricks/etc!
[Resolved] Using the '@' code per the Ren'Py Documentation
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.
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.
[Resolved] Using the '@' code per the Ren'Py Documentation
Last edited by WhiteFog on Wed Jul 03, 2019 10:10 pm, edited 1 time in total.
Re: Using the '@' code per the Ren'Py Documentation
show jack uniform neutral 1
mc "blah blah"
ja @ uniform neutral 2 "blah blah blah"
ja "Something's a foot"
would this work?
mc "blah blah"
ja @ uniform neutral 2 "blah blah blah"
ja "Something's a foot"
would this work?
Re: Using the '@' code per the Ren'Py Documentation
Not as far as I know : /
I've tried-
ja @ 2
ja @ neutral 2
ja @ uniform neutral 2
And it comes back with 'expected statement'
So for now I'll just toggle it with
show jack 2
ja blah blah
show jack 1
I suppose. It also didn't seem to work (I copied it verbatim) for the example listed so maybe the function's simply no longer available in Ren'py?
I've tried-
ja @ 2
ja @ neutral 2
ja @ uniform neutral 2
And it comes back with 'expected statement'
So for now I'll just toggle it with
show jack 2
ja blah blah
show jack 1
I suppose. It also didn't seem to work (I copied it verbatim) for the example listed so maybe the function's simply no longer available in Ren'py?
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Using the '@' code per the Ren'Py Documentation
WhiteFog wrote: ↑Wed Jul 03, 2019 1:53 am Not as far as I know : /
I've tried-
ja @ 2
ja @ neutral 2
ja @ uniform neutral 2
And it comes back with 'expected statement'
So for now I'll just toggle it with
show jack 2
ja blah blah
show jack 1
I suppose. It also didn't seem to work (I copied it verbatim) for the example listed so maybe the function's simply no longer available in Ren'py?
Have you tried writing your three attribute as one? i.e.
image jack uniform_flustered_1 = "JackFlustered1Uniform.png"
I have no knowledge on how this function works, but that would be something I would test.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Using the '@' code per the Ren'Py Documentation
As you have alluded, some of your attributes are effectively groups (yes, using a LayeredImage would suit your naming conventions a lot better as LayeredImages natively supports groups)... By that, I mean jack can have attribute flustered OR neutral OR happy OR sad, jack can have attribute 1 OR 2 not 1 AND 2
As such, when you are changing those (without using LayeredImage) you would need to remove the old one then add the new
show jack uniform neutral 1
ja @ 2 "words"
# would make it look for attributes ( uniform, neutral, 1 AND 2 ) which is ambiguous (it finds 2 matches that both score 3 out of 4)
show jack uniform neutral 1
ja @ -1 2 "words"
# -1 removes the attribute 1 (for one line as it is to the right of the @ symbol) then 2 adds the attribute 2
Untested, though that is how I understand tag attributes working.
Note: LayeredImage... yes, it is a lot to get your head around, it is worth it though...
As such, when you are changing those (without using LayeredImage) you would need to remove the old one then add the new
show jack uniform neutral 1
ja @ 2 "words"
# would make it look for attributes ( uniform, neutral, 1 AND 2 ) which is ambiguous (it finds 2 matches that both score 3 out of 4)
show jack uniform neutral 1
ja @ -1 2 "words"
# -1 removes the attribute 1 (for one line as it is to the right of the @ symbol) then 2 adds the attribute 2
Untested, though that is how I understand tag attributes working.
Note: LayeredImage... yes, it is a lot to get your head around, it is worth it though...
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Re: Using the '@' code per the Ren'Py Documentation
On latest ren'py the following works without issue.
Unsure what your problem may be without knowing more. However, note that j white small and j small white both work, but j small does not. Might be the problem. *shrug*
Code: Select all
image jack = Solid("#444", xysize=(50,50))
image jack black = Solid("#000", xysize=(50,50))
image jack black big = Solid("#000", xysize=(100,100))
image jack white = Solid("#fff", xysize=(50,50))
image jack white small = Solid("#fff", xysize=(30,30))
define j = Character("Jack", image="jack")
label start:
show jack at truecenter
j "blah1"
j small white "blah2"
j "blah3"
j @black big "blah4"
j "blah5"
Who is online
Users browsing this forum: No registered users