Home Gallery Resources The Team Rules chat Login Register
Pages:  1 ... 16 17 18 [19] 20 21 22 ... 28
Author Topic: Let's look into Module Fíles (.rel) - Defensive Collision is now!  (Read 168813 times)
0 Members and 1 Guest are viewing this topic.
Carnage
God Kitten
*******
Offline Offline

Posts: 7551


(retired)

  • Awards Constructive Super Saiyan Topic Heart Container Starstormer

  • View Profile Awards
    « Reply #270 on: April 26, 2013, 09:46:50 AM »


    if we could add ppl instead of replacing brawl hacking would be an all new thing for sure.
    Logged


    DoctorFlux(Mariodk)
    Never Gonna Give You Up
    *
    Offline Offline

    Posts: 9387


  • Awards Infinite Smash Team Heart Container KCMM 2012 Awards Winner >9000

  • View Profile Awards
    « Reply #271 on: April 26, 2013, 10:34:05 AM »


    if we could add ppl instead of replacing brawl hacking would be an all new thing for sure.
    think about the filesize of the CSS file then its possible to add more slots
    i think that will be a problem
    Logged

    I Dont Take Requests & Dont Do Brawl Mods anymore Maybe Sm4sh modz later

    BlueBrain
    God Kitten
    *******
    Offline Offline

    Posts: 8941


  • Awards Infinite Smash Team Super Saiyan Topic >9000 Heart Container

  • View Profile Awards
    « Reply #272 on: April 26, 2013, 10:35:23 AM »


    think about the filesize of the CSS file then its possible to add more slots
    i think that will be a problem
    are you serious?
    look at stage expansion...
    you just need to lower all images' resolution for more filesize
    Logged

    Shun_One
    Lol Kitten
    *********
    Offline Offline

    Posts: 888


  • Awards >9000 Star Hacker Smash 3 Team Pin Collector

  • View Profile WWW Awards
    « Reply #273 on: April 26, 2013, 11:01:46 AM »


    I've also been experimenting a little bit with using menu_selchar.rel and menu_selchar_access.rel to implement the custom CSS code and include localized (and extendable) character color and icon options (think Brawl Masquerade) - but I think it would be better if I found a way to load a custom extension module file instead which all main game modifications can be pooled inside.
    I would imagine something like this would help with the bizarre Plug&Play .rels behavior in regards to costume slots. In case you weren't aware, I've found that if you port a character to another who has a FitChar## that the original does not, that costume can't be selected.

    For me, I've got Roy over ROB and Mewtwo over Jiggs. Roy can't access FitRobot06, it loads FitRobot00 instead. Mewtwo can't get FitPurin03.
    Logged

    I'm no longer around. If you really need to get my attention, send a PM

    PhantomWings
    Mega Kitten
    *****
    Offline Offline

    Posts: 167

  • Awards Super Saiyan Topic Featured

  • View Profile Awards
    « Reply #274 on: April 26, 2013, 02:02:28 PM »


    I would imagine something like this would help with the bizarre Plug&Play .rels behavior in regards to costume slots. In case you weren't aware, I've found that if you port a character to another who has a FitChar## that the original does not, that costume can't be selected.

    For me, I've got Roy over ROB and Mewtwo over Jiggs. Roy can't access FitRobot06, it loads FitRobot00 instead. Mewtwo can't get FitPurin03.


    The Plug&Play modules cover color restrictions as well to prevent crashing in case one of the original's colors aren't covered by the new character's. If you want to remove the color restrictions on Marth's module, just change the flags at 0xE6 in Section[8] of Marth's module.

    The flags are documented here under Costume Flags.

    Just remember that you need to make sure that all interface elements including CSPs and battle portraits exist for the additional colors.
    Logged

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Pin Collector Good Citizen Helping Hand

  • View Profile Awards
    « Reply #275 on: April 26, 2013, 02:08:52 PM »


    okay, I have looks everywhere of how you did Im srs here wanna port it to pal but I cant find how you did!

    could you pm me of how you did and where you changed? cause it is just simply amazing!

    if you have time and want that ofcourse!
    Logged

    Stupid Tinypic :C

    Shun_One
    Lol Kitten
    *********
    Offline Offline

    Posts: 888


  • Awards >9000 Star Hacker Smash 3 Team Pin Collector

  • View Profile WWW Awards
    « Reply #276 on: April 26, 2013, 07:29:09 PM »


    The Plug&Play modules cover color restrictions as well to prevent crashing in case one of the original's colors aren't covered by the new character's. If you want to remove the color restrictions on Marth's module, just change the flags at 0xE6 in Section[8] of Marth's module.

    The flags are documented here under Costume Flags.

    Just remember that you need to make sure that all interface elements including CSPs and battle portraits exist for the additional colors.
    Ah, I see now. Thanks for telling me that. I'll mess around with it some on my own now.
    Logged

    I'm no longer around. If you really need to get my attention, send a PM

    PhantomWings
    Mega Kitten
    *****
    Offline Offline

    Posts: 167

  • Awards Super Saiyan Topic Featured

  • View Profile Awards
    « Reply #277 on: April 27, 2013, 08:47:09 PM »


    okay, I have looks everywhere of how you did Im srs here wanna port it to pal but I cant find how you did!

    could you pm me of how you did and where you changed? cause it is just simply amazing!

    if you have time and want that ofcourse!

    The main areas I changed - in broad terms - are as follows:

    0x5C20: Removed all but one call to Create_wnMarioFireball_holder_and_article
    0x7B60: Changed Create_wnMarioFireball_holder_and_article to call wnRobotBeam.ctor instead of wnMarioFireball.ctor.
    0x7BB4: Changed wnInstanceHolder<wnMarioFireball>.Method[0][0] to call wnRobotBeam.dtor instead of wnMarioFireball.dtor
    0x7C10: Removed all but the first call to soInstanceHolder<wnMarioFireball>.Method[0][0]
    0xAEA4: Changed wnArticleMediator.Method[0][1] to only check the first instance holder when creating an instance of wnRobotBeam
    0xAFB0: Changed wnArticleMediator.Method[0][1] to call wnRobotBeam.instantiate instead of wnMarioFireball.instantiate
    0xB3D0: Changed wnArticleMediator.Method[1][3] to only try to clear 1 wnRobotBeam instance.
    0xB6E8: Changed wnArticleMediator.Method[1][4] to only check 1 wnRobotBeam instance holder.
    0xB950: Changed wnArticleMediator.Method[1][5] to return an instance cap of 1 for wnRobotBeam
    0xBD80: Changed wnArticleMediator.Method[1][2] to only clear 1 wnRobotBeam instance.

    Just for reference, the method listing for wnArticleMediator is as follows:

    Code:
    soArticleMediator : soArticleGenerator, soArticleOperator

    soArticleGenerator
    Method[0][0] Finalizer
    Method[0][1] GenerateArticle(r4=article_id, r5=soModuleAccessor)
    soArticleOperator
    Method[1][0] Method[0][0] Thunk
    Method[1][1] Method[1][8] Thunk
    Method[1][2] ClearInstances()
    Method[1][3] ClearInstances(r4=soModuleAccessor, r5=Article_id)
    Method[1][4] GetInstanceCount(r4=soModuleAccessor, r5=article_id)
    Method[1][5] GetInstanceCap(r4=article_id)
    Method[1][6] GetArticleCount()
    Method[1][7] SetEnabled(r4=val)
    Method[1][8] PSAEvent1001(r4=soModuleAccessor, r5=soArticle)



    It seems like a lot, but the actual number of instructions I changed is probably no more than 20. If you compare the modified module to the original Mario module, you should be able to get a good idea of what needs to be changed in the PAL version.




    Concerning the file size limits: I think I may have stumbled upon a code that can be used to increase the amount of memory allocated towards stage icons. Unfortunately Brawl makes almost full use of the Wii's memory, so there's not a lot of room for expansion. However, it seems that you can safely increase the limit by approximately 510kb without causing the game to run out of memory.

    Anyone care to test this for me? You'll need a sc_selmap.pac file that exceeds the normal size limit.

    Code:

    MenuResource Expansion (+510kb)
    04422384 006E6700


    « Last Edit: April 27, 2013, 08:48:46 PM by PhantomWings » Logged

    Shun_One
    Lol Kitten
    *********
    Offline Offline

    Posts: 888


  • Awards >9000 Star Hacker Smash 3 Team Pin Collector

  • View Profile WWW Awards
    « Reply #278 on: April 27, 2013, 09:20:37 PM »


    Concerning the file size limits: I think I may have stumbled upon a code that can be used to increase the amount of memory allocated towards stage icons. Unfortunately Brawl makes almost full use of the Wii's memory, so there's not a lot of room for expansion. However, it seems that you can safely increase the limit by approximately 510kb without causing the game to run out of memory.

    Anyone care to test this for me? You'll need a sc_selmap.pac file that exceeds the normal size limit.

    Code:

    MenuResource Expansion (+510kb)
    04422384 006E6700


    It worked. I didn't want to push it too hard initially, so I went with a lower file-size to start with. Only .01 mb bigger than the limit, but the game didn't freeze.
    « Last Edit: April 27, 2013, 09:25:03 PM by Shun_One » Logged

    I'm no longer around. If you really need to get my attention, send a PM

    Eternal Yoshi
    Heroic Kitten
    **
    Offline Offline

    Posts: 2425


    Boss? Is that you?

  • Awards KCMM Old Timer Super Saiyan Topic Active Contributor Former PMDT

  • View Profile Awards
    « Reply #279 on: April 28, 2013, 04:57:37 AM »


    This looks cool. Would you be able to do that code for say characters? Samus and Zamus are characters that have notoriously strict memory limits and I think it would be amazing if there was a way to allocate at least 50 more kb than what Brawl has allocated for them.
    Logged


    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Pin Collector Good Citizen Helping Hand

  • View Profile Awards
    « Reply #280 on: April 28, 2013, 09:54:01 AM »


    PW, you are so amazing Im srs here

    (PAL version)

    I will try to see if it are any more articles we can port to other one. I bet all articles thats used by the Special B can be ported like luigis fireball, samus Charge Beam ect
    Logged

    Stupid Tinypic :C

    PhantomWings
    Mega Kitten
    *****
    Offline Offline

    Posts: 167

  • Awards Super Saiyan Topic Featured

  • View Profile Awards
    « Reply #281 on: April 28, 2013, 11:50:51 AM »


    This looks cool. Would you be able to do that code for say characters? Samus and Zamus are characters that have notoriously strict memory limits and I think it would be amazing if there was a way to allocate at least 50 more kb than what Brawl has allocated for them.

    Memory heaps are allocated by player as opposed to character. Each player has 4 memory heaps allocated to them. For player 1, they are:

    [00553400] Fighter1Resource
    [00087C00] Fighter1Resource2
    [00052000] Fighter1Instance
    [00048500] OverlayFighter1

    Judging from the sizes, I would say Fighter1Resource is used for the model and Fighter1Resource2 is used for movesets and effects. Fighter1Instance is used specifically for the runtime character instance and I know that OverlayFighter1 is used for storing and executing the character's module.

    As a side note, because there are only 4 fighter slots, alloys are stored collectively inside the Fighter3 and Fighter4 heaps - they can get away with this because they are smaller.

    As far as increasing the size of these goes, we only have 510kb to work with - so if we were to distribute them over the 4 Resource2 heaps, it would only be an increase of about 128kb each.


    I will try to see if it are any more articles we can port to other one. I bet all articles thats used by the Special B can be ported like luigis fireball, samus Charge Beam ect

    The hardest part is finding the article ctor and dtor functions as well as the instantiation function. If you can find those 3 functions and the proper parameters to pass in when calling them, then porting them shouldn't be a problem.
    Logged

    BlueBrain
    God Kitten
    *******
    Offline Offline

    Posts: 8941


  • Awards Infinite Smash Team Super Saiyan Topic >9000 Heart Container

  • View Profile Awards
    « Reply #282 on: April 28, 2013, 11:57:29 AM »


    on the filesize issues, i found out by experience that the costume and PSA/animations work all together in setting a limit, i noticed because i made a small PSA and animation edit for akuma, and it froze with my import, but worked perfectly with ganon's regular outfits
    Logged

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Pin Collector Good Citizen Helping Hand

  • View Profile Awards
    « Reply #283 on: April 29, 2013, 12:37:13 PM »


    PW! I found something intresting! character that has 2 or more character example Samus/ZZS (especially Samus) seems to have all their articles in Sora_melee, somehow I found its Ctor but I cant find it again ;_;

    dont quite understand how to find Ctor, is it when a offset subtract itself? example at wnAuraBall in sora_melee, it substract itself! the Ctor of wnAuraBall is 39 CC 3C and that offset in sora_melee subtract itself with "39 CC 38".

    and do you know how to find Dtor? some is easy to spot cause they are relocationdata'd to sora_melee, to a weapons Method[0][22] offset - 0x8! example to "wnSamusCShot" but some seems just impossible to find D:

    last question! do you know a way to find the Ctor part to change in offset easier? example the offset at 7B60 in ft_mario.

    (yeah, kinda noobish question D: sorry)
    Logged

    Stupid Tinypic :C

    PhantomWings
    Mega Kitten
    *****
    Offline Offline

    Posts: 167

  • Awards Super Saiyan Topic Featured

  • View Profile Awards
    « Reply #284 on: May 01, 2013, 01:53:32 PM »


    I've found that the best way to find the location of an article's ctor is to look for the place where the game ordinarily calls it. For this case, all articles' ctors are called from soGenerateArticleManageModuleImpl. Finding the soGenerateArticleManageModuleImpl.ctor function is probably the hardest part as the only suggestion I can make is that it's usually around 0x850 inside the file (For Samus' case, soGenerateArticleManageModuleImpl.ctor is called at 0x830 and the actual function starts at 0x8434).

    Once inside the soGenerateArticleManageModuleImpl.ctor, I primarily work visually. When searching for article ctors, I usually look for routines that look like one of the following two possibilities:







    For the above two examples, the selected functions are calling wnSamusGBeam.ctor and Create_wnSamusCShot_holder_and_article. In the second case, Create_wnSamusCShot_holder_and_article is called 4 times for each of the 4 ChargeShot instances that Samus is allowed on screen at one time. If you want to find the actual wnSamusCShot.ctor, just go into Create_wnSamusCShot_holder_and_article and you'll find it at a point that looks like this:





    Note that in these two cases, wnSamusGBeam.ctor and wnSamusCShot.ctor are both contained in sora_melee. However, in some cases, they may be contained within the owner character's module - even if there exists a similar ctor in sora_melee.

    Also, it's difficult to determine which .ctor belongs to what object just by examining the function call. But there's an easy way to find out if you look at the wnInstanceHolder<...> that is created before it. If you look a little bit above the function call in either of the two above cases, you'll find:





    Which tells you the instance holder of the article is being created. Alternatively, it seems like the articles are generated in reverse order to how the wnInstanceHolder objects are listed when viewing the module in Module Editor 2.



    Finding the .dtors is a bit easier. Like you said, the article's Method[0][22] is usually the article's .dtor - but you can also check the wnInstanceHolder<...>.Method[0][0] which is also responsible for calling the article's .dtor:






    That's about it. There's a small bit on finding the wnSamusCShot.instantiate and wnSamusGBeam.instantiate functions, but for that, you'll mostly be using the same basic principles inside soArticleMediator.Method[0][1] for the calls to both of those functions.

    As for why Samus/ZSS have all their articles stored in sora_melee is most likely so that when they transform, existing articles onscreen don't get unloaded when the old character gets replaced by the new one. That's more helpful for us though as we should be able to generate those articles on any character we like.
    « Last Edit: May 01, 2013, 01:54:28 PM by PhantomWings » Logged

    Pages:  1 ... 16 17 18 [19] 20 21 22 ... 28
    Print
    Jump to: