RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Screenshot Request

0 Members and 2 Guests are viewing this topic.

***
Rep:
Level 75
What the...?
Over the years of RPGMaking, I've become aware of several screenshot scripts.  There is one that even takes shots of the entire map (though that one is for ACE).  I'm able to code a bit, but I've never really understood the way screenshots are taken, even after studying the afore-mentioned scripts.  I've come to the point in one of my projects, where I need a screenshot script of a specific type, and I've been unable to find one that will work, or that I can edit myself to do as I require it to.  Here's the gist of what I'm searching for:

-VX script (RGSS2)
-must take a screenshot, regardless of what scene the game's state is in (Like ModernAlgebra's does)
-must only take a shot of an 'area' of the screen, instead of the entire screen
-when activated, the system will take into account the arguments passed (x, y, width, height, directory), and set the screenshot area to those coordinates and dimensions
-once taken, the script must send the image of the area screenshot to a directory that is passed as the fifth argument

Basically, I could use a script call:

Code: [Select]
area_screenshot(20, 60, 200, 200, "Picture")

That example would take a screenshot of the screen area at x20, y60, be 200 pixels wide and 200 pixels tall.  It would then export the image taken to the 'Graphics/Picture' directory.

I have no preference if this is a new script or if it is an edited version of an existing script.  For instance, if you can take ModernAlgebra's script, and tweak it to allow for such a script call, then that would be fine.  In this case, credit would be given to both the original author and to the one who edited the script. 

I appreciate any assistance that I get on this request.
« Last Edit: January 07, 2017, 05:38:10 PM by IXFURU »

**
Rep:
Level 74
RGSS Scripter
$2 and I code it.
I'm crazy as much as I want to be.

***
Rep:
Level 75
What the...?
$2? 

Well.  I guess I'll just stick with layering sprites for now.  Thanks though.

**
Rep:
Level 74
RGSS Scripter
I'm crazy as much as I want to be.

***
Rep:
Level 75
What the...?
Wth is that?  Didn't bother.  As a scripter, I could tell this was another joke.  Doesn't matter.  Hijacked my thread is all.  I can make do with what my current methods.  Er..  Thanks.

**
Rep:
Level 74
RGSS Scripter
For a scripter you're not very good, I may say. Sorry. ;)
The blob in the beginning of the script is a Base64-encoded data, which contains the DLL needed for the script to work.

Sure, I coded it in like 10 minutes, but it's harsh to tell me you didn't bother...
Just try it. You'll be surprised. If you don't trust my code, ask Modern Algebra about it. :)
I'm crazy as much as I want to be.

***
Rep:
Level 75
What the...?
Ouch!  I'm not very good? 

Full of hurtful comments and pranks.  I'm not the best.  I've seen your other work.  You're pretty good man.  It just didn't look legit to about the 1200th line.   MA coded the screenshot script with no such lines, let alone 1200. 

I will look at it again...*sighs*

**
Rep:
Level 74
RGSS Scripter
I said that you're not good, cuz' I got angry when you said it's just "another joke". Sorry. :)

The main reason for the script to be that big is because of the Base64-encoded DLL data.
For me it's easier to embed the DLL in the script itself and have it extract it on run-time. (Doesn't slow down anything.)
If I haven't embedded the DLL in it the script would be just a non-working script without it.
For me it's better to do so than give the script and a link to a DLL file which will eventually be removed at some point in time.
I call this a stand-alone script. No other downloads needed. :)

Just try it, man. Trust me, it works. :)
I'm crazy as much as I want to be.

***
Rep:
Level 75
What the...?
Ahh.  Very cool.  It's all good man.  I'm rather skeptical of folks on RM sites these days.  I apologize for previous comments.

The script works well.  2 Questions.

What is the 'mode' argument for?

Would it be possible to set a 'color' as transparent.  Say the first pixel in the upper left hand corner of the image?  If not, it's cool just the same.

Great work man!  And thank you.

**
Rep:
Level 74
RGSS Scripter
It's all cool, man. I apologize too. I was rude, sorry. :)

The "mode" argument can be 0, 1 and 2 and it affects the quality of the screenshot.
0 is what I call the "full mode". It's "what you see it's what you get". Applies no compression on the output image.
1 is the "good mode". Compresses the output and lowers the quality.
2 is the "best mode". Slight compression and good quality.
Basically, in a normal game you would use mode 0. I have different modes because I use this for lots of different
stuff like my Streaming script which would use mode 1 for a lower image size therefore faster network traffic.

For the other question, I'm not really sure what you mean, but yes. I can do everything, basically.
Just explain it a bit more. :)
I'm crazy as much as I want to be.

***
Rep:
Level 75
What the...?
Well.  Typically PNG's can have transparent parts, so that when they are layered, The parts can be changed without covering up parts behind it.   This script will be part of a system which allows players to design images of characters, faces, weapons, etc., with layered PNGs.  When they've completed it, they click finish or whatever and the system captures the area on the screen where their parts have been layered.  The issue therefore is that the screenshot will capture the background as well.  My idea is to set the background to a color, then, when the screenshot occurs, set that background color to transparent.  That's why I suggested the first 0,0 coordinate, because it will just be part of the background anyway.
« Last Edit: August 02, 2017, 04:10:37 PM by IXFURU »

**
Rep:
Level 74
RGSS Scripter
I see. Well, I can make it so. But for a system like this you won't even need such a screenshot script, since you can do it all with just bitmaps. You can make a clear bitmap, layer the parts, draw them on the bitmap and then export the bitmap to a .PNG file.
It'd be easier. :)
I'm crazy as much as I want to be.

***
Rep:
Level 75
What the...?
So, as long as the bitmap is blank it will preserve the transparency?

**
Rep:
Level 74
RGSS Scripter
Exactly. It renders to a file as it is.
I'm crazy as much as I want to be.

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
I like how you've included the DLL in the script itself. Good job :D

***
Rep:
Level 75
What the...?
You know I hear and see a lot about DLLs.  Guess I don't really understand what they are and what they do exactly.  Also, why was it necrssary to implement them in the script?  Would it not have worked without it?  And lastly, Do you have to type all those letters and such out by hand?  That seems really confusing.

And Xaxav: 

Explaina bit about how to code this using Bitmap.  I've created and exported text files before.  They are relatively easy.  This is what I'm imagining the code would look like:

Code: [Select]
bmp = Bitmap.new (width, height)
<do the layering here, possibly using the blt method>
file = File.open (filename, w+)
<somehow attach the bmp to the file here>
file.close

It's the attaching to bitmap that I don't quite get....
« Last Edit: August 03, 2017, 08:42:52 PM by IXFURU »

**
Rep:
Level 74
RGSS Scripter
DLLs are simply application extensions. They extend the functionality of a program or an application.
They are written in C or C++ and act faster than the RGSS in most cases. People use them in RGSS for lots of stuff,
because RGSS isn't as the standard Ruby where you could just "require" a library and use it.
A lot to say, but basically DLLs extend the functionality of the RGSS where it could not do it on it's own.

The script I wrote uses a DLL which makes screenshots of the game faster than most of the other scripts.
And plus, it handles desired area capturing and image quality. It won't work without it. Of course, I can code a script
that can make screenshots without the help of a DLL too. :)
No, I didn't type that blob manually. I use the Ruby Array #pack method to pack it into a Base64 string.

To code the thing you want using Bitmaps is really easy actually.
You just do what you do on the Bitmap (using the #blt method to do the layering) and then
you convert the Bitmap data to a PNG or a BMP format by a method, which I can give you a script for if you
want to. And then save it to a file.
I'm crazy as much as I want to be.

***
Rep:
Level 75
What the...?
I can only code in Ruby.  For years I've wanted to code without using the RGSS, but I've downloaded a bunch of stuff that just seems foreign if I want to make a game.  Is there a program that essentially acts like the script editor and compiles the code?  I remember being devastated when MV switched feom Ruby, because it left me back at square one.  And that sucked after self-teaching myself Ruby.  I was even upset by the alterations of the way Ace handled windows and Scenes, but I learned a bit to code with it nonetheless. 

Anyway, yeah, if you have time and don't mind making the PNG scriptlet method or whatever that would be cool.  But understand you've done enough and I appreciate it.
« Last Edit: August 03, 2017, 10:29:34 PM by IXFURU »

*
The Hero of Rhyme
Rep:
Level 83
( ͡° ͜ʖ ͡°)
2014 Queen of RMRKProject of the Year 20142014 Best RPG Maker User - Story2011 Best Newbie2014 Best RPG Maker User - Creativity2014 Kindest Member2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
Seems like the two biggest coding learning curves are the initial programmer-logic curve and the jumping-to-a-new-language curve. :P I'm still having trouble connecting the dots and relating the languages I've learned (to various degrees).

I think someone made a new language that is similar to Ruby (?) but converts the code to javascript. If you ever get MV, it might be worth checking out!

https://forums.rpgmakerweb.com/index.php?threads/sapphirescript-a-new-language-to-make-rmmv-plugins.78530/
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]


***
Rep:
Level 75
What the...?
That's really cool yuyu!  I had no idea this existed!   I probably still need to learn JavaScript at some point, but this definitely resembles Ruby and looks like the script editor I'm used to.  Thanks for the info and the link.