May 30, 2014 at 2:31 AM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 26
Whelp
Noxid said:
0048C838 58 58 58 58 00 00 00 00 57 41 4E 50 41 4B 55 00 XXXX....WANPAKU.
0048C848 41 4E 5A 45 4E 00 00 00 47 41 4D 45 4F 56 45 52 ANZEN...GAMEOVER
0048C858 00 00 00 00 47 52 41 56 49 54 59 00 57 45 45 44 ....GRAVITY.WEED
0048C868 00 00 00 00 4D 44 4F 57 4E 32 00 00 46 49 52 45 ....MDOWN2..FIRE
0048C878 45 59 45 00 56 49 56 49 00 00 00 00 4D 55 52 41 EYE.VIVI....MURA
0048C888 00 00 00 00 46 41 4E 46 41 4C 45 31 00 00 00 00 ....FANFALE1....
0048C898 47 49 4E 53 55 4B 45 00 43 45 4D 45 54 45 52 59 GINSUKE.CEMETERY
0048C8A8 00 00 00 00 50 4C 41 4E 54 00 00 00 4B 4F 44 4F ....PLANT...KODO
0048C8B8 55 00 00 00 46 41 4E 46 41 4C 45 33 00 00 00 00 U...FANFALE3....
0048C8C8 46 41 4E 46 41 4C 45 32 00 00 00 00 44 52 00 00 FANFALE2....DR..
0048C8D8 45 53 43 41 50 45 00 00 4A 45 4E 4B 41 00 00 00 ESCAPE..JENKA...
0048C8E8 4D 41 5A 45 00 00 00 00 41 43 43 45 53 53 00 00 MAZE....ACCESS..
0048C8F8 49 52 4F 4E 48 00 00 00 47 52 41 4E 44 00 00 00 IRONH...GRAND...
0048C908 43 75 72 6C 79 00 00 00 4F 53 49 44 45 00 00 00 Curly...OSIDE...
0048C918 52 45 51 55 49 45 4D 00 57 41 4E 50 41 4B 32 00 REQUIEM.WANPAK2.
0048C928 51 55 49 45 54 00 00 00 4C 41 53 54 43 41 56 45 QUIET...LASTCAVE
0048C938 00 00 00 00 42 41 4C 43 4F 4E 59 00 4C 41 53 54 ....BALCONY.LAST
0048C948 42 54 4C 00 4C 41 53 54 42 54 33 00 45 4E 44 49 BTL.LASTBT3.ENDI
0048C958 4E 47 00 00 5A 4F 4E 42 49 45 00 00 42 44 4F 57 NG..ZONBIE..BDOW
0048C968 4E 00 00 00 48 45 4C 4C 00 00 00 00 4A 45 4E 4B N...HELL....JENK
0048C978 41 32 00 00 4D 41 52 49 4E 45 00 00 42 41 4C 4C A2..MARINE..BALL
0048C988 4F 53 00 00 54 4F 52 4F 4B 4F 00 00 57 48 49 54 OS..TOROKO..WHIT
0048C998 45 00 00 00 E...
That's where the names of the resources are stored.
Code:
00420F14  |. 8B0495 E881490>MOV EAX,DWORD PTR DS:[EDX*4+4981E8]
00420F1B  |. 50             PUSH EAX                                 ; /Arg1
00420F1C  |. E8 CFB7FFFF    CALL CS_ORG_e.0041C6F0                   ; \CS_ORG_e.0041C6F0
This is the line that tells which song to pick. EDX is the number from the TSC for the song ID. 4981E8 - 49828(C?) is a list of addresses that points to the various names. 41C6F0 finds and loads the resource ORG of name EAX.There's enough room past 4981E8 for a 42 and 43 (You'd have to find some empty space somewhere else to put the name of the resource). If you wanted, say, a hundred new songs, you'd have to find a larger empty space than there is room for at 4981E8, because at 498238 there's stuff, and I don't know what it does.After all that, you use your resource hacker to add the ORG and give it the appropriate name. The machine will find it for you, if you did things the normal way then it will be song 42. (probably)Um, does that make sense?EDIT: On a side note, I don't know what effects actually ADDING the resources (ORGS) themselves will have, or if it's anything more than just inflating the .exe Also, if you wanted to play with this stuff, the U for <CMU is at 00424313, the second call is the one you're interested in.EDIT2: some other interesting tidbits I discovered: [4A4B00] is your position in the current song (measured in beats I would imagine?) and [4A57F8] seems to be the position in the last song played (stored for <RMU, like how [004a57fc] is last song ID)



I have my own question.Either Noxid did a mediocre job of explaining how to add more songs to the game without replacing any, he made some mistakes with it, I'm doing a poor job of understanding it, or a combination thereof. Whatever the case, please clarify, whoever can. So here's what I found when I looked there in the EXE:
Code:
CPU Disasm
Address Hex dump Command Comments
004981CF 0000 ADD BYTE PTR DS:[EAX],AL
004981D1 0000 ADD BYTE PTR DS:[EAX],AL
004981D3 0000 ADD BYTE PTR DS:[EAX],AL
004981D5 0000 ADD BYTE PTR DS:[EAX],AL
004981D7 0000 ADD BYTE PTR DS:[EAX],AL
004981D9 0000 ADD BYTE PTR DS:[EAX],AL
004981DB 0000 ADD BYTE PTR DS:[EAX],AL
004981DD 0000 ADD BYTE PTR DS:[EAX],AL
004981DF 0000 ADD BYTE PTR DS:[EAX],AL
004981E1 0000 ADD BYTE PTR DS:[EAX],AL
004981E3 0000 ADD BYTE PTR DS:[EAX],AL
004981E5 0000 ADD BYTE PTR DS:[EAX],AL
004981E7 0038 ADD BYTE PTR DS:[EAX],BH
004981E9 C8 4800 40 ENTER 48,40 //Begin Noxid's list of addresses that supposedly point to the names of the resources
004981ED C8 4800 48 ENTER 48,48
004981F1 C8 4800 50 ENTER 48,50
004981F5 C8 4800 5C ENTER 48,5C
004981F9 C8 4800 64 ENTER 48,64
004981FD C8 4800 6C ENTER 48,6C
00498201 C8 4800 74 ENTER 48,74
00498205 C8 4800 7C ENTER 48,7C
00498209 C8 4800 84 ENTER 48,84
0049820D C8 4800 8C ENTER 48,8C
00498211 C8 4800 98 ENTER 48,98
00498215 C8 4800 A0 ENTER 48,0A0
00498219 C8 4800 AC ENTER 48,0AC
0049821D C8 4800 B4 ENTER 48,0B4
00498221 C8 4800 BC ENTER 48,0BC
00498225 C8 4800 C8 ENTER 48,0C8
00498229 C8 4800 D4 ENTER 48,0D4
0049822D C8 4800 D8 ENTER 48,0D8
00498231 C8 4800 E0 ENTER 48,0E0
00498235 C8 4800 E8 ENTER 48,0E8
00498239 C8 4800 F0 ENTER 48,0F0
0049823D C8 4800 F8 ENTER 48,0F8
00498241 C8 4800 00 ENTER 48,0
00498245 C9 LEAVE
00498246 48 DEC EAX
00498247 0008 ADD BYTE PTR DS:[EAX],CL
00498249 C9 LEAVE
0049824A 48 DEC EAX
0049824B 0010 ADD BYTE PTR DS:[EAX],DL
0049824D C9 LEAVE
0049824E 48 DEC EAX
0049824F 0018 ADD BYTE PTR DS:[EAX],BL
00498251 C9 LEAVE
00498252 48 DEC EAX
00498253 0020 ADD BYTE PTR DS:[EAX],AH
00498255 C9 LEAVE
00498256 48 DEC EAX
00498257 0028 ADD BYTE PTR DS:[EAX],CH
00498259 C9 LEAVE
0049825A 48 DEC EAX
0049825B 0030 ADD BYTE PTR DS:[EAX],DH
0049825D C9 LEAVE
0049825E 48 DEC EAX
0049825F 003CC9 ADD BYTE PTR DS:[ECX*8+ECX],BH
00498262 48 DEC EAX
00498263 0044C9 48 ADD BYTE PTR DS:[ECX*8+ECX+48],AL
00498267 004CC9 48 ADD BYTE PTR DS:[ECX*8+ECX+48],CL
0049826B 0054C9 48 ADD BYTE PTR DS:[ECX*8+ECX+48],DL
0049826F 005CC9 48 ADD BYTE PTR DS:[ECX*8+ECX+48],BL
00498273 0064C9 48 ADD BYTE PTR DS:[ECX*8+ECX+48],AH
00498277 006CC9 48 ADD BYTE PTR DS:[ECX*8+ECX+48],CH
0049827B 0074C9 48 ADD BYTE PTR DS:[ECX*8+ECX+48],DH
0049827F 007CC9 48 ADD BYTE PTR DS:[ECX*8+ECX+48],BH
00498283 0084C9 48008CC9 ADD BYTE PTR DS:[ECX*8+ECX+C98C0048],AL
0049828A 48 DEC EAX //End Noxid's list of addresses that supposedly point to the names of the resources
I'm not familiar with the ENTER command, what does it do? At first I thought the "ENTER x,y"'s pointed to the different songs, but how can that be if there are 23 (and the last one probably doesn't count) lines of that instead of 41 (I thought it should be 41, since that's the number of songs in the game)? And after that, down to where Noxid says it ends, it has some other stuff that appears to be different. How does that point to the resource names? Also, what does the LEAVE command do? But beyond that point we see the ENTERs. Are those supposed to be free space? But Noxid just said it was from there to 49828A that points to the names. I'm seeing some free space before 4981E8, but not after. Might he have meant to say before? So I add it in Resource Hacker as a new resource? Oh, so properly using the method you tried to describe above by making those edits in Ollydbg are supposed to make a new resource appear under the list of ORGs in Resource Hacker, and you're supposed to replace it there with your desired song as you would any other?I'm very confused.



That's the key word. You're looking at them as assembly operations, which they aren't. It's data, numbers that point to other places in the memory. The first one being 48C838
Code:
CPU Dump
Address Hex dump ASCII
004981E8 38 C8 48 00|40 C8 48 00|48 C8 48 00|50 C8 48 00| 8ÈH.@ÈH.HÈH.PÈH.
004981F8 5C C8 48 00|64 C8 48 00|6C C8 48 00|74 C8 48 00| \ÈH.dÈH.lÈH.tÈH.
00498208 7C C8 48 00|84 C8 48 00|8C C8 48 00|98 C8 48 00| |ÈH.ÈH.ÈH.ÈH.
00498218 A0 C8 48 00|AC C8 48 00|B4 C8 48 00|BC C8 48 00| ÈH.¬ÈH.´ÈH.¼ÈH.
00498228 C8 C8 48 00|D4 C8 48 00|D8 C8 48 00|E0 C8 48 00| ÈÈH.ÔÈH.ØÈH.àÈH.
00498238 E8 C8 48 00|F0 C8 48 00|F8 C8 48 00|00 C9 48 00| èÈH.ðÈH.øÈH..ÉH.
00498248 08 C9 48 00|10 C9 48 00|18 C9 48 00|20 C9 48 00| ÉH.ÉH.ÉH. ÉH.
00498258 28 C9 48 00|30 C9 48 00|3C C9 48 00|44 C9 48 00| (ÉH.0ÉH.<ÉH.DÉH.
00498268 4C C9 48 00|54 C9 48 00|5C C9 48 00|64 C9 48 00| LÉH.TÉH.\ÉH.dÉH.
00498278 6C C9 48 00|74 C9 48 00|7C C9 48 00|84 C9 48 00| lÉH.tÉH.|ÉH.ÉH.
00498288 8C C9 48 00|94 C9 48 00|00 00 00 00|00 00 00 00| ÉH.ÉH.........
Each of these points to a c-formatted string. For example, the first address
CPU Dump
Address Hex dump ASCII
0048C838 58 58 58 58|00 XXXX.
song 0, or XXXX (plays no sound). So you'd need to add a pointer, and then add a string somewhere, then add a song with resource hacker with a resource name the same as the string you point to, and you can use another song.

Aha, I see now! So I've gotten it to work now... But at a great cost. The text in text boxes becomes invisible after I do this.I found some free space in the EXE, put the resource name in the hex dump, then added a pointer to the address in the list of pointers. The extra song works, and the only problem I'm experiencing is no text showing up in text boxes. I know that I'm putting the resource name where there's free space, because in the commands it shows up as "DB 00", and shows up as zeroes in the hex dump. I've also redone this numerous times in the past two hours, trying adding it in different places in the EXE, and this happens each time. Do you have any clue what I might be doing wrong?





So If I got any of this... I got nowhere.





Can someone explain this please?
 
Last edited by a moderator:
May 31, 2014 at 3:25 AM
Neophyte Member
"Fresh from the Bakery"
Join Date: May 20, 2013
Location:
Posts: 3

Not sure if this is in the right section - if it's not then tell me. Anyway, I have a problem in cave editor. In this room, there is a door and an npc that stands still.

You can use both of them. But here's the problem; When I talk to the npc, it activates the door script instead of it's own. So basically, the npc and the door do the same thing, when they are not supposed to. A few details, the door script is written before the npc's script. I have double checked the event numbers and they are correct, and there is a <END at the end of both strings... I don't know what's happening, and honestly it's very annoying. I need help.
 
May 31, 2014 at 3:29 AM
Neophyte Member
"Fresh from the Bakery"
Join Date: May 20, 2013
Location:
Posts: 3
Entity ID's. What do they do? Do they even do anything?
 
May 31, 2014 at 3:34 AM
Giving it my all and shooting for the moon.
Modding Community Discord Admin
"What're YOU lookin' at?"
Join Date: Apr 23, 2013
Location: In a cave above the surface.
Posts: 1069
Age: 25
Does the script go in numerical order? You can't have a higher number come before a lower number, so if the Door script is first, it's event should be less than the NPC.

Without more information on what the scripts contain, it's not easy to pinpoint possible problems.


Also it's recommend you use the "Quick Modding/Hacking Answers Thread" for asking small problem-type questions like this.
 
May 31, 2014 at 3:43 AM
Neophyte Member
"Fresh from the Bakery"
Join Date: May 20, 2013
Location:
Posts: 3
Thank you! I didn't know. I didn't have them in the correct order. And now I do and it works! Well now I know.
 
Jun 3, 2014 at 12:35 PM
Junior Member
"It's dangerous to go alone!"
Join Date: May 11, 2014
Location: Australia
Posts: 30
Age: 22
ok ok so i have released 2 hacks/mods they were joke mods but im working on a real mod but since im a newb i need help learning to program bosses .... i suck but particualy im try to program an omega fight but help with the other bosses coding will be much appriciated to anyone with the know how i truly look up to you such as n0xid or bomb chu ink .
 
Jun 3, 2014 at 12:51 PM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
Coding bosses is definitely a difficult feat, so why don't you make a serious mod first? A great mod can stand out without custom bosses, and you're going to be hard pressed to get anyone here to make bosses for you. Take this advice from Uncle COOL, and surely you fill find the path to the perfect mod.
 
Jun 3, 2014 at 1:10 PM
Junior Member
"It's dangerous to go alone!"
Join Date: May 11, 2014
Location: Australia
Posts: 30
Age: 22
Tpcool said:
Coding bosses is definitely a difficult feat, so why don't you make a serious mod first? A great mod can stand out without custom bosses, and you're going to be hard pressed to get anyone here to make bosses for you. Take this advice from Uncle COOL, and surely you fill find the path to the perfect mod.
I mean programing a ordanairy boss just in general not making a custom one

But thank you uncle COOL
 
Jun 3, 2014 at 1:33 PM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
OK so uh you're just trying to add vanilla bosses into your mod? Well, have you taken a look at the vanilla code and maps? Nothing will help you become better at modding than that.
 
Jun 3, 2014 at 3:16 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 26
uhh, looked up to?

I'm just a normal guy that codes stuff....



If I understand correctly, you just want the bosses in your game?

Or do you want them to do different commands via scriptstates?
 
Jun 3, 2014 at 8:49 PM
scrungy
Bobomb says: "I need a hug!"
Join Date: Oct 7, 2011
Location: PrtWeed
Posts: 777
Age: 24
I still have a question from a bit ago.
How do I remove the bar with Exit, Volume, etc. on it?

Deleting the resource just makes a gray bar appear where it'd be ingame.
 
Jun 3, 2014 at 10:24 PM
Junior Member
"It's dangerous to go alone!"
Join Date: May 11, 2014
Location: Australia
Posts: 30
Age: 22
Bombchu Link said:
uhh, looked up to?

I'm just a normal guy that codes stuff....



If I understand correctly, you just want the bosses in your game?

Or do you want them to do different commands via scriptstates?
Just normal bosses
 
Jun 11, 2014 at 9:48 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 26

so I made a TSC command and I'm having issues with it.




Code:
offset  429F43

;INvincibility Timer reset


#define

next_TSC_command = 424F33

invtimer = 49E6C8

#enddefine


MOV ECX,DWORD PTR DS:[4A5AD8]
ADD ECX,DWORD PTR DS:[4A5AE0]
CMP BYTE PTR DS:[ECX+1],49            ;I
JNE next_TSC_command 
CMP BYTE PTR DS:[ECX+2],4E            ;N
JNE next_TSC_command
CMP BYTE PTR DS:[ECX+3],54            ;T
JNE next_TSC_command

		                 
mov invtimer, 1000


:end
ADD [4A5AE0],4   ;Fix the script position <INT = 4
JMP 004252A7     ;Jump back to the beginning of the TSC parser
It's incredibly simple, but running the event doesn't make quote flash/invincible for some reason.



and if it's helps I'm running the below code directly/a few frames beforehand.
Code:
Call TSC Event:
push eventnum
call 421990 ; note that with an unhacked parser, this will destroy invincibility
add esp,4
<INT doesn't work when either or not the TSC event function is ever CALLed.




 
Jun 11, 2014 at 9:59 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111
<END forces invulnerability to stop, unless you removed that function.
 
Jun 12, 2014 at 9:38 AM
Been here way too long...
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Oct 7, 2013
Location: India
Posts: 500
How exactly can I change the specifics of Booster 2.0, such as speed, amount of fuel, how much you travel in one boost or what increments you boost in, etc?
Thanks in advance!
 
Jun 12, 2014 at 2:07 PM
hi hi
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1099
Age: 26
It's somewhere in the agility code... Search Noxid's Assembly Compendium to find the offset for that. If you want exact offsets for everything, let me know.

E: I mean, if you can't find them on your own.
 
Jun 12, 2014 at 10:53 PM
Been here way too long...
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Oct 7, 2013
Location: India
Posts: 500
I'm really sorry, but I can't seem to understand anything there. But if I do edit something booster-related there, will the normal walking/jumping behaviour be affected?
 
Jun 12, 2014 at 11:33 PM
Senior Member
Modding Community Discord Moderator
CSE Discord Moderator
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Jan 14, 2014
Location: Antarctica (The Penguins say Hi)
Posts: 150
Age: 24
I already posted this on BLink's NPC request page but I thought I may aswell get some help from everyone here.

The last NPC that BLink made for me will only walk away from the player no matter what TSC command is used.
(If you are on the same X axis as the NPC then it will only walk left)

I wont post the NPC's code here but I will (B)link you there.
 
Top