Export rooms

Started by arj0n, Mon 01/08/2011 20:59:17

Previous topic - Next topic

arj0n

I guess not but I ask it just in case I overlooked it: is there a way to create/export a list of all rooms containing their description?

monkey0506

You just need a test-based list of the room descriptions, matched to their respective ID? There's not currently a built-in method, but it would take about 5-10 minutes to write up an editor plugin to add that function...seems somewhat limited and specialized in purpose, but feasible if you needed it.

Wyz

Well, the descriptions are stored in the Game.agf file. If you open it in notepad or another plain text editor and search for <Rooms> you will find the complete list. If you're handy with XML you might even write something that can strip it out, it's not that much work I guess. Ik hoop dat je er wat aan hebt. :)
Life is like an adventure without the pixel hunts.

monkey0506

Right, I didn't think about that. For reference, the Rooms node and its children look like this:

Code: ags
    <Rooms>
      <UnloadedRoom>
        <Number>1</Number>
        <Description>Room 1</Description>
      </UnloadedRoom>
      <UnloadedRoom>
        <Number>999</Number>
        <Description IsNull="True" />
      </UnloadedRoom>
    </Rooms>


So a simple XML parser to strip the Rooms node out and then read the children wouldn't be too terribly difficult. But then again, the actual work-load of writing the code for the parser might be comparable to just writing a simple editor plugin. Either way. :P

arj0n

Quote from: +monkE3y_05_06+ on Tue 02/08/2011 00:25:45
You just need a test-based list of the room descriptions, matched to their respective ID? There's not currently a built-in method, but it would take about 5-10 minutes to write up an editor plugin to add that function...seems somewhat limited and specialized in purpose, but feasible if you needed it.
Yes, that's what I'm looking for, just the room descriptions matched to their respective ID.

Quote from: Wyz+ on Tue 02/08/2011 01:10:44
Well, the descriptions are stored in the Game.agf file. If you open it in notepad or another plain text editor and search for <Rooms> you will find the complete list. If you're handy with XML you might even write something that can strip it out, it's not that much work I guess. Ik hoop dat je er wat aan hebt. :)
Ah, thanx Wyz. Ik denk dat ik hier voldoende aan heb. I can just copy the file and within that one remove the other info and there's the list I want, cool.
I could have know that there's a config file storing such info... stupid me  :)

Quote from: +monkE3y_05_06+ on Tue 02/08/2011 01:24:46
Right, I didn't think about that. For reference, the Rooms node and its children look like this:

Code: ags
    <Rooms>
      <UnloadedRoom>
        <Number>1</Number>
        <Description>Room 1</Description>
      </UnloadedRoom>
      <UnloadedRoom>
        <Number>999</Number>
        <Description IsNull="True" />
      </UnloadedRoom>
    </Rooms>


So a simple XML parser to strip the Rooms node out and then read the children wouldn't be too terribly difficult. But then again, the actual work-load of writing the code for the parser might be comparable to just writing a simple editor plugin. Either way. :P
Thanx Monkey.
A simple editor plugin could be handy for some people but manually getting the info from the agf file will do too for me.
But since you're a pluginman, maybe add this one to your list  ;)
(unless no one ever ask this before...)

SMF spam blocked by CleanTalk