Duke4.net Forums: Moving cutscenes to different episodes - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Moving cutscenes to different episodes

User is online   NightFright 

  • The Truth is in here

#1

I was wondering if EDuke32 allows to play cutscenes intended for specific episode slots in others.

Examples:
- Finale cutscene which is normally played at the end of episode 2 (Lunar Apocalypse) should play at the end of custom/empty episode slot 5.
- Switch finale cutscenes of episode 2 (Lunar Apocalypse) and 3 (Shrapnel City).

Can it be done and if so, how?
0

User is offline   Danukem 

  • Duke Plus Developer

#2

The answer is yes, and it involves setting a struct member to trick the game into thinking that the episode is a different one from that which the player actually completed. However, you don't want to set that until right at the end, otherwise it might cause level progression to get frakked up or it might get un-set before the end of the game.

Here's what I would try. At the end of a boss actor's CON code, there should be block that looks like this (example from BOSS3, the overlord):

  ifactioncount 8
  {
    iffloordistl 8
      sound THUD
    action ABOSS3DEAD
    cstat 0
    ifspritepal 0
    endofgame 52
  }


Let's say that boss is at the end of some episode which isn't his native episode. What you want is code that switches to that episode so that when it plays the cutscene, it's the right one. So:

  ifactioncount 8
  {
    iffloordistl 8
      sound THUD
    action ABOSS3DEAD
    cstat 0
    ifspritepal 0
    {
       setuserdef[].volume_number 1
       endofgame 52
    }
  }


If it already is volume 1 (=episode 2), then no harm done. If it isn't, then that should switch it as the game ends. Hope it works! To test, start an episode that isn't 2, go into god mode and give all and spawn BOSS3 from the console. Kill him and see if it's the right ending. If it works, do that same (with appropriate volume_number) for any other bosses.
0

User is offline   TerminX 

  • el fundador

  #3

EDuke32 allows you to define your own cutscenes, play them at any time from CON, and provides events which you can use to play sounds, draw sprites on top of the .anm, etc.
1

User is offline   Danukem 

  • Duke Plus Developer

#4

View PostTerminX, on 28 April 2016 - 12:40 PM, said:

EDuke32 allows you to define your own cutscenes, play them at any time from CON, and provides events which you can use to play sounds, draw sprites on top of the .anm, etc.


That's great, but since EVENT_CUTSCENE is not documented on the wiki and I don't know how to use it, adding a single line of code to each boss seemed like a reasonable solution.
0

User is online   NightFright 

  • The Truth is in here

#5

I will try Dan's suggestion. Thanks a lot!

To be more precise, I want to use this in "Last Reaction & Water Bases" from the addon compilation in order to try switching the slots of both episodes. I.e. the earlier "Last Reaction" should be ep.2 instead of 3 while "Water Bases" should take its place (ep.3 instead of 2). This probably means messing with the Overlord and Emperor definitions. Important to consider: The episodes still keep their respective bosses, i.e. you would have BOSS2 in episode 3 and BOSS3 in episode 2. That means I would have to tell the game that it should still play CINEOV3 when killing BOSS3 even though we are in episode 2 and CINEOV2 when killing BOSS2 in episode 3.

I guess this means I would have to add code which is usually redundant, i.e.
setuserdef[].volume_number 1
for BOSS2 (to be used in ep.3 slot) and
setuserdef[].volume_number 2
for BOSS3 (to be used in ep.2 slot)

The additional challenge might be to maintain the space intermission screens for "Water Bases" if it's not ep.2 while also keeping the city intermissions for "Last Reaction". So the two challenges are actually cutscenes and intermissions. IIRC there is a way to shift art tiles dynamically via DEF code (copytile). Maybe I just go for switching the space and city intermission tiles (if it's possible to use copytile for that) and that's it.

The idea was this:
// Overwrite ART tiles for city BONUSSCREEN with space version
copytile 3240 { tile 3245 }
copytile 3241 { tile 3246 }
copytile 3242 { tile 3247 }
copytile 3243 { tile 3248 }
copytile 3244 { tile 3249 }

// Overwrite ART tiles for space BONUSSCREEN with city version
copytile 3245 { tile 3240 }
copytile 3246 { tile 3241 }
copytile 3247 { tile 3242 }
copytile 3248 { tile 3243 }
copytile 3249 { tile 3244 }


However I am unsure if it will really switch the tiles or just use the same intermission screen in both cases.

PS: Since the addon includes a custom tiles012.art anyway, I could also just swap the tiles with editart.

This post has been edited by NightFright: 29 April 2016 - 04:38 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#6

View PostNightFright, on 29 April 2016 - 01:41 AM, said:


I guess this means I would have to add code which is usually redundant, i.e.
setuserdef[].volume_number 1
for BOSS2 (to be used in ep.3 slot) and
setuserdef[].volume_number 2
for BOSS3 (to be used in ep.2 slot)



I would just like to point out that you changed the numbers here to make them wrong. :angry:

BOSS2, despite his label, is the Cycloid Emperor, who is the boss of episode three. Episode 3 = volume 2
BOSS3, despite his label, is the Overlord, who is the boss of episode two. Episode 2 = volume 1

if you look at my code I actually had it correct.
0

User is online   NightFright 

  • The Truth is in here

#7

Ah crap. My bad. I had assumed the actor names were following the sequence of the episodes. xD Thanks for pointing that out!
0

User is offline   Danukem 

  • Duke Plus Developer

#8

View PostNightFright, on 04 May 2016 - 08:08 AM, said:

Ah crap. My bad. I had assumed the actor names were following the sequence of the episodes. xD Thanks for pointing that out!


The more important question is, does it actually work?
1

User is online   NightFright 

  • The Truth is in here

#9

I have just tested it with Last Reaction & Water Bases. I moved LR episode from episode slot 3 to 1. With Dan's code, the ep.3 cutscene still plays when you kill the Emperor at the end of the episode. That means it works and both episodes can finally be shown in the correct menu order (LR as first, WB as second episode)! Thanks a lot, Dan!

This post has been edited by NightFright: 10 May 2016 - 01:13 AM

1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options