Jan 17, 2014 at 12:17 AM
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
npc.collision = [ecx+4]

?
flags that indicate which types of tile collision the entity is experiencing. Refer to the bottom of the compendium for more information. NPCs have a more basic collision code so they can only tell sides slopes and water iirc
Two questions:
1. How would I make an NPC be in front of the player instead of behind (With the player standing still)?
2. What is the best way to put the player in a spesific position without teleporting them there
(IE talk to an NPC then put the player a set distace away from that NPC before talking to them)?
1) you can't
2) <MOV, or <MYB if you just want it to be a little distance
 
Jan 17, 2014 at 1:04 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: 150
Age: 24
...1) you can't...


I may have just found a work around for my problem.

...<HMC<FL+0205<ANP:Animation stuff goes here...



Entity

Type = 150 (Quote)

Flags = 0800

Event# 205



Only problem i'm having now is Quote not appearing. :mad:

Does the map need to reload to make Quote appear?
 
Jan 17, 2014 at 3:20 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
How do the logic instructions (and, or, xor, not) work when placed before conditional jmp's?



mov eax, npc.collision
and eax, 8
jz :Render

Does it do the same thing as je, jge, jle, jl???

I know jz = je, but it's the and before that I can't understand.


(and google/win calculator is not helping)
 
Jan 17, 2014 at 11:14 AM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2307
Age: 27
Bombchu Link said:
How do the logic instructions (and, or, xor, not) work when placed before conditional jmp's?

Code:
mov eax, npc.collision
and eax, 8
jz :Render
Does it do the same thing as je, jge, jle, jl???

I know jz = je, but it's the and before that I can't understand.


(and google/win calculator is not helping)
I'm a bit short on time right now, so I'm just going to say that most of your question should be answered by lessons 36 and 37 of Carrotlord's beginner's guide to assembly. He explains it better than I would even if I had time to explain it.
 
Jan 17, 2014 at 10:10 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
(Sorry if this doesn't belong here.)
As far as I have understood, in .pmd format the file itself contains 3 different sounds. If so, is it possible to isolate these in a separate .wav (or other) file?

Thank you in advance.
 
Jan 18, 2014 at 12:07 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
i forgot how much ass assembly sucked
Code:
CPU Disasm
Address   Hex dump          Command                                  Comments
00424E66  |.  8B15 E05A4A00 MOV EDX,DWORD PTR DS:[4A5AE0]
00424E6C  |.  83C2 04       ADD EDX,4
00424E6F  |.  52            PUSH EDX                                 ; /Arg1
00424E70  |.  E8 8BCAFFFF   CALL 00421900                            ; \Doukutsu.00421900
00424E75  |.  83C4 04       ADD ESP,4
00424E78  |.  8945 DC       MOV DWORD PTR SS:[EBP-24],EAX
00424E7B  |.  0FBE45 DC     MOVSX EAX,BYTE PTR SS:[EBP-24]
00424E7F  |.  3905 0C5B4A00 CMP DWORD PTR DS:[4A5B0C],EAX
00424E85  |.  74 14         JE SHORT 00424E9B
00424E87  |.  0FBE4D DC     MOVSX ECX,BYTE PTR SS:[EBP-24]
00424E8B  |.  890D 0C5B4A00 MOV DWORD PTR DS:[4A5B0C],ECX
00424E91  |.  C705 105B4A00 MOV DWORD PTR DS:[4A5B10],800
00424E9B  |>  8B15 E05A4A00 MOV EDX,DWORD PTR DS:[4A5AE0]
00424EA1  |.  83C2 08       ADD EDX,8
00424EA4  |.  8915 E05A4A00 MOV DWORD PTR DS:[4A5AE0],EDX
i've been looking through the <FAC code, but i'm confused. it doesn't seem to CALL or anything to result in the image rendering. I'm probably just really shitty at assembly but i was wondering if someone could help me out.

Also is there a better way to find the framerects of a particular object bc trying to search for a constant value throughout the entire executable really isn't optimal
 
Jan 18, 2014 at 5:10 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
Are

Code:
npc.movex=[ecx+10]
npc.movey=[ecx+14]
Just variables? (they don't seem to do anything by themselves)
 
Jan 19, 2014 at 8:08 PM
Junior Member
"Fresh from the Bakery"
Join Date: Jan 19, 2014
Location:
Posts: 16
Only problem i'm having now is Quote not appearing. :mad:
Does the map need to reload to make Quote appear?
well remember that what <hmc DOES is make quote invisible. if you want to make him visible again, you need to use <smc.


How do the logic instructions (and, or, xor, not) work when placed before conditional jmp's?


Code:
mov eax, npc.collisionand eax, 8jz :Render
Does it do the same thing as je, jge, jle, jl???
I know jz = je, but it's the and before that I can't understand.
I prefer using jz to je myself, because it gives a much clearer idea of what's happening. basically, the cpu has a bunch of special flags it uses for various things, one of which is the z flag (set if the result of an operation is zero), and one of which is the negative flag (set if the result is negative).

So calling jz after and just sees if the result is zero. you can obviously do the same thing after sub, or cmp (which is sub except instead of storing the result of the subtraction, it only sets the flags). jl would see if the negative flag was said, jle if the negative or zero flags, jg if the negative flag wasn't set, etc. etc.

grok?


Code:
*snip*
00424E78  |.  8945 DC       MOV DWORD PTR SS:[EBP-24],EAX
00424E7B  |.  0FBE45 DC     MOVSX EAX,BYTE PTR SS:[EBP-24]
00424E7F  |.  3905 0C5B4A00 CMP DWORD PTR DS:[4A5B0C],EAX
00424E85  |.  74 14         JE SHORT 00424E9B
00424E87  |.  0FBE4D DC     MOVSX ECX,BYTE PTR SS:[EBP-24]
00424E8B  |.  890D 0C5B4A00 MOV DWORD PTR DS:[4A5B0C],ECX
00424E91  |.  C705 105B4A00 MOV DWORD PTR DS:[4A5B10],800
*snip*
i've been looking through the <FAC code, but i'm confused. it doesn't seem to CALL or anything to result in the image rendering. I'm probably just really shitty at assembly but i was wondering if someone could help me out.
[4a5b0c] is a global var that holds the id of what face should be drawn. the drawing is handled elsewhere. you can figure this out by seeing that eax holds the argument of <fac and seeing that the only thing done with it is that it's put into that variable.

note that [4a5b10] only gets a value if the face changes from one id to another. I'd guess it has something to do with the animation that changes between faces. (possibly an x offset from the norm - I don't recall cuz it's been forever, but I believe the faces slide in)


Are

Code:
npc.movex=[ecx+10]npc.movey=[ecx+14]
Just variables? (they don't seem to do anything by themselves)
yes....
tho I don't get what you mean by "just variables" -- nothing does anything by itself, and any time you put a number into memory you're storing it into a "variable" of some form or another
 
Jan 19, 2014 at 9:34 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
bigbadwoof said:
yes....
tho I don't get what you mean by "just variables" -- nothing does anything by itself, and any time you put a number into memory you're storing it into a "variable" of some form or another
I think he's asking if they are actually utilized anywhere in the code outside of the AI functions, by which the answer is no as far as I can remember
 
Jan 20, 2014 at 7:46 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Feb 2, 2012
Location: Grassland
Posts: 123
Age: 28
So... I'm new to ASM. I'm following Carrotlords guide for ASM, I've had previous coding experience, so I feel like I'm overlooking something really obvious. So basically I'm doing the lesson on NPC hacking, and it all makes sense. However I'm not quite sure how Carrotlord got the offset for NPC 2 (Behemoth). I know I'm supposed to use the assembly compendium from noxid. The offset is 426AF0 as said in the guide. When I look up the offset in the compendium it's 0x00265B0 which is hex. How do I get 426AF0 from 0x00265B0?
 
Jan 20, 2014 at 8:07 AM
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
well for one, you're reading the compendium wrong. It's zero-indexed, so the listing you gave is for NPC0001
second of all, if it doesn't start with a 4 then probably add 0x400000 to it. This is because of inconsistency in whether people wanted to record the physical address or the virtual address.
thirdly I'd recommend using the functionlist.txt for finding function addresses as it's more recent than the compendium anyway
 
Jan 20, 2014 at 8:42 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Feb 2, 2012
Location: Grassland
Posts: 123
Age: 28
1. Oh. I feel dumb. Not that it mattered
2. Oh. That makes sense I guess.
3. Will do.

Thanks
 
Jan 21, 2014 at 12:32 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
Is it possible to add recoil to the lvl3 Bubbler thorn-like things/bullets (when shot downwards), so they behave like the lvl3 Machine Gun?
Thank you in advance.
 
Jan 22, 2014 at 6:47 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
When the bubbles pop.
 
Jan 23, 2014 at 1:58 AM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Aug 30, 2013
Location: ᕕ( ᐛ )ᕗ
Posts: 167
Age: 24
how would i be able to change how much fuel the 0.8 has? like, if its maximun height is 6 blocks (i think) i'd want it to be at 8 blocks then. does that make sense?
 
Jan 23, 2014 at 2:02 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
You cant't change the max fuel of one booster without changing the other.

The RAM address is...

[49E6E8]

there...knew I had it somewhere in my notes.
 
Jan 23, 2014 at 3:27 AM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Aug 30, 2013
Location: ᕕ( ᐛ )ᕗ
Posts: 167
Age: 24
but... how do i change it? there doesnt seem to be any way to change it, atleast from what i got. it says "ADD BYTE PTR DS:[EAX],AL" which i don't understand.
 
Jan 23, 2014 at 11:16 AM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2307
Age: 27
Kayya said:
but... how do i change it? there doesnt seem to be any way to change it, atleast from what i got. it says "ADD BYTE PTR DS:[EAX],AL" which i don't understand.
Try looking at the address in the hex dump.
 
Jan 23, 2014 at 12:07 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
That's the offset that you're looking at. You want the ram address, so you'll have to search > constant > "49E6E8" to find where the variable is set and checked.
You should probably be using ollydbg for this
 
Top