Jump to content

Photo

Freeform Doors

FFC

  • This topic is locked This topic is locked
14 replies to this topic

#1 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Gender:Female
  • Location:Rainbow Factory

Posted 09 March 2012 - 11:44 AM

Freeform Doors


Description

This script allows you put doors anywhere along the edges of the screen and not just at the center of the wall.

Screenshots and Demo

Example Dungeon
doorsexample.png

Code

The Magnificent Code


Setup

Now the fun part. The placement of the ffc needs to be exact and overlap the door depending on it's size and direction. The screenshot in the above section shows where to placed them. For shutters you need to make it so all enemies that you don't want to be counted as a enemy by the shutter need to have the misc flag "Doesn't count as beatable enemy." or the shutters may say close. So projectile shooters, bubbles, and traps need to be double checked. For bombable walls, be sure to set the ffc's CSet to match the CSet for the dust, as well as set it's size depending on how many tiles make up the dust. The initial combo should use a tile that's the top left tile of a 4x4 block. Most importantly you must check the ffc flag "Run Script at Screen Init" in order for them to work right. Now for arguments. I'll divide this into 3 sections covering each of the 3 scripts.

Locked
  • d0: Direction the door faces where 0 = North, 1 = South, 2 = West, 3 = East. Directions repeat starting with 4 = north.
  • d1: The offset between the combos. Take note that this offset affects every combo that makes up the door.
  • d2: The adjacent screen using DMap coordinates converted to decimal.
  • d3: Whether or not the door is a boss door where 0 = false, and any other number = true.
  • d4: Whether or not the door is a 2x3 door where 0 = false, and any other number = true.

Shutter

  • d0: Direction the door faces where 0 = North, 1 = South, 2 = West, 3 = East. Directions repeat starting with 4 = north.
  • d1: The offset between the combos. Take note that this offset affects every combo that makes up the door.
  • d2: The condition for reopening where 0 = Normal, 1 = Pushing a Block, 2 = Block Trigger Flag, and 3 = Secret.
  • d3: Whether or not the door is a one way shutter where 0 = false, and any other number = true.
  • d4: Whether or not the door is a 2x3 door where 0 = false, and any other number = true.

Bombable

  • d0: Direction the door faces where 0 = North, 1 = South, 2 = West, 3 = East. Directions repeat starting with 4 = north.
  • d1: The offset between the combos. Take note that this offset affects every combo that makes up the door.
  • d2: The adjacent screen using DMap coordinates converted to decimal.
  • d3: The combo data of the dust that appears.
  • d4: The combo location of the dust that appears.
  • d5: Whether or not the door is a 2x3 door where 0 = false, and any other number = true.

Resources

Nothing but good old std.zh is needed to run this script.


Edited by LinktheMaster, 04 November 2013 - 09:27 AM.


#2 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Gender:Female
  • Location:Rainbow Factory

Posted 25 March 2012 - 10:31 AM

Update 3/25/2012 Locked doors now work with level specific keys.

#3 Zefram

Zefram

    Initiate

  • Unvalidated

Posted 15 May 2012 - 10:44 AM

Where are the setup instructions and variables for shutters and bombable walls? I'm trying to make sense of the script without them, but a few things aren't clear. What's the purpose of using a value for dir > 3, and why do only locked doors support it (and how many bits is a D[] register anyway)?

Thanks for this all the same.

#4 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Gender:Female
  • Location:Rainbow Factory

Posted 15 May 2012 - 10:50 AM

Check the first post. The set up is there.

Edited by blackbishop89, 15 May 2012 - 10:50 AM.


#5 Zefram

Zefram

    Initiate

  • Unvalidated

Posted 15 May 2012 - 10:58 AM

Uh...nope. I see the part where you say you'll divide your post into 3 sections, but only one set of variables.

#6 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Gender:Male
  • Location:Washington

Posted 15 May 2012 - 11:40 AM

So wait a second. What exactly does this script do? Putting doors somewhere besides the center of the wall has been around forever. Am I missing something here?

#7 MoscowModder

MoscowModder

    Still fighting the inevitable

  • Members
  • Gender:Male
  • Location:Wisconsin (WHAT)

Posted 15 May 2012 - 11:42 AM

These doors behave like the NES doors (shutters, 1-way shutters, locked doors) but without the placement limitations of the NES. You could do them with fancy secrets stuff, but only one per screen.

#8 Zefram

Zefram

    Initiate

  • Unvalidated

Posted 16 May 2012 - 01:41 AM

I think I've made sense of this now. dir >= 4 is for multiple locked doors on the same wall, correct?

#9 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Gender:Female
  • Location:Rainbow Factory

Posted 16 May 2012 - 11:01 AM

QUOTE(Zefram @ May 16 2012, 01:41 AM) View Post

I think I've made sense of this now. dir >= 4 is for multiple locked doors on the same wall, correct?


Yes.

#10 ShadowPC

ShadowPC

    Where is ma hearts?

  • Members
  • Real Name:Not available
  • Gender:Male

Posted 07 August 2012 - 07:00 AM

What are d1, d2 and d3?

Edited by ShadowPC, 07 August 2012 - 07:01 AM.


#11 MoscowModder

MoscowModder

    Still fighting the inevitable

  • Members
  • Gender:Male
  • Location:Wisconsin (WHAT)

Posted 07 August 2012 - 10:58 AM

QUOTE
d1: The offset between the combos. Take note that this offset affects every combo that makes up the door.
d2: The adjacent screen using DMap coordinates converted to decimal.
d3: Whether or not the door is a boss door where 0 = false, and any other number = true.


I *think* D1 is the difference between the combo ID of the open door combos and the closed door combos.
D2 is the number of the screen the door leads to, converted from hexadecimal to decimal.
D3 should be self-explanatory. If it's not a boss door, put 0; if it is, put anything else.

#12 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Gender:Female
  • Location:Rainbow Factory

Posted 25 December 2012 - 01:36 PM

update 12/25/12 Redid the setup section so it makes more sense and actually added list for the two scripts I totally forgot. That was totally my fault, and I and ashamed to call myself a Scripter. Sorry for all the inconvenience my absent mindedness has caused everyone. Hopefully you guys better understand what you need to do to make this script work for your quest.

Edited by blackbishop89, 28 December 2012 - 10:37 AM.


#13 Kyle

Kyle

    Initiate

  • Members
  • Real Name:Kyle
  • Gender:Male
  • Location:CA

Posted 19 October 2013 - 05:50 PM

I've got the script down, though I'm having a hard time figuring out the formula for the combo id offset. I'm using the Pure 2.5 release graphics.



#14 klop422

klop422

    Evil Crazy Mastermind

  • Members
  • Real Name:Not George
  • Gender:Male
  • Location:Planet Earth

Posted 12 February 2014 - 10:11 AM

Question:

Do these work even when the dmap is not NES dungeon? I don't think it specifies.



#15 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Gender:Female
  • Location:Rainbow Factory

Posted 12 February 2014 - 08:35 PM

They work on Interiors, since that is what I tested it under.





Also tagged with one or more of these keywords: FFC

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users