Tinkerer's Workshop - OXP tweaking for fun and profit!

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

Moderators: another_commander, winston

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16055
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Cody »

Smivs wrote:
This is a testing tool, and not a cheat that should be used for normal gameplay.
<chortles> Once it's out in the wild, it will be used - for whatever reason.
For a long-range tester, I give that commander a few hundred ly of fuel - that too gets across the chart PDQ!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Smivs »

Cody wrote:
Smivs wrote:
This is a testing tool, and not a cheat that should be used for normal gameplay.
<chortles> Once it's out in the wild, it will be used - for whatever reason.
I know, I know. What have I done! :(
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Diziet Sma »

Smivs wrote:
N.B. This is a testing tool, and not a cheat that should be used for normal gameplay. :wink:
That's odd.. I coulda swore I heard somebody say:
Smivs wrote:
(And, NO! I won't be releasing the OXP anytime soon)
Well.. posting it here is very nearly the same thing.. :lol:

Ah well.. it's "in the wild" now.. for good or ill.. (remember kiddies.. do as Daddy says, not as Daddy does.. :wink: )

Though seriously, thanks, Smivs.. I'm sure it will come in handy at some point.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6547
Joined: Wed Feb 28, 2007 7:54 am

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by another_commander »

Smivs wrote:
I have been chatting to Dizzie over at my 'OXPs and 1.80' thread and the subject of my test ship came up.
When you are testing it is sometimes helpful to be be to cover vast distances in a short time, so my Contractor test ship has Magic Fuel Tanks which re-fill after every witchjump, thus avoiding the need to waste time re-fuelling. This is accomplished with a simple script that some of you might find helpful.

Code: Select all

"use strict"

// Standard attributes 
this.name           = "fuelCheatScript.js"; 
this.author         = "Smivs"; 
this.copyright      = "This script is hereby placed in the public domain."; 
this.version        = "1.0"; 
this.description    = "Script for 'cheat' fuel refill.";

{
this.shipExitedWitchspace = function()
 {
  player.ship.fuel += 7.0;
 }
}
Simply name this 'script.js' (without the quote marks) and place it in your AddOns folder.
N.B. This is a testing tool, and not a cheat that should be used for normal gameplay. :wink:
Rather than filling up the AddOns folder with various script.js files for doing different things, would it not be easier to just have the debug console active and connected to Oolite when testing and simply do a

Code: Select all

PS.fuel=7
whenever you need a fill-up?

I believe every OXPer would make excellent use of their time familiarizing themselves with the debug console; it can do everything that can be done with a script, only faster and probably with better control when it comes to testing.
Neelix
---- E L I T E ----
---- E L I T E ----
Posts: 288
Joined: Sat May 31, 2014 9:02 pm
Location: Melbourne, Australia

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Neelix »

another_commander wrote:
Rather than filling up the AddOns folder with various script.js files for doing different things, would it not be easier to just have the debug console active and connected to Oolite when testing and simply do a

Code: Select all

PS.fuel=7
whenever you need a fill-up?

I believe every OXPer would make excellent use of their time familiarizing themselves with the debug console; it can do everything that can be done with a script, only faster and probably with better control when it comes to testing.
I have to agree with this. between the debug console and cim's build scripts, putting my first OXP together was a lot easier than I'd expected.

The debug console and the documentation in the wiki let me experiment with the Oolite's javascript interface, which let me quickly learn how the manifest object works. I then knew what my code needed to do, so actually writing the code was pretty straightforward.

Cim's build scripts made troubleshooting a breeze! Edit the files, run the script, start Oolite and test, repeat until it stops throwing exceptions... The debug console also turned out to be very useful here too, because every time an exception was thrown the console would tell me a line number, which provided a good pointer in terms of where to look for the issue.

- Neelix
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Tricky »

Positioning the message and communication log windows.

I use the following in a hud.plist file placed in AddOns/Config

The comments for x and y help to explain how to work out the values. If x_origin is negative then x is positive. If x_origin is positive then x is negative. This is the same for y_origin and y

border inset is the amout of padding from the edge of the screen to the edge of the message/comm log window.

Code: Select all

{
	/* Top left. */
	message_gui =
	{
		alpha = 0.75;
		width = 400;
		height = 80;
		x_origin = -1;
		y_origin = 1;
		x = 210;	// Half the width + border inset of 10
		y = -50;	// -(Half the height + border inset of 10)
		row_height = 10;
	};

	/* Top right. */
	comm_log_gui =
	{
		alpha = 0.75;
		width = 240;
		height = 120;
		x_origin = 1;
		y_origin = 1;
		x = -130;	// -(Half the width + border inset of 10)
		y = -70;	// -(Half the height + border inset of 10)
		row_height = 10;
		permanent = no;
		automatic = yes;
		background_rgba = "0.0 0.05 0.45 0.5";
	};

	multi_function_displays = ({
		/* Top left under message_gui. */
		width = 240;
		height = 132;
		x = 130;	// Half the width + border inset of 10
		y = -166;	// -(Half the height + border inset of 10 + message_gui.height + 10)
		x_origin = -1;
		y_origin = 1;
		row_height = 10;
	},
	{
		/* Top right under comm_log_gui. */
		width = 240;
		height = 132;
		x = -130;	// -(Half the width + border inset of 10)
		y = -206;	// -(Half the height + border inset of 10 + comm_log_gui.height + 10)
		x_origin = 1;
		y_origin = 1;
		row_height = 10;
	});
}
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Redspear »

Thanks Tricky, I think I'll be using that one 8)

The nice, clear heading to your post makes me think that a thread like this one could really do with an index...

I've got a post on the first page of this thread that I'd be happy to turn into an index (if no one objects?)
The more postings there are here, the more good stuff is going to get buried... hopefully by even more good stuff :D

I'll see if I can set up an example of what I mean (with links to relevant posts) and then if there are objections (or if someone has a better idea) I can edit or remove it.
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Zireael »

Go ahead and make an index!
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Redspear »

Zireael wrote:
Go ahead and make an index!
Beginnings of an index started on first page of this thread.

Rather than finish it all now, I thought I'd just make a start and then it could be open to criticism.
If folks are happy with it then I will continue.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Diziet Sma »

Thanks very much for taking this project on, Redspear.. excellent idea! 8)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Twisp
Above Average
Above Average
Posts: 21
Joined: Sat Mar 16, 2013 4:18 pm

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Twisp »

I have a request for a tweak, if anyone would like to take a look at it. It has to do with Pirate Coves. While I enjoy how the OXP implements them, I've always had a consistent issue with them appearing far too often and in far too great numbers in high-security, high-tl systems. Ideally, I'd like to limit their spawning to the lowest forms of government, namely Feudal and Anarchy systems.

I have a loose idea about how to do it, gained as I slowly learn my way around oolite scripting, but every attempt I've made at it so far has produced either inconsistent or nonfunctional results. So, if anyone would like to create a tweak which would limit the spawning of Coves to Feudal and Anarchy systems, I'd appreciate it greatly as both a benefit to my playing experience and as something I could learn from. Thanks in advance!
Conducting a deepspace mining operation out in Orrira. Thanking various dieties for the existence of cargo shepherds. Flying the rugged Python Prospector Errant.
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 271
Joined: Thu Jan 01, 2009 9:45 am

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by DGill »

cim's system feature rings is excellent but prefer to have the rings on an additional planet rather the main one.

I changed in systemfeatures-ring.js and systemfeatures-rings.js all occurrences of system.mainPlanet. with system.planets[1].

and replaced in systemfeatures-rings.js (vrs 1.2) lines 7 - 22 with:

this.shipWillExitWitchspace = this.shipWillLaunchFromStation = function()
{
if (system.isInterstellarSpace || system.sun.hasGoneNova) {
return;
}
var j = 0;
j = system.planets.length
if (j > 3) {
this._addRing();
return;
}
}
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by Redspear »

DGill wrote:
cim's system feature rings is excellent but prefer to have the rings on an additional planet rather the main one.
That sounds... AWESOME :shock:
I'm definately trying that one out. Thanks DGill :D
User avatar
mossfoot
---- E L I T E ----
---- E L I T E ----
Posts: 827
Joined: Fri May 30, 2014 4:07 pm
Contact:

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Post by mossfoot »

I'm curious to tweak this as well, but can the frequency be upped a bit? I'd like to assume 1 in 10 outer planets has a ring, for example
--
Image
Pilot: Mossfoot - Ship ID: Viaticus Rex (Cobra MKII)
Rank: Competent - Status: Clean

http://www.noahchinnbooks.com/
Post Reply