Development Forum |
|
Failed to get meta room location | |
|
Malkin Manager
|
10/4/2017 | |
So I've been trying to make a small metaroom - nothing too flash, just to broaden my horizons. The room itself is just diagonally-down from the crypt and goes over the borders of the orignally-defined 'universe', but I've added in some code from Veridia to expand the map. When I go to boot up a new world with my defined room, I get the following error:
.\Bootstrap\010 Docking Station\!addon.cos
Failed to get meta room location ... 78 2281 rtyp va00 0 {@}rmsc 9631 2229 "" setv game "m ... |
My code is as follows: Pastebin of cos
What's going on?
My TCR Norns |
GimmeCat
|
10/4/2017 | |
Wow. Is 500 lines of CAOS normal for 'simple' metarooms in C3? |
Zzzzoot
|
10/4/2017 | |
I tested your script and got the same error. How did you make this script? It looks like it's corrupted. At line 96 there's
setv va00 addr game "mapeditortmp" 9535 9727 21798 2176 2278 2281
rtyp va00 0
rmsc 9631 2229 "" |
setv va00 addr defines (and makes) a room, but the top-left corner is 10x farther down the map than anything else in the metaroom. So everything after that in the script that references that room by its coordinates can't find it.
It looks like changing the 21798 to 2178 fixes the problem.
That's a weirdly specific corruption though. |
Malkin
Manager
|
10/4/2017 | |
I was just using the autogeneration tool in map editor, I took out some of the header stuff because it didn't really need it. Thanks for finding the error - how did you find it?
My TCR Norns |
Zzzzoot
|
10/5/2017 | 1 |
Ah, I thought it was probably the map editor but I've not really used it in years and the first line "**CAOS2PRAY" threw me off, haha.
So the error message means somewhere in your script there's a section that looks like this:
...78 2281
rtyp va00 0
{@}rmsc 9631 2229 ""
setv game "m... |
except without the "{@}" of course. And all squished on one line to make it hard to decipher.
The @ symbol is the command that threw the error.
The documentation for that command is
RMSC (command) x (integer) y (integer) track_name (string)
Associates a music track with the room at the specified coordinates. This overrides any track specified for the metaroom that the room is in. |
(Just a note, the way I interpret the documentation, it would make more sense to me for it so say "Failed to get room location" instead of "meta room". Perhaps it's a small bug in the engine itself, but that's a cop out on my part. Either way, I can't explain it.)
The important part of the command, as far as the error message is concerned, is the X and Y. The command specifies the room via the room's location. Which it can't find due to the corruption.
The room the RMSC command is referring to, is defined two lines above, fortunately. And the fact that that command had a 5 digit number while all the other commands had all 4 digit numbers was a hint. (I sketched out the room as defined and saw it was really warped, but that didn't actually help very much compared to what I did next.)
I took the world where I'd tried to inject the script, and used map editor's "Open from game" function. The script didn't inject properly, but fortunately everything up to the error does inject, so map editor was able to export a partially finished metaroom with one room sticking way below the rest of the metaroom.
From the map editor, I was able to figure out about where the room's boundaries were supposed to be. Some trial and error I was able to figure out the right number. (I actually found the room defined immediately above it. But I think just guessing would've been faster.)
In the past when I got weird errors like this, I think I would just redo the whole metaroom in map editor from scratch. But that was years ago and my memory isn't the best. It'd be tedious to do this a lot. Does anyone with more experience with map editor have a better way to do this? |
Malkin
Manager
|
10/5/2017 | 1 |
Thank you, that's a really big help! CAOS2PRAY is a feature of Jagent which lets you code your pray file inside your cos file.
My TCR Norns |
Zzzzoot
|
10/7/2017 | 2 |
Oh my.
I just used it for the first time. Like, wow. CAOS2PRAY is just, so awesome. I took a little script I had lying around and turned it into an actual agent in under 5 minutes.
Thank you for telling me! This is so useful. |
|