1.44 Floppy Disc Event

My plan is going for a impossible 256kb uncompressed RPG Maker 2000 game, no RTP.
Hoping this thing will not get too technical.

So far so good, 231kb RPG_RT (And I think is still even more optimizable) :D

+++ DynRPG - The RM2k3 Plugin SDK +++

I have an issue (maybe a bug).

I want to try to access common events array, but it crashes when I try to access RPG::commonEvents. (Even if I call count() ).

Peeking/backtracing some with GDB I've noticed of that:

#0  0x6a70fdcb in RPG::Catalog<RPG::CommonEvent*>::count (
    this=0x75d4dce8 <printf+104>)
    at C:/MAKER/dynrpg/dynrpg_0_30_09-15-2015/sdk/include/DynRPG/Catalog.h:34
34                                      return list.list->count;
(gdb) print this
$30 = (RPG::Catalog<RPG::CommonEvent*> * const) 0x75d4dce8 <printf+104>
(gdb) print list
$31 = {list = 0xfffffffe} //WTF that address?
(gdb) print list.list
$32 = (RPG::DList<RPG::CommonEvent*> *) 0xfffffffe //double WTF
(gdb) print list.list->items
Cannot access memory at address 0x2 //Oh well.. Null pointer things...

I have 10 Common events in DB, wich 4 of them are filled, rest are empty (I don't think that influcences there, but in case...).

Maybe the internal addresses are wrong and I'm not pointing to common events... Or I'm doing a mistake?

for (int i=0; i< RPG::commonEvents.count(); i++ ){ //blablah... }

Thanks in advance :)

[RM2k3 - DynRPG] - DynVarStorage (by-name variables, arrays and more).


Thanks! ... I save it in a very simple way: I take the variable data, joining all of them in a string, i compress it with Zlib and i save it to a .dyn DynRPG savefile format. (Saving data is provided by DynRPG itself, for more info, take a look in DynRPG documentation, or take a look in the source), and I save another file (SaveXX.dds) wich contains the size in bytes of the variables for checksum operations. For loading them is just the inverse steps.

( Yes, maybe saving the data and the file size in 2 separately files may be inneficent, but i don't know yet how handle both data in a data block ( remember that's not a file stream, so i can't use things like fread or fwrite ):( )

Yes, also i have the same idea as yours ( but not remotely) with SQLite to store the variables. But the problem was handling a database in memory and not in a file, like most databases works, so I've decided to make my own variable management system.

If you can use a C/C++ library to handle SQL databases, you can perfectly make a plugin about that. DynRPG is very useful in this way, you can attach in your plugins any stuff you want.

Maururu... bye.

[RM2k3 - DynRPG] - DynVarStorage (by-name variables, arrays and more).

Iorana Cherry.

Yes, variable mapping sounds good, but first i need to code something inside, because i need to store extra-data for each dyn-variable ( well, the dyn variables already have a flag attribute, but it's only a short int... i will need to expand that).

Also, changing topic, there's a strange bug in DynRPG I've discovered yesterday midnight: If I excecute this onComment callback...

@DVS_DELETE "test_variable"

... The parameter 0 will read : "test_variable" ( it cames already with that garbage char from parsedData->parameters.text ). It occurs especially after I call this onComment callback:

@DVS_CREATE "test_variable", V11

Will excecutes it without a problem. Also, i have to say if you remove or add a character to the command, the bug fixes (Something string cache issue?). Well, i'm temporaly fixed this changin "test_variable" into "test_var".

I will start working on the mapping after the exams X_x.
Maururu... bye.

[RM2k3 - DynRPG] - DynVarStorage (by-name variables, arrays and more).

2012 by EN.I

Iorana everyone... (sorry for my bad english)

I want to show you a DynRPG Plugin who i've created. His name is DynVarStorage.

And ... what is DynVarStorage?

Basically, DynVarStorage is an external by-name variable manager plugin for DynRPG - RPG Maker 2003. You will obtain a secondary variable storage (apart from default RPG Maker variables and switches), referenced by name (and not by number as RPG Maker does), and with dynamical management (you can create and delete variables anytime), like most programming languages. Also it will support Array and Matrix data types’ management, giving more flexibility in game making. This will make making engines a lot more easily, as well, gives more power to create new experiments and prototypes.

-Secondary variable stock, independent from RPG Maker ones.
-By-Name Variable management. (You can get a variable "Hello" instead \v(0003) : Hello)
-Manage variables dynamically (Create-delete variables on the go, as you need it).
-Support for one and two-dimensional arrays (Put many variables into one, like programming languages, like "Hello").
-Saves/loads variables automatically when you load/save a game.

DynVarStorage was a plugin for DynRPG patch, from Cherry; this patch allows you to create plugins for RPG Maker 2003 and manipulate many features of a game. You can obtain more info in the main thead here: http://rpgmaker.net/forums/topics/10254/.

How it works
DynVarStorage works apart from RPG Maker variables, so, you will need to “communicate” the plugin and RPG Maker itself. How? Setting and getting variables (like a database). This can be done with “Insert Comment” RPG Maker Event Command. By this way, you can give orders to DynVarStorage, like creating variables; get actual values and setting new ones, for example. A typically command of DynVarStorage looks like this:

<>Note: @DVS_GET_FROM_ARRAY “hero_hp”, 3, 1

@DVS_GET_FROM_ARRAY will be the command, who will get a value from a array variable (“hero_hp”) in a given index (3), and it stores its value in RPG Maker variable . (1).

By this way, you can communicate, set and get values from and to DynVarStorage variable set, using only a few RPG Maker variables “like a variable buffer”, ready to use. With DynVarStorage and RPG Maker you can do many things that do programmers to do things (for example sort and search algorithms implementations, graphs and tree’s emulation, and much more), with RPG Maker conditional and Cycles.

For example if you want to set ascendant values 1~10 to a 3x3 matrix, you can do this event script:

You can download DynVarStorage from the links below. It comes with the plugin, the documentation, an small demo game and the source code, if you want to peek how it works.


Direct Link: http://elsemieni.net/eni_stuff/DynVarStorage_v1.0.zip
Mirror (CherryShare): http://share.cherrytree.at/showfile-6794/dynvarstorage_v10.zip

(Don't forget to download DynRPG before applying it to your project)!

Note: I don't know much C and C++ programming, so I know my code maybe it's not 100% efficient, and maybe somewhere in the source there will be silly lines. Anyways, any commentary o suggestions are welcome.

Hope you like it. Any comments will be welcome.
Maururu... bye.

+++ DynRPG - The RM2k3 Plugin SDK +++

...Also, although not related, I think the casting the text into a char pointer is superfluous, since it's already a char array in the parsedData object.

GCC warns me that I need to cast it, ( I Think GCC doesn't like const char* to char* conversion), so, here it is.

Yeah, i think that's the problem ( it's a little stupid obtain the hero name for scratch, isn't? ). Anyways, it's not SOOOO important this function ( really, I only needed it for the demo, allowing users to test custom values), but yes, important or not, this is a bug, ( i guess).

Well, little happy to see that's not my fault.
Maururu... bye

+++ DynRPG - The RM2k3 Plugin SDK +++

Iorana guys.
I have a little problem.

I'm making some sort of "interesting" plugin (comming soon), but I have an issue with onComment callback.

I get a String by parameter here; i don't have any problems getting and handling common plain Strings ("hi", "1234" ,"f******ck xD"), but if I try to get a String by Hero name (N7, NV8, etc...), i just obtain a zero-length String.

Obviously, I'm doing something wrong, but I don't know what. A important fact, I'm not know much C++, so i'm developing my plugin most in ANSI-C (I'm parsing the string at char* ). Anyways, here is my code where I'm getting the string:

//text variable is already declared in this way: const char *text;
text= (char*)(parsedData->parameters[0]).text;

It's weird, beacuse this works fine with plain strings.

Any ideas?
Maururu... bye
Pages: 1