-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OoT] Cutscene Implementation Update #208
Conversation
New changes:
|
New changes:
I think this PR is now ready for review (unless I missed something but I don't think so :thonk:), though I'll wait a bit before marking it ready for review as I want to try things to improve the UI a bit Also a small note/reminder: in this PR I changed and removed classes and properties, for classes renaming is fine it doesn't break anything it just works™ but for props you need to transfer the data to the new props you want to use (this was introduced with the object list upgrade, see |
Marking this as ready to review as I don't have anything else to change (I think) |
) | ||
|
||
elif list.listType in ["StartSeqList", "StopSeqList", "FadeOutSeqList"]: | ||
endFrame = e.endFrame if list.listType == "FadeOutSeqList" else "0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you force endFrame to be 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in decomp it says the end frame isn't used so the value doesn't matter at all (unless I misread the line, which is possible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but yea I guess I can use the default value of the class, those need a small cleanup anyway but idk if I should do it in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be noted that decomp's implementation of the cutscene structs doesn't match the original implementation. For example, all evidence suggests that CsCmdMisc
, CsCmdLightSetting
, CsCmdStartSeq
, CsCmdStopSeq
CsCmdFadeOutSeq
are all the same type as CsCmdActorCue
. Decomp just implements them separately so that they can hide editor only properties not read by the game, and give a few properties more specialized names.
endFrame
is one such property that all commands have, but isn't always needed by the game. But I don't think it makes any sense to deliberately force the value to 0 just because you can get away with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and I don't feel that you should be deliberately generating corrupt data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i understand your point of view a little from the perspective of vanilla data.
but for custom cutscenes, how is it corrupt data? you want the commands that dont use an endframe to have one anyway and be confusing for the user? the ui might as well hide it so people dont need to think about it. cause again, it does not matter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, with your (mzx) logic we should also use 1 for unused args? It doesn't make sense to me, I mean I understand the point of view, like ok I get it originally it wasn't split etc, but for Fast64 in a modding context where I and other devs try our best to get something easy to use for everyone I don't think consistency should be considered for this particular thing as it's just confusing, alternatively I can accept using a macro but idk it doesn't seem really useful, also I don't really understand how 0 is corrupted data, especially for a frame value where you can actually want 0 to be used (well, ok 0 for a end frame is weird but you get what I mean hopefully)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tldr I just want Fast64 to be easy to use and understand and having a value for this would be confusing for the users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two simple reasons:
- Storing the
endFrame
for all commands is a nice thing to have, and the structs already support this. - Given that the structs all call the property
endFrame
in decomp, it makes zero sense to deliberately generate incorrect data for this property, since the user could have their own reasons for reading the data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skimmed through
fast64_internal/oot/oot_upgrade.py
Outdated
# @TODO: find a way to check properly which seq command it is | ||
if newName == "csSeqID": | ||
setattr(data, "csSeqPlayer", "Custom") | ||
setattr(data, "csSeqPlayerCustom", str(oldData)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't say I understand the todo
like, the seqId value here may be seqPlayer
from CS_FADE_OUT_SEQ
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should rephrase that but we need a proper way to check if we're dealing with the fade out command or the start/stop one, there's a minor difference between these two, the fade out one doesn't take a seq id but the player type (as defined in sequence.h iirc)
all of this is based on the informations inside z64cutscene_commands.h btw
the main issue at the moment is that we have to use "Custom" when upgrading because everything was assumed to have the same parameters, and now we know for sure this is a wrong assumption
csTermEnd: IntProperty(name="End Frm", min=0, default=100) | ||
csUseDestination: BoolProperty(name="Write Terminator (Code Execution)") | ||
csDestination: IntProperty(name="Index", min=0) | ||
csDestinationStartFrame: IntProperty(name="Start Frm", min=0, default=99) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does frm need to be abbreviated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the deprecated code, I haven't updated it tbh I don't even know if everything still works for that
imo we should completely remove that legacy system and upgrade the things (though I don't have a cs in a scene so I can't really try if it'd work properly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just remove this thing? I'm not sure anyone still using that now idk if it's worth making the code to update properly
any updates on this? sorry I just need this to be merged to make things easier with merging zcamedit |
is there anything holding this? except update that branch I guess |
most of things I wanted to do are done, I improved the importer and the exporter and fixed some issues I just want to improve the UI and I think I'm done with this, also I want to remove support for embedded cutscenes, I don't think anyone is using it, and if I do that I'll move files that are inside also I implemented the preview for everything, not only imported cutscenes edit: I just wanna improve the previewer a bit then I'll be done for real |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, otherwise looks good.
Tested importing a vanilla scene and previewing the cutscene in Blender. Also tested exporting a basic scene with several different command types. Both worked with no issues.
actorCueList: list[CutsceneCmdActorCueList] = field(default_factory=list) | ||
playerCueList: list[CutsceneCmdActorCueList] = field(default_factory=list) | ||
camEyeSplineList: list[CutsceneCmdCamEyeSpline] = field(default_factory=list) | ||
camATSplineList: list[CutsceneCmdCamATSpline] = field(default_factory=list) | ||
camEyeSplineRelPlayerList: list[CutsceneCmdCamEyeSplineRelToPlayer] = field(default_factory=list) | ||
camATSplineRelPlayerList: list[CutsceneCmdCamATSplineRelToPlayer] = field(default_factory=list) | ||
camEyeList: list[CutsceneCmdCamEye] = field(default_factory=list) | ||
camATList: list[CutsceneCmdCamAT] = field(default_factory=list) | ||
miscList: list[CutsceneCmdMiscList] = field(default_factory=list) | ||
transitionList: list[CutsceneCmdTransition] = field(default_factory=list) | ||
textList: list[CutsceneCmdTextList] = field(default_factory=list) | ||
lightSettingsList: list[CutsceneCmdLightSettingList] = field(default_factory=list) | ||
timeList: list[CutsceneCmdTimeList] = field(default_factory=list) | ||
seqList: list[CutsceneCmdStartStopSeqList] = field(default_factory=list) | ||
fadeSeqList: list[CutsceneCmdFadeSeqList] = field(default_factory=list) | ||
rumbleList: list[CutsceneCmdRumbleControllerList] = field(default_factory=list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach doesn't preserve the order different types of commands appear in. (e.g. CutsceneCmdActorCueList
followed by CutsceneCmdCamEyeSpline
vs. the other order). However, I don't think that should ever matter in game, and Fast64 has long since stopped matching on vanilla data import -> export (e.g. exported DLs are sometimes more efficient). So this is probably okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the order actually matters for cutscene commands
] | ||
|
||
# order here sets order on the UI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you reorder ootEnumCSListTypeListC
above and csListTypeToIcon
below to match this order then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna do the reverse so the UI doesn't change (note that things up to camATList
are from the zcamedit merge, so this won't change)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Opening this as a draft so people can make suggestions
Current changes:
layout.box()
to improve the UINotes:
Output Example
As always I'm open to suggestions!