Page 1 of 3
Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 01:28
by Auswaschbar
In order to improve, simplify and speed up the handling of archives, we decided to drop support for modinfo.tdf file.
modinfo.lua has more functionality, and has been in place for a lot of time, so if you still using the tdf, please convert it to lua.
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 01:35
by Argh
I take it that this is effective as of the official release?
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 01:35
by smoth
the coming version, yes.
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 02:18
by FLOZi
After all the work I went to making it backwards compatible (that trepan rewrote anyway

)
Good move.
Now, change script.txt to script.lua and change SM3 to lua and do away with the engine based tdf parser.
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 02:28
by Auswaschbar
FLOZi wrote:Now, change script.txt to script.lua and change SM3 to lua and do away with the engine based tdf parser.
Yep, after you wrote a in-engine lua generater and parser that is as convenient to use as the tdf one.
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 02:35
by Gota
So i just replace that one file?anything else?
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 02:39
by Auswaschbar
Gota wrote:So i just replace that one file?anything else?
No, just that one.
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 02:48
by Gota
But will it work until the release of new spring?
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 02:59
by FLOZi
Auswaschbar wrote:FLOZi wrote:Now, change script.txt to script.lua and change SM3 to lua and do away with the engine based tdf parser.
Yep, after you wrote a in-engine lua generater and parser that is as convenient to use as the tdf one.
There's a tdf generator? Then why was archivecache.txt written out 'by hand' as it were (as archivecache.lua is now)?
Honest question, not trying to be offensive (Nor was my offhand comment about getting rid of tdfparser in the first place, didn't mean to come across as making a demand)
edit: oh yeah, there it is, TdfSection::construct_subsection et al. I wonder if it was added after archivecache moved to lua?
Anyway, this (modinfo.tdf removal) doesn't appear to be in the main git repro yet, got a branch I can look at?

edit: nevermind, in now. Nice.
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 17:17
by zwzsg
I thought Spring already had a TFD to LUA translator. If so, what's wrong with passing modinfo.txt through it when there's no modinfo.lua?
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 23 Jan 2010, 17:49
by FLOZi
zwzsg wrote:I thought Spring already had a TFD to LUA translator. If so, what's wrong with passing modinfo.txt through it when there's no modinfo.lua?
modinfo is read before the parse_tdf.lua is read; the current engine hacks around this by loading the parse_tdf.lua into a string in the engine and then running the whole thing through lua. It adds a lot of ugly code.
Take a look at the
old code and you'll see what I mean, and why the devs would want to get rid of it.
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 24 Jan 2010, 18:31
by R-TEAM
Hi,
who can i found a discription of modinfo.lua ?
Have only one found over "partialy" modinfo.tdf
(
http://springrts.com/wiki/Mod_specification)
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 24 Jan 2010, 18:35
by zwzsg
Here's a short exemple I just made:
Code: Select all
return {
game = "Total Annihilation",
shortGame = "TA",
name = "Balanced Annihilation",
shortName = "BA",
version="V7.04-sav1",
mutator = "Save/Load",
description = "B.A., with saves",
url = "http://springrts.com/phpbb/memberlist.php?mode=viewprofile&u=145",
modtype = "1",
depend = { "BA704.sd7" },
}
The name shown by lobby will be "<name> <version>"
<shortName> is used to keep tracks of some settings, like active widget list, AI configs, ...
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 24 Jan 2010, 21:15
by R-TEAM
Hi,
Thanks zwzsg :)
But need an example with Multiple dependics and one Replacement
set too ....
And btw who is it with NO dependics ?
Leave the field empty or erase the full "depend" line it is not in use ?
(need to convert the unusable mods in my mod dir from tdf to lua,and
the base OTA too ...)
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 24 Jan 2010, 21:50
by FLOZi
R-TEAM wrote:Hi,
Thanks zwzsg :)
But need an example with Multiple dependics and one Replacement
set too ....
Code: Select all
depend = {
"myfirstdependancy.sdz",
"myseconddependancy.sdz",
"myothercoolmod.sdz",
},
replace = {
"mymodthatiamreplacing.sdz,"
}
And btw who is it with NO dependics ?
Leave the field empty or erase the full "depend" line it is not in use ?
(need to convert the unusable mods in my mod dir from tdf to lua,and
the base OTA too ...)
Just don't put the 'depend' in at all.
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 24 Jan 2010, 23:26
by R-TEAM
Hi,
thanks FLOZi , but "Replace" dont work in OTA content.
Have dong this modinfo.lua->
Code: Select all
return {
name='TA Content version 2',
description='Mods can depend on this archive to get both spring and TA content',
modtype=0,
depend = {
'otacontent.sdz',
'springcontent.sdz',
},
replace = {
'tacontent.sdz',
}
}
But the mod (and unitsync) cant find tacontent.sdz ...
Log ->
...
unitsync: adding archive: E:\Games\Spring\mods\arachnomania0[1].8fr_stable[FIXED].sd7
unitsync: adding archive: tacontent.sdz
Error opening tacontent.sdz
...
?
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 24 Jan 2010, 23:48
by FLOZi
Not sure why that doesn't work.

Re: Important announcement: modinfo.tdf support to be dropped
Posted: 25 Jan 2010, 01:28
by R-TEAM
Hi,
FLOZi wrote:Not sure why that doesn't work.

maybe Replace wasnt testet during developing of modinfo.lua ?
Or the syntax is wrong ...?
Have sucesfull convertet a couple of mods (AdvBA1.58beta/BA7.04/ REVELATION V60) and all works as before ...
Only was unsure over the [NTAI] tag ......
Re: Important announcement: modinfo.tdf support to be dropped
Posted: 25 Jan 2010, 02:16
by FLOZi
R-TEAM wrote:Hi,
FLOZi wrote:Not sure why that doesn't work.

maybe Replace wasnt testet during developing of modinfo.lua ?
Or the syntax is wrong ...?
Have sucesfull convertet a couple of mods (AdvBA1.58beta/BA7.04/ REVELATION V60) and all works as before ...
Only was unsure over the [NTAI] tag ......
But modinfo.tdf is read (in a long winded fashion) by a lua tdf parser, so the end result is the same lua table as modinfo.lua, which is what is read by the engine. Maybe my syntax is wrong, or maybe I'm missing something about the tdf->lua conversion.

Re: Important announcement: modinfo.tdf support to be dropped
Posted: 25 Jan 2010, 02:48
by Auswaschbar
I don't think its modinfo related, as the error would mention that.