Difference between revisions of "Map designate ex"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
(Use)
(Remove dead link.)
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:
  
 
==Use==
 
==Use==
Specifies which map to load when entering a floor.  Floors number up from 0 being pioneer2 or labo. Map numbers can be found in the table [https://sharnoth.com/psodevwiki/client/assets/area_mappings here].
+
Specifies which map to load when entering a floor.  Floors number up from 0 being pioneer2 or labo. Map numbers can be found in the table [[Map_ID_Table]].
 +
 
  
 
This opcode reads the given register and the 4 following it in order. If we called map_designate_ex R40, it would read R40 R41 R42 R43 and R44.
 
This opcode reads the given register and the 4 following it in order. If we called map_designate_ex R40, it would read R40 R41 R42 R43 and R44.
Line 27: Line 28:
 
Be sure to set the third and fifth value at least once when working with these (consider these reserved at this point to avoid issues if possible)
 
Be sure to set the third and fifth value at least once when working with these (consider these reserved at this point to avoid issues if possible)
  
For GC use only. For Blue Burst see [[BB_Map_Designate]]. For v1 and v2 see [[map_designate]].
+
This opcode is supported by Challenge in V2, all of V3, and all of V4. For Blue Burst see [[BB_Map_Designate]]. For V1 and V2 see [[map_designate]].
  
 
==Example==
 
==Example==

Latest revision as of 23:46, 27 December 2022

Syntax

Syntax: map_designate_ex register

  • register = register to start designations from.

Use

Specifies which map to load when entering a floor. Floors number up from 0 being pioneer2 or labo. Map numbers can be found in the table Map_ID_Table.


This opcode reads the given register and the 4 following it in order. If we called map_designate_ex R40, it would read R40 R41 R42 R43 and R44.

In this example the registers would represent the following.

R40 = floor id

R41 = map id

R42 = flag, used in conjunction with R44

R43 = map variation

R44 = (0-3) if R42 is set

  • 0: Use whatever objects and enemies you've put down on the floor
  • 1: Ignore whatever you've put on the floor and use an offline map template
  • 2: Ignore whatever you've put on the floor and use an online map template
  • 3: Ignore whatever you've put on the floor, load no template - floor is completely empty

Be sure to set the third and fifth value at least once when working with these (consider these reserved at this point to avoid issues if possible)

This opcode is supported by Challenge in V2, all of V3, and all of V4. For Blue Burst see BB_Map_Designate. For V1 and V2 see map_designate.

Example


0:       set_episode 00000001  //Defines we are playing in episode 2
         leti R40, 00000000  //used to set floor id (floor 0)
         leti R41, 00000012  //used to set the map id (labo)
         leti R42, 00000000  //leave at 0, could be set to 1, but unless you want to use map defaults best practice is to set to 0
         leti R43, 00000000  //used to set the variation
         leti R44, 00000000  //leave at 0 to load what we put in the map
         map_designate_ex R40  //use the previously set 5 registers to set floor 0, to labo
         leti R40, 0000000A  //used to set floor id (floor 10)
         leti R41, 0000001C  //used to set the map id (seabed upper)
         leti R43, 00000002  //used to set the variation (map 3)
         map_designate_ex R40  //use the previously set 5 registers to set floor 10, to seabed upper, variation 3
         leti R40, 0000000B  //used to set floor id (floor 11)
         leti R41, 0000001D  //used to set the map id (seabed lower)
         leti R43, 00000002  //used to set the variation (map 3)
         map_designate_ex R40  //use the previously set 5 registers to set floor 11, to seabed lower, variation 3
         leti R40, 0000000D  //used to set floor id (floor 13)
         leti R41, 0000001F  //used to set the map id (Olga Flow)
         leti R43, 00000000  //used to set the variation
         map_designate_ex R40  //use the previously set 5 registers to set floor 11, to seabed lower, variation 3
         set_floor_handler 0000000A, 100  //Run label 100 when entering floor 10 (Seabed Upper)
         set_floor_handler 0000000B, 200  //Run label 200 when entering floor 11 (Seabed Lower)
         set_floor_handler 0000000D, 300  //Run label 300 when entering floor 13 (Olga Flow)
         initial_floor 0000000A  //Start players in Seabed Upper
         get_difflvl2 R252  //Store off the difficulty for later use
         get_number_of_player1 R251  //Store off the number of players for later use
1:       ret

Also see

set_episode, set_floor_handler, initial_floor, BB_Map_Designate, map_designate, get_difflvl2, get_number_of_player1, ret