Author Topic: How To.........  (Read 13179 times)

Geiger

  • Guru of Life Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 315
    • View Profile
    • Geiger's Crypt
Re: How To.........
« Reply #75 on: December 02, 2008, 12:54:02 pm »
Steal maps from Japanese version

Oh noes!  You haz founded teh sekrit!  ;)

The main reason the Beta version disallows saving is due to event commands being different.  I wouldn't suggest trying to "steal" those.  The maps should be fairly safe though, provided you can match up the graphics.  Have fun!

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: How To.........
« Reply #76 on: December 09, 2008, 09:32:28 am »
Hate to ask, but how do you work with the Guardia Castle type doors?  I've got the event coded but the copies just won't copy correctly...Plus the solidity issues are a bit odd.

I'm also having trouble with layering anything correctly.  I've tried layering objects when others are disabled, but it ALWAYS writes on both layers ._.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #77 on: December 09, 2008, 05:57:25 pm »
oo good request Justin this was something that bugged me for awhile I'll make a little how to for this when I get home :)

It's basically (i'll make this more detailed later):

Object 0:  In it's activate set code where if a condition is met copy open door over
Object n:  place it in front of the door, when it's touched call door opening code
object n+1: place it behind the door, when it's touched call door opening code
door opening code (place this anywhere):  set the condition in object 0, copy the open door over

Note about copying:
There's two flavors of copy (you change the top paramter), one copies after the screen is loaded (the code activated by object n and n+1) and one copies before the screen is loaded (called by object 0's activate).

--JP

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: How To.........
« Reply #78 on: December 09, 2008, 06:06:53 pm »
Strangely, I tried that exact code and it kept copying blank black tiles for some unknown reason.  So for now, I removed the door completely until we're sure of a way to get this.

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
Re: How To.........
« Reply #79 on: December 09, 2008, 07:25:36 pm »
Sometimes the copying is a bit iffy with the different layers. Try copying with all values True maybe.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #80 on: December 10, 2008, 02:52:03 am »
How To Make a Guardia Style Door:

A guardia style door is quite a bit different than the doors you make with 'door trigger'.  They require putting code in "atleast" three different objects  I personally like to make it 4 objects (I try to put all the logic of a room in one object).   I'm going to show how to do it my way :)

First off you're going to need to put the "open door" tiles on your map.  Just copy them off in the corner somewhere...to make it easy copy both layer 1 and 2 the situations where you copy just one layer are pretty rare.  The open door is right next to the closed door on the tileset.

Now start with some blank events
Object 00  //pre room load events
Object 1-7 //PC's
Object 8   // logic

you need to atleast 2 more objects whose touch will trigger the door to open.  Place them beneath the door and behind the door (behind really = on the door since it's 2D).  When we touch them were going to do some logic so have it call object 8's arbitrary 0 (we'll put the logic there later)

Object 00  //pre room load events
Object 1-7 //PC's
Object 8   // logic
Object 9
    StartUp
        SetObject( in front of door)
    Activate
         return
     Touch
         call object 8 arbitrary 0
Object A
    StartUp
        SetObject( behind door)
    Activate
         return
     Touch
         call object 8 arbitrary 0

To debug you can just have the touch print out a textbox.  OK now we need to add the logic of opening the door.  First off we only want to call this once (you can't open an open door) so we'll need to do some sort of flag.  I personally use 7F0202/204 for my PC's coordinates and 7F0206 for flags.  So we'll say 7F0206 bit 1 being set means that the door has been open.  We also want to play the door open sound...that's easy. 

We need to copy over the tiles.  There are two variants to the CopyTile, E4 and E5.  E4 is used for "before the screen is drawn" E5 is used for After the screen is drawn.  Since the screen is drawn when we touch these objects were going to use E5.  Geiger has done  a swell job of taking out some of the ambiguity of the final parameter of CopyTile, Personally I suggest setting Everything that can be set to "true" as true and simply make sure that the corner where you drew the open door has the Properties you want (as in solidity/zplane/wind/etc).

Finally don't forget to set our flag!  Ok that took alot of explaining but it's not that much code, lets see what our code looks like now

Object 00  //pre room load events
Object 1-7 //PC's
Object 8   // logic
     Arbitrary 0
          if(  7F0206 & 1)  //it's open already!
                 return
          Play door open sound
          CopyTiles  VARIANT E5 (  upperX, upperY, lowerX, lowerY, FF) //the FF just means everything is true
          SetBit ( 7F0206 & 1)
          return
Object 9
    StartUp
        SetObject( in front of door)
    Activate
         return
     Touch
         call object 8 arbitrary 0
Object A
    StartUp
        SetObject( behind door)
    Activate
         return
     Touch
         call object 8 arbitrary 0

Not to bad right?  If it's open it'll just return immediately.  Remember to set the variant to E5!  That's a very easy mistake to make....but not the easiest!

If you run the game now the door opens.  And most rom hackers would just say their job is finished.  But not you!  You read the How-To thread, so you know that when you go to the menu and return the entire screen is redrawn!  Go ahead and try it, oh noes your door came back!  And what's worse is that you set your bit so you can't open it again.   Whatever will you do??

Well the trick is that there's a special spot in the code that gets reran every time the screen is drawn!  What spot?  Object 00's activate.  Let's copy over our logic there, but this time use variant E4 of CopyTile since were copying the tiles before the screen is drawn.  Remember this time you draw it ONLY if 7F0206 bit 1 is set otherwise it'll draw the open door before you open it!


Object 00  //pre room load events
      Activate
          if(  7F0206 & 1)  //it's open already!
               Play door open sound
               CopyTiles  VARIANT E5 (  upperX, upperY, lowerX, lowerY, FF) //the FF just means everything is true
Object 1-7 //PC's
Object 8   // logic
     Arbitrary 0
          if(  7F0206 & 1)  //it's open already!
                 return
          Play door open sound
          CopyTiles  VARIANT E5 (  upperX, upperY, lowerX, lowerY, FF) //the FF just means everything is true
          SetBit ( 7F0206 & 1)
          return
Object 9
    StartUp
        SetObject( in front of door)
    Activate
         return
     Touch
         call object 8 arbitrary 0
Object A
    StartUp
        SetObject( behind door)
    Activate
         return
     Touch
         call object 8 arbitrary 0


Thats it you should now have a fully functioning Guardia style door!

--JP

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #81 on: February 04, 2009, 05:23:51 am »
Chrono 99 how to change icons:

^That will probably not be necessary Smile Here's how I did it the first time.

Note that I had also changed two icons in the Config menu (two scythes instead of two sword icons); it's not just the Magus icon. They're kind of hard to notice but it was just to be 100% coherent (since Magus doesn't fight with swords). Anyway, to put these three icons back into the game, just do the following:

1/ Load your ROM in Tile Molester (the one with the French icons).
2/ Go into Image > Canvas Size, then type 2 for the column number.
3/ Go into View > Codec, then click on "3bbp planar, composite (2bpp+1bpp)".
4/ Go to offset 3FDDC4 using Ctrl+G, then paste the first image that I've attached to this post (use menu Edit > Paste From).
5/ Click somewhere on the grey area so that the program correctly registers that you've pasted an image (this removes the white rectangle around the icon).

Repeat steps 4 and 5 with the three other images I've attached. The second image goes at 3FE004, etc.

There are four images for three icons because the last one (Magus) comes in two parts.

--JP

[attachment deleted by admin]

Zakyrus

  • Entity
  • Magical Dreamer (+1250)
  • *
  • Posts: 1351
  • "Bouncy, bouncy, bouncy... --!!"
    • View Profile
Re: How To.........
« Reply #82 on: March 03, 2009, 04:21:43 pm »
Don't remember if this has been covered before...but I dug this out of my notes that I was sorting through. It has to do with those Unk. settings in the Map Properties tab of the Location Map Editor.


Map Properties Layer Notes:

Unk. 1.70

Setting Unk. 1.70 to:
  1 scrolls layer while moving
  2 seems to do nothing
  3 appears to do the same as 1
  4 splits layer and puts the bottom half on top and the top on bottom(in other words looks messed up)
  5 appears to do the same as 1
  6 appears to do the same as 1
  7 appears to do the same as 1


Unk. 2
These would be used for tiles that scroll by themselves such as clouds. It wouldn't make sense to use for mountains, unless of course the mountain range is possessed. ;p Scrolling clouds look especially cool when used in conjunction with Unk. 1.70.

Generally, the higher the value, the faster is scrolls.

Setting Unk. 2 to:
  1  thru 5 this makes the layer scoll by itself towards the left.
  8 no movement
  9  this makes the layer scoll by itself towards the right.
 10 this makes the layer scoll by itself slowly upwards .
 17 scrolls fast to the left, while slightly scrolling upwards
 1A scrolls slowly upwards and right
 34 scrolls reasonably fast down and right
 (this goes all the way up to FF)


~Z

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
Re: How To.........
« Reply #83 on: May 05, 2009, 01:34:54 pm »
This isn't really a How To but I don't know where else to post it:

ColorMath: If you put a value higher than E0 for 'Colors', the command will work normally but your inventory will become seriously glitched.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #84 on: May 05, 2009, 05:21:12 pm »
how to not seriously glitch your inventory?  :)

--JP