The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other Pokemon first gen obedience (https://www.pokecommunity.com/showthread.php?t=357594)

Glitchy88 October 25th, 2015 6:38 PM

Pokemon first gen obedience
 
Hello all, I've been trying to remove the obedience aspect from my hack I'm making,
specifically pokemon blue, The level curve is pretty steep and you'll have pokemon it the 40s well before you
get the 4th badge, I don't want people who utilize the in-game traded pokemon to get the shaft, does anybody know what I can do?

Imafruitbat October 25th, 2015 7:01 PM

Are you hacking using the Pokered disassembly? If so, I'll take a look and see if I can find it.

Glitchy88 October 25th, 2015 7:10 PM

Actually no, I'm not. I'm just using whatever tools I can find, mostly the ones made by swampert.

EDIT: Ok I figured I'd try my hand at this whole pokered disassembly thing.
How would I go about letting you see the stuff you need to see?

Imafruitbat October 27th, 2015 12:43 PM

Quote:

Originally Posted by shadic88 (Post 8976498)
Actually no, I'm not. I'm just using whatever tools I can find, mostly the ones made by swampert.

EDIT: Ok I figured I'd try my hand at this whole pokered disassembly thing.
How would I go about letting you see the stuff you need to see?

That was how I started, but the disassembly is easy enough to work with that I changed over. I've been using Notepad ++ as it reads the code in a more comprehensive format. Basically I just need to figure out which ASM file contains the code.

If you happen to find it first, just copy and paste the area of code into your post inside of a tag to compress it so you post isn't 400 lines long. I'm not super experienced with scripting, but if its as simple as changing a few parts to cancel it I can probably help.

Imafruitbat October 27th, 2015 3:03 PM

I believe I've found it. It's in "engine\battle\core.asm". Starting at line 4033:

Spoiler:
; checks if a traded mon will disobey due to lack of badges
; stores whether the mon will use a move in Z flag
CheckForDisobedience: ; 3dc88 (f:5c88)
xor a
ld [wMonIsDisobedient], a
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr nz, .checkIfMonIsTraded
ld a, $1
and a
ret
; compare the mon's original trainer ID with the player's ID to see if it was traded
.checkIfMonIsTraded
ld hl, wPartyMon1OTID
ld bc, wPartyMon2 - wPartyMon1
ld a, [wPlayerMonNumber]
call AddNTimes
ld a, [wPlayerID]
cp [hl]
jr nz, .monIsTraded
inc hl
ld a, [wPlayerID + 1]
cp [hl]
jp z, .canUseMove
; it was traded
.monIsTraded
; what level might disobey?
ld hl, wObtainedBadges
bit 7, [hl]
ld a, 101
jr nz, .next
bit 5, [hl]
ld a, 70
jr nz, .next
bit 3, [hl]
ld a, 50
jr nz, .next
bit 1, [hl]
ld a, 30
jr nz, .next
ld a, 10
.next
ld b, a
ld c, a
ld a, [wBattleMonLevel]
ld d, a
add b
ld b, a
jr nc, .noCarry
ld b, $ff ; cap b at $ff
.noCarry
ld a, c
cp d
jp nc, .canUseMove


The way I see it, you can set each of the level checks to 101, that way once you get the first badge you're in the clear. Another option that MAY work would be to remove lines 4035 to 4043. I don't know if it missing would cause any errors, but it might skip the badge check altogether. You could probably also set the bit of the first badge (which is probably 0) and set the level check on that one alone to 101. Whatever you try, make sure you save a backup and make sure it works.

Glitchy88 October 27th, 2015 3:10 PM

Quote:

Originally Posted by Imafruitbat (Post 8978137)
That was how I started, but the disassembly is easy enough to work with that I changed over. I've been using Notepad ++ as it reads the code in a more comprehensive format. Basically I just need to figure out which ASM file contains the code.

If you happen to find it first, just copy and paste the area of code into your post inside of a tag to compress it so you post isn't 400 lines long. I'm not super experienced with scripting, but if its as simple as changing a few parts to cancel it I can probably help.

Huh, notepad ++, I'll have to try that. One quick question about making changes, how do I apply them, do I type "make" into the cygwin terminal?

Imafruitbat October 27th, 2015 4:21 PM

I had trouble doing it without Notepad ++, but once you save the edited file you can just use the "make (red)" command. With my hack I don't need to generate 2 different ROMS, since I've eliminated most missing elements between versions on Red. It also makes editing simpler, since I can ignore instances of anything that isn't "IF DEF (_RED)". Just make sure an unedited copy of the ASM exists somewhere in case it doesn't work out.

Glitchy88 October 27th, 2015 4:39 PM

Yeah, I already had to start over multiple times due to not making a backup of the asm files that I edited.
I know that I'm probably biting off more than I can chew but I'm trying to add in at least three new pokemon.

I always wished that they expanded on the original legendary birds,
so far I've come up with two, Acuatro a water/flying type and Ricinco a poison/flying type.

Glitchy88 October 27th, 2015 6:35 PM

I found it! I was scrolling down and I found it in the Core.asm file located it the pokered/engine/battle folder.

Spoiler:
; what level might disobey?
ld hl, wObtainedBadges
bit 7, [hl]
ld a, 101 <------------ I changed this
jr nz, .next
bit 5, [hl]
ld a, 101 <------------ I changed this
jr nz, .next
bit 3, [hl]
ld a, 101 <------------ I changed this
jr nz, .next
bit 1, [hl]
ld a, 101 <------------ I changed this
jr nz, .next
ld a, 101 <------------ Didn't need to change this

It was on line 4059.


As I also want the trade pokemon to evolve, I'll be sure to let you know if I find anything,
Thanks a lot for all the help!

Imafruitbat October 27th, 2015 6:35 PM

Quote:

Originally Posted by shadic88 (Post 8978305)
Yeah, I already had to start over multiple times due to not making a backup of the asm files that I edited.
I know that I'm probably biting off more than I can chew but I'm trying to add in at least three new pokemon.

I always wished that they expanded on the original legendary birds,
so far I've come up with two, Acuatro a water/flying type and Ricinco a poison/flying type.

Ya, definitely can't help you with adding new pokemon. Additionally I was not interested in it with the original series, but I DID wish they expanded on the pokemon already present. There was a really poor balance of stats and move distribution, and I'm working on making some of the less stellar and renowned pokedudes more viable for training, while also making them a little more available.

Imafruitbat October 30th, 2015 4:32 PM

Sure, will be interested to see if that works, since I've not tested it out.

What do you mean with trade pokemon to evolve? I would think if they evolved via trade naturally that so long as you're receiving it, it should evolve, even in game.

If you're talking about making other pokemon evolve by trade then that's a different story. You can definitely switch evolution procs in the evos_moves.asm, but I'd be curious if you could set it in such a way that multiple conditions cause evolution...

Glitchy88 November 1st, 2015 8:15 PM

Quote:

Originally Posted by Imafruitbat (Post 8981437)
Sure, will be interested to see if that works, since I've not tested it out.

What do you mean with trade pokemon to evolve? I would think if they evolved via trade naturally that so long as you're receiving it, it should evolve, even in game.

If you're talking about making other pokemon evolve by trade then that's a different story. You can definitely switch evolution procs in the evos_moves.asm, but I'd be curious if you could set it in such a way that multiple conditions cause evolution...


Because of a translation error, haunter would not evolve, graveler did though,
machoke and kadabra weren't even included in the .asm file so they wouldn't evolve either.
and yeah, this was for the in-game trades, as all four of them had no trouble evolving after you
received in a trade with another cart.

This is what it was before: https://github.com/TheFakeMateo/RedPlusPlus/blob/master/engine/evolve_trade.asm

This is it after I edited it:
Spoiler:
EvolveTradeMon: ; 17d7d (5:7d7d)
; Verify the TradeMon's species name before
; attempting to initiate a trade evolution.

; The names of the trade evolutions in Blue (JP)
; are checked. In that version, TradeMons that
; can evolve are Graveler and Haunter.

; In localization, this check was translated
; before monster names were finalized.
; Then, Haunter's name was "Spectre".
; Since its name no longer starts with
; "SP", it is prevented from evolving.

; This may have been why Red/Green's trades
; were used instead, where none can evolve.

; This was fixed in Yellow.
ld a, [wInGameTradeReceiveMonName]

; MACHOKE
cp "M"
jr z, .ok

ld a, [wInGameTradeReceiveMonName]

; KADABRA
cp "K"
jr z, .ok
ld a, [wInGameTradeReceiveMonName]

; GRAVELER
cp "G"
jr z, .ok

; "SPECTRE" (HAUNTER)
cp "H"
ret nz
ld a, [wInGameTradeReceiveMonName + 1]
cp "A"
ret nz

.ok
ld a, [wPartyCount]
dec a
ld [wWhichPokemon], a
ld a, $1
ld [wForceEvolution], a
ld a, LINK_STATE_TRADING
ld [wLinkState], a
callab TryEvolvingMon
xor a ; LINK_STATE_NONE
ld [wLinkState], a
jp PlayDefaultMusic


With that all four will evolve upon being traded to you by in-game trades.

Imafruitbat November 1st, 2015 9:25 PM

Very cool, although personally I don't care for the idea of having those Mons grow super fast after evolving. I can imagine clearing the whole game with just Gengar. I actually switched my trademons to evolve at a pretty high level, although my hack isn't focused on super level curves.

Glitchy88 November 1st, 2015 10:00 PM

Quote:

Originally Posted by Imafruitbat (Post 8983331)
Very cool, although personally I don't care for the idea of having those Mons grow super fast after evolving. I can imagine clearing the whole game with just Gengar. I actually switched my trademons to evolve at a pretty high level, although my hack isn't focused on super level curves.

Well, I suppose you could alter the experience gained by traded mons to be the same as non traded.


All times are GMT -8. The time now is 2:30 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.