Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Wattson

59
Posts
493
Followers
91
Following
A member registered Jun 24, 2019 · View creator page →

Creator of

Recent community posts

I never wrote down a cheat sheet but you can rename them to what is easiest for you to remember yourself if you want. Nothing wrong with making it easier for yourself.

I've never had it flat out refuse to work. My best guess would be maybe your sprites are sharing names that are used to look up which to highlight. Having two sprites referring to the same one can often make it act screwy. Could be something else. but without more information about what's going on, that's my best guess.

Weirddd.... Could try regenerating the rpyc file. That or you could just move most of the code from one to the other.

I've never tested it with that but I'm down to work with you to try and find a fix. I'll try and see about it this week but if you wanna chat on discord or something so can maybe help me know your setup to better help.

Yeah, the kinetic text tags are a displayable being shown as part of an overall text displayable, but that text displayable doesn't know to pass it's style information down to the kinetic text tag's text. My solution to this was defining a style with all the properties you want, and then using the {=style} tag (https://www.renpy.org/doc/html/text.html#style-text-tags) INSIDE the kinetic text tag to carry that information in. While going through the text it's given, my text tags will try to keep track of other tags inside it and apply them to their text. So you'd want to do something like 

style narr_text_style:
    color "#fff"
    outlines [(2, "#000000")]
    size 1900
    font "fonts/DisgustingBehavior-AZrA.ttf"
"{sc=10}{=narr_text_style}{outlines}No! You just don't want me to be happy!{/sc}"

Not sure the style tag applies all of that attributes, especially outlines, or if that will necessarily work entirely. Though that's the general way I made it work.

While looking into this though I did learn that renpy now has some of this stuff built in. https://www.renpy.org/doc/html/textshaders.html So if it's not working it might be worth using their jitter instead.

Sorry, I can't say I tested it very extensively in NVL mode. I'll try to make a note to look into it more later. I have some guesses as to what the issue might be. I know Renpy likes to reset the whole textbox in ADV mode whenever it updates, so maybe it does something similar in NVL mode. If true, then the time being given to the displayables would be reset and not a lot I could do about that outside of awkwardly storing timers in globals in a way that'd be really messy. Though given your description, it that might not be the case and could be something else. I'll try to look into it when I have time but been busy lately.

I'll say I'm not entirely sure what you're asking, From the sounds of it, you're asking to have the shake and gradient tags moved to their own files. You are free to remove those sections are put them in their own .rpy file if you like, but I'm not sure how that will help you. If you're wondering how to use them, you just do "{sc}Some text{/sc}" for the scare tag, and the gradient tag is a bit harder, though I believe I provided some examples and reference for it in the comments of gradient_tags.rpy. Hopefully that helps but if you need more help feel free to ask!

By default I haven't added something like that yet. But it can be easily patched in by modifying 

if isinstance(sprite_focus, list):
    is_talking = char_name in sprite_focus
else:
    is_talking = char_name == sprite_focus

then passing a list of names for the cb_name I believe.

Like it cycles through multiple fonts before settling on one or each letter is a different random font?

Mostly just would be having it so the letters keep some kind timer, randomly going through characters until the timer hits zero and then just shows the actual letter. Though if you do need me to do it I'll note it down and let you know when I can get to it later.

(1 edit)

No, I've never directly made an effect like that, but with my setup, it wouldn't be hard to make one if you know what you want and have some coding experience. Could maybe make one if you need though, but currently busy with another project so can't promise anything for a bit if you need it right now.

Sorry about that. Yeah I've had that issue sometimes crop up. Usually though it's when I'm having another auto talking solution going on as well. If I ever find a solution to that though I'll be sure to let you know.

If I had to guess I would presume it's because when the scene starts, the character hasn't been speaking, so the speaking_char is probably either None or someone else. Then when the line starts, the character is then set as the speaking_char, so he lights up to normal. If you want them to start off already focused, you can manually set the speaking char by doing:

$ speaking_char = "guard1"

either before the transition or sometime during it. Which would then have the sprite start off in the talking state.

Hopefully that helps. But if it's some other issue, let me know and I'd be happy to help correct it.

You can probably have the glitch go slower but changing the redraw time. Maybe something like 1./30 instead of 0 if you just want it at 30 fps or just .2 or something if you need it slower. It'll be the renpy.redraw(self,[new number here]) bit.

I'd need to know more about your project to know what might be the issue.

Ah so you got it fixed?

You'd probably need to add a flag to each text tag function or class to tell it to do more default behavior. Will need to make it a persistent or preference variable as well so it is always accessible.

Sorry for the late reply. But yeah you need to have the base kinetic_text_tags.rpy in there as well since it contains the DispTextStyle class which helps the text tag function handle other text tags. That or you can copy it from there into that file if it's the only thing you need.

Hi. Sorry for the late reply. I tried replicating the issue on my end, but doing the same setup (or at least what I can suppose from your comment) yielded results that looked correct to me. My best guess for the issue is that something about how you defined the sprites is causing renpy to reset the anim_time value, which would cause the sprite_highlight function to snap to the highlighted value. Which maybe you're confusing for the .2 seconds given .2 is pretty fast. Though I could be wrong. This is just my best guess given the information.

I tested with NVL and that didn't seem to make much of a difference. If you'd want to show me your code so I could test it and see what the issue might be, I'd be happy to take a look when I have time. (My username on discord is wattson if you need to reach out). But yeah I'm not entirely sure what the problem might be beyond my guess. Hope this was helpful and a solution to your issue can be found!

Hi. Sorry for taking a bit to get back to you. But yeah I appreciate you wanting to edit it to be easier for non-programmers to read it. I will admit I did my best when writing the original code to try and make it approachable as I could. If you have ideas on how to make it more approachable, I'd be happy to take feedback and upload a modified version on here with credit to you for the help. But if you're not making significant changes to the functionality and just adding comments, I feel like it'd be best to just have one project up. Sent a friend request on discord so we can chat more about it. Thanks for your feedback.

- Wattson

Yes. But you'll also need to make changes to your layeredimage sprites to work with it in order for it to work. Instructions and examples on how to do it can be found in the example project.

1. You'll probably need to add the glitch tag to the DispTextStyle class as part of the custom tags. That way it'll try and add it to every letter more or less. 

2. Depends on what you want to do with the swap text. You'll probably want to update the SwapText class at least to take a list of texts to do. And then tell it to keep track of which one is being shown and increment it when you want it to go to the next one. But yeah the details from there are up to how you want to do it.

Sure I'll see what I can do about that. The main reason I split them up was originally to make it more modular. So if you didn't need every tag, you could pick and choose which you want, without it becoming a 1000+ line script file to go through. But given how many of my custom tags use the DispTextStyle class to handle other tags, probably makes sense to just lump them into one. So ppl just need to download one file even if they don't use all of them. I've just been pretty busy lately with my actual job and life stuff, so I'll see about when I get around to updating it. Probably when I have enough free time to work on another tool I've been meaning to release for a while.

Can you not use matrixcolor to accomplish the same thing?

The text's default position is going to be relative to where it would normally be placed on the screen. I don't know which specific tag is giving you problems, but I will guess it's the ATL tag. Depending on the values you give it, you may just be offsetting it too much and might want to bring them down closer to 0. Hard to know what exactly is the problem without more details, but hope you're able to get it fixed.

Sorry for the late response but I think I have an idea what's wrong. Thing is, Renpy won't even allow this to work even without the kinetic text tag. I tested it myself and the outline still wouldn't appear. I believe the problem is that for the style {=} tag, renpy will only apply certain properties of the specified style. And sadly, outlines is not one of them. https://www.renpy.org/doc/html/text.html#style-text-tags

That said, there is an outlinescolor text tag. https://www.renpy.org/doc/html/text.html#text-tag-outlinecolor But I believe this would require the text to already have an outline, which you'd probably have to specify in your say screen. Maybe make a transparent outline that you can then replace with outlinecolor? I haven't tested this but I believe the solution is beyond the scope of my text tags sadly. But hope you're able to get your thing working!

I already noted that as being a bug in the demo. I think it has something to do with a whole line being made up of displayable inserts instead of actual text and renpy not being able to figure out the proper width of things. My best solution right now is to just say to add the line breaks in manually for where you know they should be. You can use \n or the {para} tag used in the demo. I know it's annoying but been too busy with other things to really look into a serious fix to avoid it. Sorry about that.

Well hope you're able to find a solution down the line.

And happy my script able to help people out! The support is appreciated!

Maybe it has something to do with the 'with' transitions?

In what way does it not work?

Never wrote one for that. Would probably have to be a shader or something to pull that off. But could work if ya do it like that.

Sure. I don't know if I feel comfortable putting my discord out in public like this. But you can DM me on Twitter and can get a conversation going from there.

Simply put the 00auto-highlight.rpy file in the game folder in your project. Instructions on how to use it are provided within the file itself and an example of how to make use of it is provided in script.rpy.

Not sure if I'll update it to include that. But if you want, you can go into the kinetic-text-tags.rpy and go down to the ScareText class. Near the bottom of the render function, you'll see 

renpy.redraw(self, 0)

Just change that 0 to something else like 0.2 or 0.5 or something and should slow it down.

If you ever need help feel free to let me know.

Yee I'd love to see a devlog about 'em!

Programmer for the game here. Just to eek out a bit more info, do you know what your Brawn stat was at for that section? Trying to gauge if it's a matter of your Brawn stat making it harder or some other issue going on.

Oh! It would seem there is a ContrastMatrix that isn't mentioned in the matrixcolor documentation. So yeah, using ContrastMatrix should work I believe. Here's the source code to prove it exists. 

Yes, that does work. Though it has some issues. One is that it eats up a lot of unneeded file space. With your method, every image essentially requires twice as much file space. It saves a lot of file space if you do the color manipulation in the engine for basically free. And if you want to change the look of it a little, it's a lot easier this way, since you don't have to re-export every image. Albeit, the color part of this does require using Renpy 7.4, which doesn't work on some older devices.

The other issue is that then in your script, you have to write out every 'show' and 'hide' statement manually to swap between the two. Which is a fair amount of work and means you have to be sure you do it for every time who's speaking changes in the dialogue. Which might be a lot.

With my method, and a bit of setup, it does both of these effects automatically without any additional work needed or taking up additional file space. While I commend your method and think it is clever and certainly good for its time. I think this is a nice alternative for people going forward, if they wish to do it as well.

I don't believe Renpy has a class that directly affects contrast. But the list of predefined matrixes can be found here. https://www.renpy.org/doc/html/matrixcolor.html#built-in-colormatrix-subclasses 

As for actually modifying it, you'll be doing that near the bottom of the 00auto-hightlight.rpy. Specifically around lines 186-192. You'll also likely want to add a change amount a bit higher with all the rest of them around 123-125. If you have any other questions I can answer, feel free to ask!