Jump to content

[XCE 0.30hf1 - Issues with LUA and Mod Loading Info]


kabill

Recommended Posts

Two problems:

1) LUA script loading still doesn't seem to be working. Test case:

- Install this mod: https://www.dropbox.com/s/k6yqomsr1gxtbjb/Oppressive%20UI%20XCE%20v0.30.zip?dl=0

- Run game.

- Start a new game go to the equipment screen

- If mod is working properly, the soldier stat bars should be white; if it isn't they will be green instead.

All of the LUA scripts in that mod work fine if they are copy/pasted over the scripts in the 'internal' folder so it's not because the scripts themselves don't work. This issue with the same mod has been confirmed by Skitso on his own machine as well, so it's not local to my computer. I have plenty of other mods running, but I don't think any of them should be causing a problem. (I can test with them all off if needed; I'm being lazy).

2) The mod loading output file doesn't seem to update. Running the game with -modinfo does nothing. But even without this it doesn't seem to be doing anything - my log file says it was last updated on the 1st of September (i.e. over a month ago) which corresponds with when I last played the game before updating to XCE 0.30.

Link to comment
Share on other sites

I figured out what was wrong.

So I did some futzing around based on the "BaseView.lua" script, which should:

1. Use an alternate frame background image for the capacity bars

2. Color the bars dark gray (59,59,59.)

As the bug states, it does neither. However, after I modified the mod's baseview.lua (by making my own version and changing bar color to see if I could get it work), it suddenly worked!

So this is the reason:

The latest baseview.lua's last-modified date is september 11th 2014. The versions I made today for testing purposes are october 11th 2014.

It appears that the mod loader will NOT load scripts (or assets entirely? it seems to load images just fine) if they are older than the default ones.

EDIT:

Checking the source code, that appears to be the issue. The LUA loading script compares the new script's time to the internal time, and then claims that the file is cached if it is older. Given that oppressive UI did not change anything that needed updating in its script, it is thus older than internal, and so it is skipped.

The current workaround is to open and save all LUA files, or to use some sort of script which will set their last modified times to be older than XCE's latest version.

Edited by Razoric480
Link to comment
Share on other sites

The game needs to modify lua scripts, and it caches them. It is expected that mods are modified using the UI in the loader, in which case the caching will be taken care of properly. If you fiddle with things manually, it is expected that you know what you're doing.

Link to comment
Share on other sites

The game needs to modify lua scripts, and it caches them. It is expected that mods are modified using the UI in the loader, in which case the caching will be taken care of properly. If you fiddle with things manually, it is expected that you know what you're doing.

Do you mean by this that the game will only update .lua scripts if a mod is installed/uninstalled using the mod (un)installer in the game launcher?

If so, can I suggest making a point of this in the documentation? As it stands, there's no indication that this is necessary.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...