Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 10 posts ] 
    gerrtunk
  Wed Aug 25, 2010 10:31 pm
Member

Remember making eternal event systems in old makers? Creating the numbers and words images? And the condition systems to show that numbers and words?

I remember, and hate xD. Maybe its just for the XP but... anyway this script will help in that things.
Image

This script can show pictures based on a text line. The image will be treated lik ea normal picture loaded with the show picture event command. It have the same rules and can be moved, changue tone, erased, etc...

Then you need to put a command show picture with any image(its not used) and the values that you will put in a normal event command show picture. The script then creates creates a bitmap based on your text and options and loading a event picture with it.

The basic options are:
-Color
-Size
-Font type
-Bold
-Italic
-Default values
-Optimitzed large lines support.

Advanced options(Using MACL script, more info inside)
-Shadow
-Vertical gradient
-Horizontal gradient
-Outline

It includes advices to draw event variables.


A call script example:

@m = Message.new
@m.bold = true
@m.size = 48
@m.font = "Arial"
@m.italic = true
@m.color = Color.new(134,176,188,154)
@m.t"Text to show"
+Event command Show Picture

Note: This is my first completed script. Its in development, tell me any suggerences or bugs. My english is bad, if you see some thing to improve in the instructions...

Complete instructions in the script.

Expand to see the code.


Last edited by gerrtunk on Mon Oct 11, 2010 9:11 pm, edited 2 times in total.

Top Top
Profile      
 

    kyonides
  Wed Aug 25, 2010 10:44 pm
Member

Well, it's not really that bad to let the user edit some message attributes with accessors but some things are so basic that it'd be best to teach the user to include them right at the new Message class initialization like...

@m = Message.new(text, font)

Things like...

@m = Message.new
@m.font = "Arial"
@m.t "Text to show"

...look awkward, especially @m.t... t standing for what? Method names shouldn't be that cryptic. Besides your initialization method could scare anyone trying to learn from that script...


Top Top
Profile      
 

    gerrtunk
  Wed Aug 25, 2010 10:48 pm
Member

kyonides wrote:
Well, it's not really that bad to let the user edit some message attributes with accessors but some things are so basic that it'd be best to teach the user to include them right at the new Message class initialization like...

@m = Message.new(text, font)

Things like...

@m = Message.new
@m.font = "Arial"
@m.t "Text to show"

...look awkward, especially @m.t... t standing for what? Method names shouldn't be that cryptic.



Is for the sucking call script. @m.t let you use all the space easily, compare it to a normal @m.text+="Text". Think if @m were @message, like in the beggining.

Font or message arent that basic. Specially font, you can predefine anything...

I changued for this comodity, the system have it in mind. Anyway, with the show picture now it uses less arguments, but... .font or .size is bad? or is only the @m?


Top Top
Profile      
 

    kyonides
  Wed Aug 25, 2010 10:51 pm
Member

text = 'My String'
@mess = Message.new(text,'Arial')

That's all you would need just in case the string is too long.

Quote:
I changued for this comodity...

Normally I wouldn't say anything against making something more comfortable, but that isn't exactly what you did there, gerr. Your t method should really be named after what it is, some text, right, text. It'd only be used if and only if the user wants to replace an existing string not to make the first one.


Top Top
Profile      
 

    gerrtunk
  Wed Aug 25, 2010 10:57 pm
Member

kyonides wrote:
text = 'My String'
@mess = Message.new(text,'Arial')

That's all you would need just in case the string is too long.

Quote:
I changued for this comodity...


Normally I wouldn't say anything against making something more comfortable, but that isn't exactly what you did there, gerr.


I dont understand. Here a example:

@m.t"HP:"+$game_variables[1].to_s
@m.t" MP:"+$game_variables[2].to_s
@m.t" Lv: "+$game_variables[3].to_s
@m.size = 34
@m.font = "Times New Roman"
@m.outline = true

.t is a method that concatenates strings and checks to format it.

how can you this with this? text = 'My String'?. Xp suck for these long lines...
Also i doubt the font will be changued a lot more than any other option...


Top Top
Profile      
 

    kyonides
  Wed Aug 25, 2010 11:09 pm
Member

The idea behind using text = "My very long String"+any_variable.to_s is not calling a method like @m.text where a simple local variable can do the job easily whenever you use the the initialization method properly. That's not the only way you can REALLY make it more comfortable for the user, actually you could do this...

text = "My very long string \v[15]"
@mess = Message.new(text, :djvsmono, 22)

...then you'll make sure there are substitutions and if or case statements or hashes that will replace those values with some common ones that aren't the default font. Let's say :djvsmono stands for 'DejaVu Sans Mono', so include something like this...

Expand to see the code.


I know you might not have any experience with Regexp, but it might be quite useful here.


Top Top
Profile      
 

    gerrtunk
  Wed Aug 25, 2010 11:20 pm
Member

kyonides wrote:
The idea behind using text = "My very long String"+any_variable.to_s is not calling a method like @m.text where a simple local variable can do the job easily whenever you use the the initialization method properly. That's not the only way you can REALLY make it more comfortable for the user, actually you could do this...

text = "My very long string \v[15]"
@mess = Message.new(text, :djvsmono, 22)

...then you'll make sure there are substitutions and if or case statements or hashes that will replace those values with some common ones that aren't the default font. Let's say :djvsmono stands for 'DejaVu Sans Mono', so include something like this...

Expand to see the code.


I know you might not have any experience with Regexp, but it might be quite useful here.


Ok. The \v is a nice idea, and opens my mind with some new things, like adding suport for drawing actors,etc.... and mayb drawing entire paragraphs.

But about the font, its just that it normally will be used the same for all. Why make this, or make a case or strange codes? In this case i dont think that :lucidacons is more comode than 'Lucida Console'. Is not alot more short, and have to use a limited table... and learn it.

Maybe if the user can set his own codes...

The size will be more used. The thing is that this make two tipes of asignements, that complicate things. Anyway, i will need to add suport for long lines even using regexp...


Top Top
Profile      
 

    kyonides
  Thu Aug 26, 2010 12:46 am
Member

Quote:
Anyway, i will need to add suport for long lines even using regexp...

Then you haven't understand what I was trying to tell you. Maybe I'd explain it a little more about it but not today.


Top Top
Profile      
 

    gerrtunk
  Sun Sep 05, 2010 10:14 pm
Member

Important bug fixed

Expand to see the code.


Top Top
Profile      
 

    reido66
  Thu Oct 14, 2010 10:47 pm
You can't make me believe what you believe.
User avatar
Member

Oh man thanx so much. This is exactly what I needed. Great work.

_________________
"Heroes....don't give up!''


Current Projects
Content Hidden


Cheers!


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


Who is online

Users browsing this forum: No users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group