Keeping XP for next time

Added by izwebusr almost 3 years ago

Hi:

Is there a way to keep the XP for next time you play? Starting from zero every time is a bit annoying.

Thanks


Replies (9)

RE: Keeping XP for next time - Added by RaFaL almost 3 years ago

Hi you will need to download and add lua scripts from https://github.com/etlegacy/etlegacy-lua_scripts xpsave one

RE: Keeping XP for next time - Added by izwebusr almost 3 years ago

Thanks very much for the help. I was hoping you could give me some pointers on how to set up.

I have downloaded and saved xpsave.lua in this directory:

~\Documents\ETLegacy\etmain

This folder also contains the file legacy.cfg

The legacy.cfg file has the following lines related to lua scripts:

set lua_modules "xpsave.lua"
set lua_allowedModules ""

I am pretty sure the legacy.cfg is being run by the server and I have even run it directly by typing

exec legacy.cfg

The console returns:

execing legacy.cfg

However, with command lua_status console returns:

Lua 5.3 API: no scripts loaded.

Any pointers are very much appreciated.

Thanks

RE: Keeping XP for next time - Added by RaFaL almost 3 years ago

You should put xpsave.lua in fs_game directory
also there should be 2nd xpsave file in there called ZXpSave if 1st will not work properly

RE: Keeping XP for next time - Added by jemstar almost 3 years ago

Hi,
its been awhile since I have tried however I thought there was an issue with the xpsave.lua libs with the current lua 5.1.

I have Zelly’s ZxpSave.lua on my server, it worked well until ETL went to lua 5.1. Now it will save most xp, however no skills will be saved so the xp is basically just a number.

As I say its been awhile so sorry if my info is outdated.

Jem.

RE: Keeping XP for next time - Added by RaFaL almost 3 years ago

Hi Jemstar the thing is skills on UI doesn’t update

RE: Keeping XP for next time - Added by thunder almost 3 years ago

So ETlegacy wont have xpsave as mot mod have?

RE: Keeping XP for next time - Added by IR4T4 almost 3 years ago

The following script should do the job: https://github.com/Zelly/ZellyLuas/blob/master/ZXpSave.lua

This is the file based xpsave Lua script file version. The above link points to the sqlite3 Lua script version which isn’t supported atm.

RE: Keeping XP for next time - Added by izwebusr almost 3 years ago

Thank you everyone for your replies.

I have downloaded JSON.lua file and put it in the etmain folder (where the script looks for it). For the ZXpSave.lua file, I clicked on the "raw" option, copied the code to Notepad and saved with ".lua" extension in the etmain folder. I then made the necessary configuration changes in the cfg file. Still no luck. I get the following on my console:

Setting MOTD...
GeoIP is disabled
Lua 5.3 API: Loading JSON.lua
Lua 5.3 API: Loading ZXpSave.lua
Lua API: G_LuaStartVM error running lua script: [string "ZXpSave.lua"]:103: attempt to call a nil value
Game Initialization completed in 0.17 seconds.

With lua_status, I get:

Lua 5.3 API: showing lua information ( 1 module loaded )
VM Modname Signature Filename
– ———————— —————————————- ————————
0 BBC9B6F8BB2F8D259C0EF2DBC88B5AFCD8CA0E49 JSON.lua
– ———————— —————————————- ————————

Any help is very much appreciated.

RE: Keeping XP for next time - Added by izwebusr almost 3 years ago

Update...

I put the JSON.lua file in Program Files (x86)/Enemy Territory - Legacy/legacy

This caused the ZXpSave.lua script to work... better. However, I now get the following:

Lua API: et_RunFrame error running lua script: [string "ZXpSave.lua"]:465: attempt to compare nil with number
Lua API: et_RunFrame error running lua script: [string "ZXpSave.lua"]:465: attempt to compare nil with number

And this error repeats indefinitely.

With lua_status, I now get:

Lua 5.3 API: showing lua information ( 2 modules loaded )
VM Modname Signature Filename
– ———————— —————————————- ————————
0 BBC9B6F8BB2F8D259C0EF2DBC88B5AFCD8CA0E49 JSON.lua
1 ZXPSAVE nil 8560FD06D9309F3D06FD1534A8B343290607CC30 ZXpSave.lua
– ———————— —————————————- ————————

Thanks again for any help

(1-9/9)