Dec 31, 2012 at 10:05 PM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
I prefer using JE (JZ) with TEST EAX, EAX

Make sure you do:

PUSH EAX
PUSH ECX
PUSH EDX

before your code, and then

POP EDX
POP ECX
POP EAX

after your code.

Believe it or not, the call stack is designed so that this will still work even if you call functions in between the PUSH and POP blocks.
 
Dec 31, 2012 at 10:26 PM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Nov 14, 2012
Location:
Posts: 167
i want to know how to make my NPC actually talk to me when i click down but every time I do it it talks at the beggining! help me! by the way I have never posted a topic before
 
Dec 31, 2012 at 10:32 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
give them an event number and set flag 0x2000 on them
write the event in the map's TSC file
please use the sticky for questions in future, do not make threads for each question you have.
 
Jan 1, 2013 at 2:31 PM
Veteran Member
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Aug 21, 2012
Location: At a computer
Posts: 333
fadoink said:
i want to know how to make my NPC actually talk to me when i click down but every time I do it it talks at the beggining! help me! by the way I have never posted a topic before
Set the entities that talk's flags to 2000. (Player Character presses down to activate event).
Also how do i convert original cave story (1x) stages to plus (2x)?
 
Jan 1, 2013 at 2:43 PM
The Eternal Darkness
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Feb 12, 2012
Location: The Enemy of the Truth
Posts: 314
Age: 108
liammillay said:
Also how do i convert original cave story (1x) stages to plus (2x)?
As far as I'm aware, you'd require the permission of Noxid or GIRakaCHEEZER. And I think there's another condition or two, but I can't remember it.

...

Does anyone here know the exact maximum amounts of items and facepics as well as the maximum size of backgrounds?
 
Jan 1, 2013 at 2:52 PM
Veteran Member
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Aug 21, 2012
Location: At a computer
Posts: 333
Shane said:
As far as I'm aware, you'd require the permission of Noxid or GIRakaCHEEZER. And I think there's another condition or two, but I can't remember it.

...

Does anyone here know the exact maximum amounts of items and facepics as well as the maximum size of backgrounds?
Actually, i meant porting my mod to cave story plus (Not the 2x res hack).
Also, i dont know about the maximums of those sorry.
 
Jan 1, 2013 at 3:51 PM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2314
Age: 27
Shane said:
Does anyone here know the exact maximum amounts of items and facepics as well as the maximum size of backgrounds?
I'm pretty sure there's no limit to the amount of face pictures. When you add more to the image, the game automatically registers the extra face picture if you make your parameter for the face picture go beyond regular Cave Story's highest. I am not aware of any limits though.

I once tried adding more items and that didn't work, so I would say you can't add any new items without replacing existing ones, but I remember you saying in a PM once that you actually got it to work, so I wouldn't know of any limits.

As for backgrounds, the largest I've seen are the size of the game's window. (320x240 in the original, and 640x480 in CS+) But there might be some background settings in the map properties you can mess with to get larger backgrounds working, I'm not sure though.
liammillay said:
Actually, i meant porting my mod to cave story plus (Not the 2x res hack).
If your mod doesn't use any assembly hacks, and does not use any image editing, then it's fairly straightforward. If it does use assembly hacking, then it is impossible to port it in it's full glory, and if it uses image editing, then it will be a bit tricky, but possible, but it will make it illegal to distribute the full port to anyone who does not own an authentic copy of CS+, as distributing NICALiS' graphics is illegal.
 
Jan 1, 2013 at 4:57 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
there's nothing difficult about changing the images :/
you just have to replace the file like anything else
 
Jan 1, 2013 at 7:42 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: Jan 1, 2013
Location:
Posts: 3
Okay. I'm new to modding and haven't understood it all, soo.. I'm trying to figure it out by looking at the game's data.

1) I don't get how to specify the "warp location" in TSC scripts.

2) Is there a way to call a message box in mid-boss fight (either at a certain percent of health or at random)?

Thanks for the answer.
 
Jan 1, 2013 at 7:52 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
NormalNavi said:
Okay. I'm new to modding and haven't understood it all, soo.. I'm trying to figure it out by looking at the game's data.

1) I don't get how to specify the "warp location" in TSC scripts.

2) Is there a way to call a message box in mid-boss fight (either at a certain percent of health or at random)?

Thanks for the answer.
You should watch these: https://www.youtube.com/watch?v=hl3guQcqEtQ and https://www.youtube.com/watch?v=IOEYO3MvJok

As for the individual questions...

1) Look at the TSC command <TRA

2) Not unless you want to do some assembly hacking
 
Jan 1, 2013 at 7:57 PM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2314
Age: 27
EDIT: Gah! GIR ninja'd me. Oh well, I'll keep this post up just in case NormalNavi finds my explanation for number 1 more helpful.
NormalNavi said:
Okay. I'm new to modding and haven't understood it all, soo.. I'm trying to figure it out by looking at the game's data.

1) I don't get how to specify the "warp location" in TSC scripts.

2) Is there a way to call a message box in mid-boss fight (either at a certain percent of health or at random)?

Thanks for the answer.
1) This is the command for transitioning the player to another room: <TRAWWWW:ZZZZ:XXXX:YYYY

In the place of "WWWW", put the number corresponding to the map that you would like to warp to.
In the place of "ZZZZ", put the number corresponding to the event you want to run in the script of the room you will be warped to.
In the place of "XXXX", put the x coordinate of where on the map you want the player to be warped on the 16x16 tile grid.
In the place of "YYYY", put the y coordinate of where on the map you want the player to be warped on the 16x16 tile grid.

For the last two, the lowest number you can have is zero, and y increases at you go down rather than as you go up, so (o, o) would be in the top left corner of your map.


2) That requires assembly, which I do not recommend delving into if you are new to modding.
 
Jan 1, 2013 at 8:18 PM
The Eternal Darkness
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Feb 12, 2012
Location: The Enemy of the Truth
Posts: 314
Age: 108

... Double ninja'd here. That's new. Anyway...


HaydenStudios said:
I'm pretty sure there's no limit to the amount of face pictures. When you add more to the image, the game automatically registers the extra face picture if you make your parameter for the face picture go beyond regular Cave Story's highest. I am not aware of any limits though.
Well, it does have one, apparently, because using <FAC0135 ends up displaying no face pic at all, even if it's in Face.pbm or Face.bmp.
Can this be fixed using assembly or am I stuck with ±130 facepics?


HaydenStudios said:
I once tried adding more items and that didn't work, so I would say you can't add any new items without replacing existing ones, but I remember you saying in a PM once that you actually got it to work, so I wouldn't know of any limits.
It is possible to add more items without assembly, although I don't know how many - there's already 56 items in Shane's Cave Story 1, and I have to ask if there's a limit, just in case I'm going to add more. Better safe to ask first before being sorry about adding more items without asking.

If I remember correctly, Cave Story crashes if one has more than 24 items, right?


Which brings me to another question, although slightly unrelated and probably a very stupid question.

How many ticks are there in a second? 40? 80?
 
Jan 1, 2013 at 8:47 PM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2314
Age: 27
Shane said:
Well, it does have one, apparently, because using <FAC0135 ends up displaying no face pic at all, even if it's in Face.pbm or Face.bmp.
Can this be fixed using assembly or am I stuck with ±130 facepics?
Holy freaking crap. You need an entire 135 face pictures for your mod? Anyway, you could probably fix this with assembly, but I don't know how yet.
Shane said:
If I remember correctly, Cave Story crashes if one has more than 24 items, right?
No actually! Nothing out of the ordinary happens until you have more than thirty items in your inventory. If you have thirty in, nothing odd happens, and all that happens if you have more than that is that the 31st item appears outside of the boundaries of your inventory menu.

I used this code to test this concept:
Code:
<KEY<MSG1<NOD<IT+0001
2<NOD<IT+0002
3<NOD<IT+0003
4<NOD<IT+0004
5<NOD<IT+0005
6<NOD<IT+0006
7<NOD<IT+0007
8<NOD<IT+0008
9<NOD<IT+0009
10<NOD<IT+0010
11<NOD<IT+0011
12<NOD<IT+0012
13<NOD<IT+0013
14<NOD<IT+0014
15<NOD<IT+0015
16<NOD<IT+0016
17<NOD<IT+0017
18<NOD<IT+0018
19<NOD<IT+0019
20<NOD<IT+0020
21<NOD<IT+0021
22<NOD<IT+0022
23<NOD<IT+0023
24<NOD<IT+0024
25<NOD<IT+0025
26<NOD<IT+0026
27<NOD<IT+0027
28<NOD<IT+0028
29<NOD<IT+0029
30<NOD<IT+0030
31<NOD<IT+0031<CLR<WAI0050
The game does not crash!<NOD<END
I haven't tested past 31, but it doesn't seem like it would necessarily crash.

Shane said:
How many ticks are there in a second? 40? 80?
There are 50 ticks per second in the original Cave Story. Just FYI, it's 60 if you're modding Cave Story+.
 
Jan 2, 2013 at 2:46 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Does anyone know what is stored in 0049E640, 0049E644 and 0049E648?
 
Jan 2, 2013 at 3:02 AM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2314
Age: 27
S. P. Gardebiter said:
Does anyone know what is stored in 0049E640, 0049E644 and 0049E648?
The Assembly Compendium said:
Random: Player data, and other stuff. [MISCRAN]

0049E640 DirectionFaced
0049E644 IsFacingUp [0x01 Facing Up]
0049E648 IsFacingDown [0x01 Facing Down]
 
Jan 2, 2013 at 4:18 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Thank you.
That doesn't help me much I fear though.
I wanted to figure out, where the code of the levitation ability of the machine gun is located at. I can't find it in the bullet and the weapon functions.
 
Jan 2, 2013 at 7:46 AM
The Eternal Darkness
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Feb 12, 2012
Location: The Enemy of the Truth
Posts: 314
Age: 108
HaydenStudios said:
Holy freaking crap. You need an entire 135 face pictures for your mod? Anyway, you could probably fix this with assembly, but I don't know how yet.
That's Shane's Cave Story 1, and that's not the most - Shadow of the Stars has 210. D:

Anyway, I'll probably try another way by removing unused facepics for now.


HaydenStudios said:
No actually! Nothing out of the ordinary happens until you have more than thirty items in your inventory. If you have thirty in, nothing odd happens, and all that happens if you have more than that is that the 31st item appears outside of the boundaries of your inventory menu.

I used this code to test this concept:
Code:
<KEY<MSG1<NOD<IT+0001
2<NOD<IT+0002
3<NOD<IT+0003
4<NOD<IT+0004
5<NOD<IT+0005
6<NOD<IT+0006
7<NOD<IT+0007
8<NOD<IT+0008
9<NOD<IT+0009
10<NOD<IT+0010
11<NOD<IT+0011
12<NOD<IT+0012
13<NOD<IT+0013
14<NOD<IT+0014
15<NOD<IT+0015
16<NOD<IT+0016
17<NOD<IT+0017
18<NOD<IT+0018
19<NOD<IT+0019
20<NOD<IT+0020
21<NOD<IT+0021
22<NOD<IT+0022
23<NOD<IT+0023
24<NOD<IT+0024
25<NOD<IT+0025
26<NOD<IT+0026
27<NOD<IT+0027
28<NOD<IT+0028
29<NOD<IT+0029
30<NOD<IT+0030
31<NOD<IT+0031<CLR<WAI0050
The game does not crash!<NOD<END
I haven't tested past 31, but it doesn't seem like it would necessarily crash.
Okay, I went above 31 (to 50). Apparently there is a limit on items as only 36 items can be visible at a time.

I probably did something wrong sometime in 2011 that resulted in Cave Story crashing.








Randolf said:
There are 50 ticks in a secons as Cave Story runs at 50 FPS
HaydenStudios said:
There are 50 ticks per second in the original Cave Story. Just FYI, it's 60 if you're modding Cave Story+.
Thanks!
 
Top