Lua Unit Defs vs tdfs - Page 3

Lua Unit Defs vs tdfs

Classic game design, maintained to please you...

Moderator: Content Developer

User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Lua Unit Defs vs tdfs

Post by TheFatController »

TradeMark wrote:Edit: what im crying is here because youre all so fucking retarded that you use scripting languages for static data files because youre too fucking lazy to use a dev tool to edit your mod easier. you are also fucking stupid you think im crying about this just for Modit lol gtfo noobs.
Lua is fine for data storage, it's no different than JSON with javascript which is an accepted data storage format.

Also since no mod seems to want to deal with the 3 reports you've picked up in this forum please consider this your final warning before I arrange for your posting privelidges in the BA forum to be removed, more civility please.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Lua Unit Defs vs tdfs

Post by TradeMark »

TheFatController wrote:Lua is fine for data storage, it's no different than JSON with javascript which is an accepted data storage format.
Wrong, JSON is static format, no scripting required.
TheFatController wrote:Also since no mod seems to want to deal with the 3 reports you've picked up in this forum please consider this your final warning .
so others got no reports despite their trolling / insults in here? seems like i have to gtfo and create new account. you seem all got obsessed at me.

Edit: nvm JSON sucks, doesnt allow newlines in the format >_>
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Lua Unit Defs vs tdfs

Post by Google_Frog »

What are the advantages tdf over lua?

After 3 pages you still have not sated anything tdf can do that lua can't. You're just arguing in circles calling everyone who uses lua retarded.

I see things lua can do that tdf can't so I preffer lua.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Lua Unit Defs vs tdfs

Post by TradeMark »

...

I already told that TDF is broken, and it would just have to be fixed.

All it needs is quotes for strings and some syntax error checking. then its 100% bullet proof.

What are the advantages tdf over lua?
Consistency for example? dont use scripting in data; anyone can read it without building huge scripting engine.

Its always smarter to not use heavy stuff on simple things that doesnt need it. For example dont make BMP image into XML format because youre too lazy to write BMP reader because you already have XML library. (yeah that doesnt make sense).
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Lua Unit Defs vs tdfs

Post by Tribulex »

Google_Frog wrote:You seem to have 2 main points:
  • Everyone who uses lua for data files is stupid (and is somehow an apple fanboy).
  • It is impossible to use lua in modit
Your first point is irrelevant to the actual functionality of lua defs. Your second is disproved by the existence of CarRepairers mod stats thing.

In short:
OMFG ur such a whiny noob tm. Lua defs makes sense. it has more features than tdf. ur just being lazy because you dont actually make mods, you just spam metalmaps. but no one cares if modit parses lua.
Yeah bitch backed by a moderator!

But srsly if you read your posts you will realize the truth in my post.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Lua Unit Defs vs tdfs

Post by TradeMark »

shut up you troll.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Lua Unit Defs vs tdfs

Post by Google_Frog »

Consistency for example? dont use scripting in data; anyone can read it without building huge scripting engine.
Lua can be opened by text editors. The rest of this just seems circular.
Its always smarter to not use heavy stuff on simple things that doesnt need it.
Not when the 'heavy stuff' has many more features. Anyway lua does not seem much heavier than tdf.
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Lua Unit Defs vs tdfs

Post by Tribulex »

So TM is bashing lua vs tdf, doesnt mod so doesnt realize the effectiveness of the lua, and everyone disagrees with him and submits valid points against his stubborn ideology. However, he doesnt care what other people say and even thinks he has won the argument.

Our luck sucks that he is also responsible for the useful modders tool modinfo.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Lua Unit Defs vs tdfs

Post by Saktoth »

Id just like to clear something up, CA's lua files use almost nothing special, no scripting, they're laid out just like TDF files, only in a different format and with a few customparams, which are themselves laid out just like any other tdf parameter. The mass-edit program we use to make broad sweeping changes to the lua files is precisely what you say we should be using Trademark, a dev tool (CAEdit) that mass edits the luadefs files, then spits them back out in the same format, with a bunch of parameters changed. We do very little editing of the units stats during runtime, and if we do it is mostly for mod options which are necessarily variable. Because, frankly, it would be a nightmare to dev if we couldnt rely on a change to the unitdef propagating into the actual game. There are a few areas, such as morph and jump defs which are kept in seperate files within the repository, but these are new attributes to units rather than edits to the traditional luadefs.

Much kudos to all the work you've done Trademark. Lets all try and remain civil (Except Trib, who is gonna troll no matter what you do).

So, what kind of impacts can we see from not using a static file? Most people here seem to be interpreting this as something that will make modders lives more difficult and complicated: Not necessarily, because luadefs can be made just as simple as .tdf/.fbi or they can use complex scripts if the modder has those skills. Is there some other problem, such as a performance hit? When we were first going over to lua we asked this question, and i was told that tdf/fbi's are converted to lua anyway, so there is no reason not to use it.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Lua Unit Defs vs tdfs

Post by TradeMark »

Saktoth wrote:CA's lua files use almost nothing special, no scripting
doesnt matter since CA is not the only one, and there are no standards how the lua data files format would be. also they mess up all the unit/weapon/corpse data at some other functions, so what you see in those files is something else you see when you start the game. means i would have to use spring.exe to execute the lua scripts to get the real data. i explained earlier why i cant even parse them without spring.exe (look few pages back and find lots of lua code).
Google_Frog wrote:
Consistency for example? dont use scripting in data; anyone can read it without building huge scripting engine.
Lua can be opened by text editors. The rest of this just seems circular.
LOL
are you trolling me again?

Image
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Re: Lua Unit Defs vs tdfs

Post by quantum »

As a tool maker, I think lua defs are easier to read. Just run the top file in the mod with a lua interpreter, it will read everything and work for every mod that works in Spring, because that's exactly what Spring does when loading a mod.

You'll need a couple of lua functions spring has, but they are trivial to implement or you can just paste them from another tool.

Also, you don't need spring.exe. You can use unitsync or a lua interpreter.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Lua Unit Defs vs tdfs

Post by TradeMark »

stop talking bullshit, thats not easier.

i would like to see how you do that in PHP (without executing any programs)

now whats easier huh...
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Re: Lua Unit Defs vs tdfs

Post by quantum »

Well it is harder for tool makers who can only run php, which seems to be a problem specific to you. Maybe ask for help in hosting a lua interpreter? Run it on your computer and upload data files to your site?
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Lua Unit Defs vs tdfs

Post by TradeMark »

i can already execute spring.exe on my host. i just need the code that does that... im still waiting trepan's answer to my question so i cant do a shit now.

but thats offtopic. we talk here how retarded it is to use scripted data files.
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Lua Unit Defs vs tdfs

Post by Tribulex »

SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Lua Unit Defs vs tdfs

Post by SirMaverick »

TradeMark wrote:also they mess up all the unit/weapon/corpse data at some other functions, so what you see in those files is something else you see when you start the game. means i would have to use spring.exe to execute the lua scripts to get the real data.
That would only show you default settings. Some mod options have influence on unit stats.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Lua Unit Defs vs tdfs

Post by TradeMark »

SirMaverick wrote:
TradeMark wrote:also they mess up all the unit/weapon/corpse data at some other functions, so what you see in those files is something else you see when you start the game. means i would have to use spring.exe to execute the lua scripts to get the real data.
That would only show you default settings. Some mod options have influence on unit stats.
its not only unit stats that they reformat. look at the armors list for example.
Tribulex wrote:lua is an open source standard.

a quick google search

http://pecl.php.net/package/lua
http://www.sourcepeek.com/wiki/PHP_LUA_Parsing_Class
thanks, but that doesnt solve the problem that is related in scripted data files.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: Lua Unit Defs vs tdfs

Post by trepan »

Here's a diff that makes lua2php.cpp work against current the git
sources ("master" branch from git://github.com/spring/spring.git).
Besides the defs.lua definitions, I've also added output for
resources.lua, sidedata.lua, etc...

An example output PHP file (compressed), is also attached. I used
a SDD mod directory because of the incompatibility between the
current git unitsync and the mods/games that I have. The example
file passes through the php5 CLI parser without error. It was
created using the following command:

sh lua2php.cpp ba704.sdd
Attachments
lua2php.diff
(4.41 KiB) Downloaded 13 times
ba704.sdd.php.gz
(116.65 KiB) Downloaded 13 times
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Lua Unit Defs vs tdfs

Post by Tribulex »

so basically there is no more room for whining and excuses?

well then again its trademark, nevermind.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Lua Unit Defs vs tdfs

Post by TradeMark »

Tribulex wrote:so basically there is no more room for whining and excuses?

well then again its trademark, nevermind.
using a tool specificly made for me doesnt solve problems for everyone else as well. so yes, the whine is not over yet. you just dont get it, do you?
trepan wrote:Here's a diff that makes lua2php.cpp work against current the git
sources ("master" branch from git://github.com/spring/spring.git).
Besides the defs.lua definitions, I've also added output for
resources.lua, sidedata.lua, etc...
i cant open .diff files, can you send the whole file link to me? if you cant, then forget about it
Post Reply

Return to “Balanced Annihilation”