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.
[XP] Snapshot

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 84
Yes, hoh my gawd!
Snapshot
Authors: game_guy
Version: 1.0
Type: Picture Taking Script
Key Term: Misc Add-on

Introduction

Ever wanted to take screenies or snapshots ingame? While there are other methods of doing that, this one is by far the easiest. With a simple button press or script call, it'll take a screenshot of the game for you and save it in a folder.
Also useful for beta testing. Your testers can snapshot bugs or errors in mapping or stuff like that.

Features

  • Take picture with button press or script call
  • Customizable Button to press

Screenshots

Here's how well the pictures come out. No windows borders or anything.
Spoiler for:

Demo

Download

Script

You'll also need the screenshot.dll for this script to function correctly.
Spoiler for:
Code: [Select]
#===============================================================================
# Snapshot
# Author game_guy
# Version 1.0
#-------------------------------------------------------------------------------
# Intro:
# Ever wanted to take screenies or snapshots ingame? While there are other
# methods of doing that, this one is by far the easiest. With a simple button
# press or script call, it'll take a screenshot of the game for you and
# save it in a folder.
# Also useful for beta testing. Your testers can snapshot bugs or errors in
# mapping or stuff like that.
#
# Features:
# Take picture with button press or script call
# Customizable Button to press
#
# Instructions:
# Place screenshot.dll in your projects folder.
# Get the dll here if you need it
# http://decisive-games.com/ggp/scripts/screenshot.dll
# Make a folder in your projects folder called Snapshots
#
# Go down to the line where it says SnapShot_Key = Input::A
# You can change Input::A to any of the following
# Input::A - Usually the Shift Key
# Input::B - Usually the X or Escape key
# Input::C - Usually C, Enter, or Space
# Input::X - Usually the A Key
# Input::Y - Usually the S Key
# Input::Z - Usually the D Key
# Input::L - Usually the Q Key
# Input::R - Usually the W Key
# Input::SHIFT
# Input::CTRL
# Input::ALT
# Input::F5
# Input::F6
# Input::F7
# Input::F8
# Input::F9
#
# To take a snapshot with a script call use this
# GameGuy.snap thats it!
#
# Compatibility:
# Not tested with SDK. (Should work though)
# Will work with anything.
#
# Credits:
# game_guy ~ For making it
# Google ~ Searching up Win32Api tutorials
# Screenshot.dll ~ Whoever made this, made this script possible
#===============================================================================
module GameGuy
  SnapShot_Key = Input::A # Shift Key
  def self.snap
    snp = Win32API.new('screenshot.dll', 'Screenshot', %w(l l l l p l l), '')
    window = Win32API.new('user32', 'FindWindowA', %w(p p), 'l')
    ini = (Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p),
      'l')
    game_name = "\0" * 256
    ini.call('Game', 'Title', '', game_name, 255, '.\Game.ini')
    game_name.delete!('\0')
    win = window.call('RGSS Player', game_name)
    dir = Dir.new("Snapshots/")
    count = 0
    dir.entries.each {|i| count += 1}
    file_name = "Snapshots/snap_#{count}.png"
    snp.call(0, 0, 640, 480, file_name, win, 2)
  end
end
module Input
  class << self
    alias gg_update_input_snapshot_lat update
  end
  def self.update
    if Input.trigger?(GameGuy::SnapShot_Key)
      GameGuy.snap
    end
    gg_update_input_snapshot_lat
  end
end

Instructions

In the script. Its recommended to place this above main but below everything else. It shouldn't cause issues with anything.

Compatibility

Not tested with SDK. (Should work anyways)
Should work with everything.

Credits and Thanks

  • game_guy ~ For making it
  • Google ~ Searching up Win32Api tutorials
  • Screenshot.dll ~ Whoever made this, made this script possible

Author's Notes

Enjoy!

***
Rep:
Level 84
Yes, hoh my gawd!
Bump. Any comments?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I think it's pretty useful game_guy. I'm a little biased though since I made one for VX :P It is easier to do in VX though. Good work.

***
Rep:
Level 84
Yes, hoh my gawd!

**
Rep: +0/-0Level 82
www.rmxpunlimited.net
Wow, great script man! Mind if I post this in my site's script archive?

Thanks again!

***
Rep:
Level 84
Yes, hoh my gawd!
Go right ahead, all I ask is my name is listed and fix the link please. It says the url ir illegal as in not typed right.