Weapon Hacking

Discussion in 'Modding Discussion' started by S. P. Gardebiter, Nov 21, 2007.

Old topic!
The last post in this thread is over 60 days old. Posting in this thread will be considered a bump, so please make an attempt to be courteous if you go ahead with it.

If the last post is over 6 months old, it may instead be a better idea to start a new topic. If you aren't sure about what to do, feel free to ask a staff member for help, or try to locate a 'general questions'-type thread if it exists in this (sub-)forum.
  1. Jun 15, 2009
    Lace
    Lesbian Seagull
    "Life begins and ends with Nu."
    Join Date: Jan 4, 2008
    Location: Hunky Dory
    Posts: 3050
    now with information from dooey!
    can you add something usefultacular in your next update sp?
     
  2. Jun 15, 2009
    S. P. Gardebiter
    Ex-Admin
    "Life begins and ends with Nu."
    Join Date: Dec 30, 2005
    Location: Germany
    Posts: 3202
    Every update is useful. You know users don't want to read the entire thread if they can get information in a single text file.
    Plus I added much more information than only dooeys.
     
  3. Jun 15, 2009
    Lace
    Lesbian Seagull
    "Life begins and ends with Nu."
    Join Date: Jan 4, 2008
    Location: Hunky Dory
    Posts: 3050
    sorry, I am a bit annoyed w/ weapon hacking myself, and that didn't give anything useful to me.
    >_>
     
  4. Jun 27, 2009
    Nick The HedgeHog
    Junior Member
    "Fresh from the Bakery"
    Join Date: Jun 26, 2009
    Location: Here
    Posts: 12
    can someone help me,i know the hex value of the weapons are like 0x95ce3 or somthing like that,but i need it in binary,cuz the Dam Scientific Calculator isnt very helpful
     
  5. Jun 29, 2009
    Lace
    Lesbian Seagull
    "Life begins and ends with Nu."
    Join Date: Jan 4, 2008
    Location: Hunky Dory
    Posts: 3050
    why would you want it in binary?
     
  6. Jul 1, 2009
    VoidMage_Lowell
    Level 73 Procrastinator
    "Life begins and ends with Nu."
    Join Date: Apr 6, 2009
    Location: Forgotten Tower
    Posts: 2052
    Huh?

    Well, the value{s} of Offset x95CE3 is/are a bunch of 00's, :confused:;

    Anyways, I don't think you're using your Calculator correctly.
    Assuming you're using the one on your computer {Which is best}, and you've set the view to Scientific, you can swap values from Decimal to Hex to Binary to Oct instantly by clicking those top left bubbles right below the display....
    For instance, 47 in Decimal would be 2F in Hex and 101111 in Binary.
    Got that all from the Calculator...

    And....why do you need the values in Binary...?
     
  7. Oct 25, 2009
    Strawberry
    Junior Member
    "Fresh from the Bakery"
    Join Date: Oct 22, 2009
    Location:
    Posts: 15
    Just was lurking a bit and noticed your FAQ link in the first post is now broken. Sad day.
     
  8. Oct 25, 2009
    Lace
    Lesbian Seagull
    "Life begins and ends with Nu."
    Join Date: Jan 4, 2008
    Location: Hunky Dory
    Posts: 3050
    weird, it was working last week.
    the only thing I have on my drive is the asm values, so soz.
    that's these:
    Code:
    0x047B0 - Polar Star (all levels)
    
    0x04B30 - Fireball (all levels)
    
    0x05120 - Machinegun (all levels)
    
    0x055A0 - Missile Launcher (all levels)
    
    0x05F30 - Bubbler level 1
    0x09190 - Bubbler level 2
    0x064D0 - Bubbler level 3
    
    0x068B0 - Bubbler level 3 shot
    0x075E0 - Blade level 3 slash
    0x078A0 - [unused]
    
    0x06BB0 - Blade level 1
    0x06E60 - Blade level 2
    0x07110 - Blade level 3
    
    0x07910 - Super Missile Launcher (all levels)
    
    0x08230 - Nemesis (all levels)
    
    0x08710 - Chargeless spur (all levels)
    
    0x08AE0 - Non moving spur (all levels)
    
    0x08230 - Spur level 1
    0x08F40 - Spur level 2
    0x08F90 - Spur level 3
     
  9. Nov 27, 2009
    isack55
    Neophyte Member
    "Fresh from the Bakery"
    Join Date: Nov 22, 2009
    Location:
    Posts: 9
    PLS fix the link. i need this.

    if anyone has a copy of it, could they at least post it on here or in a new thread or somethin. it would be a big help for me.
     
  10. Aug 4, 2010
    Maruhai
    Junior Member
    "Fresh from the Bakery"
    Join Date: Aug 2, 2010
    Location: France
    Posts: 16
    Age: 21
    Sorry for the 1 year (oh my) bump but can anyone give me a copy of the tutorial or another tutorial ? I just want to know what value is what.
     
  11. Aug 4, 2010
    Noxid
    Pretty Skater in a Sailor Suit
    "Life begins and ends with Nu."
    Join Date: Aug 28, 2009
    Location: space or some shit
    Posts: 5181
    This thread might be of more use to you than this old thing.
     
  12. Aug 5, 2010
    Maruhai
    Junior Member
    "Fresh from the Bakery"
    Join Date: Aug 2, 2010
    Location: France
    Posts: 16
    Age: 21
    Maybe you should put thins link in the index of useful thread.
    Thanks anyway.
     
  13. Aug 5, 2010
    Landonpeanut
    Been here way too long...
    "Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
    Join Date: Mar 20, 2010
    Location:
    Posts: 252
    Actually, they're quite different, and the free hacks! thread doesn't cover anything in here, although cave editor's weapon editor does cover some of it, there are still some things that need this to be edited.

    That's a good idea.:rolleyes:


    I'll probably add some more weapon modding stuff in a few months, as I still have a lot of work ahead of me, and I'm a little lazy (I also have to type it up).

    EDIT: I noticed that the original link is down, so here's the one off of the tribute site:
    http://www.miraigamer.net/cavestory/guides/WeaponHack.txt
     
  14. Feb 15, 2012
    reverze
    Novice Member
    "Officially Worth 1 Rupee"
    Join Date: Feb 15, 2012
    Location:
    Posts: 1
    adding weapons?
     
  15. Feb 15, 2012
    cultr1
    ℒℯ
    "Life begins and ends with Nu."
    Join Date: May 6, 2009
    Location: ᵐᵉᵐᵉˢ
    Posts: 2132
    Age: 20
    It's not really doable, there is one unused slot for weapons in the game, but it's glitchy and not fun to mess with.
     
  16. Feb 15, 2012
    Dubby
    Senior Member
    "Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
    Join Date: Jan 21, 2011
    Location:
    Posts: 249
    Actually, you can add as many weapons as you want. You just have to know how to handle the projectiles, because the weapons are not stored as a list of weapons, but rather as a list of bullets - each attributed to a level of a weapon. The function that handles weapon selection doesn't have a set limit, so it's not too hard to code a weapon to have three different 'bullets', but only take up a single slot in the list. It just needs to be coded efficiently. Granted, doing this will work perfectly find in-game, and the player is unlikely to notice the changes, but editing the different weapons in CE (or any other editor) becomes rather tricky. For instance, here is my version of the Polar Star's weapon entry:
    Code:
    CPU Disasm
    Address   Hex dump					 Command								  Comments
    0041DE60  /$  55					   PUSH EBP
    0041DE61  |.  89E5					 MOV EBP,ESP
    0041DE63  |.  83EC 1C				  SUB ESP,1C
    0041DE66  |.  8B45 08				  MOV EAX,DWORD PTR SS:[ARG.1]
    0041DE69  |.  8945 F8				  MOV DWORD PTR SS:[LOCAL.2],EAX
    0041DE6C  |.  83C0 03				  ADD EAX,3
    0041DE6F  |.  8945 FC				  MOV DWORD PTR SS:[LOCAL.1],EAX
    0041DE72  |.  6A 02					PUSH 2
    0041DE74  |.  E8 87680700			  CALL 00494700							; (Count WPN ID shot occurances)
    0041DE79  |.  83C4 04				  ADD ESP,4
    0041DE7C  |.  83F8 02				  CMP EAX,2
    0041DE7F  |.  7E 05					JLE SHORT 0041DE86
    0041DE81  |.  E9 32010000			  JMP 0041DFB8
    0041DE86  |>  8B0D 14E24900			MOV ECX,DWORD PTR DS:[49E214]
    0041DE8C  |.  230D 14364900			AND ECX,DWORD PTR DS:[493614]
    0041DE92  |.  0F84 20010000			JE 0041DFB8
    0041DE98  |.  6A 01					PUSH 1								   ; /Arg1 = 1
    0041DE9A  |.  E8 0141FEFF			  CALL 00401FA0							; \Cave_Story_-_Redesign10.00401FA0
    0041DE9F  |.  83C4 04				  ADD ESP,4
    0041DEA2  |.  85C0					 TEST EAX,EAX
    0041DEA4  |.  75 11					JNE SHORT 0041DEB7
    0041DEA6  |.  6A 01					PUSH 1								   ; /Arg2 = 1
    0041DEA8  |.  6A 25					PUSH 25								  ; |Arg1 = 25
    0041DEAA  |.  E8 91270000			  CALL 00420640							; \Cave_Story_-_Redesign10.00420640
    0041DEAF  |.  83C4 08				  ADD ESP,8
    0041DEB2  |.  E9 01010000			  JMP 0041DFB8
    0041DEB7  |>  A1 54E64900			  MOV EAX,DWORD PTR DS:[49E654]
    0041DEBC  |.  8945 F4				  MOV DWORD PTR SS:[LOCAL.3],EAX
    0041DEBF  |.  A1 58E64900			  MOV EAX,DWORD PTR DS:[49E658]
    0041DEC4  |.  8945 F0				  MOV DWORD PTR SS:[LOCAL.4],EAX
    0041DEC7  |.  A1 40E64900			  MOV EAX,DWORD PTR DS:[49E640]
    0041DECC  |.  8945 EC				  MOV DWORD PTR SS:[LOCAL.5],EAX
    0041DECF  |.  A1 44E64900			  MOV EAX,DWORD PTR DS:[49E644]
    0041DED4  |.  8945 E8				  MOV DWORD PTR SS:[LOCAL.6],EAX
    0041DED7  |.  A1 48E64900			  MOV EAX,DWORD PTR DS:[49E648]
    0041DEDC  |.  0345 E8				  ADD EAX,DWORD PTR SS:[LOCAL.6]
    0041DEDF  |.  8945 E4				  MOV DWORD PTR SS:[LOCAL.7],EAX
    0041DEE2  |.  837D E4 00			   CMP DWORD PTR SS:[LOCAL.7],0
    0041DEE6  |.  74 4C					JE SHORT 0041DF34
    0041DEE8  |.  837D EC 00			   CMP DWORD PTR SS:[LOCAL.5],0
    0041DEEC  |.  74 0D					JE SHORT 0041DEFB
    0041DEEE  |.  8B45 F4				  MOV EAX,DWORD PTR SS:[LOCAL.3]
    0041DEF1  |.  05 00020000			  ADD EAX,200
    0041DEF6  |.  8945 F4				  MOV DWORD PTR SS:[LOCAL.3],EAX
    0041DEF9  |.  EB 0B					JMP SHORT 0041DF06
    0041DEFB  |>  8B45 F4				  MOV EAX,DWORD PTR SS:[LOCAL.3]
    0041DEFE  |.  2D 00020000			  SUB EAX,200
    0041DF03  |.  8945 F4				  MOV DWORD PTR SS:[LOCAL.3],EAX
    0041DF06  |>  837D E8 00			   CMP DWORD PTR SS:[LOCAL.6],0
    0041DF0A  |.  74 14					JE SHORT 0041DF20
    0041DF0C  |.  C745 EC 01000000		 MOV DWORD PTR SS:[LOCAL.5],1
    0041DF13  |.  8B45 F0				  MOV EAX,DWORD PTR SS:[LOCAL.4]
    0041DF16  |.  2D 00100000			  SUB EAX,1000
    0041DF1B  |.  8945 F0				  MOV DWORD PTR SS:[LOCAL.4],EAX
    0041DF1E  |.  EB 35					JMP SHORT 0041DF55
    0041DF20  |>  C745 EC 03000000		 MOV DWORD PTR SS:[LOCAL.5],3
    0041DF27  |.  8B45 F0				  MOV EAX,DWORD PTR SS:[LOCAL.4]
    0041DF2A  |.  05 00100000			  ADD EAX,1000
    0041DF2F  |.  8945 F0				  MOV DWORD PTR SS:[LOCAL.4],EAX
    0041DF32  |.  EB 21					JMP SHORT 0041DF55
    0041DF34  |>  8B45 F0				  MOV EAX,DWORD PTR SS:[LOCAL.4]
    0041DF37  |.  05 00060000			  ADD EAX,600
    0041DF3C  |.  8945 F0				  MOV DWORD PTR SS:[LOCAL.4],EAX
    0041DF3F  |.  837D EC 00			   CMP DWORD PTR SS:[LOCAL.5],0
    0041DF43  |.  74 09					JE SHORT 0041DF4E
    0041DF45  |.  C745 F4 000C0000		 MOV DWORD PTR SS:[LOCAL.3],0C00
    0041DF4C  |.  EB 07					JMP SHORT 0041DF55
    0041DF4E  |>  C745 F4 00F4FFFF		 MOV DWORD PTR SS:[LOCAL.3],-0C00
    0041DF55  |>  8B45 EC				  MOV EAX,DWORD PTR SS:[LOCAL.5]
    0041DF58  |.  50					   PUSH EAX								 ; /Arg4 => [LOCAL.5]
    0041DF59  |.  8B45 F0				  MOV EAX,DWORD PTR SS:[LOCAL.4]		   ; |
    0041DF5C  |.  50					   PUSH EAX								 ; |Arg3 => [LOCAL.4]
    0041DF5D  |.  8B45 F4				  MOV EAX,DWORD PTR SS:[LOCAL.3]		   ; |
    0041DF60  |.  837D E4 00			   CMP DWORD PTR SS:[LOCAL.7],0			 ; |
    0041DF64  |.  75 06					JNE SHORT 0041DF6C					   ; |
    0041DF66  |.  0305 54E64900			ADD EAX,DWORD PTR DS:[49E654]			; |
    0041DF6C  |>  50					   PUSH EAX								 ; |Arg2
    0041DF6D  |.  8B45 FC				  MOV EAX,DWORD PTR SS:[LOCAL.1]		   ; |
    0041DF70  |.  50					   PUSH EAX								 ; |Arg1 => [LOCAL.1]
    0041DF71  |.  E8 0A60FEFF			  CALL 00403F80							; \Cave_Story_-_Redesign10.00403F80
    0041DF76  |.  83C4 10				  ADD ESP,10
    0041DF79  |.  6A 00					PUSH 0
    0041DF7B  |.  6A 03					PUSH 3
    0041DF7D  |.  8B45 F0				  MOV EAX,DWORD PTR SS:[LOCAL.4]
    0041DF80  |.  50					   PUSH EAX
    0041DF81  |.  837D E4 00			   CMP DWORD PTR SS:[LOCAL.7],0
    0041DF85  |.  75 0F					JNE SHORT 0041DF96
    0041DF87  |.  8B45 F4				  MOV EAX,DWORD PTR SS:[LOCAL.3]
    0041DF8A  |.  0345 F4				  ADD EAX,DWORD PTR SS:[LOCAL.3]
    0041DF8D  |.  0305 54E64900			ADD EAX,DWORD PTR DS:[49E654]
    0041DF93  |.  8945 F4				  MOV DWORD PTR SS:[LOCAL.3],EAX
    0041DF96  |>  8B45 F4				  MOV EAX,DWORD PTR SS:[LOCAL.3]
    0041DF99  |.  50					   PUSH EAX
    0041DF9A  |.  E8 F1CCFEFF			  CALL 0040AC90
    0041DF9F  |.  83C4 10				  ADD ESP,10
    0041DFA2  |.  6A 01					PUSH 1								   ; /Arg2 = 1
    0041DFA4  |.  837D 08 03			   CMP DWORD PTR SS:[ARG.1],3			   ; |
    0041DFA8  |.  75 04					JNE SHORT 0041DFAE					   ; |
    0041DFAA  |.  6A 31					PUSH 31								  ; |
    0041DFAC  |.  EB 02					JMP SHORT 0041DFB0					   ; |
    0041DFAE  |>  6A 20					PUSH 20								  ; |
    0041DFB0  |>  E8 8B260000			  CALL 00420640							; \Cave_Story_-_Redesign10.00420640
    0041DFB5  |.  83C4 08				  ADD ESP,8
    0041DFB8  |>  89EC					 MOV ESP,EBP
    0041DFBA  |.  5D					   POP EBP
    0041DFBB  \.  C3					   RETN

    This revision is significantly smaller than the original, but does the exact same thing. Thus, clearing up tremendous room for additional weapons. The same sort of thing can be done with the polar star's bullets, although I have not had any need to do so yet.
     
  17. Feb 15, 2012
    cultr1
    ℒℯ
    "Life begins and ends with Nu."
    Join Date: May 6, 2009
    Location: ᵐᵉᵐᵉˢ
    Posts: 2132
    Age: 20
    What I was saying is that to a basic level modder (not you), adding new weapons as it stands would require a tremendous amount of work for someone of their level. It's possible, but if you have to basically clean up Pixel's mess to do it. Hence the "not really doable," instead of "impossible."
     
  18. Feb 15, 2012
    Dubby
    Senior Member
    "Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
    Join Date: Jan 21, 2011
    Location:
    Posts: 249
    *chuckles* Right, silly me.
     
  19. Feb 16, 2012
    DualHack
    Senior Member
    "This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
    Join Date: Jan 12, 2012
    Location: West Philadelphia born and raised on the playgroun
    Posts: 102
    Age: 15
    Yeah I'm looking at the Bullet Data with Cave Editor and there ALOT of unsed wepons so let me rephrase that for you!

     
  20. Feb 16, 2012
    Noxid
    Pretty Skater in a Sailor Suit
    "Life begins and ends with Nu."
    Join Date: Aug 28, 2009
    Location: space or some shit
    Posts: 5181
    Actually there aren't a lot of unused weapons, the data you are looking at is just poorly explained.
    I really don't like it when people spread false information based on a lack of knowledge.