• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

[RT] Why is the runtime looking for OneOfMyDDSImages.lua, and other problems?

g02703

Chieftain
Joined
Apr 2, 2016
Messages
33
So I've got a sponsor mod and I added dds images to my project.

I added Type: InGameUIAddIn, Name and Description: MySponsorIcon64, FileName: MySponsorIcon64.dds, Import into VFS: True.

I did the same thing to all the other dds files.

I opened FireTuner, and I am noticing a Runtime Error (one for each image.dds I import into my ModBuddy project).


Error opening/reading C:/PathToImageInMyMod/MySponsorIcon64.lua.
stack traceback:
[C] in function '(anonymous)'


It seems like the runtime is looking for a lua script whose file name is equal to the filename of a dds file. I'm looking at other modders' sponsors and I don't see a corresponding lua file for each image. Why am I getting this error? Can I just simply ignore it?

Am I setting the wrong values for importing each image? I've read that the content type for images is InGameUIAddin, but they didn't say if we could set Name and Description to whatever we want, as long as no other content has the same name.

As an aside problem, the game freezes as soon as I open the diplomacy screen (or when I meet another faction). I get a blank diplomacy screen forever, and the sponsor's image/animation and the buttons to the right don't even show up. I have a feeling that my unresolved runtime errors may somehow cause the diplomacy screen to freeze.

Other times, when I start a game, I lose several graphics layers on the map (can't see water, expedition sites, units - only the basic geography, the city labels, and unit icons). When I exit this missing graphics game (without closing the application), I try to start another game, even under "regular" (not under Mods), using an in-game faction. I still get the missing graphics. I will have to manually exit the game, and go to Windows Task Manager to kill CivBE because it didn't really close. Anybody else experience this?
 
Images are not added as InGameUIAddIn, they are simply loaded into the Virtual File System (VFS) at the bottom of the properties window.

And yes, the graphics thing is a known problem caused by lua errors.
If you're planning to do more with lua I suggest creating a command prompt (.cmd) to easily kill and restart the game with one click:

taskkill /F /IM CivilizationBE_DX11.exe
cmd /K "D:\Programs\Steam\steamapps\common\Sid Meier's Civilization Beyond Earth\CivilizationBE_DX11.exe"

Well, most of the time it works. ;)
Fair warning for anyone who might read this though: Steam isn't able to sync your local files with the cloud if you use that.
 
Also, make sure you have added ALL the proper sizes for the image.

For Sponsor Leader portrait, I believe they are:
256,128,80,64

For Sponsor Civ I believe they are
256, 128, 80, 64, 45, 32
And I think there is Alphas or same size and also a "Glow" (size 32).

Glow is the icon opponents see over units.

You need to have them all defined under your ...IconAtlas key.
 
I am getting those lookup errors because I currently do not have every size for every asset, but they don't seem to be messing up the game. I plan to do those eventually.

I always wondered about the Glow icon atlas, which just by the name, looks like a blur mask of my sponsor's logo. But I guess it's not a blur mask. The only icons I see above opponents' units signify what kind of unit they are (for example, the compass-looking icon for explorers). Are those the glow icons? I just use the default for now.

But suppose I want a different icon for each unit (or unit type, I should say), what do I need to do? I imagine just creating dds laid out in a grid, but how do I know which slot in the grid corresponds to which unit type so I'll know how to fill it out? Or, do I just create whatever grid I want and specify an icon index per unit type just for my sponsor? If that is so, what tables do I need to add data to?
 
Back
Top Bottom