Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → Hacking Red Questions (Trade evolutions and adding more TMs)

#76 2015-09-28 00:43:41

megamctaco
Member
Registered: 2015-08-23
Post 40/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

First I got an error saying "Unknown Symbol 'MART_LIST'. So I changed that back to $FE and now I get "Unknown Symbol 'SAFARI'.

Offline

#77 2015-09-28 00:55:36

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

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

yes, MART_LIST is a new constant I made to replace $FE because it was more meaningful.

And of course you get an error with SAFARI, it's a new tileset I added :p Just remove that from the tileset list.

Offline

#78 2015-09-28 01:00:00

megamctaco
Member
Registered: 2015-08-23
Post 41/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Mateo wrote:

yes, MART_LIST is a new constant I made to replace $FE because it was more meaningful.

And of course you get an error with SAFARI, it's a new tileset I added :p Just remove that from the tileset list.

Haha I just realised that when I remembered why I was moving banks in the first place.

'wd152' is an unknown symbol now. I don't know what the alternative was in Danny's version. I know I had to change similar ones in the past.

EDIT: Got it.

Last edited by megamctaco (2015-09-28 01:02:58)

Offline

#79 2015-09-28 01:23:05

megamctaco
Member
Registered: 2015-08-23
Post 42/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Nothing has changed field move-wise.

Where I am with my current save, I have 4 badges and can use Cut and Fly. Pressing A on a tree doesn't bring up a prompt to cut though.

EDIT:

https://github.com/MegaMcTaco/pokeredhackpurple

Latest commit with mart data moved and field moves added

Last edited by megamctaco (2015-09-28 01:26:49)

Offline

#80 2015-09-28 01:24:54

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

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

That's rather strange. I tested this before making the commit, and if you did everything correctly, it should work. I know this is a dumb question, but you do actually have a Pokemon in your party that knows Cut, right?

EDIT: Also, right now, this won't bring up a prompt asking if you want to cut or not. It will just cut the tree without asking. I'm going to add the questions later. In this commit, I just ported over a proof-of-concept routine by Yenatch (his also included some stuff just for testing that I didn't need, such as his put a Strength boulder in Pallet Town, made you start with 8 badges, and made starters know HM moves at the start and stuff like that for testing, and I only ported over the part you actually need).

Last edited by Mateo (2015-09-28 01:29:06)

Offline

#81 2015-09-28 01:27:26

megamctaco
Member
Registered: 2015-08-23
Post 43/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Mateo wrote:

That's rather strange. I tested this before making the commit, and if you did everything correctly, it should work. I know this is a dumb question, but you do actually have a Pokemon in your party that knows Cut, right?

Haha! Of course. Charizard currently just to test things out.

Offline

#82 2015-09-28 01:28:51

megamctaco
Member
Registered: 2015-08-23
Post 44/103

Offline

#83 2015-09-28 01:39:26

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

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Nothing is jumping out at me as being a problem so far. I'm gonna try compiling and playing around with what you have on there to see if I can sort it out.

EDIT: Well, I downloaded it, and it won't even compile. Keeps telling me that "OPP_" is already defined several times and then aborts compiling. Your trainer_constants file looks normal (for the current Pokered anyway, it looks weird to me because I'm used to an older copy, but anyway).

Last edited by Mateo (2015-09-28 01:42:44)

Offline

#84 2015-09-28 02:09:41

megamctaco
Member
Registered: 2015-08-23
Post 45/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Strange. I'll try to add field moves to a different (much, much cleaner ) pokered and see if that will work.

Offline

#85 2015-09-29 05:11:55

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

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

I just figured out the problem. If you'll notice, the routine is checking for the Soul Badge in order to use Cut, when it should be checking for the Cascade Badge. I just cheated to have all the badges when testing, so I didn't catch on to this at first. So in the TryCut: part in field_moves.asm, you'll want to change "bit 4, a ; SOUL_BADGE" to "bit 1, a ; CASCADE_BADGE" so that it checks for the proper badge. That's gonna be why nothing was happening even though you had the first 4 badges, and it wasn't your own fault, since neither Yenatch nor I caught that when working with that routine, and you just copied what I had (and I copied what he had).

If you're curious, here is the commit where I fixed that bug, and made those interactions ask if you want to use the move the way Gen 2 does.

Last edited by Mateo (2015-09-29 05:29:55)

Offline

#86 2015-09-29 14:21:03

megamctaco
Member
Registered: 2015-08-23
Post 46/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Mateo wrote:

I just figured out the problem. If you'll notice, the routine is checking for the Soul Badge in order to use Cut, when it should be checking for the Cascade Badge. I just cheated to have all the badges when testing, so I didn't catch on to this at first. So in the TryCut: part in field_moves.asm, you'll want to change "bit 4, a ; SOUL_BADGE" to "bit 1, a ; CASCADE_BADGE" so that it checks for the proper badge. That's gonna be why nothing was happening even though you had the first 4 badges, and it wasn't your own fault, since neither Yenatch nor I caught that when working with that routine, and you just copied what I had (and I copied what he had).

If you're curious, here is the commit where I fixed that bug, and made those interactions ask if you want to use the move the way Gen 2 does.

Ah! That makes sense! I was wondering why it had SOUL_BADGE on there. Cheers!

Offline

#87 2015-09-30 00:49:36

megamctaco
Member
Registered: 2015-08-23
Post 47/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

How would I go about putting an Oak sprite somewhere to battle? I'd like to have him only appear after beating the Elite 4, and then disappearing after the battle (Like Red in Mt. Silver). Then possibly even having a Pokeball with Mew inside dropping next to him (Think Rocket Grunt dropping Lift Key in Celadon Game Corner Hideout).

I'd ideally like to put him at either the grassy area under Pallet or inside Bill's house.

I know you can battle him (done it plenty of times back in the day), but I can't find that code anywhere.

Last edited by megamctaco (2015-09-30 00:51:59)

Offline

#88 2015-09-30 01:13:07

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

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Well, if you want him to show up on an outdoor map, it needs to be one with his sprite in the map's sprite sheet. If it's an indoor map, you don't have to keep anything special in mind and can just put him in there.

To work on making him hidden/shown, and to make him drop the Mew pokeball, some places you could look for code examples are:

- The rocket that drops the lift key (for an example of a trainer script, and making him drop the Pokeball)
- The Eevee Pokball in Celadon (for an example of a pokeball that just gives you a Pokemon and isn't your starter)

You would also need to add entries into constants/hide_show_constants.asm and to data/hide_show_data.asm

If you are adding him to a map that has other events that disappear, you need to add his constant and his entry in with the other entries for that map. If it is a map that didn't have any originally, you can just add his entry at the end. For an example of adding him to a new map, you can look at this commit. A lot of that commit isn't relevant, but I added entries for Mew (and I added constants for some other legendaries while I was at it, but they are unused for now) but it shows you how to add an entry for a new map. You just need to put the pointer in the right slot for that map's ID number and then add the entries in the right place to match his hide/show constant. So if you added his constant at the end of the list, you'll need to add the hide/show entry for that map at the end of the list, like I did with Mew here. I'm sure that's probably still confusing though. I'm not the best at explaining things.

Offline

#89 2015-09-30 01:51:41

megamctaco
Member
Registered: 2015-08-23
Post 48/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Mateo wrote:

Well, if you want him to show up on an outdoor map, it needs to be one with his sprite in the map's sprite sheet. If it's an indoor map, you don't have to keep anything special in mind and can just put him in there.

To work on making him hidden/shown, and to make him drop the Mew pokeball, some places you could look for code examples are:

- The rocket that drops the lift key (for an example of a trainer script, and making him drop the Pokeball)
- The Eevee Pokball in Celadon (for an example of a pokeball that just gives you a Pokemon and isn't your starter)

You would also need to add entries into constants/hide_show_constants.asm and to data/hide_show_data.asm

If you are adding him to a map that has other events that disappear, you need to add his constant and his entry in with the other entries for that map. If it is a map that didn't have any originally, you can just add his entry at the end. For an example of adding him to a new map, you can look at this commit. A lot of that commit isn't relevant, but I added entries for Mew (and I added constants for some other legendaries while I was at it, but they are unused for now) but it shows you how to add an entry for a new map. You just need to put the pointer in the right slot for that map's ID number and then add the entries in the right place to match his hide/show constant. So if you added his constant at the end of the list, you'll need to add the hide/show entry for that map at the end of the list, like I did with Mew here. I'm sure that's probably still confusing though. I'm not the best at explaining things.

I was able to add Oak's sprite in Bill's house, and hide it by doing the following:

billshouse.asm

db $4 ; objects
    object SPRITE_SLOWBRO, $6, $5, STAY, NONE, $1 ; person
    object SPRITE_BLACK_HAIR_BOY_2, $4, $4, STAY, NONE, $2 ; person
    object SPRITE_BLACK_HAIR_BOY_2, $6, $5, STAY, NONE, $3 ; person
    object SPRITE_OAK, $5, $5, STAY, NONE, $4 ; person

hide_show_data.asm

MapHS58: ; cc0d (3:4c0d)
    db BILLS_HOUSE,$01,Show
    db BILLS_HOUSE,$02,Hide
    db BILLS_HOUSE,$03,Hide
    db BILLS_HOUSE,$04,Hide

The thing I don't understand is how to make him appear after a certain event and how to add his trainer data? Once I get that, I think I'd be able to work out how to get him to give me a Mew.

Offline

#90 2015-09-30 02:00:43

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

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Take a look at how Brock's script makes the guy in Pewter City disappear after you beat him. I seem to recall it being pretty simple, but I'm not to where I can look it up at the moment. I think it's just a matter of loading the constant for that sprite to somewhere and calling a hide or show routine.

Offline

#91 2015-09-30 03:01:38

megamctaco
Member
Registered: 2015-08-23
Post 49/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Alright I've tried a few different things and no luck.

Every time I speak to Oak, it just comes up with "Switch On" and I can access Bill's PC.

First I tried to make him a trainer, and followed the coding of other trainers (such as Lorelei or Viridian Forest trainers). No luck.

Next I tried to just make him give me a Lapras (based on the Lapras guy code) and no luck there either.

Maybe I'm getting ahead of myself. I should work out how to make him a trainer first, then try the other stuff (Mew ball, appearing and disappearing).

Offline

#92 2015-09-30 15:04:44

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

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Bill's house probably isn't the best place to try and add this.

For trainers to work properly, the map's script needs to call certain things in a certain way to make the trainers actually work, and since there is other stuff going on in Bill's House that probably would make that complicated, it might be better to add him somewhere else. Either a map that already has trainers, or a map that has nothing fancy going on, to make it simpler to set up the script header properly. For example, look at the scripts file in that commit I linked earlier with Faraway Island. Mew is a trainer, because of the stupid way Gen 1 handles Pokemon and Trainers.


EDIT: my bad, you'll also need to look at this commit too. I forgot which of the 2 Faraway Island commits dealt with the scripts for the inside of the island and stuff. The one I linked earlier had the part where I fixed it so he disappeared after the battle (and fixed a bunch of other stuff), the first one had most of the original setup, including getting his "trainer" event to work properly and start the battle.

Last edited by Mateo (2015-09-30 15:10:09)

Offline

#93 2015-10-11 06:54:05

megamctaco
Member
Registered: 2015-08-23
Post 51/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Been busy awhile. Back into the swing of things!

How do I edit .blk files? I've tried numerous software and nothing works with the disassembly blk files.

Or is there a mapping program that will work with the colorised overworld version of pokered, and can add new maps?

Offline

#94 2015-10-11 16:09:00

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

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Last time I checked, the disassembly comes with a map editor-- but nobody seems to be able to run it if you're using Windows.

At one point, I had modified an old version of goldmap's ini files so I could edit the tilesets, and I used some gen 2 map editor (I think it was megamap) to export .map files which happened to be in the same format as .blk files.

These days I use the bbeta-test version of Glitch Map that I was sent to help pokeglitch test it. But since it is unfinished and almost certainly not fully compatible with the current version of pokered (and since it wasnt publicly released) I don't give that out to people.

I'm sure other people all have their own ways of mapping, and maybe one of them will work for you.

Last edited by Mateo (2015-10-11 16:10:48)

Offline

#95 2015-10-12 15:21:24

ShantyTown
Member
Registered: 2013-12-04
Post 247/344

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

megamctaco wrote:

Been busy awhile. Back into the swing of things!

How do I edit .blk files? I've tried numerous software and nothing works with the disassembly blk files.

Or is there a mapping program that will work with the colorised overworld version of pokered, and can add new maps?

You can use RBMap to load a ROM, edit maps, and export their .blk files.  This is what I use for Maize Version map editing.
http://hax.iimarck.us/topic/5284/

I see that you actually posted to the RBMap thread, and I never responded.  Oops.  You can't create completely brand new map using only RBMap.  First, you have to manually change the pointers/object data/map headers in the disassembly, so that RBMap can actually load those non-existing map ids.

Offline

#96 2015-10-13 10:22:43

megamctaco
Member
Registered: 2015-08-23
Post 52/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

How would I go about changing the pointers? Honestly I don't even know what that is haha

Offline

#97 2015-10-25 09:37:59

megamctaco
Member
Registered: 2015-08-23
Post 55/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Every time the original Pokered disassembly gets updated, how do I go about merging it so any updated coding is the same, but without losing what I've done?

Offline

#98 2015-10-25 11:09:02

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 329/434
Website

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

With the git command line:

$ git remote add upstream https://github.com/pret/pokered.git
$ git merge upstream/master

Last edited by Crystal_ (2015-10-25 11:10:01)

Offline

#99 2015-10-25 23:06:07

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

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

Don't merge every time something changes... Do a rebase pull instead, so your individual commits won't be squashed.

cYa,

Tauwasser

Offline

#100 2015-11-06 00:55:37

megamctaco
Member
Registered: 2015-08-23
Post 82/103

Re: Hacking Red Questions (Trade evolutions and adding more TMs)

How do I make it possible to change the nickname of traded Pokemon?

Offline

  • Index
  • → Help/Question
  • → Hacking Red Questions (Trade evolutions and adding more TMs)

Board footer

Powered by FluxBB