Skip to content

Instantly share code, notes, and snippets.

Custom Resource Manipulator

Custom Resource Manipulator is a GUI-friendly trigger library and UI addition dependency created and distributed by Alzarath that adds custom resource icons and labels that can be created and manipulated.

Installation

To install, add the Custom Resource Manipulator dependency to your map. Alternatively you can rip the triggers and UI elements and inject them into your own map, which I won't help with.

The dependency mod is available in the StarCraft 2 Arcade on the US, EU, and KR servers using the name "Custom Resource Manipulator".

<?xml version="1.0" encoding="utf-8"?>
<TriggerData>
<Standard Id="RsUI"/>
<Name>Resource Manipulator</Name>
<Root>
<Item Type="CustomScript" Library="RsUI" Id="F08CC8BE"/>
<Item Type="Structure" Library="RsUI" Id="63D4F42F"/>
<Item Type="Variable" Library="RsUI" Id="DD88A7AA"/>
<Item Type="Variable" Library="RsUI" Id="2BD55B82"/>
<Item Type="FunctionDef" Library="RsUI" Id="3EBEEB6F"/>
@Alzarath
Alzarath / SimpleBaseDiscovery.SC2Lib
Last active November 23, 2024 10:56
StarCraft 2 Trigger Library that generates units at probable base locations
<?xml version="1.0" encoding="utf-8"?>
<TriggerData>
<Standard Id="SBDL"/>
<Name>Simple Base Discovery</Name>
<Root>
<Item Type="CustomScript" Library="SBDL" Id="14A6B2AE"/>
<Item Type="FunctionDef" Library="SBDL" Id="B5684D12"/>
<Item Type="FunctionDef" Library="SBDL" Id="30E2BDA6"/>
<Item Type="FunctionDef" Library="SBDL" Id="3F64780C"/>
</Root>
@Alzarath
Alzarath / calculate_periodic_options.py
Last active April 11, 2023 15:04
Calculates the numbers for a periodic effect given the amount applied over the duration, the duration, and a tick rate
#!/usr/bin/python3
def calculate_options(amount: float, duration: float, divisible: float = 0.0625):
valid_values: list = []
for tick in range(1, int(duration / divisible)):
period: float = tick * divisible
if period % divisible != 0: # Skip if the calculated period is not divisible
continue
count: float = duration / period