Jump to content


Photo
* * * * * 3 votes

TSC Trickery: Help Thread For Simplification & Visual Effects


Old topic!
Guest, the last post in this thread is over 60 days old. Posting in this thread will be considered a bump, so please make an attempt to be courteous if you go ahead with it.

If the last post is over 6 months old, it may instead be a better idea to start a new topic. If you aren't sure about what to do, feel free to ask a staff member for help, or try to locate a 'general questions'-type thread if it exists in this (sub-)forum.


  • Please log in to reply
24 replies to this topic

#1 03 May 2012 - 04:03 PM

DoubleThink Offline
It doesn't matter
"Life begins and ends with Nu."
Join Date: 20 Aug 2006
Location: LocationCaught between interests
Posts: 2,196
Age: 22
 

So I just had a possible brainwave. Over time, I've come up with preferred ways of creating certain effects, and picked up a few from playing other mods. Now, while there's a multitude of "how I make this work" threads, there has (from memory) never really been a place to discuss how to make the code work for you. Say, for example, that someone comes up with an idea for a scene and then goes about thinking how to implement it in a mod. They might assume some parts are impossible and downsize it until it only works with basic coding functions, or scrap it altogether.

There are some things, of course, that require ASM, or drawing ability (>_>), or just aren't feasible. However, particularly in the case of effects that are purely visual, it's possible to get surprisingly far using only TSC. I've also seen many a new mod struggle with basic map or entity effects, but almost never see questions about them, such as what deleting an entity or making them visible or invisible really means. These types of difficulties are more like logic errors than run-time errors, and so don't really fit in with starter-level coding tutorials or quick answers, as they can often be abstract or complex. In many cases there are even multiple ways of doing the same thing.

Classic example: An event takes place where certain entities or tiles are changed, the player saves and reloads, and the changes are lost. Entities can usually be fixed using flags, but maps are only ever loaded in their default configuration. Therefore, rather than having to make a change every single time a map is reloaded, what I do is create the map the way it will look in its final state and change it to its 'initial' state only the first time that it's visited. Failing that, or if certain other changes need to be made upon each load, a h- or v-trigger can be placed directly over the save point, which will instantly go off before the player can do anything. However, this runs into difficulties if such tiles visible near the save point, because the player isn't meant to see them changing. Sometimes it might even be better to create a whole new map, but only when it won't mean even more work or waste space.

I've long wanted to try and find a place where these types of tips and tricks would fit in, but in tute threads they would get drowned out and in the quick answers thread I can only help one person at a time and people may not even think to ask these things there. Hopefully this thread will allow my self and others to help folks out with their ideas as they arise, and maybe save them the trouble we all went through when we were first starting out. For the time being, feel free to discuss/argue my idea here, and if it works out the topic can be made official-ish.

Hugs :debug:
I'm an admin
 
Quickie Mod Guide [Update List]
 

Soon Google will purchase Twitter and Facebook, and combine them with YouTube to form the ultimate social networking site: YouTwitFace


#2 03 May 2012 - 11:19 PM

Hiino Offline
Junior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: 20 Feb 2011
Location: LocationFrance
Posts: 165
Age: 20
 

In other words, this thread is about advanced TSC modding, right? It's cool, we kinda needed a thread like that. We could as well share our special techniques to make cool stuff using only TSC while we're at it.

if certain other changes need to be made upon each load, a h- or v-trigger can be placed directly over the save point, which will instantly go off before the player can do anything.

Yeah, I did that in my mod too, cause I couldn't figure out how to change map tiles upon reloading.

Then I thought that I could as well copypaste the #0090 to #0094 events (to #1090 to #1094 for example), add some <CMP commands (and sometimes <CNP) in them, and add a <WAI command before the <FAI so that the changes could be made during the black screen. This way, everytime I'd need the modified map, I'd call the #109_ events instead of the #009_ events, and everything would work fine.
I still had to put a H/V trigger somewhere though. But this way I'd avoid allowing the player to see the changes in the map.

Edited by Hiino, 03 May 2012 - 11:21 PM.

Posted Image

#3 04 May 2012 - 01:49 AM

DoubleThink Offline
It doesn't matter
"Life begins and ends with Nu."
Join Date: 20 Aug 2006
Location: LocationCaught between interests
Posts: 2,196
Age: 22
 

In other words, this thread is about advanced TSC modding, right? It's cool, we kinda needed a thread like that. We could as well share our special techniques to make cool stuff using only TSC while we're at it.

Sort if, I was intending more for it to be a place where people can ask for advice about creating certain effects rather than a compendium
I'm an admin
 
Quickie Mod Guide [Update List]
 

Soon Google will purchase Twitter and Facebook, and combine them with YouTube to form the ultimate social networking site: YouTwitFace


#4 04 May 2012 - 11:09 PM

Hiino Offline
Junior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: 20 Feb 2011
Location: LocationFrance
Posts: 165
Age: 20
 

Well, we can do both.

And for inauguration purposes (and also because I'd like to know), is it possible to remove a boss health bar (after calling a <BSL) in TSC without killing the boss?
<CNP, <ANP, <TRA, <END, <CLR didn't work. I don't have many more ideas D:
Posted Image

#5 08 May 2012 - 03:52 PM

DoubleThink Offline
It doesn't matter
"Life begins and ends with Nu."
Join Date: 20 Aug 2006
Location: LocationCaught between interests
Posts: 2,196
Age: 22
 

Coming back to this... it's a bit hard to think of why you would want to do this, because the only purpose of <BSL is to make the health bar show up. All I can think of is having it appear and then disappear for cinematic effect, which come to think of it would make sense, seeing as that's what this thread is for :awesomeface: In that case the easiest method I can think of is to have a background that matches up perfectly with the scene at that moment (i.e. is a screenshot), but then change it so that a row or two of tiles near the bottom of the screen are actually blank and only 'appear' visible because the background is the same. Then, <TRA to an identical map that has the same background with the boss health bar pasted over the top, and <TRA back when you want to remove it. I hope that makes sense - note that it will only work if the screen is static the entire time, unless the background is uniform. There are a couple of other methods I can think of that would achieve the same effect (involving <SMP), but none that would work with a moving background.
I'm an admin
 
Quickie Mod Guide [Update List]
 

Soon Google will purchase Twitter and Facebook, and combine them with YouTube to form the ultimate social networking site: YouTwitFace


#6 08 May 2012 - 06:17 PM

Hiino Offline
Junior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: 20 Feb 2011
Location: LocationFrance
Posts: 165
Age: 20
 

I see. But that means the health bar wouldn't act as a real health bar, would it? And even if it would, the map is too big to allow that kind of trick.
I wanted to make a boss battle where you could escape and change map without fighting, but still have the health bar if you wanted to beat the boss. I guess I'll have to code an assembly function then. Thank you for helping though!
Posted Image

#7 09 May 2012 - 04:42 AM

Dunc2403 Offline
.
"I'm sorry Mario, but your princess is in another castle."
Join Date: 18 Oct 2011
Location:
Posts: 1,184
Age: 13
 

Wait, didn't that happen in Jenka's Nightmare? I'm almost positive there was no hacking in JN, so it must be possible. I'm going to look in the script for Misery's Abode later to see. Or you guys can, if you want.
Posted Image

#8 10 May 2012 - 06:03 PM

Randolf Offline
I hate everything.
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: 17 Oct 2011
Location: LocationI don't exist
Posts: 521
Age: 16
 

I don't know if it fits here but is there any way to make player respawn at the same map in a spawn point when dead with full HP?
Cave Story mods:
Haunted House Story (0.45) NO PROGRESS
Operation Delta - Space Attack (0.2) BEING WORKED ON

Other mods:
Little Fighter NTF 4 Turbo (Demo) ON HOLD

#9 11 May 2012 - 01:06 PM

DoubleThink Offline
It doesn't matter
"Life begins and ends with Nu."
Join Date: 20 Aug 2006
Location: LocationCaught between interests
Posts: 2,196
Age: 22
 

ZT came up with a way to restore from death a long time ago, I'll see if I can find it...

Here we go

Basically the way I've always read this is that upon death you will need to reset/reload the game and then 'fast-forward' it to the point where you died using flag checks. There seems to be no other way to do this using TSC alone.

Additional note: To get a better idea of how dying worked I decided to see what would happen if I put an auto-save in the death script. The result: It loads you exactly at the point where you died, meaning instant auto-death if spikes were involved, except when dying without having saved once before (i.e. profile.dat did not exist), in which case it will load you back in the start room, but only if you select yes at the death query :koron:
I'm an admin
 
Quickie Mod Guide [Update List]
 

Soon Google will purchase Twitter and Facebook, and combine them with YouTube to form the ultimate social networking site: YouTwitFace


#10 11 May 2012 - 03:40 PM

Randolf Offline
I hate everything.
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: 17 Oct 2011
Location: LocationI don't exist
Posts: 521
Age: 16
 

Thank you! I have another trouble sometimes: with the MYB command. How does it exactly work? When I set direction to left, it bumps me right, not left. And is there any way to bump player upwards?
Cave Story mods:
Haunted House Story (0.45) NO PROGRESS
Operation Delta - Space Attack (0.2) BEING WORKED ON

Other mods:
Little Fighter NTF 4 Turbo (Demo) ON HOLD



Old topic!
Guest, the last post in this thread is over 60 days old. Posting in this thread will be considered a bump, so please make an attempt to be courteous if you go ahead with it.

If the last post is over 6 months old, it may instead be a better idea to start a new topic. If you aren't sure about what to do, feel free to ask a staff member for help, or try to locate a 'general questions'-type thread if it exists in this (sub-)forum.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users