Skip to content

Commit

Permalink
Support fx for aeion abilities
Browse files Browse the repository at this point in the history
  • Loading branch information
dyceron committed Sep 15, 2023
1 parent d53aab7 commit 895c631
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,74 @@
"fields": {},
"dependencies": []
},
"FX": {
"type": "CFXComponent",
"unk_1": 1500,
"unk_2": 0.0,
"functions": [
{
"name": "FXCreateAndLink",
"unk1": true,
"unk2": false,
"params": {
"Param1": {
"type": "s",
"value": ""
},
"Param2": {
"type": "s",
"value": ""
},
"Param3": {
"type": "s",
"value": ""
},
"Param4": {
"type": "s",
"value": ""
},
"Param5": {
"type": "i",
"value": 0
},
"Param6": {
"type": "i",
"value": 4
},
"Param7": {
"type": "f",
"value": 0.0
},
"Param8": {
"type": "f",
"value": 0.0
},
"Param9": {
"type": "f",
"value": 0.0
},
"Param10": {
"type": "f",
"value": 0.0
},
"Param11": {
"type": "f",
"value": 0.0
},
"Param12": {
"type": "f",
"value": 0.0
},
"Param13": {
"type": "b",
"value": false
}
}
}
],
"fields": {},
"dependencies": []
},
"AUDIO": {
"type": "CAudioComponent",
"unk_1": 3000,
Expand Down
17 changes: 17 additions & 0 deletions open_samus_returns_rando/pickup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def patch_single_item_pickup(self, bmsad: dict) -> dict:

action_sets: dict = bmsad["action_sets"][0]["animations"][0]

fx_create_and_link: dict = bmsad["components"]["FX"]["functions"][0]["params"]

if item_id == "ITEM_ENERGY_TANKS":
item_id = "fMaxLife"
quantity *= self.configuration["energy_per_tank"]
Expand All @@ -67,6 +69,21 @@ def patch_single_item_pickup(self, bmsad: dict) -> dict:
action_sets["animation_id"] = 150
action_sets["action"]["bcskla"] = "actors/items/itemtank/animations/relax.bcskla"

elif item_id.startswith("ITEM_SPECIAL_ENERGY"):
fx_create_and_link["Param13"]["value"] = True
if item_id == "ITEM_SPECIAL_ENERGY_SCANNING_PULSE":
fx_create_and_link["Param1"]["value"] = "orb"
fx_create_and_link["Param2"]["value"] = "actors/items/powerup_scanningpulse/fx/orb.bcptl"
if item_id == "ITEM_SPECIAL_ENERGY_ENERGY_SHIELD":
fx_create_and_link["Param1"]["value"] = "orb"
fx_create_and_link["Param2"]["value"] = "actors/items/powerup_energyshield/fx/orb.bcptl"
if item_id == "ITEM_SPECIAL_ENERGY_ENERGY_WAVE":
fx_create_and_link["Param1"]["value"] = "yelloworb"
fx_create_and_link["Param2"]["value"] = "actors/items/powerup_energywave/fx/yelloworb.bcptl"
elif item_id == "ITEM_SPECIAL_ENERGY_PHASE_DISPLACEMENT":
fx_create_and_link["Param1"]["value"] = "purpleorb"
fx_create_and_link["Param2"]["value"] = "actors/items/powerup_phasedisplacement/fx/purpleorb.bcptl"

set_custom_params["Param1"]["value"] = item_id
set_custom_params["Param2"]["value"] = quantity

Expand Down

0 comments on commit 895c631

Please sign in to comment.