How can I make a small modification to a Lua script in a game?
Moderator: Moderators
-
- Posts: 9
- Joined: 22 Apr 2017, 01:24
How can I make a small modification to a Lua script in a game?
I want to change one line in the game "Spring: 1944 test-4909-d25e4ff" which was automatically-downloaded through SpringLobby. I did it for a manually-downloaded game by simply modifying the file, but with the automatically-downloaded game I do not know where it is located. I want to implement this workaround. How can I do it? Where is the relevant file located?
Re: How can I make a small modification to a Lua script in a game?
In short, you can't.
Instead you can grab a copy of the file from https://github.com/spring1944/spring194 ... UI/Widgets and save it to your local user widgets folder, and it should overwrite the game copy for you.
You can also submit a pull request on github to s44 devs for the workaround if you get it working.
Instead you can grab a copy of the file from https://github.com/spring1944/spring194 ... UI/Widgets and save it to your local user widgets folder, and it should overwrite the game copy for you.
You can also submit a pull request on github to s44 devs for the workaround if you get it working.
-
- Posts: 9
- Joined: 22 Apr 2017, 01:24
Re: How can I make a small modification to a Lua script in a game?
I placed it in ~/.spring/LuaUI/Widgets/gui_s44_supplyradius.lua and it does not work. What is the correct path?
- MasterBel2
- Posts: 347
- Joined: 11 Apr 2016, 12:03
Re: How can I make a small modification to a Lua script in a game?
If it's a widget that's part of the game, it needs to be in the game package itself. This would require uncompressing the game from sdz (zip) format and
If the game was downloaded by SL, this isn't possible because the "rapid" download system splits packages across "pool" files iirc. Afaik there's no way to reconstruct the full package from this.
If you want the latest version of the game, as in *the* latest, download the game from github as it stands, and play with a .sdd folder. Unfortunately this probably won't allow you to play multiplayer with others, unless they have the exact same file. To do this, set the modoptions & package it up as a .sdz file, and publish it on Spring files (unless you have a preferred method of distribution.) That way anyone can dl and play with you.
Did I make sense?
~MasterBel2
If the game was downloaded by SL, this isn't possible because the "rapid" download system splits packages across "pool" files iirc. Afaik there's no way to reconstruct the full package from this.
If you want the latest version of the game, as in *the* latest, download the game from github as it stands, and play with a .sdd folder. Unfortunately this probably won't allow you to play multiplayer with others, unless they have the exact same file. To do this, set the modoptions & package it up as a .sdz file, and publish it on Spring files (unless you have a preferred method of distribution.) That way anyone can dl and play with you.
Did I make sense?
~MasterBel2
Re: How can I make a small modification to a Lua script in a game?
I don't believe you are correct. S44 makes no effort to block user widgets so afaics it should work. Perhaps try changing the internal widget name and see if it appears in the F11 list
- MasterBel2
- Posts: 347
- Joined: 11 Apr 2016, 12:03
Re: How can I make a small modification to a Lua script in a game?
Oops forgot about user widgets.FLOZi wrote:I don't believe you are correct. S44 makes no effort to block user widgets so afaics it should work. Perhaps try changing the internal widget name and see if it appears in the F11 list
