====== Add New Pressure Plate Arrow Trap (ER) ======
Authors: Evanlyn
===== Prerequisites =====
* DS Map Studio, and basic usage knowledge
* DarkScript 3, and basic usage knowledge
* Yabber (w/ unpacked Elden Ring folder)
* Patience.
===== Notes =====
Be sure to take notes of all the relevant names and IDs as you go. Make lots of backups.
Be careful not to use any duplicate flags or Entity IDs; regions with duplicate EntityIDs in particular have a chance to //permanently corrupt loaded mapbnds//, so exercise caution.
Be careful when making Flag IDs; if the fifth digit is 1-9, it will cause the flag to reset on grace/area reload (Eg: XXXX0XXX).
Refer to other Entity or Flag IDs to see how FromSoft formatted them; sometimes it might matter, or not.
If you're curious about most entities having MapID: -1, UnkE0C: 255, and UnkS0C: -1, don't ask me. I have no idea, but changing it can break things. So just keep them that way.
===== How To Make Pressure Plate Arrow Traps =====
**1.** Create a new pressure plate asset (eg: AEG027_044). Give it a unique EntityID, and place it where you want it to go.
**2.** Create a new Enemy entity. Give it a unique EntityID, and the following values:
* UnkC4: -1
* LightSetID: -1
* FogParamID: -1
* MapID: -1
* Unk0C: -1
* Unk14: -1
* ThinkParamID: 1
* NPCParamID: 10003100
* TalkID: 0
* PlatoonID: 0
* UnkT24: -1
* UnkT84: 1.000
* ModelName: c1000 (invisible placeholder model)
* Unk08: 9004
* UnkE0F: 1
* IsShadowDest: Yes
* EntityGroupIDs: Set all to 0
* UnkE3C: -1
**3.** Create a new Other, Box region. Position it over the pressure plate; you may want to make it slightly bigger to fit the plate. Give it a unique EntityID, and the following values:
* Unk2C: Unique one-to-three digit number
* UnkE08: 255
* MapID: -1
* UnkS0C: -1
**4.** Create three new Other, Sphere regions. Shrink their radius to around 0.050-0.100. Position them where you want the projectiles to spawn from, and aim them in the correct direction. (The blue axis arrow in Map Studio points forward; use it as reference.) Give them each unique EntityIDs, and the following values:
* Unk2C: Unique one-to-three digit number
* UnkE08: 255
* MapID: -1
* UnkS0C: -1
**5.** Add a new Event, which will initialize the necessary common event (90005660).
$Event(NewEventID, Default, function() {
if (EventFlag(57)) {
InitializeCommonEvent (0, 90005660, EnemyID, PlateID, BoxRegionID, BehaviorID, HoleRegionID 1, HoleRegionID 2, HoleRegionID 3);
} else if (EventFlag(56)) {
[Repeat for EventFlags 56-50]
}
});
**Notes:** BehaviorID will pick which BehaviorParam the arrows use. There are eight of each; set the eighth value to match that line's EventFlag, as described in the Guillotine Traps section.
Quick reference:
* 8010010X0 = Fire Arrows
* 8010100X0 = Ice Arrows
* 8010200X0 = Lightning Arrows
* 8010320X0 = Magic Arrows
**5b.** For custom projectiles, duplicate and edit one of the above sets of BehaviorParams in Param Editor. Duplicate and edit referenced BulletParams and AtkParam_NPC entries; be careful everything matches.
**6.** Initialize the event by adding the following line to Event(0, at the top:
InitializeEvent(0, NewEventID, 0);
**7.** Congrats.