Get your Custom NPCs right here folks!

Mar 6, 2014 at 3:37 AM
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: 153
Age: 24
Pronouns: he/him
Bombchu Link said:
Add at the beginning of the code:


Offset NPC000


Replace 000 with the NPC number of momorin, assemble, and then Kanpachi, then assemble again.
Thanks again for the help but (I hope I don't sound like Quote 2.0 when I say this) when I said "Now I just need to learn how to add them..." I meant from scratch.
I've never ASM hacked before (although I have read some of the beginers guide and understood it) only TSC so I need from square 1(ish).



P.s Sorry if that was to many brackets (I just like brackets ok?(ok?(Good.))).
 
Mar 6, 2014 at 5:22 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: 153
Age: 24
Pronouns: he/him
Mar 6, 2014 at 8:03 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: 27
Pronouns: he/him
Brayconn said:
Unless I missed something in NPC hacking 1-3 there isn't anything teaching you how to install premade NPC's (IE the ones being made here).
just read the readme to the Doukustu assembler and that should tell you everything you need to know.

Doors Coffee thought that you wanted to learn to make ASM, not just apply patches.
 
Mar 6, 2014 at 9:07 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: 153
Age: 24
Pronouns: he/him
Bombchu Link said:
just read the readme to the Doukustu assembler and that should tell you everything you need to know.

Doors Coffee thought that you wanted to learn to make ASM, not just apply patches.
Right now I only need to install patches but eventully I do want to learn ASM.
On a side note, the beginners guide to ASM says to use Olly Debug instead of Doukustu ASM. Which one should I use for installing the NPC's?
 
Mar 6, 2014 at 9:12 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: 27
Pronouns: he/him
Brayconn said:
Right now I only need to install patches but eventully I do want to learn ASM.
On a side note, the beginners guide to ASM says to use Olly Debug instead of Doukustu ASM. Which one should I use for installing the NPC's?

The way I coded it, you NEED to use the Doukutsu assembler.


(I need to get around to making that video guide on how to use it)
 
Mar 6, 2014 at 11:34 PM
Sincerity will always triumph over irony.
Modding Community Discord Admin
"What're YOU lookin' at?"
Join Date: Apr 23, 2013
Location: In a cave above the surface.
Posts: 1079
Age: 26
Pronouns: He/Him
Bombchu Link said:
(I need to get around to making that video guide on how to use it)
Incase you don't get around to it before me, that topic is on the list for the tutorial I'm planning.
 
Mar 7, 2014 at 6:43 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: 153
Age: 24
Pronouns: he/him

UPDATE



I followed the instructions in the D-ASM's readme and Bombchu's instructions and got this error:



"Line Number: 29

Line Contents: setnpinter



Unable to recognize this instruction."


Code:
Code:
offset 223

#define

L_framerect_distance = 0
U_framerect_distance = 0

sprite heigth    = 20
sprite width     = 10

walk timer     = 6
walk frames    = 3
walk speed     = 200
dbl walk speed = 400
gravity_level  = 5ff


#enddefine

push ebp
mov ebp,esp
SUB ESP,10                        

MOV DWORD [EBP-10],0 
MOV DWORD [EBP-C],0 
MOV DWORD [EBP-8],0
MOV DWORD [EBP-4],0

setpointer
mov eax, npc.scriptstate
jmp [eax*4+:StateTable]

;-------------------------------------------------

:StateIdle 
mov npc.framenum, 0
mov eax npc.X
cmp eax PlayerXpos
jg :face_right
mov npc.direction, 0
jmp :Render
:face_right
mov npc.direction, 2
jmp :Render


;-------------------------------------------------

:StateWalk
inc npc.frametimer
cmp npc.frametimer, walk timer
jl :Walk_end

mov npc.frametimer,0
cmp npc.framenum,1
je :1_to_0
jg :2_to_0

cmp npc.scriptstate, 2
je :0_to_1
jne :0_t0_2

:1_to_0
mov npc.framenum, 0
mov npc.scripttimer,2
jmp :Walk_end

:2_to_0
mov npc.framenum, 0
mov npc.scripttimer,1
jmp :Walk_end

:0_to_1
mov npc.framenum, 1
jmp :Walk_end

:0_t0_2
mov npc.framenum, 2
jmp :Walk_end

:Walk_end
add npc.X walk speed
cmp npc.direction, 2
je :render
add npc.X -dbl walk speed
jmp :render

;----------------------------------------------------


:Render
add npc.X gravity_level         ;gravity    
mov eax, npc.framenum                  
imul al, al, sprite width
add eax, L_framerect_distance 
mov npc.DisplayL,eax                    
add eax, sprite width                          
mov npc.displayR,eax
mov eax, U_framerect_distance  
cmp npc.direction, 0
je :face_left
add eax, sprite heigth
:face_left
mov npc.displayU,eax                   
add eax, sprite heigth                           
mov npc.displayD,eax   

:end_of_code
mov esp, ebp
pop ebp
retn
     
:StateTable
print :StateIdle         ;<ANP0000
print :StateWalk         ;<ANP0001
print :StateWalk         ;yes, this second one is here on purpose



I also tried to use "offset NPC223" but D-ASM didn't recognize that offset number.
 
Mar 8, 2014 at 5:01 AM
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: 153
Age: 24
Pronouns: he/him
Bombchu Link said:
Oops...

change "setnpinter" to "setpointer"
Ctrl+F
setnpinter
no results...
:sun:
 
Mar 8, 2014 at 8:49 AM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1104
Age: 27
Pronouns: none
Do you have the setpointer defined? If you don't, it will keep talking about setnpinter
 
Mar 8, 2014 at 8:56 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: 153
Age: 24
Pronouns: he/him
Do you have the setpointer defined? If you don't, it will keep talking about setnpinter
Set pointer isn't in the #define #enddefine.
Code:
offset 223

#define

L_framerect_distance = 0
U_framerect_distance = 0

sprite heigth    = 20
sprite width     = 10

walk timer     = 6
walk frames    = 3
walk speed     = 200
dbl walk speed = 400
gravity_level  = 5ff


#enddefine

push ebp
mov ebp,esp
SUB ESP,10                        

MOV DWORD [EBP-10],0 
MOV DWORD [EBP-C],0 
MOV DWORD [EBP-8],0
MOV DWORD [EBP-4],0

setpointer
mov eax, npc.scriptstate
jmp [eax*4+:StateTable]

;-------------------------------------------------



You did download the defines in the OP, right?
(Noob alert >>>) I need to download defines in the what? (<<< Noob alert)
 
Mar 8, 2014 at 9:17 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1104
Age: 27
Pronouns: none
Original Post (I think?)

First post of the topic.
 
Mar 8, 2014 at 10:31 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: 27
Pronouns: he/him
Randolf said:
Original Post (I think?)

First post of the topic.
Opening post

Original post

Original poster

Opening presentation


Whatever the first post is called.
 
Mar 8, 2014 at 11:29 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: 153
Age: 24
Pronouns: he/him
I added the correct offset now! (offset 4524E0)
Same error though...
 
Mar 9, 2014 at 12:34 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: 27
Pronouns: he/him
Brayconn said:
I added the correct offset now! (offset 4524E0)
Same error though...

Did you change setnpiter or whatever it was to setpointer like I said?
 
Mar 9, 2014 at 1:14 AM
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: 153
Age: 24
Pronouns: he/him
Bombchu Link said:
Did you change setnpiter or whatever it was to setpointer like I said?
Setnpinter dosn't exist.
 
Mar 9, 2014 at 1:19 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: 27
Pronouns: he/him
Setnpinter dosn't exist.


The code you posted assembles perfectly on my end.


Code:
offset NPC223

#define

L_framerect_distance = 0
U_framerect_distance = 0

sprite heigth    = 20
sprite width     = 10

walk timer     = 6
walk frames    = 3
walk speed     = 200
dbl walk speed = 400
gravity_level  = 5ff


#enddefine

push ebp
mov ebp,esp
SUB ESP,10                        

MOV DWORD [EBP-10],0 
MOV DWORD [EBP-C],0 
MOV DWORD [EBP-8],0
MOV DWORD [EBP-4],0

setpointer
mov eax, npc.scriptstate
jmp [eax*4+:StateTable]

;-------------------------------------------------

:StateIdle 
mov npc.framenum, 0
mov eax npc.X
cmp eax PlayerXpos
jg :face_right
mov npc.direction, 0
jmp :Render
:face_right
mov npc.direction, 2
jmp :Render


;-------------------------------------------------

:StateWalk
inc npc.frametimer
cmp npc.frametimer, walk timer
jl :Walk_end

mov npc.frametimer,0
cmp npc.framenum,1
je :1_to_0
jg :2_to_0

cmp npc.scriptstate, 2
je :0_to_1
jne :0_t0_2

:1_to_0
mov npc.framenum, 0
mov npc.scripttimer,2
jmp :Walk_end

:2_to_0
mov npc.framenum, 0
mov npc.scripttimer,1
jmp :Walk_end

:0_to_1
mov npc.framenum, 1
jmp :Walk_end

:0_t0_2
mov npc.framenum, 2
jmp :Walk_end

:Walk_end
add npc.X walk speed
cmp npc.direction, 2
je :render
add npc.X -dbl walk speed
jmp :render

;----------------------------------------------------


:Render
add npc.X gravity_level         ;gravity    
mov eax, npc.framenum                  
imul al, al, sprite width
add eax, L_framerect_distance 
mov npc.DisplayL,eax                    
add eax, sprite width                          
mov npc.displayR,eax
mov eax, U_framerect_distance  
cmp npc.direction, 0
je :face_left
add eax, sprite heigth
:face_left
mov npc.displayU,eax                   
add eax, sprite heigth                           
mov npc.displayD,eax   

:end_of_code
mov esp, ebp
pop ebp
retn
     
:StateTable
print :StateIdle         ;<ANP0000
print :StateWalk         ;<ANP0001
print :StateWalk         ;yes, this second one is here on purpose



Are you extra sure that you have the new defines replacing the old ones?
 
Mar 9, 2014 at 1:28 AM
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: 153
Age: 24
Pronouns: he/him
I feel really dumb for saying this but...

I was still using the default defines.txt file...


Please don't hurt me.
 
Back
Top