View Single Post
Old October 18th, 2009 (5:35 PM). Edited October 18th, 2009 by colcolstyles.
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Originally Posted by Hiroshi Sotomura View Post
@colcolstyles: Ah, a setmaptile script. I should consider making special deviations with that script to allow setmaptile to… plant puddles in certain areas. :P (I was already considering this, but I forgot about it as I rewrote this.)
That's genius! Of course, the script would have to be different for every map as the locations of puddles would vary from map to map. But that's a really neat idea :)

Also, I looked over your latest entry and the idea looks pretty cool. Only, I can't seem to think of any useful function for it :\
There was an issue in the old RHN that demonstrated how one could use 'writebytetooffset' to change the pointer to the player's OW in the RAM to another OW. Using that method would eliminate some of the glitches present with the '0x0B' behavior method, leading me to believe that the '0x0B' method doesn't have any benefits.

Though if you're interested I found out that when the player switches control to the "0x0B NPC", their range of movement is limited. Upon closer inspection, I discovered that the available walking range is dependent on the value in the 'Movement' byte in AdvanceMap. As I'm sure you're already aware, that byte controls how many tiles a NPC can move vertically and horizontally. For example, a value of 21 would give the NPC a range like this (behold the amazing ASCII art):

...with the X representing the original location. Anyways, I found that when you switch control from the player to the NPC, the player is limited to only those tiles. Everything else acts as though it's movement permission is '1'. Once I discovered that the Movement byte was the controlling factor, I deducted that the maximum movement range would be 17x17 ('0xFF' (counting the original location)) but if you set the Movement byte to 0x00, then the NPC's range becomes unlimited :O
So I guess that might be useful if you plan on using this.

As a helpful tip, you can use the command 'spritebehave wPeople# bBehaviour#' to change a NPC's behavior byte to '0x0B' at any time.

One thing which I was very disappointed to discover was that 'special 0x8E' doesn't mimic the effect of, say, opening and closing the bag. Nor does 'fadescreen', though (unlike 'special 0x8E') I didn't expect that work in the first place. So unless you can think of some other 'special' (or anything that might emulate the opening and closing of the bag) then we can't control when and where the player switches control to the NPC :\

On a final note, I've been experimenting with the possibility of having two "0x0B NPCs" on the same map but I haven't been able to draw any conclusions so far. Please, let me know if you make any discoveries of your own.

Edit: Whoa, I just found out something more. If you open the Bag again (after you've already "morphed" into the "0x0B NPC" (do you mind if I just start calling them BNPCs?)), you will retain control over that NPC but the OW graphic will change back to that of the Player's default OW. Interesting...

Brother of Vrai
Reply With Quote