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

Login with username, password and session length
News: Current Zelda Oracles Hacking Suite beta version: 0.05
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: want npc to give item?  (Read 249 times)
nmoyd
Newcomer
*
Offline Offline

Posts: 28


View Profile
« on: February 18, 2011, 07:00:32 AM »

how do i get some one to give me an item for say an old man give me a sword
i have tryd text editing but that dident work so well please help
iv been puzzling over this weeks on end :cursing:
Logged
Jandazekon
Jr. Member
**
Offline Offline

Posts: 76


View Profile WWW
« Reply #1 on: February 18, 2011, 01:16:14 PM »

It would be good if ZOLE had the feature to select a npc interaction and right click on it. Then change properties like make it talkable or enemy and then after talking to it or killing it. You get an item or a trigger will change some previous visited rooms.
Logged
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« Reply #2 on: February 18, 2011, 04:53:51 PM »

Actually this is done via scripts.  If an item is to be given to you at a specific time, then the script checks for a flag of some sort.  The actual script opcode to make an item appear is DD xx xx, and remember that the item needs to be set to comming out of a chest for it to work(or else the game will freeze).

Sorry to say, but there's not yet an easy way to edit npc's without knowing some ASM and scripting.  Don't forget that Lin and I are still deconstructing both Ages and Seasons.

Edit:  I found out that the script opcode that let's a npc give you an item is DE xx xx.  You still need to pay attention to the actual item and make sure it's set so it's given to you as opposed to falling down, spawning via puff of smoke, or rises up from the ground like you got it from a chest.

Now, if you want to find out where the script is for the interaction you want to edit, in the D000 section of ram, interactions are loaded in this area.  For the mayor in Horon Village in Seasons, his interaction loads at D340 in ram.  At D358 and D359, the two bytes used to get the script are stored here.  When the room is first loaded, it's poised over the trigger script code, and when the conditions are set, it starts excecuting the rest of the code.  The script bank in Seasons is at 2C000, and the bank in Ages is at 30000.  Remember you need to set things up to set flags when you do get an item.
« Last Edit: February 18, 2011, 06:01:41 PM by Jigglysaint » Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Offline Offline

Posts: 580



View Profile
« Reply #3 on: February 19, 2011, 07:01:20 PM »

Actually this is done via scripts.  If an item is to be given to you at a specific time, then the script checks for a flag of some sort.  The actual script opcode to make an item appear is DD xx xx, and remember that the item needs to be set to comming out of a chest for it to work(or else the game will freeze).

Sorry to say, but there's not yet an easy way to edit npc's without knowing some ASM and scripting.  Don't forget that Lin and I are still deconstructing both Ages and Seasons.

Edit:  I found out that the script opcode that let's a npc give you an item is DE xx xx.  You still need to pay attention to the actual item and make sure it's set so it's given to you as opposed to falling down, spawning via puff of smoke, or rises up from the ground like you got it from a chest.

Now, if you want to find out where the script is for the interaction you want to edit, in the D000 section of ram, interactions are loaded in this area.  For the mayor in Horon Village in Seasons, his interaction loads at D340 in ram.  At D358 and D359, the two bytes used to get the script are stored here.  When the room is first loaded, it's poised over the trigger script code, and when the conditions are set, it starts excecuting the rest of the code.  The script bank in Seasons is at 2C000, and the bank in Ages is at 30000.  Remember you need to set things up to set flags when you do get an item.
That's very interesting. I'm working on ZOSE as I type this and I've created a new opcode called "jump3bytecm", which will jump anywhere in the ROM if a certain byte in the memory matches the specified byte. I can guarantee it will have that opcode, and I want to have more that's capable of creating NPCs and doing more than just dungeon-type events.
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!