[DYNRPG]TEXT PLUGIN

Write text on the screen, perfect for custom systems!

  • Kazesui
  • 04/29/2015 06:09 PM
  • 23599 views
This is a plugin which allows you to write text anywhere onto the screen. You have full control of what you want to write, where you want to place the text and at what picture layer it should be drawn.

This plugin supports a range of comment commands, as well as some commands within the text strings themselves. This includes stuff like the familiar \v to retrieve a variable, and \n for hero names. it's also possible to nest these commands to do stuff like \v[\v] to perform pointer operations.

This is perfect for creating custom menu systems, menu based custom battles as well as for ABS systems, where you might want numbers representing damage pop up over the enemies head (and of the hero as well).

The download includes a readme which explains the comment and text commands more in detail as well as a demonstration project to help you see how this Plugin can be used.


Details

  • 1.3 MB
  • 1053
  • 03/31/2024 02:01 PM

Actions

Posts

Pages: first prev 12 last
I confirm that is the last you had loaded.
I have a small request, you can add information about the monsters?
Such as name, hp, mp etc etc as you did previously with the heroes? Because that information can not be obtained outside the battles.
Or rather. I think there is a message extender plugin. Can this work?

I want to be able to eventually make a main menu.
I would be interested to have the original name of a hero : e.g. in a Pokemon-like game, if a player is renaming a hero (a Pokemon), you would still have access to the original name.

The Class for this : http://rewking.com/dynrpg/class_r_p_g_1_1_d_b_actor.html
I wish I'd taken up use of this plugin years ago, but even though most of the heavy lifting is already done the hard way, I can still make good use of this.

That said, I'm playing around with this plugin, figuring out how it works and all that, and I've noticed two curiosities. Neither of them are really a problem for me, but nevertheless.

The first is that the @write_text command will not show the final character in the text string unless the final character is a space or some form of punctuation.

So a command like {@write_text "Message", 0, 0, "Hello world", 85} only actually results in showing "Hello worl". However, if I make the string "Hello world " (with a redundant space at the end), "Hello world.", "Hello world,", "Hello world!", or "Hello world?", then it works just fine. However, if I use "@append_line", then it doesn't have this problem. It's not really a big deal, because I can add a space to the end of the string just fine, but it's odd. I wonder if perhaps it has something to do with the fact that I'm using a custom font, or perhaps it has something to do with the fact that I'm using Cherry's VarTextWidth patch?

The second curiosity is a little bit more of a big deal, potentially, for some people, but still isn't an issue for me. If I use "@append_line" several times, the game crashes. Depending on how long the lines are, the first five or six appends will work fine, but then the sixth or seventh will crash the game. When all of the lines (both the appends and the initial write) are all a single letter, it crashes on the seventh append, and when the lines are actually several words long (to about a half screen's width), then it crashes after the sixth append. Again, this isn't a problem for me, as I'll never need more than two uses of @append_line anyway, so it should be fine. But I could see this being a problem for some people, potentially, at some point. Every crash that I got save one gave the error of "Insufficient memory" (I have 16 gigs of DDR3 ram running at 1333mhz, and my Task Manager does not show any spike in memory use). There was one crash, however, that gave an error message of, "Access violation in module 'RPG_RT.exe' in with address 00489625 and offset A6A0BFB7 of type Write occured."

EDIT: I figured out what was causing the unusual crash (still don't know what's up with the "insufficient memory" crash, though). It was because I was using a pointer that equaled 0. I guess that you can't do that. That's okay for me, but again, I think some people might find that problematic, as \n{0} is quite useful. And with \n, it doesn't matter if I'm using a pointer or not, it will crash every time if the value is 0 (normally, \n{0} prints the name of the party leader, whoever that might be).

EDIT: Oh, also, if I try to specify a colour, the text is just always red, no matter what I set it to. Thankfully, again, this won't be a problem for me, as I don't think I'll need text displayed through this plugin that will be anything other than \c{0} (which is what shows if I don't specify a colour at all), but this might be problematic for some.

EDIT: So I figured out what was wrong with the colour problem. I needed to put commas between the optional parameters, even if they were completely empty. So I actually needed something like {@write_text "Message", 0, 0, "Hello world", , 0, 85}. So that one turned out to just be user error. My bad.
First question: it's the VarTextWidth patch the cause for that problem.
Second question: yep after 5 or 6 append_line the game crashes. I notice this problem a couple of years ago. But if you alternate append_line and others write_text there is no problem.
Yes, there is a some sort of memory leak happening each time append line is used, which I never got around to fixing. As pointed out above, this leak is cleaned up by calling a write_text or doing pretty much anything else which leads to the underlying image being discarded and redrawn, so it won't cause any known harm outside of this. I'd recommend not using append line more than 2 or 3 times before calling a write text, or alternatively just use multiple texts instead.
It kind of defeats the purpose of the function, but I'm not too sure it will be fixed at this point.
When I was going to bed last night, I was actually wondering if you could offset it by using a @write_text command after every few @append_line commands. As you say, it does kind of defeat the purpose of @append_line, but hey, it works. And it's not a problem for me anyway, like I said. So it's all good. What's important is that it can still get the job done.
So I came across something that's a bit of a problem for me. If I use a "move picture" command to move the picture layer that's associated with a text, the text does not move with the picture. Is there any way to make the text move with the associated picture? I know it has the "fixed" parameter to make the text move with the map, but what about moving with the picture? And I know it has the "change_position" command, but that doesn't have a parameter — at least not that's listed in the documentation — for determining a number of frames thru which to make the change; it always is just a single frame move.

EDIT: It's still not the end of the world, though, because I can math out the exact co-ordinates to manually reposition the text for every individual frame along the way of the move, but that is kind of a pain.
It's been a while, so I don't remember all the ins and outs of the plugin, but from what I recall:
The position of the picture has no bearing on the text images, and as such, using move picture will have no effect on the text. The text just happen to share some properties with the picture, being the drawing order and the transparency.
So, the only way to deal with movement of the text is the painful way by utilizing coordinates to reposition the text manually, probably using change_position (which seems to be in listed in the documentation having 3 parameters, id tag, x position and y position, at least in the readme I just downloaded from the most recent download button)

Yes, I mentioned all that. In other words, "No." lol. Thanks for getting back to me, at least. Painstaking manual course plotting it is. xD
Pages: first prev 12 last