Adding a boss to a level

Discussion in 'Discussion and Q&A Archive' started by InfiniteWave, Apr 20, 2013.

Thread Status:
Not open for further replies.
  1. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    I'm going to take a break from HPZ but for now but I want to at-least get a boss going. So how would I take Emerald Hill's boss and stick it into Hidden Palace? I looked for tutorials on how to do this but there are none.
     
  2. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    923
    Boss loading is controlled by the Dynamic Level Events. I'm pretty sure most or all bosses use hardcoded positions, so if you wanted to put EHZ's boss in HPZ, he'd have to be at the same exact spot in HPZ that he is in EHZ.
     
  3. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Well then, allow me to enlighten you with me flapping my jaws about it.


    First, find LevEvents_EHZ. Copy everything from that label up to (but not including) LevEvents_001 and paste it into a new ASM file. Name it "HPZ Level Events.asm".


    Now, go through that ASM file and replace every instance of LevEvents_EHZ with LevEvents_HPZ.


    Finally, we need to actually put our code in. So find LevEvents_HPZ (in s2.asm, mind you) and replace it and the rts under it with the contents of the ASM file we made earlier.


    I hope this helped you in some way.
     
  4. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    One thing you guys are missing there is something else you have to do before you can get it too work or else the bosses art will load glitched up and the screen will not lock correctly. To do this go to SetLevelEndType: and below the, after HTZ2 retrun add

    cmpi.w #$801,(Current_ZoneAndAct).w
     beq.w return_4C46  ; if HPZ2, return

    This will tell the zone that you are at the end of the second act of HPZ, (since HPZ zone ID is $8 and $00 is act 1 and $01 is act 2 so the result is $801) so it knows to lock the screen for the boss and the return is pretty much self explainitory.

    Edit: yes I know I gave him the answer for this but he is a beginner so I thought what the hell and it will help him learn how level types work and what zone and act ID is what.
     
    Last edited by a moderator: Apr 20, 2013
  5. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    It gave me a bunch of errors when I try to build. They say "the jump distance is too big" and the others say "double symbol defined" That would mean I need to change the "return_XXXX to somewhere else but I don't where.
     
  6. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    It would help if we had an idea of what branchs cause the jump distance errors, (are they bsr.w or bra.w branchs) and what symbols are double defined. Could you copy and paste your results so we can have a better idea?

    Edit: Did you change all EHZ level events you copied into HPZ like Thomas said, you could of overlooked something? Also my HPZ uses MCZ boss so It could be making it have the EHZ boss that is causing issues I never came across.
     
    Last edited by a moderator: Apr 20, 2013
  7. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    I followed Thomas's steps. But anyway here are the results.

    Code:
    assembling s2.asm
    PASS 1
    s2.macrosetup.asm(201)
    > > >s2.asm(19190): error: jump distance too big
    > > >   bne.s   loc_E6A2
    > > >s2.asm(19192): error: jump distance too big
    > > >   bcs.s   return_E6A0
    > > >s2.asm(19199): error: symbol double defined
    > > > RETURN_E6A0
    > > > return_E6A0:
    > > >s2.asm(19202): error: symbol double defined
    > > > LOC_E6A2
    > > > loc_E6A2:
    > > >s2.asm(19210): error: jump distance too big
    > > >   bcs.s   return_E6EC
    > > >s2.asm(19223): error: symbol double defined
    > > > RETURN_E6EC
    > > > return_E6EC:
    > > >s2.asm(19235): error: jump distance too big
    > > >   bcs.s   return_E736
    > > >s2.asm(19248): error: symbol double defined
    > > > RETURN_E736
    > > > return_E736:
    > > >s2.asm(19254): error: jump distance too big
    > > >   beq.s   return_E750
    > > >s2.asm(19259): error: symbol double defined
    > > > RETURN_E750
    > > > return_E750:
    mappings/sprite/obj34.asm(476)
    s2.sounddriver.asm(2807)
    s2.asm(89009)
    
    0.76 seconds assembly time
    
      92493 lines source file
     123145 lines incl. macro expansions
          1 pass
         10 errors
          0 warnings
    Press any key to continue . . .
    
     
  8. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    Change all the branchs that have a .s at the end and change it to .w that should fix your branch errors and for the sympol double defined well it means its in there twice whcih is not aloud. Also just put a _HPZ after those double defined symbols because those came along with EHZ level events. Actually the last part I told you about should fix all the errors.

    Edit: Make sure you dont change the EHZ return branches by mistake
     
    Last edited by a moderator: Apr 20, 2013
  9. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    Two more errors showed up.

    Code:
    assembling s2.asm
    PASS 1
    s2.macrosetup.asm(201)
    > > >s2.asm(19244): error: short addressing not allowed
    > > >   addq.b  #2,(Dynamic_Re.wsize_Routine).w ; => LevEvents_HPZ2_Routine4
    > > >s2.asm(19244): error: addressing mode not allowed here
    > > >   addq.b  #2,(Dynamic_Re.wsize_Routine).w ; => LevEvents_HPZ2_Routine4
    mappings/sprite/obj34.asm(476)
    s2.sounddriver.asm(2807)
    s2.asm(89010)
    
    0.74 seconds assembly time
    
      92494 lines source file
     123146 lines incl. macro expansions
          1 pass
          2 errors
          0 warnings
    Press any key to continue . . .
    
    
    
     
  10. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    Thats because you have ,(Dynamic_Re.wsize_Routine) when it should be (Dynamic_Resize_Routine) so you put in a non-existant control.

    Edit: Oh you accedently put .w in the name
     
    Last edited by a moderator: Apr 20, 2013
  11. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    That seems to have fixed everything so now I need to find where out where the boss will load at. Thanks for your help.
     
  12. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    No problem man thats what I and other members are here for Happy Hacking!

    Edit: Any futher questions dont hesitate to ask just dont ask excessively.
     
    Last edited by a moderator: Apr 20, 2013
Thread Status:
Not open for further replies.