Best Answer Echo, 17 July 2020 - 02:28 PM
The object is displayed by default, you have to hide them with a lua function. I don't have my modding utility here, but I think you can find the required files in Data.big. Specifically you will need scriptevents.xml and scripts.lua (can be edited with notepad or other simple text editors). Then just take a look at the GondorFighter object. In the AIUpdateInterface module, it should have something called "AILuaEventsList = SomeFunctions". You can find that "SomeFunctions" in scriptevents.xml. That refers to a lua script in scripts.lua, among them a function that hides the forged blade of the GondorFighter. "EventName" refers to the condition, in your case "OnCreated", and ScriptFunctionName refers to the lua script that gets executed if the condition is met. If you could follow me until here, it should be fairly straightforward from here on, because it'll just be copy & paste and change names.
Copy the "SomeFunctions" block of the GondorFighter in scriptevents.xml, paste it below the "SomeFunctions" block, change the name to something else ( I'll call it "YourUnitFunctions" here), then go to lua, copy the function name that hides the forged blades, paste it below, change the name of the function to something unique that makes sense (generally used is "OnUnitXCreated", substitute the X), change the name of the forged blade subobject so you hide the correct object, and make sure that "YourUnitFunctions" calls the proper function OnCreated, in this case "OnUnitXCreated". Finally make sure to refer to "YourUnitFunctions" in AILuaEventsList in your units' object code.
It probably sounds more complicated than it actually is. If anything is unclear, just ask. I might be able to go more into detail.
Go to the full post