Jump to content


Photo

Changing the Teleport Icon


6 replies to this topic

#1 Miros

Miros
  • Members
  • 17 posts

Posted 30 May 2018 - 10:11 PM

Hi!
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.

Any ideas?

#2 Industrial_Strength

Industrial_Strength

    Diesel Powered

  • Members
  • 152 posts
  • Location:North America
  • Projects:Surviving, DOW 1
  •  S/A: Random Delays [See Profile]

Posted 31 May 2018 - 12:13 AM

I don't have any as I'm not that "experienced" so to speak.

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.
"I do what I can to serve the public."

#3 Gambit

Gambit

    title available

  • Members
  • 5,620 posts
  • Location:Athens, Greece

Posted 31 May 2018 - 10:44 AM

Pretty sure this is a question for brother Evil Isador :grad:

I will PM him.

 

... But I think it is hard-coded...


Edited by Gambit, 31 May 2018 - 10:45 AM.

-In search of Papasmurf...

#4 Evil Isador

Evil Isador
  • New Members
  • 2 posts
  • Location:Germany

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.



#5 Miros

Miros
  • Members
  • 17 posts

Posted 02 June 2018 - 06:37 PM

Crap...

Ok thanks a lot anyway.

I believe I will switch to a SCAR ability of some sorts, which should give me more freedom (and some other sorts of headaches too, I bet).

#6 Gambit

Gambit

    title available

  • Members
  • 5,620 posts
  • Location:Athens, Greece

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. :grad:

 

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.

-In search of Papasmurf...

#7 Miros

Miros
  • Members
  • 17 posts

Posted 08 July 2018 - 08:33 AM

I ended up creating a dummy ability and linking it with a teleport SCaR code, just like Gambit suggested.

Though probably not the most elegant solution, it works wonders (at least in single player).



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users