View topic - Important announcement: modinfo.tdf support to be dropped



All times are UTC + 1 hour


Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: 23 Jan 2010, 01:28 
Spring Developer

Joined: 24 Jun 2007, 07:34
Location: 50┬░ 56' N, 11┬░ 35' O
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.


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 01:35 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
I take it that this is effective as of the official release?


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 01:35 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
the coming version, yes.


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 02:18 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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.


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 02:28 
Spring Developer

Joined: 24 Jun 2007, 07:34
Location: 50┬░ 56' N, 11┬░ 35' O
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.


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 02:35 
Supreme Annihilation Maintainer
User avatar

Joined: 11 Jan 2008, 16:55
So i just replace that one file?anything else?


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 02:39 
Spring Developer

Joined: 24 Jun 2007, 07:34
Location: 50┬░ 56' N, 11┬░ 35' O
Gota wrote:
So i just replace that one file?anything else?

No, just that one.


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 02:48 
Supreme Annihilation Maintainer
User avatar

Joined: 11 Jan 2008, 16:55
But will it work until the release of new spring?


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 02:59 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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.


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 17:17 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
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?


Top
 Offline Profile  
 
PostPosted: 23 Jan 2010, 17:49 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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.


Top
 Offline Profile  
 
PostPosted: 24 Jan 2010, 18:31 

Joined: 22 Jan 2009, 19:25
Hi,

who can i found a discription of modinfo.lua ?
Have only one found over "partialy" modinfo.tdf
(http://springrts.com/wiki/Mod_specification)


Top
 Offline Profile  
 
PostPosted: 24 Jan 2010, 18:35 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
Here's a short exemple I just made:
Code:
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, ...


Top
 Offline Profile  
 
PostPosted: 24 Jan 2010, 21:15 

Joined: 22 Jan 2009, 19:25
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 ...)


Top
 Offline Profile  
 
PostPosted: 24 Jan 2010, 21:50 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
R-TEAM wrote:
Hi,

Thanks zwzsg :)
But need an example with Multiple dependics and one Replacement
set too ....


Code:
depend = {
  "myfirstdependancy.sdz",
  "myseconddependancy.sdz",
  "myothercoolmod.sdz",
},
replace = {
  "mymodthatiamreplacing.sdz,"
}


Quote:
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.


Top
 Offline Profile  
 
PostPosted: 24 Jan 2010, 23:26 

Joined: 22 Jan 2009, 19:25
Hi,

thanks FLOZi , but "Replace" dont work in OTA content.
Have dong this modinfo.lua->
Code:
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
...

?


Top
 Offline Profile  
 
PostPosted: 24 Jan 2010, 23:48 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Not sure why that doesn't work. :|


Top
 Offline Profile  
 
PostPosted: 25 Jan 2010, 01:28 

Joined: 22 Jan 2009, 19:25
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 ......


Top
 Offline Profile  
 
PostPosted: 25 Jan 2010, 02:16 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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. :?


Top
 Offline Profile  
 
PostPosted: 25 Jan 2010, 02:48 
Spring Developer

Joined: 24 Jun 2007, 07:34
Location: 50┬░ 56' N, 11┬░ 35' O
I don't think its modinfo related, as the error would mention that.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.