Show and Tell (new ships/ ships in progress)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

Cmdr. Maegil wrote:
Killer Wolf wrote:
if you can't dock you totally eliminate the trading aspect
It just occurred to me, but how about a piece of primable equipment that made the player's ship into a static NPC and ejected the player into say, a Worm shuttle with the ship's cargo capacity and value but no hyperdrive and all equipment disabled (just an avatar). The "what if the player took the shuttle through a wormhole" would have to be addressed, but I think it's feasible.
THAT is just the type of thing I was considering, other than having other ships dock at my big one. If I could launch a sub-player craft, with cargo to trade at the main station, that would work fine for me as well. Once again, though, whether it's a player, or npc, it's dead out of space until I figure the scripting out. Why the heck does it have to be so dang complicated? Stupid question, I guess. All programing is complicated if you don't know programing. Kind of makes this a programers game, unless you just want to play. Too bad, as I was starting to enjoy ship building, and I was just getting started with ideas I have burbling in the back of my mind. :| :mrgreen:
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Cmdr. Maegil
Sword-toting nut-job
Sword-toting nut-job
Posts: 1294
Joined: Tue Feb 27, 2007 10:28 pm
Location: On the mend in Western Africa

Re: Show and Tell (new ships/ ships in progress)

Post by Cmdr. Maegil »

...just why do you think I finally dubbed the Spartans OXP as vapourware?...
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Show and Tell (new ships/ ships in progress)

Post by Smivs »

The Player is the Ship.
That is the Oolite mantra, and there is no known way around it. You can't, I'm afraid, switch player ships in-game other than by buying a new one at the shipyard.
As for scripting, yes it's complicated, but so is much of life. And it needs to be learnt the same way as other life-skills, slowly and starting at the beginning. My little girl is four and is just learning her letters. Mostly she gets them right, and she can now identify simple words (cat, horse etc). It's a start and in years to come she might be penning novels or who knows what. The moral is don't try to run before you can walk.
I gave you a simple script a while ago to spawn ships, and that's a good place to start. Play around with it and see how it works. Spawn 2 or 3 ships, rather than just one, make them further away. Make them appear after a jump rather than when you leave the station. This will give you a start inasmuch as you can then spawn your ships where you want them. Then try spawning them in certain types of systems, or a specific system. All the info you need to do this is in the js reference section of the Wiki, or you can ask/check here or in the chatroom.
And consider that many OXP ships simply don't need any scripting. A 'regular' ship can just be spawned as one of the default roles (eg trader) with the default AI for that role. A specialised ship might need a custom AI to do un-usual things.
As I've suggested before, try to be methodical. First, make sure your ship works and appears in game (using the spawning script will achieve this), then maybe do any AI it might need and make sure it behaves properly, then move on to any scripting it might need. The point I'm trying to make is, if you try to do it all at once, it almost certainly won't work, and you won't know why, because it could be anything!
And as I've also mentioned before, the most useful resource you have is the game itself. Study the AIs and scripts and you will start to 'see' how they work. Steal bits of them if you need to - that's what I often do.
It takes time to learn this stuff, yes, but if you approach it in a structured and sensible way, you'll be surprised how much you can learn.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

To repeat myself once more, I HAVE been studying other AIs and Scripts. I have tried using core Oolite AIs as guides to creating my own. I have tried using AIs and Scripts from other oxps to help me create my own, I have read, re-read, and re-read again all of the info listed on the Wiki on how to write all of that. I won't say that I didn't learn something, as I can now put together a simple shipdata.plist and make it work with the .dat file, and the Texture. Thanks to Staer9, and other Blender tutorials, I now know my way around Blender far better than I ever thought I would.

It's easy to tell others to just "go look it up", when you already know the answers. It's easy to lecture someone on perseverance, even though you don't actually know what that person has been doing. I have been offered help on scripting, and writing AIs, only to be told to "go look it up" by the very people that offered to help.

You know something, I'll continue to "go look it up", not because of your public lecture to my obvious laziness, but because I do want to learn. I also enjoy doing it, even when it's wrong. I wasn't asking you for help. I have stopped asking for help of anyone, because my doing so is obviously annoying to those I ask. Hind site is 20/20, as the saying goes, and if I could do things over, I would know how to write computer programs well enough by now, that the AIs and scripting wouldn't even be a problem. It's funny how forty years goes by so fast, and you didn't learn what you should have, so you try to start learning it now, and HEY, this ain't so easy. What's the deal?

End of Rant.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Show and Tell (new ships/ ships in progress)

Post by Okti »

Well mandoman, that is just how we all started contributing to oolite, learning from other peoples work and core game. Must admit being a professional programmer did not help me at the begining. And most of the time I need to look at the references provided by oolite and other OXPs to find a solution to the problem. Then comes the testing part, first tests are annoying because after changing a line in one of the files, you must shift start the game and see if it worked or not.

Some features like changing ships on the fly can not be done by scripts or AIs, but apart from that we will all try to guide you to the way to do it. If you want an AI or script to do what you want, even that can be provided. But that will not be good for your learning.

Keep on with the ambition to contribute to oolite.
My OXP's
And Latest Mission Coyote's Run
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Show and Tell (new ships/ ships in progress)

Post by Smivs »

Please don't take offense, I am only trying to help. I certainly don't 'know it all' - my abilities are fairly limited, but what I do know I've learnt by doing what I suggested to you. I looked at the AIs etc and slowly began to work out how they work, then learnt a bit more by trying a few simple changes to them.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

I apologize to you all. Once more I let my temper guide my words. I will keep trying, and hopefully truly will contribute to the game.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Show and Tell (new ships/ ships in progress)

Post by Smivs »

No need to apologise...believe me I know how frustrating this can be. It still does it to me - I can't get my head around much of the more advanced js, and as for quarternions....... :cry:
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Show and Tell (new ships/ ships in progress)

Post by Okti »

My OXP's
And Latest Mission Coyote's Run
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Show and Tell (new ships/ ships in progress)

Post by mandoman »

So I've been told, and have experienced to some degree. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Show and Tell (new ships/ ships in progress)

Post by Thargoid »

The trick is always the balance between pointing people in the right direction and actively doing things for people. The difficult part in scripting is understanding the general mechanism behind it and how it works. That key understanding, combined with the information in the wiki, is enough to write at functional OXPs.

It's how I started (I'm not a programmer, the last computer language I learnt was BASIC), and I can these days string some functions together. That's not to say I don't have days also when I'm forever restarting the game with shift held and snipping out stupid bugs like everyone else, but it's not enough to generate too much frustration (usually). But it's clear when comparing my script to others here who do it better that we're all (very much me included) still learning stuff and coming up with new and unusual ways of doing things.

All I can say is stick with it, it does become easier once you get your brain around how things work conceptually and mechanically.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: Show and Tell (new ships/ ships in progress)

Post by Killer Wolf »

Thargoid wrote:
The trick is always the balance between pointing people in the right direction and actively doing things for people.
Must admit to being guilty (as you know, lol) of asking people to script stuff. i like to learn stuff myself but the prob i have is i've got a million things on the go as different hobbies and i work full time, so i end up having little time to apply to each of my projects. i end up thinking, would it be better to ask and get an OXP out for people to (hopefully!) enjoy, or muck about for 6 months trying to sort the bugger myself? i *do* like to suss things myself tho but Javascript totally frustrates me in its syntax, formats, quirks and operation. having been a COBOL programmer etc i can usually figure out what code does, but sometimes the layout of JS just leaves me dead in the water. there's a good few freebie "learn java" sites out there, but that leads back to the not having enough free time thing.
User avatar
Cmdr. Maegil
Sword-toting nut-job
Sword-toting nut-job
Posts: 1294
Joined: Tue Feb 27, 2007 10:28 pm
Location: On the mend in Western Africa

Re: Show and Tell (new ships/ ships in progress)

Post by Cmdr. Maegil »

Cmdr. Maegil wrote:
made the player's ship into a static NPC and ejected the player
Smivs wrote:
The Player is the Ship.
That is the Oolite mantra, and there is no known way around it. You can't, I'm afraid, switch player ships in-game other than by buying a new one at the shipyard.
I didn't made myself clear, maybe because I really don't know what I'm talking about...

For the purpose I was thinking, it wouldn't mean to change it on the fly - there may be a workaround to this problem if it's possible to:
a) create a dockable NPC ship on the player's position;
b) register the ship's variables for later repurchase;
c) make the player be instantly docked at this NPC, with its own custom shipyard.

Buy your Avatar, launch, dock at station to do what you wish, then return;

c) on the NPC shipyard, re-buy your "previous" ship
d) launch and delete NPC carrier
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
User avatar
Selezen
---- E L I T E ----
---- E L I T E ----
Posts: 2530
Joined: Tue Mar 29, 2005 9:14 am
Location: Tionisla
Contact:

Re: Show and Tell (new ships/ ships in progress)

Post by Selezen »

I always thought that one of the core rules of being the "friendliest board this side of Reidquat" was that we never tell people to "RTFM". We point people to the right bits of TFM (relevant topics etc) and then wish them luck.

Even looking through scripts can be a bit daunting for someone new to Oolite. I'm a qualified programmer and I get hot sweats thinking about quaternions, so it's understandable to crave some collaboration through those first shaky steps! :-)
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Show and Tell (new ships/ ships in progress)

Post by Kaks »

Killer Wolf wrote:
there's a good few freebie "learn java" sites out there, but that leads back to the not having enough free time thing.
Aargh! :)
It's javascript, not java:they're two different programming languages! :P

In any case, yes, this whole thing can be overwhelming, but if you stick at it, getting your baby to fly exactly how you want is an extremely nice feeling! :)

Small changes to a working script is usually the easiest way to figure things out. Expecially when you're not used to the way .plists & js work, even a very minor change is enough to break things.
After a while you kind of get a feeling of what might or might not work, usually as a result of the accumulated wisdom of finding out why things broke after just a 1 letter change in the past!
When faced with a completely new thing the first thing I do is make one small change, see if it breaks anything, and if not I pat myself on the back - most of the time just metaphorically! :D
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply