Script Helpdesk

Jul 22, 2009 at 7:19 AM
Luls
"Bleep, Bloop, Bleep, Bloop"
Join Date: Oct 6, 2007
Location: I dunnos
Posts: 1584
wedge of cheese said:
And some call always call from NpcSym.pbm or NpcRegu.pbm regardless of which spritesheets you set in SW/CE. Some also call from Caret.pbm or Bullet.pbm. This can be changed by hacking the "npc.tbl" file.

Anything on NpcSym.pbm can be called regardless of the spritesheets set for that map. However, you're wrong about NpcRegu.pbm. You HAVE to set it to use whatever's in it.

Gaajashin said:
Is there a tutorial on how the enitity calling works?
As in, entity 1 calls which 16x16 grid, or 32x32 grid.

You're gonna have to find out that on your own, if what you're referring to are the framrect areas for the sprite's frames.

Gaajashin said:
Also, how do I make entities move, as in, walking, does the walking animation automatically moves the entity?

Wait WHAT?! YOU HAVEN'T READ THE ANP.txt YET?!?!?!

Btw yeah, that's basically it: <ANP commands. All found <ANP commands can be found in the ANP.txt.

Some entities only have limited movement abilities, as you'll realise when you read through it.
 
Jul 22, 2009 at 10:23 AM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Jul 14, 2009
Location:
Posts: 155
Metalogz said:
Wait WHAT?! YOU HAVEN'T READ THE ANP.txt YET?!?!?!

Btw yeah, that's basically it: <ANP commands. All found <ANP commands can be found in the ANP.txt.

Some entities only have limited movement abilities, as you'll realise when you read through it.

I use ANP.txt. o_o
What I was asking is that it automatically moves th entity when using the walking animation for that certain character.

So now, I have a problem, this script doesn't work:
Code:
#0999
<KEY<MSG<FAC0021At long last...<NOD<FAC0000<CLO
<HMC<FON0900:0001<FAI0004<CNP0901:0067:0000
<MSG<FAC0015lalala<NOD<FAC0000<CLO<WAI0050
<ANP0901:0013:0000
<MSG<FAC0015lalala<NOD<FAC0000<CLO<SOU0029<ANP0901:0030:0000<SMC<CMP0007:0002:0000<WAI0070<HMC<CNP0900:0150:0002<ANP0900:0010:0002
<END
 
Jul 22, 2009 at 3:11 PM
Luls
"Bleep, Bloop, Bleep, Bloop"
Join Date: Oct 6, 2007
Location: I dunnos
Posts: 1584
Gaajashin said:
I use ANP.txt. o_o
What I was asking is that it automatically moves th entity when using the walking animation for that certain character.

So now, I have a problem, this script doesn't work:
Code:
#0999
<KEY<MSG<FAC0021At long last...<NOD<FAC0000<CLO
<HMC<FON0900:0001<FAI0004<CNP0901:0067:0000
<MSG<FAC0015lalala<NOD<FAC0000<CLO<WAI0050
<ANP0901:0013:0000
<MSG<FAC0015lalala<NOD<FAC0000<CLO<SOU0029<ANP0901:0030:0000<SMC<CMP0007:0002:0000<WAI0070<HMC<CNP0900:0150:0002<ANP0900:0010:0002
<END

Yeah walking <ANPs do move the character automatically in the direction that you specify in the command.

And about your problem... wait, what's the problem? :(
 
Jul 22, 2009 at 3:25 PM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Jul 14, 2009
Location:
Posts: 155
Metalogz said:
Yeah walking <ANPs do move the character automatically in the direction that you specify in the command.

And about your problem... wait, what's the problem? :(

Misery doesn't 'cast spell', as in the command that says:
Code:
<ANP0901:0030:0000
0901 is Misery's event number.
30 is the cast spell event, and no, 31 doesn't work too.
 
Jul 22, 2009 at 4:06 PM
Luls
"Bleep, Bloop, Bleep, Bloop"
Join Date: Oct 6, 2007
Location: I dunnos
Posts: 1584
Gaajashin said:
Misery doesn't 'cast spell', as in the command that says:
Code:
<ANP0901:0030:0000
0901 is Misery's event number.
30 is the cast spell event, and no, 31 doesn't work too.

Err... If I'm not wrong, I think what "Cast spell" means is that she does her casting spell poise, but doesn't actually cast out anything.

Not too sure though, seeing as I rarely ever use Misery <ANPs.
 
Jul 22, 2009 at 4:09 PM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Jul 14, 2009
Location:
Posts: 155
Metalogz said:
Err... If I'm not wrong, I think what "Cast spell" means is that she does her casting spell poise, but doesn't actually cast out anything.

Not too sure though, seeing as I rarely ever use Misery <ANPs.

What I want is that she uses her pose, not the spell that appears, but she doesn't even pose at all.
 
Jul 22, 2009 at 6:32 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Help In A Box
Download that and open it up with an editor, and view the Intro map (#72).
Should answer any questions about Miza-mations.
Plus you getta see the original intro for my mod (which, oddly, is my first scripting experience).
Plus you getta see why I changed it.
(HINT: It involves Toroko.)
 
Jul 23, 2009 at 6:31 AM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Jul 14, 2009
Location:
Posts: 155
DragonBoots said:
Help In A Box
Download that and open it up with an editor, and view the Intro map (#72).
Should answer any questions about Miza-mations.
Plus you getta see the original intro for my mod (which, oddly, is my first scripting experience).
Plus you getta see why I changed it.
(HINT: It involves Toroko.)

Your setup says that it cannot find 'VSR.exe'
 
Jul 23, 2009 at 6:39 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Gaajashin said:
Your setup says that it cannot find 'VSR.exe'

Not important.
 
Jul 23, 2009 at 8:47 AM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Jul 14, 2009
Location:
Posts: 155
DragonBoots said:
Not important.

How is it not important? I can't view/edit the file D:

Also, when I use this:

Code:
#0200
<PRI<CNP0200:0000:0000
<SOU0022<FAO0004
<TRA0002:0094:0009:0018<END

code, from map #1 to map #2, the background of map #2 doesn't appear, it's just pitch black.

If you're wondering what map information both of the maps have,

Map 1: bkFog, fixed(0), size: 30x16.
Map 2: bkFog, fixed(0), size: 80x20.

And I have this

Code:
#0090
<MNA<CMU0008<FAI0000<END
#0091
<MNA<CMU0008<FAI0001<END
#0092
<MNA<CMU0008<FAI0002<END
#0093
<MNA<CMU0008<FAI0003<END
#0094
<MNA<CMU0008<FAI0004<END

piece of code for both maps.

This doesn't work too.

If I did something wrong, please tell me, and also please tell me the solution, thanks.
 
Last edited by a moderator:
Jul 25, 2009 at 10:25 AM
Neophyte Member
"Fresh from the Bakery"
Join Date: Jul 25, 2009
Location:
Posts: 4
If the Cave Story background behaviour issue thread didn't solve it, I don't think I can.
 
Jul 25, 2009 at 7:40 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
bibopie said:
If the Cave Story background behaviour issue thread didn't solve it, I don't think I can.

I like the cut of your jib. o.o

And Gaaj, are you sure you set the background to a correct parallax?
Some of the parallax (or background movement styles) just hide the background.

Additionally, VSR.exe was just the old filename for The Dark Platform.exe
The file you want to open (Use Sues' if possible) is "c:/program files/TDP/The Dark Platform.exe" assuming you installed it via the suggested route in the installer.
 
Oct 11, 2009 at 3:28 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
Pronouns: he/him
It seems every time I try scripting I find a new way to break it. Right now, my problem is that I've replaced Item 3 (santa's key) with a message

Code:
#6003
<KEY<MSGA note found in Akahana's
fireplace. Do you want to
read it?<YNJ0000<MSG<TURD.... .....ana
The time h.......e, we
must as.......... and<NOD<CLRdefe.....he island fro...
........ts. Tell noone, and
........re they do not<NOD<CLRsee y.........ill meet
you i........nd don't
forge..o hide the<NOD<CLR...ifact in a se.....
...tion and d.....is
..ssage. -Ka.....<NOD<FRE<MSGThe rest of it is too
damaged to read.<WAI9999<END

And to get the item, I use the event

Code:
#0202
<KEY<FLJ0124:0203<MSGThe fireplace has been
out for a while.<WAI0050 There's something
lying in the ashes...<NOD<CLR<GIT1003<IT+1003<CMU0010<TURGot the Burnt Note.
<WAI0160<NOD<RMU<CLR<FL+0124<END

Now, everything seems fine, but when you go into the item menu, the graphic does not appear. Furthermore, if you press the z button at certain moment during the script's execution (after selecting "no", or while it's writing "the rest is too damaged to read") it runs the following

Code:
#7018
<KEY<MSGDo you want to remove it?<YNJ0000<EQ-0001<FL-0742<MSG
Deequipped Booster.<NOD<WAI0003<FRE<EVE5018

Yea. And if you select yes to that one and keep the cursor over the item, it calls it booster 0.8, although it won't give you the option to equip it, it will just repeat the "do you want to remove" script. If you select no, it does the exact same thing only it doesn't call it booster 0.8, the message box is just blank.

On top of this, if I pick up this item before I get a gun, then my empty weapon select thing allows me to scroll one empty spot to the left, leaving the cursor halfway outside the menu, although selecting it does nothing different than selecting the other "no weapon" space.

Also, in the category of "troubling but acceptable", this seems to work properly for a door script

Code:
#0113
<NCJ0274:0101
<KEY<CNP0113:0000:0000<SOU0011<WAI0015
<HMC<WAI0015<FAO0002<TRA0004:0092:0005:0005

But if I do this:

Code:
#0113
<NCJ0274:0101<KEY<CNP0113:0000:0000<SOU0011<WAI0015
<HMC<WAI0015<FAO0002<TRA0004:0092:0005:0005

It completely ignores the first line. Which it probably is still doing, I just can't notice because I don't have any NPC0274 out at the moment. I've also had issues with flagjumps going to events after the target, such as

Code:
#0111
<KEY<FLJ0122:0411<EVE0101

...

#0411
<CNP0111:0000:0000<SOU0011<WAI0015<HMC
<WAI0015<FAO0002<TRA0003:00092:0004:0009

#0412
<KEY<MSG"message text"<NOD<CLR<END

And it would write the message instead of using the door.
 
Oct 11, 2009 at 3:43 AM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Noxid said:
Code:
#0202
<KEY<FLJ0124:0203<MSGThe fireplace has been
out for a while.<WAI0050 There's something
lying in the ashes...<NOD<CLR<GIT1003<IT+1003<CMU0010<TURGot the Burnt Note.
<WAI0160<NOD<RMU<CLR<FL+0124<END
Now, everything seems fine, but when you go into the item menu, the graphic does not appear. Furthermore, if you press the z button at certain moment during the script's execution (after selecting "no", or while it's writing "the rest is too damaged to read") it runs the following

Code:
#7018
<KEY<MSGDo you want to remove it?<YNJ0000<EQ-0001<FL-0742<MSG
Deequipped Booster.<NOD<WAI0003<FRE<EVE5018
Yea. And if you select yes to that one and keep the cursor over the item, it calls it booster 0.8, although it won't give you the option to equip it, it will just repeat the "do you want to remove" script. If you select no, it does the exact same thing only it doesn't call it booster 0.8, the message box is just blank.

On top of this, if I pick up this item before I get a gun, then my empty weapon select thing allows me to scroll one empty spot to the left, leaving the cursor halfway outside the menu, although selecting it does nothing different than selecting the other "no weapon" space.
Well, first of all, you screwed up the <IT+ part.
You add 1000 to whatever item to use <GIT, but you do not add 1000 for <IT+/-/J. It should be <IT+0003. {At least in this case}
Try it with that corrected.

Noxid said:
Also, in the category of "troubling but acceptable", this seems to work properly for a door script

Code:
#0113
<NCJ0274:0101
<KEY<CNP0113:0000:0000<SOU0011<WAI0015
<HMC<WAI0015<FAO0002<TRA0004:0092:0005:0005
But if I do this:

Code:
#0113
<NCJ0274:0101<KEY<CNP0113:0000:0000<SOU0011<WAI0015
<HMC<WAI0015<FAO0002<TRA0004:0092:0005:0005
It completely ignores the first line. Which it probably is still doing, I just can't notice because I don't have any NPC0274 out at the moment.
This I'm not sure on.
I can only guess that something else is going on, something not in the script, and it's not just the line being moved that caused it. {Possibly a removed/created entity you forgot about, or something}
It could be the extra line, but I doubt it.
{Then again I've never ever used that command before}
Noxid said:
I've also had issues with flagjumps going to events after the target, such as

Code:
#0111
<KEY<FLJ0122:0411<EVE0101

...

#0411
<CNP0111:0000:0000<SOU0011<WAI0015<HMC
<WAI0015<FAO0002<TRA0003:00092:0004:0009

#0412
<KEY<MSG"message text"<NOD<CLR<END
And it would write the message instead of using the door.
Flags are very iffy.
You can only save yourself from hair-pulling trouble later by keeping a document or something tracking every single flag you've used/are using/have used but aren't anymore/etc.
Also remember that deleting an entity with an ID causes that flag to unset.
Or something. I can't remember which way it goes, but it causes a lot of ruckus.
 
Oct 11, 2009 at 4:04 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
Pronouns: he/him
VoidMage_Lowell said:
Well, first of all, you screwed up the <IT+ part.
You add 1000 to whatever item to use <GIT, but you do not add 1000 for <IT+/-/J. It should be <IT+0003. {At least in this case}
Try it with that corrected.

Well, that fixed most of the problems. The item works fine now, but there's still the wierd problem of letting the weapon cursor go off the screen, but it does that for any item before you get a weapon I imagine. I actually had a "Working" item in the exact same room and I didn't add 1k to my IT+ for that one... I guess I just wasn't thinking :/

VoidMage_Lowell said:
Flags are very iffy.
You can only save yourself from hair-pulling trouble later by keeping a document or something tracking every single flag you've used/are using/have used but aren't anymore/etc.
Also remember that deleting an entity with an ID causes that flag to unset.
Or something. I can't remember which way it goes, but it causes a lot of ruckus.

But, if it's just a problem with a flag being not set properly, why would it go down to an event past the target? It also should be noted that it made that little typing sound like when if you forget an <END it types the event number of the next event in the background before it runs the event.

Also, when you load a new game it clears all flags does it not?

I have a little .txt with all my flags and stuff, which helps to keep track. However, I've never heard about deleting entities causing flags to become unset... Somebody should make a list of all the things you CANT do. For one, you can't make skipflags over like 25 or something. That confused me for a long time.
 
Oct 11, 2009 at 4:11 AM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Noxid said:
Well, that fixed most of the problems. The item works fine now, but there's still the wierd problem of letting the weapon cursor go off the screen, but it does that for any item before you get a weapon I imagine. I actually had a "Working" item in the exact same room and I didn't add 1k to my IT+ for that one... I guess I just wasn't thinking :/
Brain fart.
Noxid said:
But, if it's just a problem with a flag being not set properly, why would it go down to an event past the target? It also should be noted that it made that little typing sound like when if you forget an <END it types the event number of the next event in the background before it runs the event.
Ah, I was having a hard time understanding what you meant there. My brain fart.
I'd double check for any unnecessary white space in there, maybe delete it all and retype it.
If you can't get it to work, you could be lazy like me and just move the events all down a number, or even pick new numbers :)
Noxid said:
Also, when you load a new game it clears all flags does it not?
Pretty sure it does.
{Well, technically it just wouldn't have anything to load from, and wouldn't know what flags to set. But same idea}

Noxid said:
I have a little .txt with all my flags and stuff, which helps to keep track. However, I've never heard about deleting entities causing flags to become unset... Somebody should make a list of all the things you CANT do. For one, you can't make skipflags over like 25 or something. That confused me for a long time.
Can't use skipflags over 25? Err, but all my skips flags are over 200, and there's never been a problem...
 
Oct 11, 2009 at 4:31 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
Pronouns: he/him
VoidMage_Lowell said:
I'd double check for any unnecessary white space in there, maybe delete it all and retype it.
If you can't get it to work, you could be lazy like me and just move the events all down a number, or even pick new numbers :)

That's what bugged me about this problem. I spend an entire night trying to fix it... Originally, the event I jumped to was the original +1000, to make it easy to keep track of. But, I figured that might not be so smart to have such big numbers, so I bumped it down to the 400s, and it still did the same thing, so I manually rearranged the events in a pseudo-random order and it STILL did the same thing. So, I gave up and changed the <FLJ in the first event to an NPC check, since the flag was supposed to be there only if the NPC was not.

VoidMage_Lowell said:
Can't use skipflags over 25? Err, but all my skips flags are over 200, and there's never been a problem...

It never worked for me... I started with using skipflags over 1000, then I tried skipflags around 100, and they never did anything. I ended up checking the flags in the original game, and saw they went from 1 to 7 or something, and jumped to 20-24, so I settled with 1. Although, I still ended up with some strange problems that I can't exactly remember the circumstances to. I gave up with the skipflags and removed them :/
 
Oct 27, 2009 at 3:56 AM
Junior Member
"Fresh from the Bakery"
Join Date: Oct 22, 2009
Location:
Posts: 15
Confirmed.

Noxid said:
The item works fine now, but there's still the wierd problem of letting the weapon cursor go off the screen, but it does that for any item before you get a weapon I imagine.

Just loaded up my mod and opened inventory before any items were obtained. The cursor, does, in fact go off screen. i would imagine this is a bug in vanilla Cave story as well.
 
Dec 17, 2009 at 12:34 AM
Junior Member
"It's dangerous to go alone!"
Join Date: Jul 18, 2009
Location:
Posts: 31
So, I'm trying to make a cloaking device.
And have it so that you cannot turn it on/off on certain maps.
Flag 0318 is for running the on/off events.
Flag 0271 is for not turning it on/off.
Code:
#5005
<MSG<TURCloaking Device<WAI9999<END

#6005
<FLJ7041:0271<EVE7039<END

#7039
<FLJ7040:0318<KEY<FL+0318<EQ+0064<MSG<TURDevice Activated.<WAI9999<END

#7040
<KEY<FL-0318<EQ-0064<MSG<TURDevice Deactivated.<WAI9999<END

#7041
<KEY<MSG<TURIt's not responding!<WAI9999<END
When you try to run the event when Flag 0271 is set, it runs event #7039, regardless of Flag 0318.
 
Dec 17, 2009 at 1:10 AM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Hmm, unless the other events you didn't include are out of order, I don't see a direct reason to cause the problem...
But that never seems to stop a bug >.>;
I'm guessing this is from the ArmsItem TSC, and that the item is set for event 6005?

Anyways, let me make sure I understand you:
The cloaking device works fine, turning off and on, when flag 0271 is cleared.
But as soon as you set that flag, it goes funny and just keeps running event 7039?
Well, staring at this for another 5 minutes doesn't seem to be helping, nothing looks wrong...
...Until I went and double checked the <FL commands in CE.
Simple brain fart, you've got your values mixed up in the <FLJ's ^.^;
The flag you're checking comes first, followed by the event you want to jump to.
Code:
<FLJXXXX:YYYY
Description:
Jump to event Y if flag X is set.
It's easy to see how someone can get confused by the wording, I almost fell for it, before :p;
 
Back
Top