Jump to content

Question regarding to mod alias


RageLeague

Recommended Posts

image.thumb.png.969cbeb63f0b985a982423acc178adc0.png

I clearly didn't do the mod alias thing correctly. I have a file whose path is "[save folder]/mods/DemocraticRace/assets/campaign_icon.png", and I tried to load it with the following code:

engine.asset.Texture("DEMOCRATICRACE:assets/campaign_icon.png")

It clearly failed to load.

The question is, what should I actually do to load this image?

Link to comment
Share on other sites

I see the problem.

I called this function outside of the OnLoad function, directly within the calling of the script. At that time, an alias for this has not been mounted, so when I tried to refer to my file by alias, it didn't work.

It worked previously because when you call the MountModData function, the modpath is already mounted to the alias, and you can safely call the filepath by alias.

I guess, don't put anything other than your mod functions directly in the script.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...