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

Posts: 1472


DOG is your destiny

  • Awards Super Saiyan Topic Pin Collector Starstormer Famous Hacker

  • View Profile Awards
    « Reply #225 on: January 15, 2013, 07:13:53 PM »


    Doing that in Final Destination?
    Logged


    FC: 2191-7379-6272

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Good Citizen Pin Collector Helping Hand

  • View Profile Awards
    « Reply #226 on: January 16, 2013, 06:57:20 AM »


    found more how objects are stored and load ingame!

    and damn, it's like looking in a maze!
    it doesn't not load through a method inside a object (as it seems), more of asm OUTSIDE.
    the thing I saw how grGimmick load isn't in method that Module Editor2.2 couldn't find :/

    I know that initiaziler is branching to one method that no object using which makes one object load through there.
    have found all 3 objects in final destination and where they get loaded, but how those 2 other invisible methods gets loaded is still a mystery
    Doing that in Final Destination?
    yes, it is final destination! cause it's the simplests of all stage modules!
    « Last Edit: January 16, 2013, 12:29:35 PM by pikazz » Logged

    Stupid Tinypic :C

    PhantomWings
    Mega Kitten
    *****
    Offline Offline

    Posts: 167

  • Awards Super Saiyan Topic Featured

  • View Profile Awards
    « Reply #227 on: January 16, 2013, 11:42:00 PM »


    Alright, Info Dump time!

    It looks like modules aren't so chaotically structured after all. There's actually quite a bit of coherence to them if you know where to look.

    First of all, here's a mapping of some of the more important functions in ftLucario.rel:

    ("ctor" is short for "constructor")

    0xCC BSSList.add(r3=obj, r4=finalizer, r5=new_node)
    0xD8 BSSList.clear() (this is actually module finalizer[0])
    0x13C ftLucario.ctor(r4=?, r5=?, r6=?, r7=?)

    0xD388 ftLucarioExtendParamAccesser.ctor()
    0xD3D0 ftClassInfoImpl.ctor()

    0x11928 wnLucarioQigong.ctor(r4=?, r5=stack_data, r6=.pac_resource)
    0x9B18 create_wnLucarioQigong_instance(r4=?)

    0x8ECC init_ftLucarioTransactor()

    Module Constructors:
    0x712C soResourceModuleImpl.ctor(r4=owner, r5=?, r6=?, r7=soModuleAccessor)
    0x7194 soModelModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?)
    0x721C soMotionModuleImpl.ctor(r4=soModuleAccessor, r5=?)
    0x73F0 soPostureModuleImpl.ctor(r4=soModuleAccessor, r5=?)
    0x7460 soGroundModuleImpl.ctor(r4=soModuleAccessor)
    [BASE] soSituationModuleImpl.ctor
    0x6D0C soTeamModuleImpl.ctor(r4=?, r5=soModuleAccessor)
    0x74C4 soCollisionAttackModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?, r7=?)
    0x7588 soCollisionHitModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?, r7=?)
    0x764C soCollisionShieldModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?)
    0x7720 soCollisionShieldModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?)
    [NULL] soCollisionShieldModuleNull
    0x77F4 soCollisionCatchModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?)
    [NULL] soCollisionSearchModuleNull
    0x788C soDamageModuleActor.ctor(r4=soModuleAccessor, r5=?)
    [BASE] soCatchModuleImpl.ctor
    [BASE] soCaptureModuleImpl.ctor
    [BASE] ftStopModuleImpl.ctor
    [BASE] soTurnModuleImpl.ctor
    0x78F8 soShakeModuleImpl.ctor(r4=soModuleAccessor, r5=?)
    0x7954 soSoundModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?)
    0x79E4 soLinkModuleImpl.ctor(r4=soModuleAccessor)
    [BASE] soVisibilityModuleImpl.ctor
    0x7A38 ftControllerModuleImpl.ctor(r4=soModuleAccessor, r5=?)
    0x7AA8 soCameraModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?, r7=?)
    [BASE] soWorkManageModuleImpl.ctor
    [NULL] soDebugModuleNull
    0x7B14 soAnimCmdModuleImpl.ctor(r4=?)
    0x7B58 soStatusModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?)
    [NULL] ftGeneralTermDisideModuleNull
    [NULL] ftSwitchDecideModuleNull
    0x8010 soKineticModuleGenericImpl.ctor(r4=soModuleAccessor)
    [BASE] soEventManageModuleImpl.ctor
    0x8440 soGenerateArticleManageModuleImpl.ctor(r4=soModuleAccessor)
    0x863C soEffectModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?, r7=?, r8=?, r9=?)
    [BASE] ftComboModuleImpl.ctor
    0x8708 ftAreaModuleImpl.ctor(r4=soModuleAccessor, r5=?, r6=?)
    [NULL] soTerritoryModuleNull
    [NULL] soTargetSearchModuleNull
    0x87A0 soPhysicsModuleImpl.ctor(r4=soModuleAccessor, r5=?)
    [BASE] soSlopeModuleImpl.ctor
    [BASE] soShadowModuleImpl.ctor
    0x8800 soItemManageModuleImpl.ctor(r4=soModuleAccessor, r5=?)
    [BASE] soColorBlendModuleImpl.ctor
    [BASE] soJostleModuleImpl.ctor
    [BASE] ftAbnormalModuleImpl.ctor
    [BASE] soSlowModuleImpl.ctor
    [NULL] soReflectModuleNull
    [BASE] soHeapModuleImpl.ctor
    0xD67C ftLucarioParamCustomizeModule.ctor(r4=?)
    [BASE] ftGlowModuleImpl.ctor

    Next, here's a mapping for a few constructor functions in sora_melee.


    0x1257EC Fighter.base_ctor(r4=?, r5=id, r6=?, r7=?)

    0x192D4C ftFighterBuildData.base_ctor(r4=?, r5=id, r6=?, r7=?, r8=?, r9=?)

    0xD8E28 soInstanceManagerFixedSimple.base_ctor()

    0x68598 soModuleAccessor.base_ctor(r4=owner, r5-r10=modules, r1=modules)

    0x6F850 soResourceModuleImpl.base_ctor(r4=?, r5=?, r6=?)
    0x77DC soModelModuleImpl.base_ctor(r4-r8=?)
    0x13844 soMotionModuleImpl.base_ctor(r4=soModuleAccessor, r5=?)
    0x23364 soPostureModuleImpl.base_ctor(r4=soModuleAccessor, r5=?)
    0x2556C soGroundModuleImpl.base_ctor(r4=soModuleAccessor)
    0x3513C soSituationModuleImpl.base_ctor(r4=?, r5=soModuleAccessor, r6=?)
    0xB5048 soTeamModuleImpl.base_ctor(r4-r8=?)
    0x39590 soCollisionAttackModuleImpl.base_ctor(r4-r10=?)
    0x42AA4 soCollisionHitModuleImpl.base_ctor(r4-r10=?)
    0x48A1C soCollisionShieldModuleImpl.base_ctor(r4-r10=?)
    0x48A1C soCollisionShieldModuleImpl.base_ctor(r4-r10=?)
    [NULL] soCollisionShieldModuleNull
    0x4B184 soCollisionCatchModuleImpl.base_ctor(r4-r10=?)
    [NULL] soCollisionSearchModuleNull
    0x61454 soDamageModuleActor.base_ctor(r4-r8=?)
    0x64C8C soCatchModuleImpl.base_ctor(r4=soModuleAccessor, r5=?)
    0x65EE4 soCaptureModuleImpl.base_ctor(r4=soModuleAccessor)
    0x154088 ftStopModuleImpl.base_ctor(r4=soModuleAccessor)
    0x693F4 soTurnModuleImpl.base_ctor(r4=soModuleAccessor)
    0x68888 soShakeModuleImpl.base_ctor(r4=?, r5=?, r6=?)
    0x561E0 soSoundModuleImpl.base_ctor(r4-r9=?)
    0x6A244 soLinkModuleImpl.base_ctor(r4=?, r5=?)
    0x5B248 soVisibilityModuleImpl.base_ctor(r4=soModuleAccessor, r5=?, r6=?)
    0x150320 ftControllerModuleImpl.base_ctor(r4-r7=?)
    0xB215C soCameraModuleImpl.base_ctor(r4-r8=?)
    0xA1DA4 soWorkManageModuleImpl.base_ctor(r4=soModuleAccessor, r5=?)
    [NULL] soDebugModuleNull
    0x1AB96C soAnimCmdModuleImpl.base_ctor(r4=?)
    0x73930 soStatusModuleImpl.base_ctor(r4-r10=?)
    [NULL] ftGeneralTermDisideModuleNull
    [NULL] ftSwitchDecideModuleImplNull
    0xB6DBC soKineticModuleGenericImpl.base_ctor(r4=?, r5=?, r6=?)
    0x8EBF0 soEventManageModuleImpl.base_ctor(r4=owner)
    0x92F10 soGenerateArticleManageModuleImpl.base_ctor(r4-r7=?)
    0x9747C soEffectModuleImpl.base_ctor(r4-r10=?)
    0x14FBD8 ftComboModuleImpl.base_ctor(r4=soModuleAccessor)
    0x14DFE4 ftAreaModuleImpl.base_ctor(r4-r10=?)
    [NULL] soTerritoryModuleNull
    [NULL] soTargetSearchModuleNull
    0x10158 soPhysicsModuleImpl.base_ctor(r4-r7=?)
    0xACAC4 soSlopeModuleImpl.base_ctor(r4=soModuleAccessor, r5=?, r6=?, r7=?)
    0xB62E4 soShadowModuleImpl.base_ctor(r4=soModuleAccessor, r5=?, f1=?)
    0xB7E20 ItemManageModuleImpl.base_ctor(r4-r9=?)
    0xBEBB4 soColorBlendModuleImpl.base_ctor(r4=soModuleAccessor, r5=?, r6=?)
    0xC20D8 soJostleModuleImpl.base_ctor(r4=soModuleAccessor, r5=?, r6=?, r7=?)
    0x196664 ftAbnormalModuleImpl.base_ctor(r4=soModuleAccessor)
    0x5BED0 soSlowModuleImpl.base_ctor(r4=soModuleAccessor)
    [NULL] soReflectModuleNull
    0x649FC soHeapModuleImpl.base_ctor(r4=?, r5=?, r6=?, r7=?)
    0x14B5F8 ftParamCustomizeModuleImpl.base_ctor(r4=?)
    0x14CCEC ftGlowModuleImpl.base_ctor(r4=soModuleAccessor)

    Finally a few more functions which are relevant to Lucario in the sora_melee module:


    0x39BDA8 wnLucarioAuraBall.ctor(r4=?, r5=stack_data, r6=.pac_resource)
    0x39B0A8 create_wnLucarioAuraBall_instance(r4=?, r5=?)

    0x39A924 ftLucarioTransactor.ctor()


    So what is the significance of all this? Well, I'll try to explain it the best I can.



    All interfacing with the character modules are primarily done through the ftClassInfoImpl objects. In particular, whenever the game needs an instance of Lucario, it calls ftClassInfoImpl<33, ftLucario>.Method[0][2]. This function simply calls ftLucario.ctor.

    ftLucario.ctor calls Fighter.base_ctor, ftFighterBuildData.base_ctor, soInstanceManagerFixedSimple.base_ctor, soModuleAccessor.base_ctor and each of the module constructors. Most character modules will usually create derived versions of the modules so they will implement their own constructors which will generate part of the object and then call the sora_melee version of the constructor. Sometimes though the character module will instead just opt to call the base constructor on its own as all it needs is the base functionality of the sora_melee version. Other times, a null placeholder will be loaded up in place of the module instead.

    I haven't mapped all the functions that ftLucario.ctor calls yet, but that much on its own is pretty interesting.

    Of particular interest is the soGenerateArticleManageModuleImpl.ctor function. Characters who don't use articles will fill the soGenerateArticleManageModuleImpl spot with a null placeholder, but characters who do use articles will have this function implemented. In addition to creating the base soGenerateArticleManageModuleImpl object, the implemented constructor will also create create soInstancePool, soInstancePoolSub and wnInstanceHolder objects inside of the soGenerateArticleManageModuleImpl object. Additionally, it will also call the constructor functions for the articles (in Lucario's case, it calls wnLucarioQigong.ctor and wnLucarioAuraBall.ctor). Essentially, this function sets up all of Lucario's articles for use. Later on when we want to create instances of the articles, we call soArticleMediatorImpl.Method[0][1] which in turn calls either create_wnLucarioQigong_instance or create_wnLucarioAuraBall_instance.

    On a side note, the reason the wnLucarioAuraBall constructor and instance generator functions are in sora_melee is because Kirby can copy Lucario's AuraBall.


    There are other points of interest to this information too. When cloning modules, the places that cause difficulties in the cloning process are mainly the article constructors. Both wnLucarioQigong.ctor and wnLucarioAuraBall.ctor require a .pac_resource pointer. Cloned modules will usually try to retrieve the original's .pac_resource pointer which causes a crash if the original isn't loaded. Lucario's create_wnAuraBall_instance function also references a .pac_resource pointer. The ftLucarioExtendParamAccessor.ctor and ftClassInfoImpl<33, ftLucario>.ctor functions both statically reference the module id - both need to be changed when cloning. Fighter.base_ctor and ftFighterBuildData.base_ctor also reference the module id - when they are called in ftLucario.ctor, the passed id needs to be changed.

    Finally, there some spots here and there which needs to gain access to the ftClassInfoImpl object. this is usually done by calling a specific sora_melee function and passing in the module id. One of the places that needs to call this function is near the end of ftLucario.ctor (this is the same for all characters). For Lucario's module, there are two other places which does this: ftLucario.Method[17][16] and ftLucario.Method[0][3]. I'm not sure the significance of these two functions, but their use doesn't seem to be universal.



    Anyways, I think this information will prove useful not just for cloning characters, but for adding additional functionality to existing characters as well. Unfortunately, there seems to be a lot of syntax to follow in order to ensure things run nicely - but hopefully that will come with time.
    Logged

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Good Citizen Pin Collector Helping Hand

  • View Profile Awards
    « Reply #228 on: January 17, 2013, 08:40:58 AM »


    ooooh! nice information you got there, you need to get a promotion!
    YOU'RE GETTING A PROMOTION!


    okay, seriously. that's are really helpful. I will start to look at lucario's chor.

    also, could you add a function in Module Editor 2.2 that can read PPC that isn't in a method? every module has those and st/FtClassInfo Method[0][1] are always loading the beginning of the Section1 = always loading 0xCC in all modules I have checked!

    cause that would be very helpful! found out how objects gets "load" ingame in therody but that would be very helpful to see all the commands instead for hex
    Logged

    Stupid Tinypic :C

    Battleon469
    Extreme Kitten
    *******
    Offline Offline

    Posts: 379


    The Power.

  • Awards Shadow the Pinhog

  • View Profile Awards
    « Reply #229 on: January 18, 2013, 04:45:08 AM »


    ok seriously WTF? Dr eggman said he's giving a promotion but he gets one himself???
    Logged

    [/url]

    PhantomWings
    Mega Kitten
    *****
    Offline Offline

    Posts: 167

  • Awards Super Saiyan Topic Featured

  • View Profile Awards
    « Reply #230 on: January 18, 2013, 04:18:20 PM »


    Yeah, sorry about the Module Editor 2.2. Unfortunately, I programmed it really poorly, so adding a function to view the whole assembly block is really more trouble than it's worth. Instead, I've been using the first version of the module editor whenever it comes to viewing standalone functions (I actually use all 3 versions for different purposes XD). Now that BlackJax has started to implement the assembly viewer in BrawlBox, I don't think continuing to work on the Module Viewer is really worth it anymore.

    Anyways, here's the v1 download in case you need it:

    Module Editor v1
    Logged

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Good Citizen Pin Collector Helping Hand

  • View Profile Awards
    « Reply #231 on: January 18, 2013, 05:00:23 PM »


    Yeah, sorry about the Module Editor 2.2. Unfortunately, I programmed it really poorly, so adding a function to view the whole assembly block is really more trouble than it's worth. Instead, I've been using the first version of the module editor whenever it comes to viewing standalone functions (I actually use all 3 versions for different purposes XD). Now that BlackJax has started to implement the assembly viewer in BrawlBox, I don't think continuing to work on the Module Viewer is really worth it anymore.

    Anyways, here's the v1 download in case you need it:

    Module Editor v1
    oh yeah, thats true xD

    but I download v1 to check out on the setup! I will be back for more information and what I did find
    Logged

    Stupid Tinypic :C

    SonicBrawler
    Magical Girl
    Overlord Kitten
    ******
    Offline Offline

    Posts: 6977


    Bae

  • Awards Star Hacker Renowned Hacker Active Contributor Heart Container

  • View Profile WWW Awards
    « Reply #232 on: February 01, 2013, 05:15:34 PM »


    *Reads PW's Post*

    It seems I read German. I have no clue what it means

    Hopefully someone else understood it.
    Logged

    Quotes:
    Not all people have the luxury of being able to buy things whenever they want.

    Some people are barely scraping by in the economy.
    Modding has made you guys so spoiled.

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Good Citizen Pin Collector Helping Hand

  • View Profile Awards
    « Reply #233 on: February 01, 2013, 05:26:37 PM »


    *Reads PW's Post*

    It seems I read German. I have no clue what it means

    Hopefully someone else understood it.
    russian is way harder Im srs here

    I kinda know what he said, but I am in the situation that are "I know how the car works and how to drive it but dont know how the engine works" scenario


    sorry all for not being active in Module recently but I am pretty stuck with my other projects and my IRL :/
    Logged

    Stupid Tinypic :C

    SonicBrawler
    Magical Girl
    Overlord Kitten
    ******
    Offline Offline

    Posts: 6977


    Bae

  • Awards Star Hacker Renowned Hacker Active Contributor Heart Container

  • View Profile WWW Awards
    « Reply #234 on: February 01, 2013, 05:47:35 PM »


    russian is way harder Im srs here

    I kinda know what he said, but I am in the situation that are "I know how the car works and how to drive it but dont know how the engine works" scenario


    i see. I am kinda understanding sorta. okay nvmd i feel like i am reading brail
    « Last Edit: February 01, 2013, 06:18:59 PM by Gary Oak » Logged

    Quotes:
    Not all people have the luxury of being able to buy things whenever they want.

    Some people are barely scraping by in the economy.
    Modding has made you guys so spoiled.

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Good Citizen Pin Collector Helping Hand

  • View Profile Awards
    « Reply #235 on: February 07, 2013, 12:30:02 PM »


    I am little angry Im srs here

    I am planing to do a Special Throw Guide using Module files and Jigglypuff as an example
    but now I can't delete the Relocation that has the ID of "1B" inside Jigglypuffs Module file!
    it works on other characters but not on jigglypuff! but I know I can delete those before in jigglypuffs module file! :c but nope!

    EDIT: what is this shiet! if I just do a sligtly little edit in a module file in a hex editor, I can't open it in Module Viewer 2 :c that makes me angry!
    « Last Edit: February 09, 2013, 09:03:47 AM by pikazz » Logged

    Stupid Tinypic :C

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #236 on: February 10, 2013, 08:02:02 AM »


    hey PW...
    could you email me a copy of the REL structuring stuff...

    I don't have the time to read it right now,
    and I won't be able to read it other than Gmail when I get home...
    (kinda hard when you can't view kc-mm or even google search)

    I'm working on structuring a scripting system for UMC and this would really help out.
    (especially with my HexEdit template, and a few other programs)

    thanx.


    EDIT:
    actually... don't worry about it...
    I can now access kc-mm through VTunnel.

    thanx Smiley
    « Last Edit: February 13, 2013, 06:51:58 AM by Tcll » Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Good Citizen Pin Collector Helping Hand

  • View Profile Awards
    « Reply #237 on: February 11, 2013, 04:43:53 PM »


    I released a guide of how to add Specials throw with Module files!
    so if anyone are intresting of more how Modules works, you should check it to get little more info

    http://forums.kc-mm.com/index.php?topic=49878.msg1011427#msg1011427
    Logged

    Stupid Tinypic :C

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #238 on: February 13, 2013, 08:07:59 AM »


    @PW: your post was extremely useful for me...

    and helps me out to better see some of the inner working of ftPikachu.rel


    I was already expecting alot of syntax constraints... Tongue
    for the people who don't know:
    rel files are the end result of a long and cmplex process beginning from basic C++ src files.
    (the compiler works to clean the code much better than exe compilers)

    I was wrong about plf files...
    apparently plf files are the "dirty" compiled code...

    when plf files become rel files,
    they are cleaned and also contain a section that's removed when the conversion finishes.

    EDIT:
    could tell BJ to add an import option for the str file Tongue
    (for the name offset in the rel header)

    the only use it really serves is the creation directory... Tongue
    but still, it's nice to have the compatibility of it's plf name...
    « Last Edit: February 13, 2013, 08:22:24 AM by Tcll » Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    Dantarion
    Mega Kitten
    *****
    Offline Offline

    Posts: 172

  • Awards Favorite'd Former PMDT Staff Helper

  • View Profile Awards
    « Reply #239 on: February 13, 2013, 02:49:51 PM »


    Hello PhantomWings
    http://opensa.dantarion.com/module2013/
    Logged

    Pages:  1 ... 13 14 15 [16] 17 18 19 ... 28
    Print
    Jump to: