Page 1 of 2

Behemoths

Posted: Thu Mar 21, 2013 10:03 pm
by mandoman
I was just wondering whether a builder could add their own behemoth into the mix, without too much confusion. I don't want to step on copy rights, or anything of that nature, but I would sure like to add a couple of carriers that would be seen as the behemoths they are, and put into the game as such. Is that possible, or am I just blowing smoke?

Re: Behemoths

Posted: Thu Mar 21, 2013 10:13 pm
by Rorschachhamster
I'm not really familar with the Behemoth.OXP, but if you need scripts or something else from it, you could just write it into the description of your OXP that it is needed. :wink:

Re: Behemoths

Posted: Thu Mar 21, 2013 10:21 pm
by mandoman
I've already tried dropping subtle hints to that effect, but so far no takers have stepped forward. Everyone is too busy with their own projects. :)

Re: Behemoths

Posted: Fri Mar 22, 2013 5:07 am
by JazHaz
I have a player-flyable behemoth, that Dizzy sorted out for me for an OXP project. I'll send it to you if you like.

Re: Behemoths

Posted: Fri Mar 22, 2013 6:33 am
by submersible
mandoman wrote:
I've already tried dropping subtle hints to that effect, but so far no takers have stepped forward. Everyone is too busy with their own projects. :)
I've been working on a model which has no particular home. 'Colossus' looking for a use. This ship launches from either port or starboard belly-forward , and accepts docking from above. Currently only a model.
Image
Image

Re: Behemoths

Posted: Fri Mar 22, 2013 12:44 pm
by mandoman
JazHaz wrote:
I have a player-flyable behemoth, that Dizzy sorted out for me for an OXP project. I'll send it to you if you like.
Yeah, I would appreciate that. Sounds interesting. :D

Re: Behemoths

Posted: Fri Mar 22, 2013 7:58 pm
by toltesi
submersible wrote:
mandoman wrote:
I've already tried dropping subtle hints to that effect, but so far no takers have stepped forward. Everyone is too busy with their own projects. :)
I've been working on a model which has no particular home. 'Colossus' looking for a use. This ship launches from either port or starboard belly-forward , and accepts docking from above. Currently only a model.
Image
Image
Wow...I love this game!

Re: Behemoths

Posted: Sat Mar 23, 2013 1:05 am
by Diziet Sma
mandoman wrote:
JazHaz wrote:
I have a player-flyable behemoth, that Dizzy sorted out for me for an OXP project. I'll send it to you if you like.
Yeah, I would appreciate that. Sounds interesting. :D
Be aware that I didn't sort out the shields.. some tweaking is still needed.

Re: Behemoths

Posted: Sat Mar 23, 2013 1:32 am
by mandoman
I asked Eric Walch about how to pull it off, and he said that just specifying in the ship roles that it is a behemoth will add it to the list. In other words, if it's role is a behemoth carrier home-for-others, what-have-you, the game will work it into the behemoth lineup for appearing in the game. That was almost too simple, so it was just right for me. :mrgreen:

Re: Behemoths

Posted: Sat Mar 23, 2013 8:18 am
by Eric Walch
At the begin of the Behemoth script is a list of roles:

Code: Select all

this.behemoth = ["behemoth-ymir", "behemoth-argus", "behemoth-atlas", "behemoth-grid", "behemoth-surt", "behemoth-talos", "behemoth-tethys", "behemoth-bolverk", "behemoth-gog", "behemoth-magog", "behemoth-titan", "behemoth-loki", "behemoth-goliath", "behemoth-colossus", "behemoth-nimrod", "behemoth-geryon"];
The whole purpose of that script is to avoid that the player will ever see two identical named Behemoths in the same system. When you create new types and give each a different role from above list, it will only enhance the variation. The behemoth.oxp will than do the addition as before.

And you could give your oxp a copy of the behemoth script with its own name. That copy then should check if the original Behemoth script is present. If yes, it deletes itself. If not, your script does the population.
This looks a bit complex, but ensures that your oxp would also work in the absence of the original oxp, without the risk of disturbing it when present. But first create ships themselves. :wink:

Re: Behemoths

Posted: Sat Mar 23, 2013 1:37 pm
by mandoman
Ooookay. I hope I understood you clearly. None of my carriers have the name "behemoth" at the head of the ship name, but in the roles I entered "behemoth-mt1012carrier". Then I took the original behemoth.js script, added the two I have up and running right now in the list, with the same name given in each my ship's roles, and then renamed the script "behemoth2.js". Now, I may have part, or all of that wrong. Does it look right to you? Should I NOT have changed the script name to "behemoth2.js"?

Re: Behemoths

Posted: Sat Mar 23, 2013 2:44 pm
by Eric Walch
Not only the filename must be different but also the entry name. The content of name is used to identify other scripts. I would suggest to add the original script into your oxp and add the following lines

Code: Select all

this.name = "behemoth-mandoman";

this.startup = function ()
{
		if (worldScripts.behemoth)
		{
				delete this.shipExitedWitchspace;
				for (var i = 0; i<this.behemoth.lenght; i++)
				{
					worldScripts.behemoth.behemoth.push(this.behemoth[i]);
					worldScripts.behemoth.behemothList.push(this.behemoth[i]);
				}
		}
}
And also give your behemoths unique roles and fill them in in the new script instead of the original roles. That will result in:
When the behemoth.oxp is not installed by the user, your oxp will work on its own and add the ships. And when the behemoth .oxp was installed alongside yours, your code deletes its own populating script-part and the original oxp will select ships from both oxps. That avoids increasing the added amount of ships to the universe if both oxps are installed.

Re: Behemoths

Posted: Sat Mar 23, 2013 3:36 pm
by mandoman
I'm following your logic, but where in the original script do I add what you have posted. Also, where you have
this.name = "behemoth-mandoman"; In the place of mandoman, am I to place the unique name/role of the ship I'm adding to the list? Also, this is completely seperate from the behemoth.js? I don't add my carriers to the behemoth.list?

Sorry, this is the kind of stuff that trips me up. Thanks for the help. :)

Re: Behemoths

Posted: Sat Mar 23, 2013 9:08 pm
by mandoman
I set it up the way I thought you meant, and am getting no error notices in Latest.log. In fact, Latest.log shows the MTFleetV1.2.oxp as present, and running. I guees I'll just have to keep my eyes open for the ships, now. :D

Re: Behemoths

Posted: Sat Mar 23, 2013 9:20 pm
by Shipbuilder
Looks like the lure or the dark side was too much for you to resist Mandoman. :mrgreen:

And it sounds like you are working on an interesting project.