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

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
Re: How To.........
« Reply #45 on: March 21, 2007, 09:58:49 am »
Yes, the darken command allows to adjust the speed of the fades, and the song this way is also faded. I find this code useful to hightlight special sequences such as ellipsises or "in the meanwhile" scenes.

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
Re: How To.........
« Reply #46 on: May 01, 2007, 09:24:56 am »
How to quickly detect text corruption:

Just a little trick to quickly detect text corruption when you're working extensively on a location. Put a text command in Object00 right after the Return, with a short placeholder sentence like "Text{null}". Each time you'll enter the location in the game, this sentence will be shown before the rest of the events. This way, if the strings in the location get corrupted (they become non-ending garbage texts), you'll know it as soon as you enter the location. This is useful to avoid spending time coding something while not realizing that at some point the location strings became corrupted.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #47 on: May 16, 2007, 04:28:02 pm »
How to utilize the multiple planes feature:

This is a really cool feature and quite literally adds a whole new dimension  to your map (i crack myself up).  This is something that had bugged me for a really long time and actually now that I understand it it helps me realize what is going on in the maps alot more.  First off what is the multiple planes?  Well have you ever wondered how at one point in a map you can go "under' a bridge but then at then you climb a ladder walk around and all of a sudden you go right over the bridge...how does this work on a 2D map?  Well it turns out it's all cause of planes. 

Now I realized that there were planes while toying with TF but I never knew how to use them.  It turns out it's actually really easy I just had been missing one piece.  First off open a map and turn on the "Z plane" by going map -> Zplane or just press ctrl + 8 (you want to learn these shortcuts trust me).  Then open up tile properties by going window -> location -> tile properties.

If your map already has 4 colors you can go on to the next step, otherwise you'll need to do the following:

Make a tile of Plane 1 (dark blue):  in the tile properties window go Z plane make it Plane 1 and click a tile
Make a tile of Plane 2 (light blue):  In the tile properties window go to Z plane make it plane 2 and click a tile
Make a transitional walkable tile (gray):  In the tile properties window go to Z plane make it plane 2 and click a tile.
Make a transitional solid tile (pink):  In the tile properties window go to Z plane make it plane 2 and click a tile.


Now that we have all of the Z planes we can start making a cool map.  Now I know it's tempting to use solidity to make walls and such but if you are making  a map with multiple planes you might as well use planes as walls (except for corners and such since Z planes don't have "corners).

Wherever Crono loads becomes the first plane that he is on.  Whatever plane he loads on he can walk on and the opposite is solid.  Now here's the cool part once Crono touches a "transition tile" (gray) the roles reverse I.E.  if he started on dark blue then dark blue becomes solid and Light blue becomes walkable.  Finally the pink is always solid.  So in a nutshell, always make solid things pink (walls) make the ground blue and make the upstairs light blue.  Then stick a transition tile at the top or bottom of ladders (or stairs). 

What's even cooler is some tiles have different properties if crono is on a certain plane.  I'm still working on mastering that but currently I just use pre - existing examples (one is grates in robot levels when you are on plane 1 crono is under them when you are on plane 2 crono is above them).

I'm working on a map right now so if I figure something out I'll add to this post.

--JP
« Last Edit: May 16, 2007, 04:30:39 pm by jsondag2 »

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #48 on: May 16, 2007, 11:00:44 pm »
How to Make Someone turn white (useful for teleporting and healing cutscenes)

Chickenlump posted this in a similar thread a long time ago:

Category:  Memory Copy
Command: Multi-mode 88
MemCpy88
   mode = 40
   Param 1 = F
   Param 2 = F
   Param 3 = 2
   Data leave blank

Pause(3 seconds)

Category:  Memory Copy
Command: Multi-mode 88
MemCpy88
   mode = 0

Put that in a characters (or NPC) arbitrary and then use Call object function to call it.

--JP
« Last Edit: May 23, 2007, 03:45:35 pm by jsondag2 »

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #49 on: May 17, 2007, 03:17:38 pm »
How to put more than one room on a map.

Credit again to chickenlump:

Ever wonder how some of the CT maps can have so many rooms close to each other but you still don't see them? 

Well the easy answer is to use the "scroll" locks of a location but sometimes you don't want to use a whole bunch of for all these small rooms.  Well thats where the RAM location of the scroll locks come into play.

Here is the memory locations for scroll:

7E1D1A:  Left
7E1D1B:    Right
7E1D1C:    UP
7E1D1D:   Down

(thanks to chickenlump for figuring this out)

First off since it's all one one big map you need to know which part of the map your character is in.  Lucky there's a getObjectCoord command

Category:  Object Coordinates
Command:  GetObjectCoordinates
Variant:  22 (not sure this matters)
Mode:  PC (your getting your playable character)
Obj/PC:  00 (there's always atleast one character in your party)
XCoord:   7F0220
YCoord:   7F0222 (these can be any temp memory)

Now that you know have the x/y coordinates you can know which room your character is in and set the scrolls appropriately.  Here's an example.  Imagine a map with 6 rooms in 2 columns, 3 rows.  Put this in object 00's activate:

if(mem.7f0220 < 0F )  //he's in the left column TF calls this Comparison, value to mem
  if(mem.7f0222 < 11)  //he's in the top row
         mem.7E1D1A = 0
         mem.7E1D1B = F
         mem.7E1D1C = 0
         mem.7E1D1D = F
         return
  if(mem.7f0222 > 23)  //he's in the Bottom row left column
         mem.7E1D1A = 0
         mem.7E1D1B = F
         mem.7E1D1C = 23
         mem.7E1D1D = 2f
         return
  //he's in the middle row
         mem.7E1D1A = 0
         mem.7E1D1B = F
         mem.7E1D1C = 11
         mem.7E1D1D = 20
         return
   
You can do a similar thing for the right column.  A few notes:

Object 00's activate gets called automatically after the player goes to a menu.  That's why you put this code there (that way if they hit a menu and come back it's not reset.....this is also where you put code for copytiles that need to stay copied after a user hits menu). 

Make sure you make your scrolls atleast the size of one screen otherwise there are bugs......and really annoying hard to figure out ones too.

--JP
« Last Edit: May 23, 2007, 03:45:56 pm by jsondag2 »

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #50 on: May 19, 2007, 03:48:27 am »
How to.....Force a cut scene, the easy way!

For the longest time I didn't know this....You'll notice parts of crimson echoes where you have to touch a very specific spot to do anything.  Now you can easily set a whole "area" to trigger a scene.  Through the power of getObjectCoordinates:

First off your going to need a loop that continuously checks coordinates do do this simply follow these steps:

//I chose the last two myself, as long as they are above 7f0200 it's fine.
getObjectCoordinates, variant 22, PC, 00, 7f0220, 7f0222  //store crono's pos in two memory spots

......//code goes here

goto line of get object coordinates

The goto command isn't the most user friendly.  There's a very large drop down list and you have to find a very specific line number.  But it's doable.  Now in between those two lines you are going to put conditionals, for example if you want them to not cross a certain X coordinate you can do something like this

getObjectCoordinates, variant 22, PC, 00, 7f0220, 7f0222 

if( 7f0220 >= (x coordinate)
    - explore mode off
    -  begin cutscene

goto line of get object coordinates

If you wanted a specific block of the map to trigger a battle

getObjectCoordinates, variant 22, PC, 00, 7f0220, 7f0222 

if( 7f0220 >= (x coordinate))
   if (7f0222 >- (y coordinate)
    - explore mode off
    -  move party
   -  move enemies
  -  move screen
  -  battle

goto line of get object coordinates


It really is that easy.  Stick that code in any startup/idle object and have fun.

--JP

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #51 on: May 22, 2007, 09:02:13 pm »
Here's a quick one for you.  If you have your party spread out for a cutscene and you need to bring them back together really fast just use the partyFollow command (under sprite movement). 

Note:  Don't call this from within a PC's arbitrary.

--JP

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
Re: How To.........
« Reply #52 on: May 30, 2007, 03:14:48 am »
How to make a save point:

First off put a save point NPC on the map (for simplicity make the last digit of the object coordinates 0)
Next put an object at the same location as the save point
Now have a getObjectCoords for PC 00
If( X of PC 00 ) = (first 2 digits of object coord)  // he's at the right X
  If (Y of PC 00 )  = (first 2 digits of object coord) // he's at the right Y
    if (Memory & bit)
        If (a button is pressed) // he pressed A
            Special Dialogue --Save (under category text)
        go to getObjectCoords
   play save point sound
   set Memory bit
   go to getObjectCoords
 reset bit
 go to get object coord


 I'm not sure what the point is of setting the object Bit.  In the example I pulled up it was
7f01CF bit 80.  It may be a bit that allows Saving in the menu (just a guess hopefully someone can confirm this).  But the main point is to check the X and Y coordinates of PC 00 (just drop the 3rd digit of the object coordinates).

--JP

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: How To.........
« Reply #53 on: August 21, 2007, 07:58:34 pm »
Check for gold amount > 65535:

Use Memory Assignment commands to copy the 3 gold bytes (7E2C53, 7E2C54, 7E2C55) somewhere into the 7F02xx+ location event temp memory.

Then, use several If Statements on those bytes to check for the gold amount.

---
Example - check if 500,000G or more obtained ($07A120)

Assignment, Mem to Mem, Variant 48, 7E2C55 to 7F0200, Width 1 byte
Assignment, Mem to Mem, Variant 49, 7E2C53 to 7F0202, Width 2 byte

Comparison, Value to Mem, Variant 12, 7F0200, Value 07, Width 1 byte, Operation >=

Comparison, Value to Mem, Variant 13. 7F0202, Value A120, Width 2 byte, Operation >=

---

The second If Statement should be inside the first one.  The code window will look similar to:

Assign(data)
Assign(data)
If(address >= 1 byte number)
   If(address >= 2 byte number)
      Code to use if gold amount or higher is obtained


Check the Game Clock:

This is very similar to the above example.  Copy the clock bytes you want from the 7E0400-7E0406 range to 7F0200+ location event temp memory and use If checks.  Read the Memory Locations.txt of the Offsets Guide from Geiger's Crypt to find out how the clock values are stored.

---
Basic example - check if game clock > 99:59:

Assignment, Mem to Mem, Variant 48, 7E0406 to 7F0200, Width 1 byte

Comparison, Value to Mem, Variant 12, 7F0200, Value 00, Width 1 byte, Operation >

---

Sora

  • Chronopolitan (+300)
  • *
  • Posts: 362
  • The Terror Of Death
    • View Profile
Re: How To.........
« Reply #54 on: August 29, 2007, 01:11:13 pm »
im trying to turn gato into something else, can you tell me how to make him, into something? also, is there a actor memory list thing?

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: How To.........
« Reply #55 on: August 29, 2007, 01:25:59 pm »
Um...It's right in the event coding if I remember.  Load Enemy w/e Gato.  Just mess around with that command.

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: How To.........
« Reply #56 on: August 30, 2007, 01:28:22 am »
also, is there a actor memory list thing?

http://www.chronocompendium.com/Term/Modification.html

has a text list of npcs, enemies, sound effects, etc.

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
Re: How To.........
« Reply #57 on: October 21, 2007, 12:19:13 pm »
How to change text color:

I don't know the details for it but apparently this command can change the color of the text in the dialogue boxes:

MemCpy2E(43, 09, 05, 01, 00)

This one makes the text yellow, but other variants are possible.

Zakyrus

  • Entity
  • Magical Dreamer (+1250)
  • *
  • Posts: 1351
  • "Bouncy, bouncy, bouncy... --!!"
    • View Profile
Re: How To.........
« Reply #58 on: October 21, 2007, 01:49:22 pm »
Here's how to hide/show Layer3 (used in Hunting Range for rain effect)

How to hide Layer 3:
7E0BD8 = 0
7F1521  = 0
MemCpy2E(54, 00, 16, FF, 01)
MemCpy2E(54, 18, 68, FF, 01)
MemCpy2E(40 17, 01, 00, 01)


How to show Layer 3:
7E0BD8 = 4
7F1521  = 4
MemCpy2E(54, 00, 16, F8, 08)
MemCpy2E(54, 18, 68, F8, 08)
MemCpy2E(40 17, 01, 04, 04)

Could be used to turn on/off rain, snow, etc, etc.

« Last Edit: October 21, 2007, 01:54:09 pm by Zakyrus »

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: How To.........
« Reply #59 on: October 22, 2007, 12:53:23 am »
MemCpy2E(40-5F
9
A
0 (55 = layer 2) (FF = Every layer except NPC)
9-A = Instant color change

40, 46-4F = Blue
40 - 42 = white
43 = Yellow
44 - 45 = White
50 = Black
51 = Red
52 = Green?(Says Shinrin)
53 = Yellow
54 = Dark Blue
55 = Purple
56-5F = Sky Blue

Thanks to Shinrin, we were able to find these colors.  We think these are the only ones that are there, but meh.
« Last Edit: October 22, 2007, 01:06:36 am by justin3009 »