[DYNRPG] RPGSS
Posts
Introduction
The Role Playing Game Scripting System is a plugin for Cherry's DynRPG (RM2k3 Plugin SDK). RPGSS is a (more or less) complete scripting environment for the RPG Maker 2003, based on the programming language Lua. It's most likely comparable to the RGSS (Ruby Game Scripting System), the scripting environment for the RPG Maker XP.
Features
Screenshots
Roadmap
Source Code
Check out RPGSS on GitHub
Documentation
Check out RPGSS docs on GitHub
Alternatively, each release contains the Programmer's Guide in PDF format.
Downloads
rpgss-0.5.0.7z
rpgss-0.5.1.7z
rpgss-0.5.2.7z
rpgss-0.6.0.7z
rpgss-0.7.0.7z
rpgss-0.8.0.7z
License
The MIT License (MIT)
The Role Playing Game Scripting System is a plugin for Cherry's DynRPG (RM2k3 Plugin SDK). RPGSS is a (more or less) complete scripting environment for the RPG Maker 2003, based on the programming language Lua. It's most likely comparable to the RGSS (Ruby Game Scripting System), the scripting environment for the RPG Maker XP.
Features
- MIT Licenced.
- Lua instead of C++. Lua is very easy to pick up, dynamic, powerful, extendable, widely used (even in commercial video games) and very fast ( compiles Lua code to machine code at run time).
- Rapid extension development and painless maintenance. An extension in RPGSS is simply a human-readable Lua source code file.
- Meaningful error messages and a detailed stack traceback, when something goes wrong, assist the developer.
- Most of the powerful C++ DynRPG API available to Lua scripts.
- Rich set of powerful standard libraries. RPGSS provides a lot of essential libraries out of the box with an easy to pick up API.
- Fast and powerful graphics routines. Unfortunately the graphics routines available to a DynRPG plugin developer are slow and simplistic. RPGSS provides a rich set of blazing fast graphics routines that open up new possibilities.
Screenshots
Roadmap
- Improve the documentation. (Priority: High)
- Add more scripts. (Priority: High)
- Add more graphics routines. (Priority: Middle)
- Optimize the graphics routines even more. (Priority: Middle)
- Add a spatial audio library. (Priority: Low)
Source Code
Check out RPGSS on GitHub
Documentation
Check out RPGSS docs on GitHub
Alternatively, each release contains the Programmer's Guide in PDF format.
Downloads
rpgss-0.5.0.7z
rpgss-0.5.1.7z
rpgss-0.5.2.7z
rpgss-0.6.0.7z
rpgss-0.7.0.7z
rpgss-0.8.0.7z
License
The MIT License (MIT)
Interesting, maybe its possible make a message system similar to my lufia message system without have to make all the text based in pictures.
images
images
Most definitely possible. As a matter of fact a message system is planned as a system script. You could take it then as a basis for your Lufia message system. If you don't want to wait, a message system isn't very difficult anyway. Everything you need is already there, so you can start right away.
This is COOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOL, that's all I can say
Damn, I need to learn some programming :I
Damn, I need to learn some programming :I
Using this, I've already managed to write up a script to use the SFX.exe program to take a screenshot and move it to a battle backdrop, which I was previously using keypatch for. But this is way smoother. Excellent work, sir!
In case you didn't know: you can take a screenshot using the following code:
;)
Edit: But I'm not sure if the result will be an 8-bit image.
Edit 2: Just tested, the resulting image will be 32-bit (i.e. 24-bit plus alpha channel). But if you need it to be 8-bit, I could probably add support for writing 8-bit images.
local screenshot = game.screen.copyRect(0, 0, 320, 240)
graphics.writeImage(screenshot, "Picture/screenshot.png")
;)
Edit: But I'm not sure if the result will be an 8-bit image.
Edit 2: Just tested, the resulting image will be 32-bit (i.e. 24-bit plus alpha channel). But if you need it to be 8-bit, I could probably add support for writing 8-bit images.
New Release
rpgss-0.6.0.7z
_____________
The new release for the first time also contains a few scripts that allow to display and manipulate sprites (similar to pictures, but much more powerful), though in the meantime I refactored the scripts, so I suggest to use the updated scripts from the repository.
Here is a demo that shows some of the sprite features.
First, in order to create the sprite, talk to the baldheaded dude at the top. Afterwards you can talk to the other characters, each doing something different to the sprite.
rpgss-0.6.0.7z
Changes between 0.6.0 and 0.5.2
-------------------------------
* Changed license to the MIT license.
* Removed unused field in graphics::Image.
* Made blend mode a function argument instead of a state.
* Renamed rotation constants to "cw" and "ccw" for consistency.
* Fixed wrong argument indices in Image:getPixel and Image:setPixel.
* Vec2::rotateBy now respects that our y-axis goes down and not up.
* Memory file constructors that take a buffer now behave as expected.
* Added initial set of assets.
* Added CHANGELOG.
_____________
The new release for the first time also contains a few scripts that allow to display and manipulate sprites (similar to pictures, but much more powerful), though in the meantime I refactored the scripts, so I suggest to use the updated scripts from the repository.
Here is a demo that shows some of the sprite features.
First, in order to create the sprite, talk to the baldheaded dude at the top. Afterwards you can talk to the other characters, each doing something different to the sprite.
@kyuu - actually, if it's not too much trouble could you add an 8-bit screenshot option? For some odd reason my SFX.exe has stopped working and this sounds way easier than routing through two or three external programs. =/
Edit: Well, I figured out how to do it using ImageMagick and some os. functions, and the code you provided. Thanks a bunch for writing this!
Edit: Well, I figured out how to do it using ImageMagick and some os. functions, and the code you provided. Thanks a bunch for writing this!
author=gadesx
amazing work, so it support images of full color?
Yes, RPGSS supports 24-bit images with alpha channel (also: five blend modes (including additive and subtractive), graphics primitives (points, lines, rectangles, circles, arbitrary textured quads), drawing windows using window skins, drawing text using bitmap fonts, seamless reading from archives, sound playback of many audio formats, etc.).
:)
author=LizardKing
@kyuu - actually, if it's not too much trouble could you add an 8-bit screenshot option? For some odd reason my SFX.exe has stopped working and this sounds way easier than routing through two or three external programs. =/
Edit: Well, I figured out how to do it using ImageMagick and some os. functions, and the code you provided. Thanks a bunch for writing this!
No trouble at all, I will add it. :)
so can it read ogg files ? I'm still unsure whats going on. But reading the sound playback of many audio formats.
I'm liking this 24 bit image :) tired of just 8bit
I think I'm not really understanding how to install it or see any difference.
I'm liking this 24 bit image :) tired of just 8bit
I think I'm not really understanding how to install it or see any difference.
I noticed in the demo that you bound the mouse sprite to the mouse "coordinate system" (in esi\spritelib.lua)
What other coordinate systems are there that you can bind sprites to? Events? Battlers? Or just the mouse?
What other coordinate systems are there that you can bind sprites to? Events? Battlers? Or just the mouse?
author=Razzy
so can it read ogg files ?
I'm currently using Audiere (this will change in the future, as I plan on adding a spatialized audio API), so it supports every audio format Audiere supports (i.e. WAV, AIFF, OGG, MP3, FLAC, MOD, S3M, IT and XM).
author=Razzy
I think I'm not really understanding how to install it or see any difference.
RPGSS is a plugin for Cherry's DynRPG, i.e. you need to install DynRPG first. RPGSS also works only with DynRPG 0.20 and (probably) higher. DynRPG 0.20 currently only exists as a test version (will be officially released soon, according to Cherry), you can get it from here. To be on the safe side, make sure that you patch over a fresh (read: unmodified) RPG_RT.exe.
After you installed DynRPG 0.20 and it's working, you can install RPGSS. All RPGSS releases come with a documentation (docs/Programmer's Guide.pdf) that serves as a starting point as well as a reference. The "Getting Started" section inside this document describes the installation process and some important aspects of RPGSS.
If you have any questions, don't hesitate to ask me!
author=LizardKing
I noticed in the demo that you bound the mouse sprite to the mouse "coordinate system" (in esi\spritelib.lua)
What other coordinate systems are there that you can bind sprites to? Events? Battlers? Or just the mouse?
Currently there are three coordinate systems that sprites can be bound to: "screen", "mouse" and "map". When a sprite is rendered, its position is converted to screen coordinates according to its coordinate system. This happens in std/sprite.lua:252. Actually you can add anything as a coordinate system that has a position (like hero, events and battlers). In fact I already experimented with binding to the hero and events, but my solution appeared to me as not elegant enough, so I left them out for the time being. If you replace the if statement with the following, you will be able to bind sprites to the hero and any event on the map:
if self._coord_sys == "screen" then
-- NO-OP
elseif self._coord_sys == "mouse" then
local mouse_x, mouse_y = mouse.getPosition()
x = mouse_x + x
y = mouse_y + y
elseif self._coord_sys == "map" then
local cam_x, cam_y = game.map.getCameraPosition()
x = x - cam_x
y = y - cam_y
elseif self._coord_sys == "hero" then
local hero_x, hero_y = game.map.hero:getScreenPosition()
x = x + hero_x
y = y + hero_y
else -- event
local event = game.map.findEventByName(self._coord_sys)
if event ~= nil then
local event_x, event_y = event:getScreenPosition()
x = x + event_x
y = y + event_y
end
end
author=Razzy
also wondering how the font works x_x
To draw text, just use game.screen.drawText, or Image:drawText if you want to draw to an image.
Creating new bitmap fonts is easy as well. A bitmap font is simply an image that follows the following format:
- There must be 256 characters (each maps to an ASCII code, starting from the top-left).
- There must be 16 rows of 16 characters.
- All characters must have the same maximum width and height (the actual character width can be smaller).
- A 1px border with an unused color must separate the characters.
There are no restrictions on the maximum width and height of a character, as long as all characters in the font share the same maximum width and height.
See assets/Fonts/standard.png (open in GIMP) for an example.
drawing windows using window skins, drawing text using bitmap fonts, seamless reading from archives
I need this ;)
How can start to use it? can you make a project sample with a message?
I need this ;)
How can start to use it? can you make a project sample with a message?
author=gadesx
drawing windows using window skins, drawing text using bitmap fonts, seamless reading from archivesI need this ;)
How can start to use it? can you make a project sample with a message?
Sure:
Download
What it does: In the onInit callback it loads the font and the window skin and in the onCharacterDrawn callback it draws a window and a text (the character's name) above the characters.
It also shows how to use archives: The files inside the Data folder are just zipped corresponding folders (i.e. I zipped the folders Scripts, Fonts and WindowSkins, replaced the file extension and put the files to the Data folder. On startup RPGSS adds everything inside the Data folder to the virtual filesystem. Instead I could also use the script function io.mount (see scripting reference) and add them manually.
The message script I promised is still on my TODO list, though. ;(
Ah I thought that was possible
make a message from the own rpg maker using a comment,
something like
@call show_message"Welcome to Midgar.", Variable150x, Variable151y, "Picture/font.png"
make a message from the own rpg maker using a comment,
something like
@call show_message"Welcome to Midgar.", Variable150x, Variable151y, "Picture/font.png"