Campaign with lua

For AI and campaign script related discussions and questions

Re: Campaign with lua

Postby Samowar » 19 Feb 2010, 00:45

Per wrote:If you look at the lua code converted from VLO files, they use zero-indexed arrays (which are legal in lua, but not exactly encouraged or recommended) but at great cost to code readability. So we should probably change this.
OK, I think I formulated it wrong. The problem in Alpha6 was that the SLO file initialized two arrays of two groups each. Now the first error was that these became Array() in Lua. When I changed them to {Group(), Group()} each, they became indices 1 and 2 instead of the 0 and 1 the rest of the scripts expect. Now I don't know what is easier: Changing the initialization (so the arrays are explicitly initialized as Strike1[0]=Group() and Strike1[1]=Group()) or changing all code that deals with these arrays. And I don't know (hence my question) if it's feasible to tweak the converter script so it deals with this matters or if the current version is as good as it gets and whatever errors still remain are to be fixed by hand.
Samowar
Trained
Trained
 
Posts: 42
Joined: 03 Jun 2009, 19:46

Re: Campaign with lua

Postby Samowar » 24 Mar 2010, 23:02

Samowar wrote:And I don't know (hence my question) if it's feasible to tweak the converter script so it deals with this matters or if the current version is as good as it gets and whatever errors still remain are to be fixed by hand.
Hello? Is there still any interest in developing the lua branch? If yes, I see two possible roads:

1. Someone writes a better converter which fixes the faults I've posted here. That someone won't be me; however, I'd be ready to test the results.

2. Someone takes the scripts as they are produced by the current converter and fixes them manually. I'm ready to be that someone (at least for the campaign scripts). However, in that case, life would be much easier if the lua scripts were under version control so I could easily produce svn-diffs and post them in trac.

I think the decision is up to the devs.
Samowar
Trained
Trained
 
Posts: 42
Joined: 03 Jun 2009, 19:46

Re: Campaign with lua

Postby Crymson » 26 Mar 2010, 22:17

Samowar wrote:
Samowar wrote:And I don't know (hence my question) if it's feasible to tweak the converter script so it deals with this matters or if the current version is as good as it gets and whatever errors still remain are to be fixed by hand.
Hello? Is there still any interest in developing the lua branch? If yes, I see two possible roads:

1. Someone writes a better converter which fixes the faults I've posted here. That someone won't be me; however, I'd be ready to test the results.

2. Someone takes the scripts as they are produced by the current converter and fixes them manually. I'm ready to be that someone (at least for the campaign scripts). However, in that case, life would be much easier if the lua scripts were under version control so I could easily produce svn-diffs and post them in trac.

I think the decision is up to the devs.

Can you post a diff of what you have done so far?
I also don't think the devs are around, except for Zarel.
User avatar
Crymson
Trained
Trained
 
Posts: 289
Joined: 18 Mar 2010, 21:08

Re: Campaign with lua

Postby Per » 02 Apr 2010, 16:11

Samowar wrote:Hello? Is there still any interest in developing the lua branch? If yes, I see two possible roads:

1. Someone writes a better converter which fixes the faults I've posted here. That someone won't be me; however, I'd be ready to test the results.

2. Someone takes the scripts as they are produced by the current converter and fixes them manually. I'm ready to be that someone (at least for the campaign scripts). However, in that case, life would be much easier if the lua scripts were under version control so I could easily produce svn-diffs and post them in trac.

I think the decision is up to the devs.

Since the main lua dev is not around at the moment, I suppose we could go ahead with committing the script results to the lua branch, and improve them by hand. I do not think anyone, including its author, wants to modify the conversion script further. I will look into it once I am back from Easter vacation.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 3625
Joined: 03 Aug 2006, 19:39

Re: Campaign with lua

Postby cybersphinx » 02 Apr 2010, 16:47

I thought there was something the script needs to be adapted for? Don't remember what that was, though... Anyway, committing the scripts might be nice, since it helps making the branch run on other platforms. But wasn't the plan to have the converter script for old mods? So if the script isn't doing all the work itself, we also need a guide on how to fix stuff later...
cybersphinx
Inactive
Inactive
 
Posts: 1671
Joined: 01 Sep 2006, 19:17

Re: Campaign with lua

Postby Saberuneko » 04 Apr 2010, 13:19

lav_coyote25 wrote:
dmkp wrote:What's "lua"?



http://www.lua.org/about.html



It's interesting, I've started to learn about lua some days ago, I think I have to raise a little the rythm for being able to give a hand. :)
User avatar
Saberuneko
Regular
Regular
 
Posts: 555
Joined: 15 Jan 2010, 18:20

Re: Campaign with lua

Postby stiv » 08 May 2010, 02:06

I recently made some modifications to the wz2lua.py script at Per's request. More work is certainly possible. I have not been following the lua branch closely so hints and suggestions are welcome.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: Campaign with lua

Postby Crymson » 05 Jun 2010, 21:56

Samowar wrote:
Samowar wrote:And I don't know (hence my question) if it's feasible to tweak the converter script so it deals with this matters or if the current version is as good as it gets and whatever errors still remain are to be fixed by hand.
Hello? Is there still any interest in developing the lua branch? If yes, I see two possible roads:

1. Someone writes a better converter which fixes the faults I've posted here. That someone won't be me; however, I'd be ready to test the results.

2. Someone takes the scripts as they are produced by the current converter and fixes them manually. I'm ready to be that someone (at least for the campaign scripts). However, in that case, life would be much easier if the lua scripts were under version control so I could easily produce svn-diffs and post them in trac.

I think the decision is up to the devs.

I don't see any changes in point 1.
For point 2, I don't understand the reason for not doing this? Everything should be under version control, should it not?
How can you produce svn-diffs on something that isn't in version control? O_o
User avatar
Crymson
Trained
Trained
 
Posts: 289
Joined: 18 Mar 2010, 21:08

Re: Campaign with lua

Postby Zarel » 14 Jun 2010, 00:30

An off-topic conversation was split to What Lua is
User avatar
Zarel
Elite
Elite
 
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA

Re: Campaign with lua

Postby Buginator » 20 Jun 2010, 21:03

For what it is worth, I think the plan will be to commit the generated scripts into SVN, then we can go from there.

Sorry for the delay.
and it ends here.
User avatar
Buginator
Professional
Professional
 
Posts: 3285
Joined: 04 Nov 2007, 02:20

Previous

Return to Scripting