This is not a mod itself, but a code library you can add to your mod, which will give you access to a few functions, allowing you to change the repair skill of pilots or mechs, or another condition of your choosing.
Replace Repair 2.1.2
- 2.0 was a rewrite of the old library. It was prone to giving errors when used incorrectly, and was a bit hard to use due to it's functions with many parameters. It should hopefully be easier to get started with it now.
There is now also better support for abilities that can change the repair skill dynamically for any given condition.
Example Mod 2.1.2 - a working mod providing examples on how to use library.
- Place the extracted folder into your mod so it looks like this: ("NameOfMyMod" should be the actual name of your mod)
Updating mods to 2.x
- It should be as simple as replacing your old replaceRepair folder in your mod with the updated one. The console may tell you to update modApiExt.
Most old function calls are preserved for backwards compatibility.
Full function list with documentation on how to use them can be found in /replaceRepair/api.lua
most likely to be used functions:
Code: Select all
sets the repair skill for a pilot.
input is a table with the following required fields:
field | type | description
Name | string | displayed skill name for pilot
Description | string | displayed skil description for pilot
PilotSkill | string | id of pilot skill
Weapon | string | id of weapon replacing repair skill
Icon | table | path to icon (in game or mod)
loads the library.
- Since this library actually modifies the repair skill every time you use it, the tipimage will always finish the last skill that was initiated within the tipimage before showing a new one.
There are no known ways to get around this delay.
- The origin of the tipimage will always be at Point(2,2) since that is the origin of the default repair skill.
This can cause various effects to behave strangly, or not show up at all. Projectiles for example will always originate from this point even if the unit in the tipimage is not there.
One way around this limitation is to give the weapon a CustomTipImage.
This way you have total control over what is being shown. The origin will be the same though, so you have to employ tricks to create projectiles/etc going from an arbitrary origin to it's destination.
If you want to learn more, you are welcome to join the ITB discord and discuss it in #modding-creation.
- There may be more limitations, so if you discover any, please let me know.
Current working mods using the library which you can check out to learn more:
- Mezzelo for testing and initial documentation.
- kartoFlane for modApiExt.
- Tosx for adding support for frozen, smoke and water icons, and general help in testing.
Changelog (using pre 2.0 versions is not recommended)
Code: Select all
2.1.2 - Fixed an issue causing tipimage to throw an error if no mechs had been deployed yet.
2.1.1 - Fixed all known bugs after rewrite.
2.1.0 - Added lava/acid icon overlays for custom repair icons.
2.0.0 - Complete rewrite. It is for the most part compatible with versions pre 2.0, however, it is recommended to update Replace Repair for all mods.
[url=https://drive.google.com/open?id=1q438hV4UWk3MilAUFr0sjf-NJ685QnUR]1.3.2[/url] - Tosx added support for smoke and water overlay over custom icons.
1.3.1 - Tosx added support for frozen version of custom icons. What should happen while frozen is up to the user to decide.
[url=https://drive.google.com/open?id=1mllr3g7kUTw4QELLvP-SSNX_B3ZxAhwE]1.3.0[/url] - fixed a Test Mech error.
[url=https://drive.google.com/open?id=1FxxU3hD31AL6aMpbNOXuSj3VDuDRdJps]1.2.2[/url] - First release on this forum.