Jump to content

Photo

[ITEM] [2.53] Farore's Wind not respecting scripted continue


  • Please log in to reply
6 replies to this topic

#1 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 06 October 2018 - 02:53 AM

Normally when using Farore's Wind, it will behave identical to an F6 continue. When trying to fix a continue bug with a script, however, I've discovered that  it doesn't seem to respect Game->LastEntranceDMap/Screen or Game->ContinueDMap/Screen when they are set with ZScript. It instead sends Link to whatever the continue screen was before the script changes were applied. Testing the same script with Continue/Save it seems to be otherwise working as intended. I can imagine this causing continue bugs in quests with both a scripted save system and Farore's Wind.

 

I've tested this in both 2.50.2 and 2.53 Beta 22.

 

The script I used for testing:

ffc script CustomWindContinue{
	void run(){
		while(true){
			//if(UsingItem(I_FARORESWIND)){
			//	while(true){
					Game->ContinueDMap = Game->GetCurDMap();
					Game->ContinueScreen = Game->GetCurDMapScreen();
					Game->LastEntranceDMap = Game->GetCurDMap();
					Game->LastEntranceScreen = Game->GetCurDMapScreen();
					Waitframe();
			//	}
			//}
			Waitframe();
		}
	}
}


Edited by Moosh, 06 October 2018 - 02:54 AM.


#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 20 November 2018 - 10:07 PM

 

Normally when using Farore's Wind, it will behave identical to an F6 continue. When trying to fix a continue bug with a script, however, I've discovered that  it doesn't seem to respect Game->LastEntranceDMap/Screen or Game->ContinueDMap/Screen when they are set with ZScript. It instead sends Link to whatever the continue screen was before the script changes were applied. Testing the same script with Continue/Save it seems to be otherwise working as intended. I can imagine this causing continue bugs in quests with both a scripted save system and Farore's Wind.

 

I've tested this in both 2.50.2 and 2.53 Beta 22.

 

The script I used for testing:

ffc script CustomWindContinue{
	void run(){
		while(true){
			//if(UsingItem(I_FARORESWIND)){
			//	while(true){
					Game->ContinueDMap = Game->GetCurDMap();
					Game->ContinueScreen = Game->GetCurDMapScreen();
					Game->LastEntranceDMap = Game->GetCurDMap();
					Game->LastEntranceScreen = Game->GetCurDMapScreen();
					Waitframe();
			//	}
			//}
			Waitframe();
		}
	}
}

 

I'll have a look when I'm done writing the module system. What happens if you use an item script, instead of an ffc for this?

 

I don't think that you can interrupt Faeroe's Wind with an ffc script. A global script, perhaps, but not an ffc script.

 

FW, I think, reads its values before you get a chance to write them.



#3 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 20 November 2018 - 10:45 PM

I'll have a look when I'm done writing the module system. What happens if you use an item script, instead of an ffc for this?

 

I don't think that you can interrupt Faeroe's Wind with an ffc script. A global script, perhaps, but not an ffc script.

 

FW, I think, reads its values before you get a chance to write them.

I believe the FFC script was my followup attempt after using an item script failed. I figured it would make more sense to set the point before the item was used altogether. Either way the idea remains the same, I'm not trying to interrupt Farore's Wind in any way, just change the screen that it sends you to. One would imagine this is either the continue screen, the last entrance screen, or a fixed value associated with the DMap. It appears to be none of these, as it's affected by the Continue Here screen flag.

 

If this isn't a bug but an intended behavior, that's fine. I found it while trying (and failing) to fix a continue bug in Prometheus and figured it was worth bringing up.



#4 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 21 November 2018 - 12:17 PM

Same issue if you F6 continue during a warping animation. ZC won't care about changes to Game->LastEntranceDMap/Screen or Game->ContinueDMap/Screen.

Edited by Avataro, 21 November 2018 - 12:20 PM.


#5 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 21 November 2018 - 05:14 PM

Same issue if you F6 continue during a warping animation. ZC won't care about changes to Game->LastEntranceDMap/Screen or Game->ContinueDMap/Screen.

Do you mean only in cases where the continue point is set during the warp animation? Or that all continue point changes are ignored by F6 during warps?
 

...

This seems like it could potentially increase the severity of the bug, as it opens the possibility of breaking all quests using a scripted continue system.



#6 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 21 November 2018 - 05:43 PM

 

Or that all continue point changes are ignored by F6 during warps?

 

This. ZC must keep track internally of a continue point, and I guess F6 during warps and farores wind use the internal variables instead of the zscript exposed ones.


Edited by Avataro, 22 November 2018 - 02:49 PM.


#7 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 23 November 2018 - 01:42 AM

This. ZC must keep track internally of a continue point, and I guess F6 during warps and farores wind use the internal variables instead of the zscript exposed ones.

 

I'll certainly look into it. I did make it very easy to duplicate Farore's Wind by script, using new functions:

 

Link->WarpEx() and Link->Explode() together, will effectively act like FW.


  • Avaro likes this


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users