Skip to content

Commit

Permalink
chore: adding gotoif logic for codex
Browse files Browse the repository at this point in the history
  • Loading branch information
bradhannah committed Jan 8, 2024
1 parent bfda5a7 commit 7c09b75
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 113 deletions.
29 changes: 18 additions & 11 deletions Ultima5Redux/DataFiles/CutSceneScripts.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ MapNum,FrameNum,Command,StrParam,IntParam,X,Y,Visible,Comment
1,0,Comment,,0,0,0,false,"---- Shrine of Virtue Cut Scene"
1,0,Output,"<br>Thou dost approach the tranquil Shrine...",0,0,0,false,""
1,0,CreateMapunit,avatar,332,5,10,false,"off camera"
1,0,CreateMapunit,avatar,65,5,2,true,"Codex of Ultimate Wisdom"
1,1,MoveMapunit,avatar,0,5,10,false,"off camera"
1,1,SoundEffect,WalkOnGrass,1,0,0,false,"Heard off camera"
1,1,Pause,,500,0,0,false,""
Expand Down Expand Up @@ -141,16 +140,10 @@ MapNum,FrameNum,Command,StrParam,IntParam,X,Y,Visible,Comment
2,100,OutputModalText,"The Codex of Ultima Wisdom lies before thee...",0,0,0,false
2,101,OutputModalText,"The book is open to the page thou dost seek",0,0,0,false
2,102,OutputModalText,"Upon the hallowed page thou dost read:",0,0,0,false
2,103,OutputModalText,_CodexVirtueText,0,0,0,false,
2,104,ScreenEffect,InvertColors,1,0,0,false,"Invert the Colours"
2,104,SoundEffect,EarthQuake,1,0,0,false,"Start the rumble!"
2,104,ScreenEffect,ShakeScreen,1,0,0,false,"Earthquake!"
2,105,Pause,,3000,0,0,false,"Hold Tight"
2,106,ScreenEffect,InvertColors,0,0,0,false,"Uninvert Colors"
2,106,SoundEffect,EarthQuake,0,0,0,false,"Start the rumble!"
2,106,ScreenEffect,ShakeScreen,0,0,0,false,"Earthquake!"
2,107,OutputModalText,"A STRANGE WIND CAUSES THE PAGE TO TURN!",0,0,0,false
2,108,Goto,,200,0,0,false,"Go to leaving section"
2,102,GotoIf,ShrineStatus_QuestNotStarted_All,500,0,0,false,"If none have started - then you shouldn't be here!"
2,102,GotoIf,ShrineStatus_ShrineOrdainedNoCodex_Any,300,0,0,false,"You can ordain a quest and change to ShrineOrdainedWithCodex"
2,102,GotoIf,ShrineStatus_ShrineOrdainedWithCodex_Any,300,0,0,false,"Just repeat what you said before"
2,102,GotoIf,ShrineStatus_ShrineCompleted_All,500,0,0,false,"If all are complete - then you should not be able to pass guardians!"
2,200,MoveMapunit,avatar,0,5,4,true,"off camera"
2,201,SoundEffect,WalkOnGrass,1,0,0,false,"Leaving"
2,201,Pause,,500,0,0,false,""
Expand All @@ -176,3 +169,17 @@ MapNum,FrameNum,Command,StrParam,IntParam,X,Y,Visible,Comment
2,208,SoundEffect,WalkOnGrass,1,0,0,false,"walking in grass"
2,208,Pause,,500,0,0,false,""
2,209,EndSequence,,0,0,0,false,end of scene2
2,300,Comment,,0,0,0,false,"You have a shrine that is not ordained!"
2,300,OutputModalText,_CodexVirtueText,0,0,0,false,
2,301,ScreenEffect,InvertColors,1,0,0,false,"Invert the Colours"
2,301,SoundEffect,EarthQuake,1,0,0,false,"Start the rumble!"
2,301,ScreenEffect,ShakeScreen,1,0,0,false,"Earthquake!"
2,302,Pause,,3000,0,0,false,"Hold Tight"
2,303,ScreenEffect,InvertColors,0,0,0,false,"Uninvert Colors"
2,303,SoundEffect,EarthQuake,0,0,0,false,"Start the rumble!"
2,303,ScreenEffect,ShakeScreen,0,0,0,false,"Earthquake!"
2,304,OutputModalText,"A STRANGE WIND CAUSES THE PAGE TO TURN!",0,0,0,false
2,305,Goto,,200,0,0,false,"Go to leaving section"
2,500,Comment,,0,0,0,false,"You shouldn't be here!"
2,500,OutputModalText,"HOW DID YOU GET HERE?",0,0,0,false,"Let them know this is not right!"
2,501,Goto,,200,0,0,false,"time to leave"
250 changes: 160 additions & 90 deletions Ultima5Redux/DataFiles/CutSceneScripts.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@
"Visible": false,
"Comment": "off camera"
},
{
"FrameNum": 0,
"Command": "CreateMapunit",
"StrParam": "avatar",
"IntParam": 65,
"X": 5,
"Y": 2,
"Visible": true,
"Comment": "Codex of Ultimate Wisdom"
},
{
"FrameNum": 1,
"Command": "MoveMapunit",
Expand Down Expand Up @@ -1425,104 +1415,44 @@
"Comment": ""
},
{
"FrameNum": 103,
"Command": "OutputModalText",
"StrParam": "_CodexVirtueText",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": ""
},
{
"FrameNum": 104,
"Command": "ScreenEffect",
"StrParam": "InvertColors",
"IntParam": 1,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Invert the Colours"
},
{
"FrameNum": 104,
"Command": "SoundEffect",
"StrParam": "EarthQuake",
"IntParam": 1,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Start the rumble!"
},
{
"FrameNum": 104,
"Command": "ScreenEffect",
"StrParam": "ShakeScreen",
"IntParam": 1,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Earthquake!"
},
{
"FrameNum": 105,
"Command": "Pause",
"StrParam": "",
"IntParam": 3000,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Hold Tight"
},
{
"FrameNum": 106,
"Command": "ScreenEffect",
"StrParam": "InvertColors",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Uninvert Colors"
},
{
"FrameNum": 106,
"Command": "SoundEffect",
"StrParam": "EarthQuake",
"IntParam": 0,
"FrameNum": 102,
"Command": "GotoIf",
"StrParam": "ShrineStatus_QuestNotStarted_All",
"IntParam": 500,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Start the rumble!"
"Comment": "If none have started - then you shouldn't be here!"
},
{
"FrameNum": 106,
"Command": "ScreenEffect",
"StrParam": "ShakeScreen",
"IntParam": 0,
"FrameNum": 102,
"Command": "GotoIf",
"StrParam": "ShrineStatus_ShrineOrdainedNoCodex_Any",
"IntParam": 300,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Earthquake!"
"Comment": "You can ordain a quest and change to ShrineOrdainedWithCodex"
},
{
"FrameNum": 107,
"Command": "OutputModalText",
"StrParam": "A STRANGE WIND CAUSES THE PAGE TO TURN!",
"IntParam": 0,
"FrameNum": 102,
"Command": "GotoIf",
"StrParam": "ShrineStatus_ShrineOrdainedWithCodex_Any",
"IntParam": 300,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": ""
"Comment": "Just repeat what you said before"
},
{
"FrameNum": 108,
"Command": "Goto",
"StrParam": "",
"IntParam": 200,
"FrameNum": 102,
"Command": "GotoIf",
"StrParam": "ShrineStatus_ShrineCompleted_All",
"IntParam": 500,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Go to leaving section"
"Comment": "If all are complete - then you should not be able to pass guardians!"
},
{
"FrameNum": 200,
Expand Down Expand Up @@ -1773,6 +1703,146 @@
"Y": 0,
"Visible": false,
"Comment": "end of scene2"
},
{
"FrameNum": 300,
"Command": "Comment",
"StrParam": "",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "You have a shrine that is not ordained!"
},
{
"FrameNum": 300,
"Command": "OutputModalText",
"StrParam": "_CodexVirtueText",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": ""
},
{
"FrameNum": 301,
"Command": "ScreenEffect",
"StrParam": "InvertColors",
"IntParam": 1,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Invert the Colours"
},
{
"FrameNum": 301,
"Command": "SoundEffect",
"StrParam": "EarthQuake",
"IntParam": 1,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Start the rumble!"
},
{
"FrameNum": 301,
"Command": "ScreenEffect",
"StrParam": "ShakeScreen",
"IntParam": 1,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Earthquake!"
},
{
"FrameNum": 302,
"Command": "Pause",
"StrParam": "",
"IntParam": 3000,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Hold Tight"
},
{
"FrameNum": 303,
"Command": "ScreenEffect",
"StrParam": "InvertColors",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Uninvert Colors"
},
{
"FrameNum": 303,
"Command": "SoundEffect",
"StrParam": "EarthQuake",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Start the rumble!"
},
{
"FrameNum": 303,
"Command": "ScreenEffect",
"StrParam": "ShakeScreen",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Earthquake!"
},
{
"FrameNum": 304,
"Command": "OutputModalText",
"StrParam": "A STRANGE WIND CAUSES THE PAGE TO TURN!",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": ""
},
{
"FrameNum": 305,
"Command": "Goto",
"StrParam": "",
"IntParam": 200,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Go to leaving section"
},
{
"FrameNum": 500,
"Command": "Comment",
"StrParam": "",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "You shouldn't be here!"
},
{
"FrameNum": 500,
"Command": "OutputModalText",
"StrParam": "HOW DID YOU GET HERE?",
"IntParam": 0,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "Let them know this is not right!"
},
{
"FrameNum": 501,
"Command": "Goto",
"StrParam": "",
"IntParam": 200,
"X": 0,
"Y": 0,
"Visible": false,
"Comment": "time to leave"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ public class Goto : CutOrIntroSceneScriptLineTurnResult {
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum GotoCondition {
None, BadMantra, ShrineStatus_QuestNotStarted, ShrineStatus_ShrineOrdainedNoCodex,
ShrineStatus_ShrineOrdainedWithCodex, ShrineStatus_ShrineCompleted, HasNotEnoughMoney, GaveNoMoney
ShrineStatus_ShrineOrdainedWithCodex, ShrineStatus_ShrineCompleted, HasNotEnoughMoney, GaveNoMoney,
ShrineStatus_QuestNotStarted_All, ShrineStatus_ShrineOrdainedNoCodex_Any,
ShrineStatus_ShrineOrdainedWithCodex_Any, ShrineStatus_ShrineCompleted_All
}


public Goto(CutOrIntroSceneScriptLine scriptLine) :
base(TurnResultType.Script_GotoIf, TurnResulActionType.ActionRequired, scriptLine) {
if (scriptLine.Command is not CutOrIntroSceneScriptLine.CutOrIntroSceneScriptLineCommand.Goto
Expand Down
Loading

0 comments on commit 7c09b75

Please sign in to comment.