Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#26 2011-01-14 18:10:22

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 429/3,498

Re: Noob trying to hack Crystal (Help)

The "unused city tileset" that goldmap loads for the beta maps is not actually left in the rom in its entirety. There is only block data, with no actual tileset header, graphics, etc left for it. This is why you can't load it in the newer goldmap that loads everything from the rom instead of from ini files and pictures for the tilesets. The beta maps have no map headers, and the beta tileset has no tileset header.

Offline

#27 2011-01-14 23:46:59

Riverside
Member
Registered: 2010-12-12
Post 9/55

Re: Noob trying to hack Crystal (Help)

Oh dang... does that mean I can't use them to make the 2 floors I want?

Offline

#28 2011-01-15 00:50:16

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 430/3,498

Re: Noob trying to hack Crystal (Help)

Sadly, that is correct. Your best bet would be to become more familiar with pointers, so that you can repoint and expand the tileset blocks to add your new ones

Offline

#29 2011-01-15 02:55:01

Riverside
Member
Registered: 2010-12-12
Post 10/55

Re: Noob trying to hack Crystal (Help)

I see, too bad.

But then, what am I lacking? I know how to calculate pointers, I kinda know what pointers are and do... I just need to put this in practice

I don't know what should I do... copy the tileset header over blank data? or make pointers from those pointers and copy them into blank data? I dunno :S

Offline

#30 2011-01-15 03:10:29

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 431/3,498

Re: Noob trying to hack Crystal (Help)

WHat you do to add new blocks:

Copy your existing block data to blank space with room at the end.
Find the pointer to your new location
Replace the pointer to the old location with the pointer to the new location
Add your new blocks at the end

Then do the same for collision data

Offline

#31 2011-01-15 22:37:58

Riverside
Member
Registered: 2010-12-12
Post 11/55

Re: Noob trying to hack Crystal (Help)

But that would add more blocks to an already existing tileset, right?

Because what I'm trying to do it's not that (for now), but instead having a map to actually edit stuff there.

Unless I'm misunderstanding something...

Offline

#32 2011-01-16 01:57:49

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 434/3,498

Re: Noob trying to hack Crystal (Help)

That would add blocks to an already existing tileset, which would make them useable on any map that used that tileset and would not overwrite anything.

As for what you said you are trying to do, I'm not entirely sure what you mean. Are you wanting to make a whole new tileset so one map can have a few custom blocks? Adding them to an existing tileset is the better way to do it for that.

Offline

#33 2011-01-16 03:55:18

Riverside
Member
Registered: 2010-12-12
Post 12/55

Re: Noob trying to hack Crystal (Help)

Mateo wrote:

That would add blocks to an already existing tileset, which would make them useable on any map that used that tileset and would not overwrite anything.

As for what you said you are trying to do, I'm not entirely sure what you mean. Are you wanting to make a whole new tileset so one map can have a few custom blocks? Adding them to an existing tileset is the better way to do it for that.

... I don't know how to explain this , but the idea is simple... damn lack of english..

Unless by "add blocks to an already existing tileset" you mean "add more blocks to an already existing map" I don't know how it would help because I dont know if you're telling me if it would add more blocks to the map so I can place more blocks in that map, or if it would add more blocks, so I can edit the tiles from those blocks. In other words, I dont know if we're talking about the size of the map, of the amount of blocks a tileset can have.

Ok, let's take "New bark town -> Players house (upstairs).

That map uses the "room" tileset, but its only 4x3 blocks long. If that map was big enough, I could just add another room in the same map without having to create a new map, modify blocks or tilesets or whatever.

http://img5.imageshack.us/img5/7003/kjla.png

In case a map can't be "expanded", then the other option would be to create another map, include the "room" tileset to that map, then edit the blocks and finally add the blocks to that map to build the house. It seems like a lot of work but I'm guessing it's the only option.

And that's why I don't need more blocks (for now), because I don't have a PLACE to put those blocks since all the maps are already on use.

tl;dr: I want a map/maps so I can create a copy of Hiro's house, both floors. All the maps are already being used, so Im guessing I have to create a new map.

Last edited by Riverside (2011-01-16 04:05:54)

Offline

#34 2011-01-16 06:10:54

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 435/3,498

Re: Noob trying to hack Crystal (Help)

oh I see. You want to expand the map. That's pretty easy, you would just repoint it and change the size bytes. Goldmap can actualyl do that for you by going to "resize map". I was thinking you meant adding more map blocks to use for drawing the map.

Offline

#35 2011-01-16 12:56:33

Tauwasser
Member
Registered: 2010-10-16
Post 81/448

Re: Noob trying to hack Crystal (Help)

Wow... that was pretty confusing.
You should have said you wanted to change the map size or expand the map instead of using "adding blocks" for all your descriptions. Also, the whole times, this sounded like you thought blocks were created per map instead of per tileset. I hope that's cleared up now.

Also, specifically when expanding hero's upstairs room, make sure to leave the original room at the position in the top-left corner of the map. Else, you will have the decoration script go mad and place "random" blocks everywhere.

cYa,

Tauwasser

Offline

#36 2011-01-18 02:21:44

Riverside
Member
Registered: 2010-12-12
Post 13/55

Re: Noob trying to hack Crystal (Help)

Tauwasser wrote:

Wow... that was pretty confusing.
You should have said you wanted to change the map size or expand the map instead of using "adding blocks" for all your descriptions. Also, the whole times, this sounded like you thought blocks were created per map instead of per tileset. I hope that's cleared up now.

Also, specifically when expanding hero's upstairs room, make sure to leave the original room at the position in the top-left corner of the map. Else, you will have the decoration script go mad and place "random" blocks everywhere.

cYa,

Tauwasser

Mateo wrote:

oh I see. You want to expand the map. That's pretty easy, you would just repoint it and change the size bytes. Goldmap can actualyl do that for you by going to "resize map". I was thinking you meant adding more map blocks to use for drawing the map.

Thanks both of you. I did it. It's a shame that I won't be able to load those maps in Crystalmap anymore, but it's Ok I guess. Perhaps doing this manually has its benefits in the future, who knows.

It was a bit hard to figure this out completely since I'm a bit slow when it's about hacking >_> but in the end it was easy as you said Mateo, thanks again.

Now there's 2 things I want to do...

In the "extra upstairs room" I created the PC and the Radio doesn't work (I press A and nothing happens). I would like to make the Radio work normally so when I press the A button it shows the normal radio showcast and in the PC's case, I want that when I press A it says "I better don't mess with her computer"

I know it has something to do with signposts and such, but I don't know how to use or make them

Offline

#37 2011-01-18 03:11:41

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 437/3,498

Re: Noob trying to hack Crystal (Help)

You would have to repoint the event data for the map to add more events. The computer would just be a normal script that loads some text, and the radio would be the same basically. I think there is an 0C code for a radio though I'd have to look into it. Either way the compendium is your friend when it comes to scripting and event formats

Offline

#38 2011-01-18 05:48:26

Riverside
Member
Registered: 2010-12-12
Post 14/55

Re: Noob trying to hack Crystal (Help)

Ok, I'll try it out. The "compendium" is your thread named "intro into scripting" right?

Now, time for the stupid question of the day.

How do I use the Lunar compressor? I mean, it says that I have to write something, but it also says that it closes if you press any bottom so... Prof elm house's map is compressed and I want to do one thing or two with TLP on that map.

Offline

#39 2011-01-18 08:15:51

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 438/3,498

Re: Noob trying to hack Crystal (Help)

I cannot honestly say on that, since I've never used lunar compress, only agixp for graphics.

Also no, by the compendium I mean the document linked to in the thread "tauwasser's scripting compendium"

Offline

#40 2011-01-18 10:09:20

Cloud
Member
Registered: 2010-12-18
Post 49/285

Re: Noob trying to hack Crystal (Help)

I don't know if you forgot he is hacking crystal mateo,but that compendium is only for gold and silver,right? Or it also available for crystal?

Offline

#41 2011-01-18 14:34:10

137/701

Re: Noob trying to hack Crystal (Help)

Cloud96 wrote:

I don't know if you forgot he is hacking crystal mateo,but that compendium is only for gold and silver,right? Or it also available for crystal?

It is mostly accurate for Crystal as well. The only difference is that there are a couple new scripting codes inserted in the middle, so some of the codes have 1 or 2 added to them—see this thread.

#42 2011-01-19 04:25:33

Riverside
Member
Registered: 2010-12-12
Post 15/55

Re: Noob trying to hack Crystal (Help)

Mateo wrote:

You would have to repoint the event data for the map to add more events. The computer would just be a normal script that loads some text, and the radio would be the same basically. I think there is an 0C code for a radio though I'd have to look into it. Either way the compendium is your friend when it comes to scripting and event formats

There's something I dont understand about the Events structure...

[Number of warps] Number * [Warp data][Number of triggers] Number * [Trigger data][Number of signposts] Number * [Signpost data][Number of people] Number * [People data]

...I dont understand why the extra "number" after a "[number of X]" byte and the " * " symbol. I ask this because normally I see " * " as a multiplication, but once a guide used that symbol for... I dont know, it was weird...

Also, it asks for Trigger Data and Number of Triggers. I can know the number of triggers checking in Goldmap maps that are similar to the ones in Crystal, but there's some events that happen only in Crystal so I can't rely on Goldmap to know the number of triggers in every map. Any other way to know?

Offline

#43 2011-01-19 05:50:22

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 447/3,498

Re: Noob trying to hack Crystal (Help)

Ok, I'll try to explain this by quoting where I explained it in another post.

Mateo wrote:

Well, let's take warps for example. If the map has 2 warps, it will look for 2 blocks of 5 bytes immediately following the byte saying number of warps. So it would look like:

02 04 05 01 01 01 04 04 01 01 01

This shows 2 warps, the first being at 4,5 on the map and warping to warp 1, bank 1 map 1. The other is at 4,4 on the map and warps to the same place

If you wanted to expand it so the map had 3 warps, you would have to repoint it, and add the new warps in with the others, then copy in the rest of the events that followed. so you would change it to

03 04 05 01 01 01 04 04 01 01 01 02 05 01 01 02

This shows 3 warps. The first 2 are the same as before, and the new one is at 2,5 on the map and warps to warp 1, bank 1, map 2
-snip-

That should explain your question about the number byte, and the * useage.

For the triggers, the best way I know of to tell you would be to look at the original event data and see what it has there

Offline

#44 2011-01-19 23:08:46

Riverside
Member
Registered: 2010-12-12
Post 16/55

Re: Noob trying to hack Crystal (Help)

Hmm...

There's something I don't get...

I got to the Event structure using CrystalMap, according to the guide, the event structure starts with "warps" and you can see the offset where the Warp Data starts using CrystalMap

If I remember correctly, using a 3 byte pointer means you can point to data that's not in the same bank, while using a 2 byte pointer implies the data you're pointing to it's in the same bank, thus, it don't need the "bank" byte.

Well, according to the guide and what I learned, every secondary map header has an Event Data Pointer (2 bytes) and the secondary header for New bark town is localized in $94DDB, so the Event Data Pointer (2 bytes) should start in $94DE1 and the Event Data should be in the same bank, right? (Bank 25, $94000)

But followig CrystalMap, the event data from New bark town starts in $1A834F, Bank 6A. I don't know how this works :S a 2 byte pointer it's pointing to data that's on another bank, or am I wrong?

The data I got from Crystalmap seems to be correct, however, as it matches the Event Structure perfectly...

This is important because I'm ready to repoint all the event data, but I need to change the Event Data Pointer too or else it won't work :S

Last edited by Riverside (2011-01-19 23:14:51)

Offline

#45 2011-01-19 23:22:04

140/701

Re: Noob trying to hack Crystal (Help)

Riverside wrote:

Hmm...

There's something I don't get...

I got to the Event structure using CrystalMap, according to the guide, the event structure starts with "warps" and you can see the offset where the Warp Data starts using CrystalMap

If I remember correctly, using a 3 byte pointer means you can point to data that's not in the same bank, while using a 2 byte pointer implies the data you're pointing to it's in the same bank, thus, it don't need the "bank" byte.

Well, according to the guide and what I learned, every secondary map header has an Event Data Pointer (2 bytes) and the secondary header for New bark town is localized in $94DDB, so the Event Data Pointer (2 bytes) should start in $94DE1 and the Event Data should be in the same bank, right? (Bank 25, $94000)

But followig CrystalMap, the event data from New bark town starts in $1A834F, Bank 6A. I don't know how this works :S a 2 byte pointer it's pointing to data that's on another bank, or am I wrong?

The data I got from Crystalmap seems to be correct, however, as it matches the Event Structure perfectly...

This is important because I'm ready to repoint all the event data, but I need to change the Event Data Pointer too or else it won't work :S

The event data is always in the same bank as the blockdata. Notice that the blockdata is in bank 6A.

#46 2011-01-20 00:19:23

Riverside
Member
Registered: 2010-12-12
Post 17/55

Re: Noob trying to hack Crystal (Help)

IIMarckus wrote:

The event data is always in the same bank as the blockdata. Notice that the blockdata is in bank 6A.

Yeah but... hmmm... what I mean it's that the Event Data Pointer it's in 94DE1 in form 4D 43, because it's 2 byte pointer shouldnt the Event Data (where it's pointing) be in bank 25 aswell? I dont understand it. I need to replace the Event data Pointer so it points to $74D0, where I plan to repoint the Event Header (or structure, I dont know how its called)

Following that 2 byte pointer I end up in $9434D, and well, I'm very confused right now. I'm doing something wrong most probably because as you said, the Event data it's on bank 6A...

Offline

#47 2011-01-20 02:58:52

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 451/3,498

Re: Noob trying to hack Crystal (Help)

The event data and map script pointers both use the same bank. In the map header, you will see: 3 byte pointer to map, event/script bank byte, 2byte pointer to map script, 2 byte pointer to map events.

When I say map script, I mean scripts that run when you enter the map, if it has any. Most maps don't have any, but some do. That is why you are finding a 2byte pointer to data in another bank.

Offline

#48 2011-01-20 03:43:47

142/701

Re: Noob trying to hack Crystal (Help)

Riverside wrote:
IIMarckus wrote:

The event data is always in the same bank as the blockdata. Notice that the blockdata is in bank 6A.

Yeah but... hmmm... what I mean it's that the Event Data Pointer it's in 94DE1 in form 4D 43, because it's 2 byte pointer shouldnt the Event Data (where it's pointing) be in bank 25 aswell?

Don’t think of it as a “two‐byte pointer,” think of it as “part of a five‐byte set of two pointers.” Two pointers, both of which are in the same bank.

#49 2011-01-20 21:19:18

Riverside
Member
Registered: 2010-12-12
Post 18/55

Re: Noob trying to hack Crystal (Help)

Mateo wrote:

The event data and map script pointers both use the same bank. In the map header, you will see: 3 byte pointer to map, event/script bank byte, 2byte pointer to map script, 2 byte pointer to map events.

When I say map script, I mean scripts that run when you enter the map, if it has any. Most maps don't have any, but some do. That is why you are finding a 2byte pointer to data in another bank.

I kinda... urgh... I dont get it...

In any case, what should I do so I can point to $74D0 (Where I placed all the event structure)? replace the Event data pointer (2 bytes) thats on the 2nd map header? using what value? (how to calculate it)

Perhaps if I do that I can figure out what is going on

Offline

#50 2011-01-20 22:21:16

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 454/3,498

Re: Noob trying to hack Crystal (Help)

You replace it in the secondary map header like you said. I'll see if I can get up some examples with screenshots to help express this all when I'm on the legit computer not this one at the BCM.

Offline

Board footer

Powered by FluxBB