Quick Modding/Hacking Answers Thread

Feb 4, 2016 at 10:53 AM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 757
Age: 22
Feb 4, 2016 at 11:09 AM
Part-Time Perfectionist
CS Beta Content Discord Admin
"Bleep, Bloop, Bleep, Bloop"
Join Date: Dec 26, 2014
Location: the back of their own hand.
Posts: 1599
Age: 120
Feb 4, 2016 at 11:24 AM
Senior Member
"Huzzah!"
Join Date: Dec 2, 2015
Location:
Posts: 208
Age: 21
The right click menu seems to be different than what I have, are you using version 1.10?
If not, try downloading it and try it again.

Also short question of my own: What tiles are used by the motionwall NPC?
Yeah, I had the version 2.0.1

Anyways I downloaded the 1.10

I did everything you said, aaaand olly just flat-out closes out when I save.
Hey, at least I didn't get that error.
And no, the changes were not saved.
 
Feb 4, 2016 at 2:23 PM
Part-Time Perfectionist
CS Beta Content Discord Admin
"Bleep, Bloop, Bleep, Bloop"
Join Date: Dec 26, 2014
Location: the back of their own hand.
Posts: 1599
Age: 120
Can someone please tell me how to edit the health of all the bosses that don't appear in Npc.tbl? (Eg. Ballos' 2nd/3rd form, The Undead Core, etc.)
 
Feb 4, 2016 at 6:22 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3712
Age: 28
Can someone please tell me how to edit the health of all the bosses that don't appear in Npc.tbl? (Eg. Ballos' 2nd/3rd form, The Undead Core, etc.)
The health for "big bosses" is hard coded into the executable, and is actually a part of their enemy AI. If you go to their ASM functions individually, you should be able to find somewhere in their enemy AI subroutine where they set their HP.
 
Feb 4, 2016 at 9:34 PM
Senior Member
"Huzzah!"
Join Date: Dec 2, 2015
Location:
Posts: 208
Age: 21
The health for "big bosses" is hard coded into the executable, and is actually a part of their enemy AI. If you go to their ASM functions individually, you should be able to find somewhere in their enemy AI subroutine where they set their HP.
So these big bosses, are they not their own entities?

Would there be any way to change them through the assembler?
 
Feb 4, 2016 at 9:54 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3712
Age: 28
So these big bosses, are they not their own entities?

Would there be any way to change them through the assembler?
They're special entities. They do bigger tile collision checks and stuff, but for the most part, they're a normal "entity", except that they don't appear in the npc table. A sort of super-entity.

I'd recommend using a disassembler to take a look at them at least, but theoretically, you could entirely overwrite their AI functions with the assembler.
 
Feb 5, 2016 at 10:32 AM
Catz R cool
Modding Community Discord Moderator
"..."
Join Date: Nov 23, 2015
Location: Somewhere within a world far away from reality...
Posts: 381
Age: 20
Can I ask something?

If you offset an NPC, and the asm coding takes up more space than the original, does it overwrite the next NPC as well?
 
Feb 5, 2016 at 2:59 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 6000
what do you mean "offset"
 
Feb 5, 2016 at 3:17 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4489
I believe the sets of code for each NPC are pretty close to each other so if you change the length of an NPC's code it will likely overwrite part of the next NPC's code.
 
Feb 5, 2016 at 4:23 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3712
Age: 28
If you offset an NPC, and the asm coding takes up more space than the original, does it overwrite the next NPC as well?
If you rewrite an NPC's AI function, and the new function is longer (in bytes, not commands) than the old function, then yes, it'll overwrite into whichever function is next (which is likely the next NPC), since you're trying to put a longer function into a smaller space.
 
Feb 5, 2016 at 10:02 PM
Senior Member
"Huzzah!"
Join Date: Dec 2, 2015
Location:
Posts: 208
Age: 21
If you rewrite an NPC's AI function, and the new function is longer (in bytes, not commands) than the old function, then yes, it'll overwrite into whichever function is next (which is likely the next NPC), since you're trying to put a longer function into a smaller space.
What if I put some code for the the said AI function in a completely different(and empty) part of the exe, and CALL to it during the NPC code? Then Retn it and it wouldn't take up any more space in the NPC code area?

Wait, f*ck, don't local variables, like not stay during a CALL function or something like that?
 
Feb 5, 2016 at 10:11 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3712
Age: 28
What if I put some code for the the said AI function in a completely different(and empty) part of the exe, and CALL to it during the NPC code? Then Retn it and it wouldn't take up any more space in the NPC code area?

Wait, f*ck, don't local variables, like not stay during a CALL function or something like that?
Calling another function will "mess up your local variables" if you set it up right, yes. Basically the function you called will/should no longer have access to the local variables from the function you are calling from. But instead of calling, you can just JMP to your code in the unused space elsewhere in the .exe, which would mean that you're never leaving the scope of the function you're in and could use the local variables. You'll want to be sure to JMP back to the end of the function at the end.
 
Feb 5, 2016 at 10:21 PM
Senior Member
"Huzzah!"
Join Date: Dec 2, 2015
Location:
Posts: 208
Age: 21
Calling another function will "mess up your local variables" if you set it up right, yes. Basically the function you called will/should no longer have access to the local variables from the function you are calling from. But instead of calling, you can just JMP to your code in the unused space elsewhere in the .exe, which would mean that you're never leaving the scope of the function you're in and could use the local variables. You'll want to be sure to JMP back to the end of the function at the end.
Wait, so now i'm confused.
If you could just JMP back and forth, what would CALL and RETN be good for?
 
Feb 5, 2016 at 10:26 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 6000
because there are some benefits that come with not having to worry about having conflicts over local variables with every other block of code that could call a function. The rest is left as an exercise to the reader.
 
Feb 5, 2016 at 11:14 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3712
Age: 28
Wait, so now i'm confused.
If you could just JMP back and forth, what would CALL and RETN be good for?
To play nicely with the stack, i.e. so that the functions you are calling DON'T touch/mess up your local variables.

It's also so that you can call a function and it'll know to return to where it's called from, whereas if you JMP back and forth, the code block you are JMPing to can only JMP back to one spot. So the function can easily be called from multiple spots.
 
Feb 5, 2016 at 11:32 PM
Senior Member
"Huzzah!"
Join Date: Dec 2, 2015
Location:
Posts: 208
Age: 21
To play nicely with the stack, i.e. so that the functions you are calling DON'T touch/mess up your local variables.

It's also so that you can call a function and it'll know to return to where it's called from, whereas if you JMP back and forth, the code block you are JMPing to can only JMP back to one spot. So the function can easily be called from multiple spots.
This information would be really useful to me if I could FIGURE OUT MY ISSUE WITH OLLY.

By the way F_Link, I couldn't open up the other debugger because of the 7-zip format. Cause, parental controls.

Anyone got another disassembler I could possibly use?
 
Feb 5, 2016 at 11:49 PM
Senior Member
"Huzzah!"
Join Date: Dec 2, 2015
Location:
Posts: 208
Age: 21
I hate to be the bearer of bad news, but I think that those parental controls *might* have to do with your olly problems. Maybe.
Yeaaah, it always gives me a message when I open up olly saying "you do not have administrator privlages".

But my issue is that it crashes when I try to save my changes to the executable. So why would parental controls mess that up instead of just preventing me from opening up olly at all?
 
Top