Perfect .Rel porting Progress -Lucario is first Pack. Ganon is new .rel-

Started by SonicBrawler, November 10, 2012, 11:40:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lucario Won. Who should be the new Plug and Play?

Yoshi
Captain Falcon
Ganondorf
ROB
Fox
Falco
Luigi
Keep them modules comin', PW. :af:
[white]: SW-2632-7270-6724[/white]


Quote from: PhantomWings on April 09, 2013, 08:17:26 PM
You don't need any codes for entries as those are also covered by the modules.

I've tested Lucario over Yoshi and it works with no problems. I haven't tested Mewtwo yet though. I suggest that you first get Lucario working over Yoshi, and then replace Lucario's files with Mewtwo's like usual.
Ok.  Is there any way you can send me the rel that you used?  I think it may have become corrupted.  (My bandwidth sucks)


Currently Waiting For:
Super Smash Bros. 4
A Link Between Worlds
Super Mario 3D World
Mario Kart 8
Zelda U

Hey PW, can you please give more insight on Section[8] and what goes in constructing it and what sections of sora_melee I should look in to help with that? Snake's got lots of articles.

These modules have some sort of "Character X has Character Y's Soundbank" code built into them, right? Would it be possible to disable them? Because it is possible to give ported characters their own sfx and not character Y's.
NNID: Cha0sKnight     3DS FC: 4768-7680-2509

Its possible, you just need to look at the files themselves

Section[8] is pretty simple. The primary components are the character Id, copy info and copy data.

It goes without saying that the character Id is stored in the first word of the section.

Starting at 0x20, the copy info is stored as entries in sequence. Each entry is 0x10 in size:

Copy Entry:
0x00 (ptr) destination
0x04 (ptr) source
0x08 (half) id_step
0x0A (half) data_size
0x0C (word) data_tag

Most of the fields are pretty self explanatory except id_step which simply offsets the destination address by character_id * id_step. The data_tag is 0xD8A for all entries except for the last one.

The last entry has a data_tag of 0x1D8A. This entry patches the character_id into the addresses stored at the source ptr. Writes are done in halfwords, so all addresses need to be shifted by 2 if you are writing to assembly addresses.

The first 9 copy entries are usually dedicated for patching known character parameters in sora_melee. The one's that will probably be the most useful are entries 7 and 8 which patch the character's soundbank and constants. Following the first 9 entries are the entries used for patching sora_melee functions.



Finding the functions in sora_melee is no easy feat. The main places where cloned characters will encounter errors in sora_melee are the places where the game reuses code for other characters. This is primarily to do with places involving Kirby's copy abilities, but there are other places like in the case of Link's Final Smash which has code shared with ToonLink's Final Smash.

For Snake, there shouldn't be too many problems because the grenades are of type wnSimple (I think...) which means that there shouldn't be any special code sharing to allow Kirby to use them.

As for the remaining articles, as long as you patch all the constant character Id values in ft_snake.rel, they shouldn't exhibit any problems.

well first time using the module editor.. was able to get lucario working over mario easily.. then added the mewtwo psa into his folder, worked like a charm. no use of codes at all ^_^
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

besides the fact that we can now port link, my favorite part is that this makes the AI act like the character you're porting, instead of the character you're over, so computer cloud over olimar fights like ike, not olimar

Quote from: billyskater555 on April 10, 2013, 08:12:19 AM
besides the fact that we can now port link, my favorite part is that this makes the AI act like the character you're porting, instead of the character you're over, so computer cloud over olimar fights like ike, not olimar
OMG yes!  I hated porting others to Olimar because they would be stupid...now they work right!


Currently Waiting For:
Super Smash Bros. 4
A Link Between Worlds
Super Mario 3D World
Mario Kart 8
Zelda U



I am currently porting Lucario Plug&Play to PAL to those who are using PAL.

however, it's only 98% done! there is something that I can't port yet D:
Stupid Tinypic :C

Quote from: Nanobuds on April 10, 2013, 03:21:15 PM
Can characters get their own CSS slots yet?
the clone engine? You are in the P:M team so you should know :P
Quotes:
Sorry but you are not allowed to view spoiler contents.

Quote from: Nanobuds on April 10, 2013, 03:21:15 PM
Can characters get their own CSS slots yet?
I would assume that if someone knew how to code in a separate CSS isntance slot and all the various things tied to a new character slot, that yes, at this point it'd be possible.

So, basically: If we can do the stuff that we can't do yet(?) we can do it.
I'm no longer around. If you really need to get my attention, send a PM

Well it looks like porting Snake was a lot harder than I thought it would be. In the end, I updated the Plug&Play model to v1.2 to cover a certain oddity in sora_melee that made it difficult to patch entry data. There's not too many changes except for a new _prolog function that gets called before the v1.1 function. If anyone's had any problems porting characters over Fox, Falco, Peach, Wario, Metaknight or Snake, then this would be the cause for it.

The 3 new modules are Mario, Sonic and Snake

Plug&Play Modules v1.2:
ft_mario.rel
ft_link.rel
ft_marth.rel
ft_pit.rel
ft_lucario.rel
ft_ike.rel
ft_snake.rel
ft_sonic.rel


While cloning characters to completely new slots is technically possible using the Plug&Play modules, you still need to have interface elements, CSPs, and CSS icons for the new character slot. You also need to add a new .rel and .pac file paths to sora_melee so they get loaded according to the new character Id. Because the .rel can't actually patch it's own file string, you'll have to use codes. Perhaps a creative individual could come up with a patch function that executes on sora_menu_selchar_access.rel or some other modules which makes the appropriate changes when it is loaded.


One other thing to note, while CPUs no longer exhibit behavior dictated by the A.I. controller functions (such as Olimar's constant Neutral B usage) they do still seem to exhibit some behavior of the original characters such as when they use their FS. The only A.I. related data I know of are the A.I. controllers and the A.I. files inside the MotionEtc files so I'm not sure what needs to be patched to fixed this.



I think I'm going to take a break from hacking after this. I've done a pretty hefty hacking marathon this week and have neglected a lot of important things thanks to that. But we have made a lot of progress here.