Flag ID's. NPC issue...

Jun 2, 2009 at 6:09 PM
Junior Member
"It's dangerous to go alone!"
Join Date: Jun 2, 2009
Location: Some place...
Posts: 30
I know I'm new here. I used the search option but no luck. Yes, this might be a n00b question. If this is in the wrong forum , (Which I'm quite sure it is, seeing as how I'm new here.) move it to the right one.
Please don't flame me for asking stupid questions...Just give me a thread with th esame question and the answer if this has already been asked. DO NOT FLAME ME!

With all that out of the way, I started hacking Cave Story two weeks ago.
I already figured out how to make NPC's that talk to you when you press down.
I know a lot (I think :D) but there is one problem.



1. I go in Sue's Workshop and make a NPC at the start point.
2. I make it say stuff...Blah blah blah.
3. I remember to put <END and <NOD's after the text...You know what I mean.
Here is where the problem comes...I want to make it so that you start in a place with Sue. Then you talk to her if you want. After that, you leave the room. After you leave the room, Sue will be at that room you just entered.
The problem is that if you talk to this NPC, which is Sue, she talks...Then I want it so that if you decide to go back to the start room, the other Sue is gone. How do I do that? Sorry if I am too hard to understand. If I am, just say so.




PROBLEM: I want it so when you go back to the start room, the Sue in the start room is gone. Well...what I mean is, when you go in the room that the start point door leads you to, the Sue in the start point goes away for good. So whenever you come back, she's not there, but is somewhere else with different events. Is that possible? Cause the guy who gives you the spur is asleep when you first meet him, but once you get the booster, he is awake. It changes? So that is how I want it for the two Sue's. I hope it's possible with only Sue's workshop. Thanks in advance!
 
Jun 2, 2009 at 8:42 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Hrm...

Well, for starters, this should be in the Hacking/Modding section, and there's a special thread just for such questions as this...
{Would andwhyisit or SP just merge this? :D}
{Be one less question to have to re-answer...}

Anyways, if I understand you correctly, you want the first Sue to disappear?
Well, first, you should set the first Sue's flags to 6000, which will enable both the ability to interact with her when the character presses down, and she'll now disappear when the flag matching her ID is set...
Now, if Sue's Workshop is anything like Cave Editor, you should be able to change the first Sue's Entity ID to some number. Now remember that number, because you obviously don't want to reuse it for something else, in this case.
Now, when you enter the next room, just add a <FL+XXXX to the door script, where the Xs represent whatever Entity ID the first Sue has {Remember, if it's not a full four digit number, add 0's to the back. EX: 42 would be 0042, 100 would be 0100, etc.}
Now, what'll happen is when you enter the next room, the flag will become set, and the first Sue will now completely disappear forever until that flag is cleared.

That should do it.
{Happy, Lace? =P}
 
Last edited by a moderator:
Jun 2, 2009 at 8:59 PM
Junior Member
"It's dangerous to go alone!"
Join Date: Jun 2, 2009
Location: Some place...
Posts: 30
Oh my god, it worked! Also, sorry for posting this in this thread and not the thread you mentioned. Ah well. Should I keep this one opened or should I just post all my question's in the thread you said? I am so happy right now! But another question.....I make the flagID 9854, and set the door script to <FL+9854, and it works. But, in the future, could I use the same flagID for other sprites NOT IN THE START POINT? Like in Mimiga Village?
Like, could I make the first Sue flagID 9854, then in Grasstown or anything else, can I make it the same ID? Or do I have to use a different one every single time? Well, thank you so much for the answer! :D
 
Jun 2, 2009 at 9:06 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Plow said:
Oh my god, it worked! Also, sorry for posting this in this thread and not the thread you mentioned. Ah well. Should I keep this one opened or should I just post all my question's in the thread you said? I am so happy right now! But another question.....I make the flagID 9854, and set the door script to <FL+9854, and it works. But, in the future, could I use the same flagID for other sprites NOT IN THE START POINT? Like in Mimiga Village?
Like, could I make the first Sue flagID 9854, then in Grasstown or anything else, can I make it the same ID? Or do I have to use a different one every single time? Well, thank you so much for the answer! :D
Just go post in the other thread from now on, don't want other people creating more and more threads, when we've already made a special one for that...
It should also collect enough answers to start acting as a tutorial in itself, eventually..

Anyways, if you do the exact same thing with the same flag, whatever entity you had put in Grasstown would not show up, because the flag's still set.
Now, if the player could not get back to the Start Point, you could clear the flag and re-use it, but I doubt you'd need to do so.
You've got something like 7000 flags to use. {I don't think you can use all 9999}
The first part of my mod didn't even use 50 flags...{I think..}

Don't forget to keep track of your flags, too.
I made a special document for mine..
 
Jun 2, 2009 at 9:09 PM
Junior Member
"It's dangerous to go alone!"
Join Date: Jun 2, 2009
Location: Some place...
Posts: 30
Okay, thanks.

This can be closed.
 
Jun 2, 2009 at 10:58 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Hold on now!

I just stumbled upon this thread while I was looking for something else, and any flag after 8000 is not safe and will change randomly.
So just stick to the flags below 8000...
{Saying this because your example used flag 9854, which would actually be affecting RAM...}

Here's the thread. Some of the stuff looks kinda funny...
Hmm, how to implement these into my mod.... :D
 
Jun 3, 2009 at 2:29 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
what am I happy about?
that's the only part I read.
=P
 
Jun 3, 2009 at 3:07 PM
Junior Member
"It's dangerous to go alone!"
Join Date: Jun 2, 2009
Location: Some place...
Posts: 30
NOW you tell me that flag ID's over 8000 don't work. I figured that out the hard way and had no idea what was happening! Well, thanks for telling me. Now it's 8000, 7999,7998,7997, etc. That makes it much easier.
 
Jun 3, 2009 at 5:46 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
flags above 8000 can be cool though, like, if you set flag 8679, it starts making the earth shake.
 
Jun 3, 2009 at 6:00 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
...

Lace said:
flags above 8000 can be cool though, like, if you set flag 8679, it starts making the earth shake.
That's all it does. It doesn't act like a real flag, all it does is make everything shake.
Other flags over 8000 can go as far as to crash the game....
 
Jun 3, 2009 at 8:01 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 31
Wait, are you sure it's just flags above 8000 and that don't work, not flags above or equal to 8000? Because from a programming perspective it would make much more sense for flags above or equal to 8000 not to work.
 
Jun 3, 2009 at 8:46 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
I think it's above, because 8000 bits of ram would be reserved for flags, and after that, it would be the normal stuff
 
Jun 3, 2009 at 10:25 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 31
But if 8000 bits are reserved then its above or equal to because the flags start at 0 not at 1. It's probably flags 0000-7999 (8000 bits) are normal flags, and flags 8000-9999 (2000 bits) are the special effect/crash flags.
 
Jun 3, 2009 at 11:00 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Ugh...

wedge of cheese said:
But if 8000 bits are reserved then its above or equal to because the flags start at 0 not at 1. It's probably flags 0000-7999 (8000 bits) are normal flags, and flags 8000-9999 (2000 bits) are the special effect/crash flags.
These aren't just special affects, these flags are getting into reserved RAM.
For instance, flags 9088 to 9095 handle what key's being pressed down.
You might end up destroying your mod, if you're not careful.

And according to Rune, it's 0000 to 8000 that's safe
 
Jun 4, 2009 at 12:22 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6211
Age: 38
VoidMage_Lowell said:
And according to Rune, it's 0000 to 8000 that's safe
Why risk it? Just go with $0000 to $7FFF.
 
Jun 4, 2009 at 2:53 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
andwhyisit said:
Why risk it? Just go with $0000 to $7FFF.

Andwhyisit that your range is in hexadecimal? We are talking about the flags used in tsc, right?
 
Jun 4, 2009 at 3:47 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
yeh, tsc flags are in decimal, which is then converted to hex. it is exactle 3e8 bytes of flag data, or 1f40 flags.

duh.

(I'm gunna edit a bit later with info on whether flags are stored bitwise or bitewise, and a flag above 8000 that will work, so ha void)
 
Jun 4, 2009 at 5:27 PM
Junior Member
"It's dangerous to go alone!"
Join Date: Jun 2, 2009
Location: Some place...
Posts: 30
Alright now I'm confused. I knew I shouldn't have read this thread once the problem was fixed. So what's okay, $0000 to #7FFF? What about $7999? After 9 comes A right? That means that after $7999 I can use $799A?
Confusing!!!
 
Jun 4, 2009 at 10:15 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Meh...

Lace said:
(I'm gunna edit a bit later with info on whether flags are stored bitwise or bitewise, and a flag above 8000 that will work, so ha void)
Tell me how many Backup's you've gone through, before getting a flag above 8000 to work as a normal flag.
If that's even possible. {Probably not, since it's bumping into Reserved RAM}

Plow said:
Alright now I'm confused. I knew I shouldn't have read this thread once the problem was fixed. So what's okay, $0000 to #7FFF? What about $7999? After 9 comes A right? That means that after $7999 I can use $799A?
Confusing!!!
Just, use any flag below 8000.
I've yet to even go above 100 flags in my mod....
There's no reason for you to need over 8000 flags.
Unless you're very sloppy and messy with them...
And even then, I doubt you'll use 2000 flags.
 
Jun 4, 2009 at 10:16 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Plow said:
Alright now I'm confused. I knew I shouldn't have read this thread once the problem was fixed. So what's okay, $0000 to #7FFF? What about $7999? After 9 comes A right? That means that after $7999 I can use $799A?
Confusing!!!

Okay, first of all colors are not nice, since using colored text is AGAINST THE FORUM RULES. Or, maybe that was just saying no fully colored posts.

But more importantly, DISREGARD what Andwhy said. The flag system is in decimal, not in hexadecimal. The range should/would be 0-7999, no letters or $'s .
 
Top