Primary Zelda Hacking
April 21, 2014, 09:21:34 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: There is now an official Primary Zelda Hacking Press!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Many questions about ZOSE...  (Read 201 times)
BigTarantula99
Jr. Member
**
Online Online

Posts: 55


Revamper of ZOLE 4 for ZOLE 4.5


View Profile
« on: January 20, 2014, 04:47:49 PM »

This is basically a list of the rest of the things I don't quite understand.  When I get these down, hopefully I'll actually be able to progress in my hack on my own somewhat.

1.  Is there a command to send Link to a different map and at a specified location?  I'm assuming I can set CC30, CC2D, D00B, and D00D to the proper values but does this work?
2.  What does SetVisible, Set45 and Set49 do?  So in other words, what is an interaction's Dx44, Dx45 and Dx49 value and what are some common settings for it?
3.  Difference between "PlaySound" and "SetMusic"?
4.  What is SetCC8A useful for?  Would SetMemory CC8A ## do the same thing?
5.  Is there a way to check if Link has a certain item without that item being set to a button?  It's not that useful if I check if Link has a sword set to B, but he has it set to A (the script won't activate).
6.  What's a cycle, like in memory address C622?
7.  So if I want the script to wait until a wall lever is pulled out all the way, would I use CheckMemory CCAB 7?
8.  For D00B and D00D, what is the max value for it (to get Link centered on the lower-right tile)?  What about in bigger dungeon rooms?
9.  What is ShowTextIDJP used for?
10.  Difference between ShowText and ShowLoadedText?
11.  I'm assuming SetTextID's Value 1 and Value 2 range from 00-FF?
12.  Do mini-bosses and normal bosses both use Interaction type 4?  Would you happen to know what some of the IDs are to get those bosses to appear?
13.  What would CheckLinkXToMA be useful for?
14.  In the ZOSE.html file, what do you mean when you say "ANDs" or "ORs", like in CheckRoomFlag and SetRoomFlag?
15.  What is SetInteractionFactor useful for?  Similarly with AddSetInteractionFactor?
16.  What is ASM15 useful for?
17.  How many posts do I need to reach or time that I need to be signed up for my "newcomer" title to go away?

Merci beaucoup for answering all of these.  I've needed these clarified for a long time so I can learn what they do.  Hopefully this will save anyone else from having these questions and asking them again on here.
Logged

Proud part of the IRCs #smwc and #ZOLE as BigT.

CURRENTLY HACKING:  MISICS (OoA)
Completion Status: 12%

-BigT
BigTarantula99
Jr. Member
**
Online Online

Posts: 55


Revamper of ZOLE 4 for ZOLE 4.5


View Profile
« Reply #1 on: January 20, 2014, 08:22:06 PM »

And just for the record, I read the rules (http://zeldahacking.net/forum/index.php?topic=243.0), where it mentions about being "spoonfed" information, and I realized that I might be appearing that way with the post above.  I have tried some of these things I mentioned, but I just can't figure them out.  I don't want to attempt some stuff, cause I'd be afraid I would enter a "wrong" value and mess up the entire hack I've been working on for a while.  Better to be safe then sorry.  If I'm coming off as being rude, offensive, or just plain too curious, I apologize in advance.  Just wanted to mention that.  I wish you guys all the best : )
Logged

Proud part of the IRCs #smwc and #ZOLE as BigT.

CURRENTLY HACKING:  MISICS (OoA)
Completion Status: 12%

-BigT
Lin
ZOLE Creator
Administrator
Hero Member
*****
Offline Offline

Posts: 580



View Profile
« Reply #2 on: January 20, 2014, 11:15:05 PM »

1. There is not a command, but a while ago I figured out a rigged way to do it. It's by no means simple. This is part of the script from Nature that sends Link to the island after you beat level 2 and talk to some lady:
Code:
//fade in
setmemory c4ac 01
setmemory c2ff 1d
setmemory c4b1 ff
setmemory c4b2 ff
setmemory c4b3 ff
setmemory c4b4 ff
setmemory c4ab 0a
//we're gonna callscript the map warping procedure
//so we have to simulate a warp
setmemory cc47 00 //group
setmemory cc4a 42 //entrance type
setmemory cc49 81
setmemory cc4f 0a
//setmemory d000 03
//setmemory cc31 01
//setmemory cc35 ff
setmemory cc2d 00
setmemory cc48 c3 //map
setmemory cc30 c3
setmemory d00b 48 //Link Y
setmemory d00d 68 //Link X
setmemory d040 0
setmemory d140 0
setmemory d240 0
asm15 20
//End

At 0x20 in the ROM, I have these bytes:
Code:
F0 97 F5 3E 01 E0 97 EA 22 22 CD 60 5A F1 E0 97 EA 22 22 C9
You shouldn't have anything important at 0x20, but if you do, you could put those bytes in some free space in bank 0 (0-0x3FFF) and change the 20 in asm15 to wherever you put those bytes.

2. SetVisible shows (or hides?) an interaction. I don't know what those values do. They can vary from interaction to interaction. With enemies, those values respectively are the enemy's stage, unknown (maybe lower byte of a movement timer), and movement direction.

3. PlaySound just plays a sound without looping and keeps the current music. SetMusic changes the music.

4. I don't know what it's used for. Most likely a value related to the map you're on (eg. how many torches are lit, how far the wall lever is pulled out, etc). Most likely yes, except it would use 2 extra bytes.

5. Not an easy way in scripts that I can think of. Here is a list of all the inventory slot's memory addresses.
Code:
00:C688 b_weapon
00:C689 a_weapon
00:C68A inv_slot_0
00:C68B inv_slot_1
00:C68C inv_slot_2
00:C68D inv_slot_3
00:C68E inv_slot_4
00:C68F inv_slot_5
00:C690 inv_slot_6
00:C691 inv_slot_7
00:C692 inv_slot_8
00:C693 inv_slot_9
00:C694 inv_slot_A
00:C695 inv_slot_B
00:C696 inv_slot_C
00:C697 inv_slot_D
00:C698 inv_slot_E
00:C699 inv_slot_F

6. A cycle is usually just a set of tasks that get performed every iteration. For example, every cycle, it handles interaction code. Maybe every cycle it increments C622, and perhaps whenever the game needs to get a random number, it uses the value at C622 as a seed for the randomizer, which would make it seem random.

7. No. Each stage increments the lever in steps of 10 (0xA). For 7 steps, thats 7 * 10 = 70, or 0x46. However, when a lever is pulled out as far as it can go, the value changes to 0xC0, so that's what you would check for. The length you can pull it out to depends on what you put in the interaction data.

8. FF and FF. Overworld maps are 10x8 in block sizes. Each block is 16x16 pixels, which the coordinates represent. -8 for the center, that comes out to be (154, 120). Big room sizes are 15x11 tiles, so do the same thing. 240x176, -8, you get (232, 168)

9. I believe it shows a text ID and jumps to the script at 305F0. I don't know what the script at 305F0 is, and ZOSE doesn't handle opcode EB apparently, so maybe we'll never know.

10. There is a command "SetTextID", which will set an interaction's text ID. When you ShowLoadedText, it will use that value to display a text box, whereas with ShowText you provide an address in ZOSE. I can't think of any immediate benefits over doing one over the other, except for maybe using multiple scripts to affect one NPC.

11. Yes, but realistically no. The two values together make up a 16-bit integer, a value ranging from 0-65535 instead of 0-255. I believe the value is little-endian too, so value 1 would range from 0-255 and value 2 might only actually go from 0-10. I might have that backwards.

12. Yes, although Fatories has managed to make his own bosses. I don't know how he did it. You'll have to talk to him. As for making them appear, you just use the interactions you find in boss rooms. Do note that the game will crash if the doors in the room don't match the original. There's no way to change them unless you know how to edit the assembly behind the interactions. They do have their own enemy IDs though, if that's what you're asking. Zerpha compiled a list of them here: http://zeldahacking.net/forum/index.php?topic=34.msg501#msg501

13. Honestly, I have no idea.

14. http://en.wikipedia.org/wiki/Bitwise_operation

15. These are useful commands, although I've never used them. SetInteractionFactor allows you to set a DxYY value without knowing what the x is in your interaction's address. For example, if your interaction is at D2** or D4**, regardless of the number there, your code will set the same value. You just provide it with the YY (the **) and the value to set it to. AddSetInteractionFactor does the same thing but instead it adds a value onto the value that's already there.

16. ASM15 allows you to execute any assembly in bank 15 (and bank 00 if you remember how Gameboy addressing works). I used it in the script above to force a warp, even though there wasn't really one.

17. 50. Dang, I didn't realize it was so high. Lol.

And just for the record, I read the rules (http://zeldahacking.net/forum/index.php?topic=243.0), where it mentions about being "spoonfed" information, and I realized that I might be appearing that way with the post above.  I have tried some of these things I mentioned, but I just can't figure them out.  I don't want to attempt some stuff, cause I'd be afraid I would enter a "wrong" value and mess up the entire hack I've been working on for a while.  Better to be safe then sorry.  If I'm coming off as being rude, offensive, or just plain too curious, I apologize in advance.  Just wanted to mention that.  I wish you guys all the best : )
Backups are extremely useful. I highly recommend making them often. Also, just plugging in random values to something is a good way to figure out how something works. It might not always be enough to just observe something properly working. You might need to see it incorrectly working to see exactly what it's doing. Also it's no problem.
« Last Edit: January 20, 2014, 11:21:27 PM by Lin » Logged
Fatories
LALE Creator
Administrator
Full Member
*****
Offline Offline

Posts: 223



View Profile
« Reply #3 on: January 21, 2014, 05:34:15 AM »

I don't really remember much of what I did for the lame bosses I made. It was a combination of spawning them, altering properties, setting room flags and crap in ZOSE. Sorry that I'm not very helpful, but it has been so long.
« Last Edit: January 21, 2014, 06:10:10 AM by Fatories » Logged

The force of a true man can penetrate all. Nothing is safe.
BigTarantula99
Jr. Member
**
Online Online

Posts: 55


Revamper of ZOLE 4 for ZOLE 4.5


View Profile
« Reply #4 on: January 21, 2014, 07:11:21 PM »

Wow, I didn't even think about backing up.  I would just copy the ROM to a different directory, right?
Logged

Proud part of the IRCs #smwc and #ZOLE as BigT.

CURRENTLY HACKING:  MISICS (OoA)
Completion Status: 12%

-BigT
Lin
ZOLE Creator
Administrator
Hero Member
*****
Offline Offline

Posts: 580



View Profile
« Reply #5 on: January 21, 2014, 10:36:26 PM »

Yes, or Tools > Create Backup.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!