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

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
How To.........
« on: January 02, 2006, 06:19:21 pm »
In an effort to help people code in TF


Make A Chest:

1.  Place on Map, Place Open Chest off map
2.  Make an Object and set Coordinates on the chest
3.  Pseudo Code that Object

startup/idle:

set Object Coord //at chest area
if(MemorySpotOfChest && Bit)
---Copy Tiles from open chest on map
---remove this object

Activate:

ExploreMode Off
Copy Tiles as before
7f0200==Index of Item
"you got {item}"
BitMath(MemorySpotOfChest, Bit, Set)
RemoveObject
ExploreMode On

Note1: Every Memory Spot of Chest has 8 (right???) bits you can set to either true of false, thus every Memory Spot can be used for 8 chests.

Note2:  7f0200 is the Memory spot used when you put {item} in a string.  You set 7f0200 to the number of the item you'll be receiving then by sayihng "you got {item}" it'll display you got Wood Sword (for example)

Do A Battle

This Code can be activated either by stepping on a spot (placing an object  at the spot and making it's arb. 0 this code) or by touching an enemy (Making the enemies arb. 0 this code)

Arbitrary 0

ExploreModeOff
Move Party //move party to correct tiles
Move Sprite //if this is not the enemies arb do a callObjectFunction
Scroll Screen //params are upper left corner tile (x,y)
Battle
//if this is a random encounter (not touching enemy)
Remove (object)
ExploreModeOn


If anyone notices a mistake I made or has questions please feel free to post and I'll update.  Also any more complicated stuff that people might have trouble coding?  

--jp

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
How To.........
« Reply #1 on: January 03, 2006, 08:37:26 pm »
Thanks for the tips :wink:

Also could you explain how you (or someone else) changed the CT intro to the CT:CE intro? I'm trying to change some stuff in the Title Screen but the screen just keep on looping back to the start instead of going to the new game/continue menu.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
How To.........
« Reply #2 on: January 03, 2006, 10:14:32 pm »
Change the Title Screen

Thank DDK for the new opening sequence

1.  Open up Location {1b1} Title Screen.
2.  Object 1 Arbitrary 1 has a "change Location at the end"
3.  Change that Location to the location that you will have your new Title screen be
4.  In the events of your new location make some sort of small intro, make sure at the end of the intro you have a change location {000} Load Screen


Obtain the Epoch

The first time you add the epoch to the game you will have to Do some memory commands in some arbitrary in your code and call that arbitrary.

Assign(Mem.7E0290=Pixel) //XCoord on Map
Assign(Mem.7E0292=Pixel) //YCoord on Map
Assign(Mem.7E029F=MapNumber)//Map LOCATION number 1FX
Assign(Mem.7E0294=XX)// A0 for wings 00 for no wings

Note:  After some debugging it was found that the pixels for the X and Y coordinates should end in 0 and be far away from exits.  Also make the width to two bytes for all assignments except the 7E0294.


--jp

mintman

  • Iokan (+1)
  • *
  • Posts: 5
    • View Profile
How To.........
« Reply #3 on: January 06, 2006, 01:32:36 am »
Hey, I'm wondering if you've been successful in getting Crono to lay in a bed correctly - that is, without all the layers screwing up. I keep copying the code and tile properties from the original scene in the opening, but it doesn't work: Crono ends up above some layers and below others.

Thanks in advance!

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
How To.........
« Reply #4 on: January 06, 2006, 02:42:09 am »
Make a bed

1)  Draw the bed
2)when you want your character to go to sleep you call an arbitrary
3) In the arbitrary you
--set the coordinates (guess and check)
--set animation to 28 (I believe)
4)if you are having some tiles go over the sprite you
--select the tile
--On the locations tab you should see tile properties
--select which quadrant y ou no longer want to be over the sprites head (NW, NE, SW, SE)
--change priority to false

--jp

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
How To.........
« Reply #5 on: January 06, 2006, 09:50:30 am »
Check the code in the 1000 AD Porre Inn, it's a very bare-bones event with a great code example.

CyberSarkany

  • Heir to the Masamune
  • Black Wind Agent (+600)
  • *
  • Posts: 695
  • "So zetta slow!"
    • View Profile
How To.........
« Reply #6 on: January 07, 2006, 08:53:23 pm »
This is the first of many stupid questions that will come:
I'm trying the tutorial stuff at the Elter's house in medina(with the shipman), at the point where to script them(Dialogue)
["In Temporal Flux 1.7, go to Dialogue (0x384650) in Strings (if 2.0 is out by the time you read this, you can just paste these as you make textbox commands). Replace lines 00-07 with the following:"].
I found out(after a few mins) there is no dialogue part in strings anymore, so i tried this:
new object->Startup/idle:new command-> text; Textbox; BB; bottom; no; 0; 0; 0;(in the empty box the text at the tutorial copy'n'pasted).
Well, i bet i made something wrong, because when i enter the house now, a black screen appears, but the music still plays.
Shouldn't this be in a new object? Where does it have to be then?
Or do I've to finish the tutorial first(wasn't sure if the object stuff was right, that's why i asked before doing everything else wrong).
This was Nr.1, more will follow...
Sry again.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
How To.........
« Reply #7 on: January 08, 2006, 12:45:35 am »
Add Text

TF 2.0 has a nifty new way to do text.  I'll do two ways, having text randomly appear and having an NPC talk

----NPC Talk
1)  Make an Object for your NPC.  Following all rules of Objects (Make sure startup Idles last two commands are return, end)
2)  Under this objects Arbitrary 0 put a return command
3)  Under this objects Activate put this command Text->TextBox->string (you write the string)
4)  put a return command

---Random Text
1)  Follow steps 3 and 4 from before in some existing Arbitrary
2)  Make an empty Object (put return and end in startup/idle)
3)  Before the return in the startup Idle do a Call object function and call the arbitrary that you made in step 1.  

Note:  You cannot display Text in startup/Idle, you have to do a Call Object Function.
Note:  If you are calling a function from Startup/Idle you have to call the Function from an object AFTER the object where you are calling the text from (I.E. Text is in object 7, call from object 8)

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
How To.........
« Reply #8 on: January 08, 2006, 05:42:33 am »
Quote from: jsondag2
Note:  If you are calling a function from Startup/Idle you have to call the Function from an object AFTER the object where you are calling the text from (I.E. Text is in object 7, call from object 8)

Wow, I think I had many problems because of this detail... Thanks for the information.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
How To.........
« Reply #9 on: January 08, 2006, 10:35:06 am »
That Zurvan Surfer looks good on you, Chrono'99.

CyberSarkany

  • Heir to the Masamune
  • Black Wind Agent (+600)
  • *
  • Posts: 695
  • "So zetta slow!"
    • View Profile
How To.........
« Reply #10 on: January 08, 2006, 01:36:07 pm »
Thx for nr.1, here a few others(still stupid):
2:is there any list of animations with pictures and stuff( like imp animation 05 and a picture of this animation, so people don't ve to test all these animation to c which is which...

3:I followed the tutorial now, but the elder is always saying the same phrase instead of the text I insert at the shipguys part. There is still the animation and the guy leaving/elder going to window, but the only thing whichis said is the phrase i declared in his activity. If i write to mem, save and reopen it, all phrases(from elder and shipguy) are the 1 the elder has to say later, donno why :/
Bah, i hate my english, hope you got what my problem is...

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
How To.........
« Reply #11 on: January 08, 2006, 02:34:38 pm »
Chrono 99'-Believe me I know how you feel took me forever to figure that out.  

Cyber
2.  Check out the animation thread sticky in Kajar.  And a thread I made called "leave your mark in Chrono Mod history"  Animation documentation is desparately needed.

3.  There's a number that you want to keep incrementing called index if I remember correctly. Increment it till it's blank and then write your string in that box then click update then click write to memory.  Hopefully that solves your problem.

Keep the questions coming.
--jp

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
How To.........
« Reply #12 on: January 08, 2006, 05:24:43 pm »
Quote from: ZeaLitY
That Zurvan Surfer looks good on you, Chrono'99.

Thanks. I made my new signature without thinking about the rank icon, but they blend together well now.

Also thank you jsondag2. With all that help I might try to actually make some small hack or mod :) maybe...

MoonStoner

  • Iokan (+1)
  • *
  • Posts: 6
    • View Profile
Doing Battle
« Reply #13 on: January 08, 2006, 09:28:34 pm »
Thanks for the help with creating battles with TF, jsondag2, but when I try putting this code in a new enemy object in the Gato Exhibit event code, the battle box comes up but doesn't do anything (there's no enemy name in the box either). Also, the enemy's sprite is fine when I first enter the area, but when Crono moves, the enemy sprite is replaced with Crono's walking sprite (with messed up colors). This happens with any enemy sprite I try, even Gato's.

Is there anything I'm missing that would cause this?

Any help would be greatly appreciated.

-MoonStoner

P.S. I kept Gato and all his code intact when trying this.

Agent 12

  • Zurvan Surfer (+2500)
  • *
  • Posts: 2572
    • View Profile
How To.........
« Reply #14 on: January 08, 2006, 09:40:46 pm »
Sounds like an enemy PRM problem.  

Enemy PRM's are very annoying once you have more than one enemy on the screen but for now make sure that whenever you call "LoadEnemy(XXXX)" the enemy PRM is between 3 and...I think A.  

Though if you kept Gato's code intact I would have thought the enemy PRM was already correct...but check anyways and  then post your results.

--jp