Important announcement: modinfo.tdf support to be dropped

Important announcement: modinfo.tdf support to be dropped

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Important announcement: modinfo.tdf support to be dropped

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Important announcement: modinfo.tdf support to be dropped

Post by Argh »

I take it that this is effective as of the official release?
User avatar
smoth
Posts: 22306
Joined: 13 Jan 2005, 00:46

Re: Important announcement: modinfo.tdf support to be dropped

Post by smoth »

the coming version, yes.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6193
Joined: 29 Apr 2005, 01:14

Re: Important announcement: modinfo.tdf support to be dropped

Post by FLOZi »

After all the work I went to making it backwards compatible (that trepan rewrote anyway :lol: )

Good move. :-)

Now, change script.txt to script.lua and change SM3 to lua and do away with the engine based tdf parser.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Important announcement: modinfo.tdf support to be dropped

Post 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.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Important announcement: modinfo.tdf support to be dropped

Post by Gota »

So i just replace that one file?anything else?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Important announcement: modinfo.tdf support to be dropped

Post by Auswaschbar »

Gota wrote:So i just replace that one file?anything else?
No, just that one.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Important announcement: modinfo.tdf support to be dropped

Post by Gota »

But will it work until the release of new spring?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6193
Joined: 29 Apr 2005, 01:14

Re: Important announcement: modinfo.tdf support to be dropped

Post 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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Re: Important announcement: modinfo.tdf support to be dropped

Post 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?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6193
Joined: 29 Apr 2005, 01:14

Re: Important announcement: modinfo.tdf support to be dropped

Post 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.
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: Important announcement: modinfo.tdf support to be dropped

Post 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)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Re: Important announcement: modinfo.tdf support to be dropped

Post 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, ...
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: Important announcement: modinfo.tdf support to be dropped

Post 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 ...)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6193
Joined: 29 Apr 2005, 01:14

Re: Important announcement: modinfo.tdf support to be dropped

Post 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.
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: Important announcement: modinfo.tdf support to be dropped

Post 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
...

?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6193
Joined: 29 Apr 2005, 01:14

Re: Important announcement: modinfo.tdf support to be dropped

Post by FLOZi »

Not sure why that doesn't work. :|
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: Important announcement: modinfo.tdf support to be dropped

Post 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 ......
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6193
Joined: 29 Apr 2005, 01:14

Re: Important announcement: modinfo.tdf support to be dropped

Post 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. :?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Important announcement: modinfo.tdf support to be dropped

Post by Auswaschbar »

I don't think its modinfo related, as the error would mention that.
Post Reply

Return to “Game Development Tutorials & Resources”