Page 1 of 1

objects, NPCs, monsters etc.

Posted: 06 Apr 2006, 15:07
by tobiasgall
Hi, I have a suggestion for the handling of all kind of non-player stuff in tmw.

I developed some small games with RPGMaker2000 some years ago, and I really liked the system how it works.

You build your world out of static tiles (some non-animated and some animated, but they all don't move). Then, you add objects.
Objects are:
- destroyable things
- things that are moving
- monsters
- NPCs
- doors
- ...

Each of those objects has it's own script. Other things you could control for each object:
- solid? (yes / no)
- moveing? (no, random, left, right, up, down)
- script (something like below)

In the script part, you could e.g. define something like the following:

Code: Select all

if(money < 500) {
    showimage("BADSMILEY", "badsmiley.png", 10, 10);
    messagebox("You don't have enough money for the shop.");
    deleteimage("BADSMILEY");
} else {
    showshopscreen();
}
This would be predefined keywords, which create a window or something.

The advantages are:
- a mapper has much power, without destroying something
- the system is simple to use (and good to document)
- scripts are easy to understand / to modify / to share

Is something like that already planned? Or how do you want to handle walking NPCs and scripts?

Posted: 06 Apr 2006, 15:24
by Crush
we wanted to use ruby as a scripting language.

re

Posted: 08 Apr 2006, 02:18
by Bear
hes talking about altering the Map editor, not the scripting language.

Posted: 08 Apr 2006, 08:43
by tobiasgall
Ok, there will be a scripting language - that's nice!

You could have one editor where you can create scripts, build the map and set the object behaviour.

I don't know if placing NPCs / events is supported in Tiled.

But what I was supposed to say:
Will moving NPCs, monsters etc. be handled as events, or do they each have a special handling?

In RPGMaker, each NPC, monster etc. is an "object". And you can change the object's properties, so you can speak to it, fight it (maybe you could define the health. 0 = not fightable), etc.

Posted: 08 Apr 2006, 20:19
by Rotonen
I think no one has thought about implementing the NPC scripts in the map format so far. That would certainly make things simpler to edit, I think.

Posted: 09 Apr 2006, 03:48
by biggeruniverse
That's evil.

Posted: 09 Apr 2006, 19:09
by knivey
have those things together in one map file would make more sense to me

Posted: 09 Apr 2006, 19:37
by Pajarico
I vote for being sepparated. And I vote twice :wink:
I want people to be able to edit the scripts with a plain text editor without having to use tiled (which requires evil Java).

Posted: 09 Apr 2006, 22:22
by Rotonen
Well we have a gzipped map format so we can just have the separate script file within the package.

Posted: 10 Apr 2006, 17:27
by Pajarico
Rotonen wrote:I think no one has thought about implementing the NPC scripts in the map format so far. That would certainly make things simpler to edit, I think.
Well, you said "implementing the NPC scripts in the map format" that's why I opposed. I don't consider a gzipped file "a format" and thought you were suggesting to include the scripts in the tmx file. I know those are human-readable xml files but still I find it clumsy.
If you meant just havin gzipped with the tmx that could be a way to store things in order but again you have to ungzip the script to edit it and gzip it again with the update. Unless someone knows a editor which is able to edit gzipped files.