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

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

Moderators: winston, another_commander

TheUAoB
Poor
Poor
Posts: 4
Joined: Mon Jul 10, 2017 10:41 pm

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

Post by TheUAoB »

Nexus-Hex wrote: Mon Jan 02, 2017 5:09 pm
Norby wrote:
Here it is. I set to 100 charges and 2-10s delay between repair attempts. Note high tech items need more attempts.
Thanks.
It's working!
I've put it to 100 ms repair time and 999 charges.
A little bit OP, don't you think? :wink:

By the way, I have an idea for an OXP.
Where do I submit it? Can you help me materialize it?
Hi everybody!

I've just written a new (more expensive, higher tech) "RepairBots" equipment OXP based on RepairBots_System which uses system energy during repairs (to regenerate repair bots) instead of 2t of nanobots in the hold and when not damaged is togglable as primable equipment. I've got it quite well balanced, I think. It is much trickier to use during combat, but doesn't run out of repair capacity (unless you run out of energy). I found the original version rather buggy to use.
Rustem
Deadly
Deadly
Posts: 170
Joined: Mon May 25, 2015 5:23 pm
Location: Russia

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

Post by Rustem »

OXP: Escort Formations.
Tweak: Added a new formation the "trigon".
Reason: Most formations place an escort in the rear half-plane, and the "trigon" formation will be in the front half-plane.
File(s): world-scripts

1. The new formation "trigon" is used for setup offensive escorts and for all quantitative combinations of escorts.
2. Corrected the formation of the "convoy" (corrected the sequence of positions and added 2 additional positions), for a more symmetrical arrangement of vessels at different numbers of escorts.

Links: Escort Formations 1.2.

Comments/feedback/bug reports welcome.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
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 »

Rustem wrote: Tue Dec 12, 2017 11:47 am
Added a new formation the "trigon".
Thanks, Rustem - when I'm no longer grounded, I'll check it out.


Talking of trigons, The Trigon Disunity is a very good tale.
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!
Runghold
Above Average
Above Average
Posts: 21
Joined: Sun Oct 30, 2016 12:34 pm

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

Post by Runghold »

OXP: Q-Charger
Tweak: Disable it by default/after loading a save state
Reason: I don't use it very often
File(s): oolite.oxp.CommonSenseOTB.Q-Charger.oxz/Scripts/Q-Charger.js
line 63:

Code: Select all

   this.qchargerenabled = true;// player can disable/enable by priming and activating Q-Charger 
Just replace

Code: Select all

true
by

Code: Select all

false
.

OXP: Explorers' Club
Tweak: Mark Systems non yet visited with white X instead of diamond marker
Reason: If "Systems visited so far" are marked and I visited a lot in a galaxy, a refresh of the F6 screen make take up some seconds. So I decided to mark "Systems not yet visited" (F6 screen refresh is instant), but the default marker lets me confuse my passenger contract destinations with systems not visited yet. ...so i changed the marker shape
File(s): oolite.oxp.CaptMurphy.ExplorersClub.oxz/Config/script.js
Recplace line 115:

Code: Select all

                        mission.markSystem({system: i, name: "exclubmap", markerColor: "orangeColor", markerScale: 1.0, markerShape: "MARKER_DIAMOND"});
by this one:

Code: Select all

                        mission.markSystem({system: i, name: "exclubmap", markerColor: "whiteColor", markerScale: 0.75, markerShape: "MARKER_X"});
.

OXP: Vacuum Pump
Tweak: Let it work not only under green, but under yellow condition too
Reason: This OXP also works if Gold or Platinum are extracted from splinters by Ore Processor - a great tool for miners. Often your are not alone when mining, so the condition is yellow and the pump couldn't be activated.
File(s): oolite.oxp.Neelix.VacuumPump.oxz/Scripts/vacuum_pump.js
Recplace line 75:

Code: Select all

		if (player.alertCondition == 1 && player.ship.energy >= 64 && $commInfo[$j].pumpUseful && 
by this one:

Code: Select all

		if (player.alertCondition !== 3 && player.ship.energy >= 64 && $commInfo[$j].pumpUseful &&
and replace lines 100 + 101:

Code: Select all

		if (player.alertCondition != 1) {
			player.consoleMessage("Vacuum Pump can not be operated unless condition is Green",5);
by these:

Code: Select all

		if (player.alertCondition == 3) {
			player.consoleMessage("Vacuum Pump can not be operated under Red condition",5);
.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
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 »

Cody wrote: Tue Dec 12, 2017 12:11 pm
Rustem wrote: Tue Dec 12, 2017 11:47 am
Added a new formation the "trigon".
Thanks, Rustem - when I'm no longer grounded, I'll check it out.
Got some flight time at last - 1.3 is cool.
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!
Rustem
Deadly
Deadly
Posts: 170
Joined: Mon May 25, 2015 5:23 pm
Location: Russia

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

Post by Rustem »

OXP: Executive SpaceWays, Saleza Aeronautics.
Tweak: Fixed a missing semicolon.
Reason: Error with missing semicolon.
File(s): shipdata.plist

Links: Executive SpaceWays, Saleza Aeronautics.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

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

Post by Norby »

Rustem wrote: Wed Mar 21, 2018 5:36 pm
OXP: Executive SpaceWays, Saleza Aeronautics.
Tweak: Fixed a missing semicolon.
Updated in the manager, thank you!
User avatar
stranger
---- E L I T E ----
---- E L I T E ----
Posts: 351
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

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

Post by stranger »

Sorry, commanders, already posts this tweak in discussion of Variable Masslock (author Norby). Looks it is more appropriate place.

Variablemasslock.js, line 181:

Code: Select all

//	t.scannerDisplayColor1 = d; // Norby's settings
	t.scannerDisplayColor1 = [0, 0, 0, 0]; // transparent - stranger's settings
Tweaked code simulates stealth technology in really interesting way. Small ship may close distance with player undetected, but reveals itself in red alert state. This is classic dilemma of stealth technology: if you are beginning fighting, you are losing covering. Temporary contact when new target enters scanner range is lore-consistent: there is no reason nor possibility to maintain stealth permanently. Stealth regime is activated after contact detected to win time for battle decision.
Really like new game flavor this this tweak :D
Rustem
Deadly
Deadly
Posts: 170
Joined: Mon May 25, 2015 5:23 pm
Location: Russia

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

Post by Rustem »

OXP: LaserCannons.
Tweak: Adds sound effect for cannons hits.
File(s): world-scripts, sounds.

More variation by cannon and plasma laser hits. Sounds play in laser hits from NPC.

Credits to Norby!

Sounds:
The sounds from BGS Soundset by P.A. Groove:
- "cannonlaser.ogg" is renamed a "bgs_PAG_laser.ogg".
- "cannonlaser_esc_hits.ogg" is renamed a "bgs_PAG_laserhits.ogg".
- "cannonlaser_esc_hits_pl.ogg"; is renamed a "bgs_PAG_hit.ogg".
Credits to Pagroove!

Links: LaserCannons 1.13.1.

This is testing and draft release. Feedback and bug reports welcome.
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

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

Post by UK_Eliter »

This sounds fun! I'll test it if I get a mo. (Sorry for the very late reply!)
User avatar
Cmdr Fleegman
Poor
Poor
Posts: 6
Joined: Fri May 08, 2015 1:59 pm

Abandoned or Orphan OXPs

Post by Cmdr Fleegman »

I'm not sure where to post this question, since it's about bug-fixing in oxps rather than tweaking - maybe it should be in Scripters Cove or the The All-in-One Guide.

My question: Is there a procedure/protocol for making permanent mods to other peoples' oxps?

I've written a fix for an oxp that has been left behind by the new Commodities structure in 1.81 and I'd like to get it added to the 'official' release of that oxp.
I sent a pm to the author a little over 3 months ago, describing the problem and including my code to fix it, but I've not heard anything back.
It looks like this oxp has been abandoned (the last update was in 2013) but I don't want to step on any toes or pinch anything that's not up for pinching, and if I wanted to adopt the oxp I wouldn't know how to go about it.

Are there conventions for:
how to notify an author of a bug fix;
how long to wait before considering an oxp orphaned;
how to adopt an oxp and replace the original
?
Red-thingy moving toward the green-thingy. I think we're the green-thingy.
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

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

Post by UK_Eliter »

Good question!

I think we've a convention for adopting or at least for part of that procedure. And we've a rule (prerequisite it) for it. That rule is: the OXP has to include, in its present form, a license that allows others to modify the code. The convention is: one notifies the person(s) who run(s) the official list of OXPs, requesting that your name be assigned to the OXP.

(Sorry if I am a bit terse but I'm pushed for time at the moment.)
User avatar
Cmdr Fleegman
Poor
Poor
Posts: 6
Joined: Fri May 08, 2015 1:59 pm

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

Post by Cmdr Fleegman »

Thanks for the quick response UK_Eliter. I started looking into notifying the OXP List moderator, but in the process I discovered that the last update to the OXP was not 2013 - as shown on the list - but 2016.
I then found the latest version. It was on display at the bottom of the last page of the BB thread, from a link halfway through the OXP wiki page, linked from the OXP List, with a sign on the door saying 'Beware of the Leopard'.

In that version the bug that I enquired about last June - before spending six months researching, gathering data, coding and testing - was already fixed. How I did laugh.
On the upside my character went from Harmless to Dangerous in those six months, and I learned a lot about Oolite coding, so it's all good. :)

Anyway, I'm sure the question of orphan OXPs will come up in the future, so thanks again for the advice.
Red-thingy moving toward the green-thingy. I think we're the green-thingy.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Tinkering with HyperCargo

Post by dybal »

My first tweak into HyperCargo (it's more a bug fix than a tweak):

- corrects the ids for the commodities Liquior&Wines and Alien Items, so those commodities will load into HyperCargo;
- added some log messages so the log shows some of what is happening in HyperCargo.

There are some indenting corrections in the file headers too :roll:

If anybody has trouble understanding diff's output (diff -Nur <original dir> <modified dir>) drop me a PM

Code: Select all

diff -Nur hyperCargo_1.10.orig/Config/script.js hyperCargo_mods/Config/script.js
--- hyperCargo_1.10.orig/Config/script.js       2012-11-25 21:21:58.000000000 -0200
+++ hyperCargo_mods/Config/script.js    2020-02-09 20:27:19.000000000 -0300
@@ -1,13 +1,13 @@
-this.name                                      = "HyperCargo";
-this.author                                    = "Thargoid";
+this.name                              = "HyperCargo";
+this.author                            = "Thargoid";
 this.copyright                         = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
 this.description                       = "Cargo space compression";
 this.version                           = "1.10";


 this.startUp = function()
        {
-       this.cargoNameArray = ["food", "textiles", "radioactives", "slaves", "liquor/wines", "luxuries", "narcotics", "computers", "machinery", "alloys", "firearms", "furs", "minerals", "alien items"];
-       this.cargoDisplayNameArray = ["Food", "Textiles", "Radioactives", "Slaves", "Liquor & Wines", "Luxuries", "Narcotics", "Computers", "Machinery", "Alloys", "Firearms", "Furs", "Minerals", "Alien Items"];
+       this.cargoNameArray = ["food", "textiles", "radioactives", "slaves", "liquor_wines", "luxuries", "narcotics", "computers", "machinery", "alloys", "firearms", "furs", "minerals", "alien_items"];
+       this.cargoDisplayNameArray = ["Food", "Textiles", "Radioactives", "Slaves", "Liquor/Wines", "Luxuries", "Narcotics", "Computers", "Machinery", "Alloys", "Firearms", "Furs", "Minerals", "Alien Items"];
        this.storedArray = [0,0,0,0,0,0,0,0,0,0,0,0,0,0]; // the array of stored cargo amounts (don't store gold, platinum or gems)
        this.defaultCommodities = [
                [ "Food", 0, 0, 19, -2, -2, 6, 1, 1, 0 ],
@@ -37,6 +37,7 @@

        if(!missionVariables.hyperCargoMemory || missionVariables.hyperCargoMemory == "EMPTY")
                { // if this is the first run of the OXP, or if there is nothing in storage from the last save game we don't need to restore anything
+               log(this.name, "HyperCargo System empty");
                missionVariables.hyperCargoMemory = "EMPTY";
                return;
                }
@@ -45,7 +46,10 @@

        let setupCounter = 0 ; // reset the counter
        for(setupCounter = 0;setupCounter<14;setupCounter++)
-               { this.storedArray[setupCounter] *= 1; } // to swap value from string to number         
+               {
+               log(this.name, "HyperCargo has " + this.storedArray[setupCounter] + "t of " + this.cargoNameArray[setupCounter]);
+               this.storedArray[setupCounter] *= 1;  // to swap value from string to number    
+               }
        }

 this.checkNCVersion = function()
@@ -83,6 +87,7 @@
        for(cargoCounter = 0;cargoCounter<14;cargoCounter++)
                {
                this.cargoItem = this.cargoNameArray[cargoCounter];
+               log(this.name, "unloading "+String(this.storedArray[cargoCounter]) + "t of " + this.cargoItem);
                manifest[this.cargoItem] += this.storedArray[cargoCounter];
                this.storedArray[cargoCounter] = 0;
                }
@@ -108,6 +113,7 @@
                var price = Math.floor(((commodity[3]+(Math.floor(256*system.scrambledPseudoRandomNumber(23))&commodity[7])+(system.economy*commodity[4]))&255) * 0.4);
                this.cargoItem = this.cargoNameArray[cargoCounter];
                this.subTotal += this.storedArray[cargoCounter] * price;
+               log(this.name, "Transfering "+ String(this.storedArray[cargoCounter]) + "t of " + this.cargoItem + "for Cr" + String(this.storedArray[cargoCounter] * price));
                this.storedArray[cargoCounter] = 0;
                }

@@ -146,6 +152,7 @@
                {
                this.cargoItem = this.cargoNameArray[loadCounter];
                this.storedArray[loadCounter] = manifest[this.cargoItem];
+               log(this.name, "Loading "+ String(manifest[this.cargoItem]) + "t of " + this.cargoItem);
                missionVariables.hyperCargoMemory = missionVariables.hyperCargoMemory + manifest[this.cargoItem] + ":";
                manifest[this.cargoItem] = 0;
                }
User avatar
Reval
---- E L I T E ----
---- E L I T E ----
Posts: 402
Joined: Thu Oct 29, 2020 3:14 am
Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.

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

Post by Reval »

Major 'tweak' in mind (or an OXP)...

First, is it possible to override/replace an entire core plist (like shipdata or shipyard)? If so, as an inexperienced OXPer, I'm eager to know how.

(if, say, for example, one had a notion to replace all the Oolite ships with their Frontier FE equivalents. I'm guessing one could use like_ship, but then wouldn't the originals remain in place?)
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
Post Reply