Map unit: Difference between revisions
| (2 intermediate revisions by 2 users not shown) | |||
| Line 8: | Line 8: | ||
Two types of map units exist: ''Static'' and ''Dynamic''. | Two types of map units exist: ''Static'' and ''Dynamic''. | ||
'''Static map units''' are loaded during stage generation (see [[GameScene]] for more details). Their name is suffixed with <code>_Static</code>. They can contain both map rails and map objects; furthermore objects can be linked to each other to implement custom game logic using the [[#Link system]]. Static | '''Static map units''' are loaded during stage generation (see [[GameScene]] for more details). Their name is suffixed with <code>_Static</code>. They can contain both map rails and map objects; furthermore objects can be linked to each other to implement custom game logic using the [[#Link system]]. Static units are always loaded in memory and will be visible if the player is within the actor's <code>TraverseDist</code> (draw distance) set in [[ActorInfo.product.sbyml]]. It's possible to see actors from the top-left to the bottom-right in open-world stages (MainField and AocField) if the <code>TraverseDist</code> is set high enough. | ||
'''Dynamic map units''' are loaded and unloaded on-the-fly. Their name is suffixed with <code>_Dynamic</code>. The dynamic loading capability is only really put to good use for open-world type stages (e.g. MainField and AocField). In such map units, the link system cannot be used and only map objects can be specified. Dynamic | '''Dynamic map units''' are loaded and unloaded on-the-fly. Their name is suffixed with <code>_Dynamic</code>. The dynamic loading capability is only really put to good use for open-world type stages (e.g. MainField and AocField). In such map units, the link system cannot be used and only map objects can be specified. Dynamic units are considered to be loaded once the player is either inside of the map they are placed (always the case for CDungeon and MainFieldDungeon), or the player is (on MainField and AocField) located in one of the map-sections around the map-section the unit is placed in. | ||
'''<u>Example</u>:''' Player is located in <u>H-5</u> so ''G-4, H-4, I-4, G-5- I-5, G-6, H-6 and I-6'' dynamic | '''<u>Example</u>:''' Player is located in <u>H-5</u> so ''G-4, H-4, I-4, G-5- I-5, G-6, H-6 and I-6'' dynamic units are loaded in memory and will be displayed if the <code>TraverseDist</code> is high enough. | ||
==Contents== | ==Contents== | ||
| Line 32: | Line 32: | ||
{{expand section}} | {{expand section}} | ||
Array of rail structures. Can only appear in group 0 maps (Static); this section is completely ignored for non-static map units. | Array of rail structures. Can only appear in group 0 maps (Static); this section is completely ignored for non-static map units. | ||
There are two primary types of Rails. | |||
{| class="wikitable" | |||
!Name | |||
!Description | |||
|- | |||
|NavigationMeshRoad | |||
|Used by Actors that are dynamically spawned along a route | |||
|- | |||
|Guide | |||
|Used to send an actor through a pre-set route via RailPoints. | |||
|} | |||
Rails utilize nodes ('''NavigationMeshRoadPoint''' and '''GuidePoint''') depending on the type of Rail in use. Rails are also configured to use a linear or Bezier rail type. | |||
<br /> | |||
{| class="wikitable" | |||
|+Node | |||
!Param | |||
!Description | |||
!Example | |||
!Default Value | |||
|- | |||
|IsAdjustPosAndDirToPoint | |||
|Determines whether the actor will turn and face the next rail point before moving. | |||
|false | |||
|false | |||
|- | |||
|WaitFrame | |||
|How long to wait at the current Rail Point. | |||
|120.0 | |||
|0.0 | |||
|- | |||
|OnFlagName | |||
|Flag to set to On when the actor arrives at the Rail Point | |||
|FirstOhenro_Point12 | |||
| | |||
|- | |||
|WaitASKeyName | |||
|If set to wait, the AS to use whilst waiting. | |||
|Surprised | |||
| | |||
|- | |||
|Next Distance | |||
|The Distance between the current Rail Point and the next one. | |||
|1.0853188 | |||
|0.0 | |||
|- | |||
|PrevDistance | |||
|The Distance between the current Rail Point and the previous one. | |||
|31.7270927 | |||
|0.0 | |||
|- | |||
|Scale | |||
|Size of Rail | |||
| | |||
|0, 0, 0 | |||
|- | |||
|Rotate | |||
|Rotation of the Rail Point | |||
| | |||
|0, 0, 0 | |||
|- | |||
|Translate | |||
|The position of the Rail Point | |||
|[38.73703, 280.20105, -2438.69751] | |||
|0, 0, 0 | |||
|- | |||
|ControlPoints | |||
| | |||
| | |||
| | |||
|- | |||
|UnitConfigName | |||
|The Type of Rail Point | |||
|GuidePoint | |||
| | |||
|} | |||
==Link system== | ==Link system== | ||
| Line 83: | Line 160: | ||
|29||DemoMember||-||デモ参加 | |29||DemoMember||-||デモ参加 | ||
|- | |- | ||
|32||FixedCs|| | |32||FixedCs||Rigid connection constraint||固定CS | ||
|- | |- | ||
|26||ForSale||Links a shop item to its seller (target is the seller NPC).||売り物 | |26||ForSale||Links a shop item to its seller (target is the seller NPC).||売り物 | ||