On 9/1/07, James Paige <[EMAIL PROTECTED]> wrote:
> On Sat, Sep 01, 2007 at 05:39:34AM +1200, Ralph Versteegen wrote:
> > On 9/1/07, Mike Caron <[EMAIL PROTECTED]> wrote:
> > > I have a question. I know Vikings of Midgard is supposed to be the
> > > "Tutorial" game for U*, but I was talking to TMC, and he mentioned
> > > something rather important: The plotscripts in that game are horrible.
> > > They work, but they look horrible, and teach nothing but bad habits.
> > >
> > > Things like this snippet:
> > >
> > > script,die in battle,begin
> > >   variable(i)
> > >
> > >   if(check tag(tag:DO NOT DIE)==OFF)
> > >   then,begin
> > >    (show textbox (596),wait for key (anykey),fade screen out
> > > (0,0,0),game over,end)
> > >   else,begin
> > >     for(i,0,3) do,begin
> > >       if (get hero stat(i,stat:HP,current stat) <= 0)
> > >       then (set hero stat(i,stat:HP,1))
> > >     end
> > >   end
> > > end
> > >
> > > Although it works, there are some serious issues. Note that the "then,
> > > begin" of the if is on a new line, and the actual content of the block
> > > is on a third line, and is surrounded by parenthesis. Also note that
> > > at the end of the if block is an additional "end", which was likely
> > > added to compensate for the error that popped up when the extra
> > > "begin" was added.
> > >
> > > If anyone is expected to learn tricks from them, and especially if its
> > > going to be included in the official distribution, these scripts
> > > really need to be cleaned up, reformatted, indented, and deWTFed.
> > >
> > > --
> > > Mike Caron
> > > Tale of the Cave
> > > http://taleofthecave.com
> >
> > To be fair, putting "then, begin" on a new line is something James'
> > does all over the place (especially in wander), and a lot of people
> > seem to have picked it up off him. While I personally find the lack of
> > spaces in James' scripts a little annoying (though writing
> > incomprehensible code in HSpeak is fun!), I won't complain much over
> > that. But, why on earth does everyone use setvariable!
> >
> > I'll start cleaning up the scripts a bit, and hope FL works off these
> > (or we'll be merging in changes).
> >
> > Also, RE:utility.hsi, I think some of the scripts are useful, some are
> > a little unclear, but things like DoHeroChange and RunOnKeyPress
> > should be left to people to write themselves.
> >
> > TMC
>
> I have mixed feelings on the subject.
>
> I do want to see clean well-formatted new-syntax scripts as examples...
> but the scripts work, and I hate to delay ubersetzung at this point.
> Maybe this is a voxhumana kind of thing. People write a lot of bad code
> already and a few more months of bad example ain't gonna kill them :)
>
> Any cleanup definitely needs to be coordinated with Fenrir, so we don't
> end up with unmergeable differences.
>
> As for utility.hsi, maybe we can move the most general-purpose of those
> to plotscr.hsd and the rest can be merged into vikings.hss
>
> ---
> James

Well, I don't see much reason to delete utility.hsi, FL can split his
scripts however is reasonable.
I don't think cleaning up the vikings scripts would delay Ubersetzung,
I can clean most of it quickly without risk of introducing bugs
(testing binary equivalence). I wouldn't convert scripts to
"plotscript" syntax.
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to