Jump to content

Photo

Anthus Asks Questions About Scripting


  • Please log in to reply
94 replies to this topic

#91 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 08 November 2017 - 04:57 PM

I got around to testing this out this afternoon, and it works perfectly for remembering the d-map to return Link to, but there is one small hiccup, but I could have worded my OP (even though it's not really the OP) better :doh:. As seen in the short video below, the d-map remembering works fine, but I should have mentioned that not only are these going to be from different d-maps, but also different screens (and maps in a real quest if that matters, this is strictly a test).

 

The exact purpose is essentially a way to have parts of a world change drastically (using different maps, d-maps, palettes, and music) but still be able to enter caves and whatnot in that same area, and only be able to get an item once. Inversely, with this method, I can also have areas that do change internally between visits by not using the script. That way, the player can't miss stuff if they didn't get it in a certain period, and I don't have to make a crazy amount of duplicate interiors with elaborate screen warping and secret carryover triggering to get the results. :P

 

It's essentially a more hacked together "events" system than using dummy items.

 

In the example, the screen Link is returning from is set to the position of the screen at the start (Screen 03) (Spring) from the interior d-map. Side warps take you to different d-maps on different screens, and when exiting the cave from one of those, it does remember the d-map, but there is no way to specify alternate warp coordinates if that d-map is a variant of the original screen, and uses a different map/ screen. Again, shoulda been more clear in my OP.

 

please excuse the horrendous test screen design



#92 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 08 November 2017 - 05:28 PM

I'm not certain I'm understanding correctly. Does it just need to remember the screen as well as the DMap? That would be a very simple change. Here it is, in fact:
Spoiler

Or does it need to account for Link leaving through a different exit than he entered from? That's still doable, but it's a very different script.

Also, I'm listening to the Xenoblade OST now and paused it to watch the video. That was slightly confusing. :P
  • Anthus likes this

#93 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 08 November 2017 - 06:35 PM

Yes, that is exactly what I needed. This makes it so a single interior can be accessed from any map/ d-map as normal, but allows that to be remembered so if that interior is accessed from different maps/ d-maps, Link will always return to the one from which he entered. :)

 

And yeah, I just listen to these really long VGM compilations on YouTube when I work with ZC mostly, but I love these, and it introduces me to a lot of composers I wouldn't have known about otherwise.

 

Video showing how an area can be accessed from different "times", but the player always returns to the one they came from

 

Each screen is a different d-map representing each visit. They all warp to and from the same screen. Success!



#94 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 02 January 2018 - 04:47 PM

Small question, because I forget. I have imported a global script. If I use a different file to import my FFC/ Item scripts, will that overwrite the global already in the buffer? Or, should I just bring in my global, along with all the other scripts in one file, like:

import "std.zh"
import "ffcscript.zh"
import "global.z"
import "RoomCancel.z"
import "signpost.z"
etc..

I like having separate files as it is easier to keep organised/ make changes, but is it better to have them all in one big file for performance or anything? Thanks!



#95 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 02 January 2018 - 05:10 PM

If you import a file, it will clear the buffer and replace it with the contents of whatever file you import.

There's basically no difference in function between keeping one big file and importing them individually, so whatever is easiest is fine. The only thing that's different is how errors are presented; the compiler will only output errors for one file at a time. I prefer to keep even the import statements in an external file, so the quest's script buffer just has a single import statement that never needs changed.
  • Anthus likes this


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users