MeridiusIX / Modular-Encounters-Systems

Modular Encounters Systems is a Massive NPC Management Framework for the game Space Engineers
55 stars 22 forks source link

New Action - ChangeAttackersFactionAccount #299

Closed ToroidalDevil closed 4 months ago

ToroidalDevil commented 4 months ago

Allows configuration of a "Bounty" or "fine" that can be applied to a players faction account when a grid is compromised.

The new action fields are: ChangeAttackersFactionAccount ChangeAttackersFactionAccountByAmount

In order for this action to operate properly, a Damage action needs to be assigned as well. The Damage action is required, because it sets the grids last attacker, which is then used when the grid is compromised to determine which faction gets the reward/fine.

Here is a working configuration example:

Inventory (NPC-ACS)-Behavior-AssaultDivision-Hunter-ShortRange [RivalAI Behavior] [BehaviorName:Hunter] [AutopilotData:(NPC-ACS)-AssaultDivision-Autopilot-Hunter-Primary] [SecondaryAutopilotData:(NPC-ACS)-AssaultDivision-Autopilot-Hunter-Secondary-ShortRange] [TargetData:(NPC-ACS)-AssaultDivision-Hunter-Targeting] [EngageOnTargetLineOfSight:true] [EngageOnWeaponActivation:true] [WeaponSystem:(NPC-ACS)-AssaultDivision-Weapons-Standard] [Triggers:ACS-AssaultDivision-Trigger-RandomRamming] [Triggers:PVTACS-Trigger-GridDamagedBountyIDAssignment] [Triggers:PVTACS-Trigger-RemoteCompromisedBounty]
<EntityComponent xsi:type="MyObjectBuilder_InventoryComponentDefinition">
  <Id>
    <TypeId>Inventory</TypeId>
    <SubtypeId>PVTACS-Trigger-RemoteCompromisedBounty</SubtypeId>
  </Id>
  <Description>
    [RivalAI Trigger]

    [UseTrigger:true]
    [Type:Compromised]

    [StartsReady:true]
    [MaxActions:1]
    [Actions:PVTACS-Action-RemoteCompromisedBounty]
  </Description>
</EntityComponent>

<EntityComponent xsi:type="MyObjectBuilder_InventoryComponentDefinition">
  <Id>
    <TypeId>Inventory</TypeId>
    <SubtypeId>PVTACS-Trigger-GridDamagedBountyIDAssignment</SubtypeId>
  </Id>
  <Description>
    [RivalAI Trigger]

    [UseTrigger:true]
    [Type:Damage]

    [StartsReady:true]
    [MaxActions:1]
    [Actions:PVTACS-Action-RemoteCompromisedBounty]
  </Description>
</EntityComponent>

<EntityComponent xsi:type="MyObjectBuilder_InventoryComponentDefinition">
  <Id>
    <TypeId>Inventory</TypeId>
    <SubtypeId>PVTACS-Action-RemoteCompromisedBounty</SubtypeId>
  </Id>
  <Description>
    [RivalAI Action]

    [ChangeAttackersFactionAccount:true]
    [ChangeAttackersFactionAccountByAmount:250000]
  </Description>
</EntityComponent>