Changing the Teleport Icon
Posted 30 May 2018 - 10:11 PM
This is call for help from all you experienced modders out here.
I'm currently developing a race mod (soon to be announced if all goes well), and I'm using the necron "teleport to building" feature (squad_jump_ext with teleport=true and teleport_summon=true)
The thing is, I want to change the way the button looks (not playing necrons, so that doesn't fit).
I first tried with the texture field available in the rgd, but that doesn't seem to work. Same way with title and description.
Editing taskbar.lua (within the frame of FreeUI), on the other hand, seems to work for both title and description, which is nice. The way it works is it binds a modal button and gives it different tooltips depending on what kind of "jump" the unit has. Editing the UCS pointer for teleport_summon does the trick.
As for the texture, there is also a field in there, but it does nothing when changed. My guess is the game pulls it out of somewhere else depending on the modality of the button (jump type), but I haven't been able to find it.
I know this is rather speciffic, but I refuse to believe it's hardcoded.
Posted 31 May 2018 - 12:13 AM
However, I'll mention it on Discord & such & see if I can't find someone who can help. 🤞
Hopefully I can get some help / input for ya.
- Miros likes this
Posted 02 June 2018 - 06:08 PM
It is hard-coded.
I've already tried to change the icon. The only alternative would be to make the original button opaque and create another button with the correct textures behind it. But this leaves the icon in enabled state, when the ability is about to recharge.
Posted 02 June 2018 - 06:50 PM
Brother Miros, I have already used something similar (SCaR) for the LotD mod.
In short, I created an ability that spawns a dummy entity, and had the scar de-spawn the squad/entity, and re-spawn it at the place of the dummy entity.
But in LotD, I had only one entity (the HQ) that was using this "teleport" ability.
If that is the case, just have a look at the code there.
But if you want to use it "generally" you must identify the "casting" squad differently.
And this will be tricky. I have some suggestion for that as well, if that is the case.
But yeah, you can always use a SCaR button.
Edited by Gambit, 02 June 2018 - 06:51 PM.
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users