Page 1 of 1

RPG coding help

Posted: March 16th, 2010, 2:23 am
by carter472
Hey. I'm currently trying to figure out how to code in RPG.

1. Using the Village_rpg map, I've found examples of ENT_ITEM and ENT_SPELL.

But according to the description in the rpg files, there are a total of 4 entities.

ENT_CHAR = 0
ENT_ITEM = 1
ENT_SPELL = 2
ENT_OBJECT = 3


Can anyone give me an example script of ENT_CHAR and ENT_OBJECT?

I could use those scripts to figure out how to use the two remaining entities.



2. Something else popped up. When I'm writing the description for items and spells in the Inventory, I face two problems.

2.1 - How do I make paragraphs of my descriptions ( this also applies to when I'm typing out dialogue using r_response ). For example, I want to type a dialogue that looks like :

How was your day Jim?
I wanted to visit you the other day but I got caught up in work. Sorry.

Meaning, I want to start a new sentence on a new line and not connect directly from the previous sentence. So i DON"T want something that looks like this


How was your day Jim? I wanted to visit you the other day but I got caught up in work. Sorry.

2.2 - How do I change the other descriptions of the item and spells? When I type a description of an item, the description appears in the top left corner of the inventory. In the top right corner and also under the icon of the item, it always says " This area will eventually be filled with what the item can do " or something like that.

How do I change the description in the top right corner and in the area below the icon of the item to something of my own?

Please and thanks so much in advance! I realize its a lot, but it'll be a tremendous help to me. ^ ^

Re: RPG coding help

Posted: March 21st, 2010, 8:53 pm
by Venima
1. look in data\game_rpg.cfg

or if you're lazy:

Code: Select all

spawn_monster = [
	r_type $ENT_CHAR
	r_name "Monster"
	r_model rc/red
]

Code: Select all

spawn_rpg_snow_portal = [
	r_type $ENT_OBJECT
	r_name "Winter village"

	r_interact [
		r_select $rpginterract
		r_telemap rpg_snow
	]
]

2.1 You mean like this:
guitext "How was your day Jim?" chat
guitext "I wanted to visit you the other day but I got caught up in work. Sorry." chat

2.2 After searching all of the files to do with platinum arts sandbox I discovered that what you're after is in this file:

src\rpggame\rpggui.cpp

About a third of the way down in this file I found "This textbox will eventually contain a brief summary of whatever the item will do to you"

Have fun trying to connect that with data\game_rpg.cfg. I'm sure if you look around enough you'll find out how to do it. (If you have the programming ability)

Re: RPG coding help

Posted: March 21st, 2010, 11:25 pm
by Hirato
the RPG is still in a very rudimentary state - I'm currently rewriting it into something that's far more flexible and powerful (I hope!), and hopefully extendable with even less effort

firstly, ENT_CHAR is the default, it's characters, AI, monsters, your player
ENT_OBJECT is intended for doors, switches, buttons, trap doors, portals and other amusing things like that

and if you want to add newlines within a description, you have two ways of going about it
firstly

Code: Select all

r_description [line one
line two
line three]
the second is to place ^n tokens in the string (this'll be interpreted as \n (which si a new line))

Code: Select all

r_description "line one^nline two^nline three"

Re: RPG coding help

Posted: March 26th, 2010, 1:40 pm
by Leo_V117
i think the rpg mode is fine. All it needs is a simplified AI coding Method.

anyway. Who was it that created Master Chef Ogro?

and Can I execute an AI script in another folder by adding

Code: Select all

exec ai/enemy.cfg
below the music execute file?

Re: RPG coding help

Posted: March 26th, 2010, 1:48 pm
by arcones
mainly high schooler's created MCO... so :?

Re: RPG coding help

Posted: March 26th, 2010, 1:54 pm
by Leo_V117
dern it. :lol: