Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Nuke on January 31, 2007, 09:23:10 am

Title: freespacelancer, aka why you modders should learn scripting
Post by: Nuke on January 31, 2007, 09:23:10 am
linky (http://www.game-warden.com/nukemod-cos/freespacelancer.mpg)

i put this in modding instead of scripting because i want people to know what scripting can do, and hopefully inspire some modders to use it. that said this is merely a demo or a proof of concept. the code is crude and is currently hard coded to one ship. check the remote turret thread in scripting for more technical info.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: NGTM-1R on January 31, 2007, 09:26:11 am
Didn't Goober already name something Freespacelancer?
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: IPAndrews on January 31, 2007, 01:41:57 pm
I teach programming. I can code C#, C++, C, Java, and Visual BASIC. I want to know how to use it. I've tried to use it. I won't touch it again with a barge pole. The documentation is inadequate gibberish. It's a black art and unless you've got an active practitioner   on speed dial you're doomed to faliure.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Wanderer on January 31, 2007, 01:56:39 pm
Just check the examples Nuke and others have posted.. Its sometimes a bit trial and error but it isn't that difficult.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: IPAndrews on January 31, 2007, 02:11:16 pm
I've tried to use it. I won't touch it again with a barge pole.

I honestly wouldn't have said anything but the thread title really got my goat.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: karajorma on January 31, 2007, 02:23:14 pm
i put this in modding instead of scripting because i want people to know what scripting can do, and hopefully inspire some modders to use it. that said this is merely a demo or a proof of concept. the code is crude and is currently hard coded to one ship. check the remote turret thread in scripting for more technical info.

Looks pretty cool Nuke. Scripting is on the list of things I want to learn in the near future. (In fact it's pretty close to the top of that list).
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Scooby_Doo on January 31, 2007, 04:33:08 pm
Is that how freelancer is actually played like? Thank god i didn't buy it then yuck.  (No offense to nuke, but to the makers of freelancer)

Also how debuggable is the script?
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Vengence on January 31, 2007, 06:09:11 pm
Actually, freelancer only used a mouse and you can aim anywhere on the screen, this looks like a camera script with targetting cursors that move to indicate where your shots will move. This looks extremely useful when in third person view where your standard aimer is way off and your ship constantly moves off the screen if it is very maneuverable.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Nuke on January 31, 2007, 07:15:05 pm
well i didnt use a camera at all. i ripped some lines of code from my mouse script to manuver by. i also wrote a function to convert the mousejoy coords to a normal, which is hacked into the remote turret function so as to aim the turrets.

script debugging is gettig alot better. there are so fewer errorless crashes. thing is you cant do much in a 3.6.9 build and anything you do probibly wont work in future builds so the best bet is to script with a recent build from the scripting forum. thing is wmc needs more feedback on the scripting system to help finalize it and get all the bugs out. so far we got maybe 3 people who are scripting and that number needs to come up greatly.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Wanderer on February 01, 2007, 03:26:17 am
I made earlier something to FSwiki.. very basic tutorial for scripting (http://www.hard-light.net/wiki/index.php/Tutorial_-_Basic_Scripting)

Unfortunaly that is written for 369 builds... i gotta update that for post-369 builds too

EDIT: There.. now it should be good for post-369 builds...

For older builds.. just check the older article revision.. Link to 369 version (http://www.hard-light.net/wiki/index.php?title=Tutorial_-_Basic_Scripting&oldid=7397)
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: MetalDestroyer on February 01, 2007, 07:41:31 am
Wouaw !! I didn't know that scripting could offer a lots a good feature like that. And that scripting is all done in LUA ? (I didn't look into the link that Wanderer gave).
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: DaBrain on February 01, 2007, 01:37:56 pm
Wow, very impressive!

I want that script for SoL! Especially the "3d" crosshair.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Nuke on February 01, 2007, 05:55:44 pm
that crosshair is a cheap hack, i got a better one that il implement later on.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: WMCoolmon on February 03, 2007, 01:32:08 pm
I teach programming. I can code C#, C++, C, Java, and Visual BASIC. I want to know how to use it. I've tried to use it. I won't touch it again with a barge pole. The documentation is inadequate gibberish. It's a black art and unless you've got an active practitioner   on speed dial you're doomed to faliure.

Say you had a student who failed to turn in a major project weeks after it was assigned. One day in class you hear him complaining that he wasn't able to complete the assignment because it was impossible to understand what exactly you wanted him to do in the assignment.

Would you believe the student if he went on to say that he 'wanted to complete the assignment' and had 'tried to complete the assignment', even though he had never said one word to you about the problems he was having?
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Nuke on February 03, 2007, 06:55:06 pm
heh, busted!

surely you have enough examples to go on. the scripting forum is loaded with em. all the freespace related handels and functions are neatly discribed in the scripting.html. the syntax is so straight forward its almoast boring. while the lua manual is crap, all you really need to look at is the built in math funcs. and surly if nuke can get it winged you can too :D
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: IPAndrews on February 05, 2007, 11:02:05 am
Would you believe the student if he went on to say that he 'wanted to complete the assignment' and had 'tried to complete the assignment', even though he had never said one word to you about the problems he was having?

Have you ever heard the phrase "If you haven't got anything good to say don't say anything"?. I became extremely annoyed with the standard of documentation for the scripting system the last time I tried to do anything constructive with it, but I didn't want to put a downer on your good work in public. That's why I didn't say anything! I shouldn't have said anything this time either. Nuke's attitude irritated me but responding to it really wasn't worth the hassle. In fact I should even be responding to your provocative post now. So just forget I said anything. Oh and I'm sure your scripting system is a fantastic piece of work even if I cannot use it. So chill out.

As for you Nuke. Go wipe your nose.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Axem on February 05, 2007, 11:35:54 am
Unless your comments about the scripting system weren't constructive at all, being quiet about is a surefire way to make sure things stay the same. It doesn't do anything to address any issues that you or anyone has with the scripting system.

Does no comments about a feature mean people find it stupid?
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: IPAndrews on February 05, 2007, 01:06:48 pm
Clearly I'm damned if I do and damned if I don't. It's like being back on the good 'ol VBBQ.  :lol:
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Nuke on February 07, 2007, 01:22:52 pm
Would you believe the student if he went on to say that he 'wanted to complete the assignment' and had 'tried to complete the assignment', even though he had never said one word to you about the problems he was having?

Have you ever heard the phrase "If you haven't got anything good to say don't say anything"?. I became extremely annoyed with the standard of documentation for the scripting system the last time I tried to do anything constructive with it, but I didn't want to put a downer on your good work in public. That's why I didn't say anything! I shouldn't have said anything this time either. Nuke's attitude irritated me but responding to it really wasn't worth the hassle. In fact I should even be responding to your provocative post now. So just forget I said anything. Oh and I'm sure your scripting system is a fantastic piece of work even if I cannot use it. So chill out.

As for you Nuke. Go wipe your nose.

didnt mean to sound like an ass, i just want the scripting system to get the attention it deserves.
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Scooby_Doo on February 07, 2007, 07:09:29 pm
I'm still wondering how you debug scripting?  I remember doing some scripting for Morrowind and it was a pain in the ass  :hopping:
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Nuke on February 07, 2007, 09:26:42 pm
you use one of the newer scripting builds, they actually have error messages. unlike the way it was back before 3.6.9 :D
Title: Re: freespacelancer, aka why you modders should learn scripting
Post by: Scooby_Doo on February 07, 2007, 10:48:36 pm
ok thats sounds reasonable  :)

morrowind scripting was pretty icky...

it might not like this usually:
myNewValue = myValue + 100

however this was ok
myNewValue = myValue
myNewValue = myNewValue + 100