• Hey everyone happy Christmas Eve we're aware of what's happened with the source code so to keep this simple absolutely don't post it on the site or use it to make mods with (it's not particularly preferable toward this end anyway) and tread lightly in general until we see how this settles, thanks to all and have a great holiday season -DT

Quick Modding/Hacking Answers Thread

Feb 4, 2016 at 9:07 AM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 805
Age: 26
Pronouns: 菓子
Sorry, I wasn't trying to go off as aggressive.
No problem, don't worry.

Well here's how it went:
1. Set up olly, everything's fine...
2. Load up Dokutsu, everything's still fine...
3. Changed some offsets, and copy to excutable.
4. Try to exit out and it says: "Would you like to save your changes?"
I click yes, and then that's when the error happens...
Try editing whatever you wanted to edit, right click whatever you changed and select copy to excutable>all modifications, and then select copy all. Right click in the new window and select save file to save. Then see if it worked.
I might be wrong here since I can't really test wether it works or not right now, but I haven't gotten the error with this method.
 
Feb 4, 2016 at 9:32 AM
Senior Member
"Huzzah!"
Join Date: Dec 2, 2015
Location:
Posts: 211
Age: 25
Pronouns: he/him
Try editing whatever you wanted to edit, right click whatever you changed and select copy to excutable>all modifications, and then select copy all. Right click in the new window and select save file to save. Then see if it worked.
I might be wrong here since I can't really test wether it works or not right now, but I haven't gotten the error with this method.

Tried it, and it gave me the exact same error...

are you sure the file is not read-only

It's not, I checked before-hand.

I know it's something to do with my laptop cause I can use olly just fine on the computers at my school.
 
Last edited:
Feb 4, 2016 at 9:39 AM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 805
Age: 26
Pronouns: 菓子
Tried it, and it gave me the exact same error...
When did the error appear? Because if you got this when trying to exit&save again you clearly haven't manually saved.
 
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: 805
Age: 26
Pronouns: 菓子
Feb 4, 2016 at 11:24 AM
Senior Member
"Huzzah!"
Join Date: Dec 2, 2015
Location:
Posts: 211
Age: 25
Pronouns: he/him
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 6:22 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
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: 211
Age: 25
Pronouns: he/him
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: 3713
Age: 32
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: 24
Pronouns: he/him
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: 5998
Pronouns: he/him
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: 4481
Pronouns: she/her
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: 3713
Age: 32
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: 211
Age: 25
Pronouns: he/him
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: 3713
Age: 32
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: 211
Age: 25
Pronouns: he/him
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: 5998
Pronouns: he/him
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: 3713
Age: 32
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.
 
Back
Top