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.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.
Campaign with lua
Re: Campaign with lua
Re: Campaign with lua
Hello? Is there still any interest in developing the lua branch? If yes, I see two possible roads: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.
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.
Re: Campaign with lua
Can you post a diff of what you have done so far?Samowar wrote:Hello? Is there still any interest in developing the lua branch? If yes, I see two possible roads: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.
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 also don't think the devs are around, except for Zarel.
Re: Campaign with lua
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.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.
-
- Inactive
- Posts: 1695
- Joined: 01 Sep 2006, 19:17
Re: Campaign with lua
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...
- Saberuneko
- Regular
- Posts: 558
- Joined: 15 Jan 2010, 18:20
- Contact:
Re: Campaign with lua
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.
Re: Campaign with lua
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.
Re: Campaign with lua
I don't see any changes in point 1.Samowar wrote:Hello? Is there still any interest in developing the lua branch? If yes, I see two possible roads: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.
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.
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?
Re: Campaign with lua
An off-topic conversation was split to What Lua is
Re: Campaign with lua
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.
Sorry for the delay.
and it ends here.