XRWS         !  	~   Ñ  H  eext_01.cat ext_01.dat readme.txt ui.xml 516 1501437205 bc04a43ae877b298f84f72418ab8d019
ui/ita_eventmonitoroverride.lua 831 1501434353 77a64b19351a87e36caa29524030d40b
ui/ita_helperoverride.lua 261 1501434463 78d2678c1cc7daee48ab5326a415e919
<?xml version="1.0" encoding="utf-8"?>
<addon name="ita_library_generic_cmdoverride" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ui/addon.xsd">
  <environment type="detailmonitor">
    <!--Replacements-->
    <file name="ui/ita_helperoverride.lua"/>
    <dependency name="ego_detailmonitor" />
  </environment>
  <environment type="fullscreen">
    <file name="ui/ita_eventmonitoroverride.lua" />
    <dependency name="ego_eventmonitor"/>
  </environment>
</addon>
base_getLiveData = GetLiveData

function GetLiveData(placeholder, component)
	if IsValidComponent(component) then
		if placeholder == "aicommand" then
			local pilot = GetComponentData(component, "pilot")
			if pilot then
				local blackdata = GetNPCBlackboard(pilot, "$ita_custom_aic")
				if blackdata ~= nil then
					return blackdata;
				else
					return base_getLiveData(placeholder, component)
				end
			end
		elseif placeholder == "aicommandaction" then
			local pilot = GetComponentData(component, "pilot")
			if pilot then
				local blackdata = GetNPCBlackboard(pilot, "$ita_custom_aica")
				if blackdata ~= nil then
					return blackdata;
				else
					return base_getLiveData(placeholder, component)
				end
			end
		else
			return base_getLiveData(placeholder, component)
		end
	end
end
Helper.base_parseAICommand = Helper.parseAICommand

Helper.parseAICommand = function(entity)
	local sotype = GetNPCBlackboard(entity, "$ita_custom_aic")
	if sotype ~= nil then
		return sotype
	else
		return Helper.base_parseAICommand(entity)
	end
endGeneric Command Override Library by Itaros.

You break it - you buy another copy of a game for everyone affected lol!

How to use:
1)Set custom command:
  * Pick an actor, write string to blackboard:
  * $ita_custom_aic = command
  * $ita_custom_aica = command action

2)Remove custom command:
  * Pick an actor, remove_value from blackboard:
  * $ita_custom_aic = command
  * $ita_custom_aica = command action

Known issues:
It currently doesn't alter command display on the map and in orders detailmonitor.

Let me know if you need something else in the scope of this library.

Itaros - 2017<?xml version="1.0" encoding="utf-8"?>
<content name="" description="" author="Itaros" version="100" save="false" date="2017-07-30" id="" lastupdate="">
  <text language="34" description="Library toolkit for other mods to override aicommands."/>
  <dependency version="400"/>
</content>
