Title: Standard Dungeon IDs Post by: Fatories on June 06, 2011, 01:14:54 AM This is just going to be a short list of interactions/items you would mostly use inside of a dungeon. If you feel I should add something, then go ahead and leave a message, I'll most likely add it in.
Chest IDs: Small Key - 3003 Boss Key - 3103 Dungeon Map - 3302 Compass - 3202 Type 2 Interactions: Small key that falls down when enemies are killed - 1201 Chest that appears when enemies are killed - 1202 Chest that appears when switch is stepped on - 2117 Switches (Type 8 Interaction): 90x - Switch that stays pressed 98x - Switch that doesnt stay pressed when stepped on. * - The "x" value depends on how many switchs of that type are in the room. 900 for the first switch, 901 for the second, 902 for third, etc. Same with 98x. Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 04, 2013, 11:48:06 PM Okay, so I added a switch with ID 900 (type 8 interaction) and a chest with ID 2117 (type 2 interaction) but when I step on the switch, nothing happens. I've noticed in a lot of dungeons with switches in a room, there's also a type 3 interaction pointer in the room. Could this be causing any trouble? Because I have no idea on how to use a type 3 interaction.
Also, it should be noted I'm trying to do this in a cave with Area ID 45, not a dungeon, if that might be a problem. Title: Re: Standard Dungeon IDs Post by: Lin on December 05, 2013, 08:17:56 AM Okay, so I added a switch with ID 900 (type 8 interaction) and a chest with ID 2117 (type 2 interaction) but when I step on the switch, nothing happens. I've noticed in a lot of dungeons with switches in a room, there's also a type 3 interaction pointer in the room. Could this be causing any trouble? Because I have no idea on how to use a type 3 interaction. Usually the type 3 interaction pointer just adds a group of enemies in the dungeon. I believe your problem is the 2117 might be the interaction that makes a chest appear and disappear. If you look at map 1C or 15 in level 1, you'll notice they use a type 2 ID 2000 interaction for the chests. Try using 2000 instead.Also, it should be noted I'm trying to do this in a cave with Area ID 45, not a dungeon, if that might be a problem. Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 05, 2013, 08:45:35 PM The Type 2's interaction coordinates are supposed to be where the chest appears, right?
Just in case I need to clarify: It said above that Type 2 interaction ID 2117 is a chest that will appear when a switch is stepped on. So I placed that on the map in the coordinates I want the chest to appear. I placed an Interaction Type 8 over a switch tile and set the ID to 900 (switch that stays down when stepped on). That's all the information I got in Fatories's post. When Link steps on the switch, it stays pressed, but no chest appears. Setting the Interaction type 2 ID to 2117 or 2000 does not work. Maybe it's just because I'm trying to do this outside of a dungeon. I haven't gotten to dungeon editing yet; I'm only experimenting with the overworld and caves trying to learn as much as I can. Title: Re: Standard Dungeon IDs Post by: Lin on December 05, 2013, 10:33:50 PM Hmm... I'm not sure why it's not working. Maybe you actually can't place them in dungeons, but that doesn't sound right. Make sure for the type 2's X and Y you're putting (tileX)8 and (tileY)8, so like if you wanted it at (5, 7), you would put in 58 and 78, respectively.
Also, when you step on the switch, do you hear the "secret discovered" sound? That's one way to narrow it down. Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 05, 2013, 11:13:19 PM I have added the 8 after my actual coordinates already.
When I step on the switch, all I hear is the "water drop" sound that usually happens when the switch is stepped on. That's it. Something else I forgot to add that might help: When I step on the switch, it presses down. But when I leave the room and come back, the switch goes back up and I can step on it again. But still, nothing happens. If I leave the room and come back again, the switch is pressable again, so on... Title: Re: Standard Dungeon IDs Post by: Lin on December 06, 2013, 12:30:37 AM Hmm... I spent a while trying to test it myself and I might have found out the cause of it not working. I did exactly what I told you and even after messing with the area flags, nothing was working. But when I added chest data to the map, the empty chest was placed on the map upon entry - indicating the chest had already been opened, which is why the trigger wasn't activating. So what I did was tried it on a new save and voila, it worked just fine. I used the 900 type 8 for the trigger and the 2000 type 2 for the chest. But you also have to tamper with the area flags (the red flag at the top). "Dungeon Map" has to be checked, instead of "indoor map" and the dungeon value has to be 1 (or any real dungeon value, from what I can tell) instead of the 15 it was. Be cautious though, because this might mess with the item flag in the dungeon you edited the room's area to be.
Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 06, 2013, 01:06:54 AM I actually have a few underground area maps linked up, and changing the area flags in the room with the chest seems to also change some other rooms' flags as well (and quite randomly). This seems to completely mess up the order of the underground rooms I have laid out. One room actually thought it was a side-scrolling room and Link couldn't get off the bottom of the screen! I ended up walking through the wall into another pre-set cave and exiting atop the Maku Tree (but of course the bush entrance wasn't open yet, so I got stuck in the bush upon exiting). In order for my underground passageway to work correctly, the dungeon must be 15 and the indoor map must be checked.
I also tried creating a new save file and nothing different. ??? Title: Re: Standard Dungeon IDs Post by: Lin on December 06, 2013, 01:37:19 AM Are you using a small indoor map, like the ones found in the underwater areas, or the ones found in the indoor big group?
Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 06, 2013, 02:50:44 AM I am using the following maps in "Present Underwater":
E0, E1, F0, and F1. E0, E1, and F1 have the underground area ID (45), and room F0 has the regular house area ID (40). Room F1 is the one I'm trying to make the chest appear in. The switch is in the same room. I can upload screenshots if you need. Title: Re: Standard Dungeon IDs Post by: Lin on December 06, 2013, 04:10:07 AM Well if you're unable to modify the dungeon value and area flags (Which makes sense I guess. The minimap would be screwed up anyway) then you're stuck making your own map script. It's very simple though - you do a checkmemory on address CCA0 to wait until it's 1 and if the item flag isn't set, create a puff and set tile YX to the chest tile. A 5-line script that would resemble something like this. It's been a very long time since I wrote any scripts so this won't be accurate to the command syntax.
checkroomflag 40 (40 is the item flag I think) checkmemory CCA0 1 createpuff yx playsound 4D settilepos yx chest-tile Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 06, 2013, 08:42:59 PM Believe it or not, it still does not work, with the same issue: nothing happens when the switch is stepped on.
Here's my exact script: writelocation 17DA3 setinteraction72 01 checkroomflag 40 checkmemory CCA0 1 createpuff playsound 4D settilepos 34 F1 I presume I'm supposed to set the interaction type 2's ID to be 7201, right? I did that and still nothing. Also, what exactly is an item flag? Does it just check if an item has been obtained in a room? I've heard of it but never knew what it was. Title: Re: Standard Dungeon IDs Post by: Lin on December 06, 2013, 09:55:52 PM Just an off-topic word of advice: For scripts, use the free space above 100000. All free space before that is usually very limited and possibly useful because specific data is bank-exclusive (eg. all music data resides in bank 3F, bank 04 is home to a lot of map scripts, tilesets, etc...). In case you don't know, a bank is just a group of 0x4000 bytes. Bank 0 is 0000-3FFFF, bank 1 is 4000-7FFF, etc...
An item flag is just bit 06 of the room's flag. If it's set, generally that means the item has already been obtained in that room. In regards to the script not working, I believe (for some stupid reason), checkmemory requires the value to be first. So it would be checkmemory 1 CCA0. Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 06, 2013, 11:55:11 PM Still doesn't work, but I noticed something. I changed the "writelocation" to 0x100001 (putting "0x" before a number indicates it is hexadecimal?). I compiled the script and closed ZOSE. When I went back into ZOSE and decompiled it, the arguments of the checkmemory command changed, and the line "setinteraction72 01" disappeared. Here's my before and after scripts:
Before: writelocation 100001 setinteraction72 01 checkroomflag 40 checkmemory 1 CCA0 createpuff playsound 4D settilepos 34 F1 After: //Decompiled script 100001 writelocation 100001 checkroomflag 40 checkmemory 1 A0 createpuff playsound 4D settilepos 34 F1 So something tells me we were correct the first time where the value in checkmemory goes after the address, because that's what it says in the ZOSE documentation, too. Another something: you said originally to set this as the map script. I've been setting it as the interaction type 2 for the chest. There is that white piece of paper in the ZOLE toolbar labeled "Map Scripts"; was I supposed to put the script there? Because I'm not sure how to do that. Title: Re: Standard Dungeon IDs Post by: Lin on December 07, 2013, 06:19:58 AM Remove the checkroomflag and see if that fixes anything. Maybe I forgot the flag number. The setinteraction72 is a compile-only instruction - it's almost like a preprocessor directive (#define xx yy in C for example). And from the looks of it, the checkmemory is actually checkmemory address value. And the ZOSE defaults to hexadecimal number values, so the 0x isn't necessary.
Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 07, 2013, 04:45:08 PM I've removed the checkroomflag a few times and still nothing.
I know nothing about C, C++, or C# so that wasn't a really good comparison for me :). The only programming language I know the very basics of is Visual Basic. I'm only putting 0x in the forum here, not in ZOSE. Title: Re: Standard Dungeon IDs Post by: Lin on December 08, 2013, 08:00:17 AM Hmm... Well, I'm clueless at this point. There's nothing else I can think off that would fix it. Sorry :(
Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 08, 2013, 03:16:38 PM I GOT IT!
I was toying around with the script commands and such, and I noticed that in the tile selector in ZOLE, there is a pressed switch tile. So in ZOSE, I replaced checkmemory with checktile and made it check for the pressed switch tile. Here's my new script: //Decompiled script 100001 writelocation 100001 checktile 35 D //checkmemory CF35 D createpuff playsound 4D settilepos 34 F1 The item flag in the room had already been set, so I had to remove the checkroomflag. But because of this, if I leave and reenter the room, I can make the chest appear again. So can I use the regular room flag (80) to prevent this? Or is there a way to remove the item flag? Title: Re: Standard Dungeon IDs Post by: Lin on December 08, 2013, 08:50:44 PM Hmmm... Interesting. If I remember correctly, that should've worked. Anyway, you CAN use flag 80 if you want, but you'll have to force the player to get the chest. Actually, you could just do a checktile YX openchesttile and then set the room flag to 80. That should make it work just fine.
Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 09, 2013, 08:47:53 PM Actually, the item flag wasn't set in that room. I was able to use the item flag in the script.
When setting the item flag, the command is "setroomflag 40", but when checking, it's "checkitemflag". Same with the regular room flag (80), the command for setting it is "setroomflag 80" and checking it is "checkspecialflag". I haven't gotten the "checkroomflag ##" to work at all. I guess it does something else besides checking the room flag. I also noticed that there is a command called "setglobalflag". What does that do? Title: Re: Standard Dungeon IDs Post by: Lin on December 09, 2013, 10:43:40 PM Actually, the item flag wasn't set in that room. I was able to use the item flag in the script. Oh, right. Weird, I forgot about that. Checkroomflag ANDs the room flag by the current value and if it's not 0, the next instruction is skipped. And honestly, it's been so long that it seems I've forgotten. I think there are an extra 8 bytes in the memory for 256 additional global flags, but don't quote me on that.When setting the item flag, the command is "setroomflag 40", but when checking, it's "checkitemflag". Same with the regular room flag (80), the command for setting it is "setroomflag 80" and checking it is "checkspecialflag". I haven't gotten the "checkroomflag ##" to work at all. I guess it does something else besides checking the room flag. I also noticed that there is a command called "setglobalflag". What does that do? I sure wish Jigglysaint was here. He'd know for sure :P Title: Re: Standard Dungeon IDs Post by: BigTarantula99 on December 09, 2013, 10:57:53 PM Well, with room and item flags, I probably won't use global flags anyway. Thanks so much for your help!
|