def write_mod(self): mod = Mod( f'money_grenade_changes_{self.mod_filename}.bl3hotfix', f'Money Grenade Changes: {self.mod_label}', 'Apocalyptech', [ f"Changes the 'Money' grenade part to drop {self.desc_text} instead of money.", ], contact='https://apocalyptech.com/contact.php', lic=Mod.CC_BY_SA_40, v='1.0.0', cats='joke, gear-grenade, cheat', ss= f'https://raw.githubusercontent.com/BLCM/bl3mods/master/Apocalyptech/gear_changes/money_grenade_changes/screenshot_{self.mod_filename}.png', ) mod.header('Update item prefixes') mod.reg_hotfix( Mod.PATCH, '', '/Game/Gear/GrenadeMods/_Design/Naming/GrenadeModNamingStrategy', 'SingleNames.SingleNames[20].NamePart.Object..PartName', self.single_name) mod.reg_hotfix( Mod.PATCH, '', '/Game/Gear/GrenadeMods/_Design/Naming/GrenadeModNamingStrategy', 'TripleNames.TripleNames[11].NamePart.Object..PartName', self.triple_name) self._combo_name(mod, 19, self.combo_name_mirv) self._combo_name(mod, 36, self.combo_name_rain) self._combo_name(mod, 52, self.combo_name_nuke) self._combo_name(mod, 67, self.combo_name_large) self._combo_name(mod, 81, self.combo_name_bouncy) self._combo_name(mod, 94, self.combo_name_spring) self._combo_name(mod, 106, self.combo_name_sticky) self._combo_name(mod, 117, self.combo_name_artillery) self._combo_name(mod, 127, self.combo_name_lingering) self._combo_name(mod, 136, self.combo_name_divide) self._combo_name(mod, 144, self.combo_name_singularity) self._combo_name(mod, 151, self.combo_name_roider) self._combo_name(mod, 157, self.combo_name_link) self._combo_name(mod, 162, self.combo_name_transfusion) self._combo_name(mod, 166, self.combo_name_generator) self._combo_name(mod, 169, self.combo_name_elemental) self._combo_name(mod, 171, self.combo_name_force) self._combo_name(mod, 172, self.combo_name_money) mod.newline() mod.header('Update part name') mod.reg_hotfix( Mod.PATCH, '', '/Game/Gear/GrenadeMods/_Design/PartSets/Part_Behavior/Money/UIStat_Grenade_Money_Icon', 'Text', self.part_text.upper()) mod.newline() mod.header('Update drop pools and card descriptions') for pool_label, rewards, (uistat_name, uistat_text) in [ ('Single-part grenade', self.rewards1, self.uistat1), ('Double-part grenade', self.rewards2, self.uistat2), ('Triple-part grenade', self.rewards3, self.uistat3), ]: mod.comment(pool_label) mod.reg_hotfix(Mod.PATCH, '', rewards.pool_name, 'BalancedItems', str(rewards)) mod.reg_hotfix(Mod.PATCH, '', uistat_name, 'FormatText', uistat_text.format(self.card_text)) mod.newline() # Special-case hardcodes for some mod types if self.mod_label == 'Diamond Keys': # Fix up the diamond key item so that it looks better when dropped # (by default it just looks like eridium, and also doesn't auto-pickup) mod.header_lines([ "Fixing up droppable Diamond Key object", "", "We're making a few changes here which affect the item card specifically,", "though the item card will basically never be seen since we're enabling", "auto-pickup as well. If you *do* get a glimpse of the card (using Photo", "Mode or the like) you'll see a bit of weirdness still -- the card might", "inherit the visual price of whatever card was last looked at, and the", "loot beam icon might inherit the last-looked-at item as well. In the", "end I'm not bothering to track that down, though, since you've gotta", "work hard to see the card anyway.", ]) mod.comment('Use an actual key mesh') mod.reg_hotfix( Mod.PATCH, '', '/Game/PatchDLC/VaultCard/Data/Currency/BP_DiamondKey_Single.Default__BP_DiamondKey_Single_C', 'ItemMeshComponent.Object..StaticMesh', # Tried lots of various meshes here; I'm tempted to go with one of the keyring ones, # but in the end I just went with one of the smaller single-key ones. Would be nice # if I could get that Geranium Key-to-City ones to interact with physics, though # that might cause weird problems with the key during the plot (or on Decoration), # so eh. We'll just stick with the tiny key for now. # A bit much, though it's a nice big size. Is definitely a keyring, though. #Mod.get_full_cond('/Dandelion/Missions/Plot/Ep04_Trashtown/Janitor_Keyring/Model/Meshes/SM_Janitor_Keyring', 'StaticMesh'), # Definitely a keyring; probably better than SM_Janitor_Keyring if I feel okay with that... #Mod.get_full_cond('/Ixora2/Missions/02_Eden6/Keyring/Model/Meshes/SM_Key_Ring', 'StaticMesh'), # Hah, just a rusty sphere basically #Mod.get_full_cond('/Geranium/LevelArt/Lodge/Props/Model/Meshes/SM_Apple_Key', 'StaticMesh'), # Very nice (and rightly-sized!) key, but it weirdly doesn't seem to actually interact with physics # at all? Just hangs there in midair. #Mod.get_full_cond('/Geranium/InteractiveObjects/MissionAssets/Plot_5/Model/Meshes/SM_Key_to_City', 'StaticMesh'), # Same story here; and seemingly identical to the other one. Almost certainly a copied object. #Mod.get_full_cond('/Game/PatchDLC/Geranium/InteractiveObjects/PlayerQuarters/RoomDecoMeshes/Meshes/SM_Key_to_City_RoomDeco', 'StaticMesh'), # Perfectly serviceable key, but quite small #Mod.get_full_cond('/Hibiscus/InteractiveObjects/MissionSpecific/Plot/EP03/Pickups/SM_Key_GateKey', 'StaticMesh'), # Perfectly serviceable key, but quite small Mod.get_full_cond( '/Game/LevelArt/Environments/_Global/Props/Keys/Key_Scooters/Model/Meshes/SM_Key_Scooters', 'StaticMesh'), ) mod.newline() mod.comment('Set a different item card type') mod.reg_hotfix( Mod.PATCH, '', '/Game/PatchDLC/VaultCard/Data/Currency/InvData_DiamondKey', 'ItemCardTypeFrameName', #'currencyEridium', # Mission is nice; has a diamondy icon, even! 'Mission', # Cash works well #'Cash', ) mod.newline() mod.comment( 'Set monetary value to 1; might prevent currency from inheriting from previously-viewed items' ) mod.reg_hotfix( Mod.PATCH, '', '/Game/PatchDLC/VaultCard/Data/Currency/InvData_DiamondKey', 'MonetaryValue', BVCF(bvc=1)) mod.newline() mod.comment( 'Assign Legendary rarity (instead of Eridium), for loot bar + frame color' ) mod.reg_hotfix( Mod.PATCH, '', '/Game/PatchDLC/VaultCard/Data/Currency/InventoryBalance_DiamondKey', 'RarityData', Mod.get_full_cond( '/Game/GameData/Loot/RarityData/RarityData_05_Legendary', 'RarityData')) mod.newline() mod.comment('Auto-pickup Diamond Keys') mod.reg_hotfix( Mod.PATCH, '', '/Game/Gear/_Shared/_Design/InventoryCategories/InventoryCategory_DiamondKey', 'PickupActionType', #'OnUseOnly', 'OnUseOrTouch', ) mod.newline() mod.close()
mod.reg_hotfix( Mod.LEVEL, 'Camp_P', '/Hibiscus/Maps/Camp/Camp_Combat.Camp_Combat:PersistentLevel.OakMissionRareSpawner_0', 'PercentChanceToSpawn', BVCF(bvc=100)) mod.reg_hotfix( Mod.LEVEL, 'Camp_P', '/Hibiscus/Maps/Camp/Camp_Combat.Camp_Combat:PersistentLevel.OakMissionRareSpawner_1', 'PercentChanceToSpawn', BVCF(bvc=100)) mod.newline() # Rare Vehicle Spawns mod.header_lines([ "Rare Vehicle Spawns", "", "Due to how these work, these won't be *guaranteed* spawns, but", "they'll be much more likely, at least. Aiming for about a 10%", "unique-vehicle spawn rate, in the levels which have them. Note", "that Skagzilla's spawn is defined very differently than the", "others, and isn't touched in here at all.", ]) for (label, levels, spawnoptions, weights) in [ ( 'Clever Girl / Bayou Watch (in Floodmoor Basin)', ['Wetlands_P'], '/Game/Enemies/_Spawning/CotV/Vehicles/Zone_2/SpawnOptions_Vehicle_CotV_WetlandsMix', # Defaults: 1 (technicals), 0.6 (cyclones), 0.01 (clever girl), 0.01 (bayou watch) [1, 0.6, 0.1, 0.1]), ( "Houndstooth (in Devil's Razor)", ['Desert_P'],