Basic RTC API

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Basic RTC API

Post by andyboy_uk »

hi george,

Im assuming that in the code of RTC there is an object model in place that has all of the object types within an RTC file and every possible property with their limits, choices, options, etc built in.

Is there any way you could make a little reflected routine to scan through that object model and plonk it out into an xml document (or some other format).

That way guide writers can put very definitive guides together of what things do and where.

Also if this function was accessible through a DLL or by referencing the EXE file in say a .NET application, it would make 3rd party tools a lot easier to write.

This could be a pain in the backside depending on what the object model inside the code is like, but with the speed of your changes recently I would say you have a fairly generic and flexible structure in there so it should be easy(ish) to extract.

Not to mention, if you had a way for an external EXE to pick graphics, sounds, etc, from an RTC file (via DLL or reference to the EXE) im sure there are a million tools that would be great.

I will be happy to explain my warped idea in more detail over PM if you like.
Regards,

Andy
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post by andyboy_uk »

Incidentally, I dont mind writing said DLL if you are able to help me reading the RTC data files.
Regards,

Andy
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Re: Basic RTC API

Post by George Gilbert »

andyboy_uk wrote:Im assuming that in the code of RTC there is an object model in place that has all of the object types within an RTC file and every possible property with their limits, choices, options, etc built in.
Not an object model (it's all in C rather than C++) but the general point is right.
andyboy_uk wrote:Is there any way you could make a little reflected routine to scan through that object model and plonk it out into an xml document (or some other format).
Not easily. Also, they don't contain anything that isn't already viewable in the RTC editor, so I'm not sure what that would give you.
andyboy_uk wrote:That way guide writers can put very definitive guides together of what things do and where.
Ooooh - that so doesn't logically follow.

Just knowing that a WALLITEM_RELAY has the "is-a-relay" property set in its object doesn't in any way shape or form give you an idea of what it does and how it does it!
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post by andyboy_uk »

True I suppose, I was working on the assumption that the editor was using some sort of reflected routine to get at all the various properties you can set.

But if that is not the case, are all the forms hardcoded to a degree? or did you create custom controls or something to sort of "lego" the forms together for the editor?
Ooooh - that so doesn't logically follow.

Just knowing that a WALLITEM_RELAY has the "is-a-relay" property set in its object doesn't in any way shape or form give you an idea of what it does and how it does it!
Good point, but with a bit of experimentation im sure we'd get there. To be honest I think your right though, the editor does everything and more that was requested recently and you have done a sterling job of it.

:)

So how bout the graphical hook in? :)
Regards,

Andy
Post Reply