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
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

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

Post by montana05 »

After some exhausting challenges from the local bureaucracy I am a bit burned out, so here is my next idea:

I am toying for a while with an "ion cannon", probably light/standard/heavy. Instead of killing a ship the max energy, recharge rate and max speed is reduced or (best approach) set to 0 for a random time, most likely depending on the mass of the target. While I could easily do that for NPC's with a ship script, I still fail to add a player version via world script.

Anybody smarter than me could point me in the right direction ? :roll:

EDIT: I had a Eureka this morning, actually the solution was pretty simple. :oops:
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4942
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

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

Post by Cholmondely »

How do I tweak Cim's ship's library to make the MFD free (currently costs 200₢)?

I did try removing the Equipment,plist (other free equipment items don't seem to have them)... no joy!

I then took Redspear's "Cargo Scoops as standard", modified the script.js (seemingly the relevant part) with the jargon from Hiran's index (EQ_SHIPS_LIBRARY), and then taking a tip from Cody, created a script folder in my AddOns and bunged it in there... no joy!

I have managed to reduce the cost to 0.1₢ (feeling that 0.01₢ is the same in game terms). And I presume that merely reducing the cost to 0 means that my ship will not automatically get one.

So how do I make the Ship's Library MFD free and awarded automatically to my ship?

And what went wrong with my previous two attempts?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4596
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

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

Post by phkb »

Cholmondely wrote: Fri Jun 04, 2021 12:08 am
So how do I make the Ship's Library MFD free and awarded automatically to my ship?
In the "ingame-manual.js" file (in the Scripts folder), look for a function called "startUpComplete", then add this line to the end of the routine:

Code: Select all

	if (player.ship.equipmentStatus("EQ_SHIPS_LIBRARY") != "EQUIPMENT_OK") player.ship.awardEquipment("EQ_SHIPS_LIBRARY");
So that it looks like this:

Code: Select all

this.startUpComplete = function() {
	this._initInterface(system.mainStation);
	this._initInterface(player.ship.dockedStation);
	if (player.ship.equipmentStatus("EQ_SHIPS_LIBRARY") != "EQUIPMENT_OK") player.ship.awardEquipment("EQ_SHIPS_LIBRARY");
}
That will make sure the equipment is always awarded to your ship.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4942
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

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

Post by Cholmondely »

phkb wrote: Fri Jun 04, 2021 4:41 am
Cholmondely wrote: Fri Jun 04, 2021 12:08 am
So how do I make the Ship's Library MFD free and awarded automatically to my ship?
In the "ingame-manual.js" file (in the Scripts folder), look for a function called "startUpComplete", then add this line to the end of the routine:

Code: Select all

	if (player.ship.equipmentStatus("EQ_SHIPS_LIBRARY") != "EQUIPMENT_OK") player.ship.awardEquipment("EQ_SHIPS_LIBRARY");
So that it looks like this:

Code: Select all

this.startUpComplete = function() {
	this._initInterface(system.mainStation);
	this._initInterface(player.ship.dockedStation);
	if (player.ship.equipmentStatus("EQ_SHIPS_LIBRARY") != "EQUIPMENT_OK") player.ship.awardEquipment("EQ_SHIPS_LIBRARY");
}
That will make sure the equipment is always awarded to your ship.
Thank you!

I'd like to produce a starter's meta-OXZ with what I consider the essential OXPs for starting to play.

Would I do better tweaking Ship's Library and uploading the free version to the EM or should I use a "Sparan-style" override in the body of my meta-OXZ?

If I go down the first route, should I just "update" the OXZ already on the EM? Or publish a second free version? What do you think?
If I go down the second route, how do I make sure that my override is loaded after cim's library so that it actually does override it?


List of vital/essential OXPs:
* XenonUI: vital reminders of what the numerous keyboard options are for the various GUI screens (F5/F6/F7/F8)
* Ship's Library OXP: comes with a top-notch in-game readable ship's manual
* GalCop Galactic Registry: vital database of the galaxy you are currently in
* MarketObserver: provides vital comparison information for commodity prices on the F8 screen to help profit on trades

Added in edit:
* Vimana HUD to allow reading the Ship's Library MFD & for warnings about low this and low that (especially altitude & temperature... golly!).

Basically they are all about information, the information a starting player would expect to know or expect to have if playing the game in 'real life' so to speak.
Last edited by Cholmondely on Fri Jun 04, 2021 3:48 pm, edited 1 time in total.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4596
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

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

Post by phkb »

Cholmondely wrote: Fri Jun 04, 2021 6:58 am
should I use a "Sparan-style" override in the body of my meta-OXZ
This.
Cholmondely wrote: Fri Jun 04, 2021 6:58 am
how do I make sure that my override is loaded after cim's library so that it actually does override it?
As long as the line of code above is in a startUpComplete function, you’re good to go.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4942
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

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

Post by Cholmondely »

I'm sure that these will have been asked before, but I don't know where to look...

One: Combining "ship/station roles"

I want to add Sothis as a "Market Inquirer station", so to speak.

Spara said:
spara wrote: Mon Jun 07, 2021 10:28 am
Make sure you have

Code: Select all

"sothis station inquirer_station";
in shipdata-overrides.plist in SothisTC.
My problem is that the code in the shipdata-overrides.plist already contains

Code: Select all

roles = "sothis station commodityMarkets_station"; 

I don't know how to combine the two roles, which I presume I need to do. I tried :

Code: Select all

roles = "sothis station commodityMarkets_station"; roles = "sothis station inquirer_station";
& I also tried:

Code: Select all

roles = "sothis station commodityMarkets_station"; "sothis station inquirer_station";
With either attempt, not only did SothisTC not register outside the station itself on any of the Market Inquirer databases, but I lost my New Cargoes abilities at SothisTC as well!

What the dickens am I supposed to do?

______________________________________________________________________________________________________________________________

Two: ... Oh ... and I want another message screen to come up in LongWayRound on arrival at either Usanat or Cetiisqu (ie, the first system after leaving Soladies with His Nibs invisibly & inaudibly on board)

The current script.js reads

Code: Select all

this.missionScreenOpportunity = function() {
    if (player.ship.dockedStation.isMainStation && galaxyNumber === 0) {
        if (!missionVariables.longwayround && system.ID === 3) {
            // show mission screen
            mission.runScreen(
                {
                    screenID: "longwayround",
                    title: "Incoming Message",
                    exitScreen: "GUI_SCREEN_STATUS",
                    messageKey: "long_way_round_Biarge_briefing"
                } 
            );
            missionVariables.longwayround = "STAGE1";
            mission.markSystem({system:248, name:this.name});
            mission.setInstructionsKey("em1_short_desc1", this.name);
            return;
        }
        if (missionVariables.longwayround === "STAGE1" && system.ID === 248) {
So if I bung in

Code: Select all

        if (!missionVariables.longwayround && system.ID === 30) {
            // show mission screen
            mission.runScreen(
                {
                    screenID: "longwayround",
                    title: "Incoming Message",
                    exitScreen: "GUI_SCREEN_STATUS",
                    messageKey: "long_way_round_Usanat/Cetiisqu_briefing"
                } 
            );
            missionVariables.longwayround = "STAGE1.5";
            mission.markSystem({system:30, name:this.name});
            mission.setInstructionsKey("em1_short_desc4", this.name);
            return;
        }
 if (!missionVariables.longwayround && system.ID === 234) {
            // show mission screen
            mission.runScreen(
                {
                    screenID: "longwayround",
                    title: "Incoming Message",
                    exitScreen: "GUI_SCREEN_STATUS",
                    messageKey: "long_way_round_Usanat/Cetiisqu_briefing"
                } 
            );
            missionVariables.longwayround = "STAGE1.5";
            mission.markSystem({system:234, name:this.name});
            mission.setInstructionsKey("em1_short_desc4", this.name);
            return;
        }
I'm quite sure that that should do it.

But: 2 questions...

Two:1: It will look clunky if one flies from Usanat to Cetiisqu or vice-versa, getting the same message twice. How do I combine the two as one either/or to prevent this?

Two:2: And how do I change it so that the message appears at launching from Usanat/Cetiisqu station? And on arriving at the witchpoint beacon in either system?

______________________________________________________________________________________________________________________________

Three: At Soladies there is a console message:

Code: Select all

       if (missionVariables.longwayround === "STAGE1" && system.ID === 248) {
            // show mission screen
            mission.runScreen(
                {
                    screenID: "longwayround",
                    title: "Incoming Message",
                    exitScreen: "GUI_SCREEN_STATUS",
                    messageKey: "long_way_round_Soladies_briefing"
                } 
            );
            missionVariables.longwayround = "STAGE2";
            player.credits += 500;
            player.consoleMessage("You have been awarded 500cr.");
            mission.unmarkSystem({system:248, name:this.name});
            mission.markSystem({system:233, name:this.name});
            mission.setInstructionsKey("em1_short_desc2", this.name);
            return;
        }

Can I tweak it so that it flashes red? Or grows in size? Or explodes and then reforms? Or does anything more exciting other than just sit there quietly and be ignored? I played LWR twice and never saw it!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4596
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

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

Post by phkb »

Cholmondely wrote: Tue Jun 08, 2021 3:46 pm
I don't know how to combine the two roles, which I presume I need to do.
Try:

Code: Select all

roles = "sothis station commodityMarkets_station inquirer_station";
Cholmondely wrote: Tue Jun 08, 2021 3:46 pm
But: 2 questions...
I'll get to this shortly... just have to do some testing first.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4596
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

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

Post by phkb »

Cholmondely wrote: Tue Jun 08, 2021 3:46 pm
I'm quite sure that that should do it.
Hmm. Maybe. Consider: what if the player bypasses the main station and decides to skim some fuel and head off without stopping? In that case, at best, the messages would never appears, or worse, the scenario could end up stuck and would not be able to progress.
Cholmondely wrote: Tue Jun 08, 2021 3:46 pm
How do I combine the two as one either/or to prevent this?
You could do this by changing the check to do an OR on the system ID, like this:

Code: Select all

 if (missionVariables.longwayround && (system.ID === 30 || system.ID === 234)) {
Notice I removed the "!" in front of the missionVariables reference. This is because, once the mission has started, you want to check that the variable exists. The "!" in front of it makes it an opposite check - ie. checking if the variable doesn't exist.

I'd also probably steer away from having "/" symbols in the messageKey's. It's probably fine, but it's suggestive (well to me as a programmer, anyway) of a message heirarchy in the missiontext.plist file that actually can't exist (it's a pure key-->value type of file). I'd keep to using "_" characters as separators - always guaranteed to work.
Cholmondely wrote: Tue Jun 08, 2021 3:46 pm
And how do I change it so that the message appears at launching from Usanat/Cetiisqu station? And on arriving at the witchpoint beacon in either system?
You can't use a mission.runScreen at launch or while in space. In that instance it would be better handled by a commsMessage of some sort.
Cholmondely wrote: Tue Jun 08, 2021 3:46 pm
Can I tweak it so that it flashes red? Or grows in size? Or explodes and then reforms? Or does anything more exciting other than just sit there quietly and be ignored? I played LWR twice and never saw it!
Console messages are not customisable in that way. The only thing we can do is lengthen the time it's displayed for by making the line read this:

Code: Select all

player.consoleMessage("You have been awarded 500cr.", 10); // display message for 10 seconds
Another option is to integrate the Email System and have an email be sent to the player saying the credits have been deposited in their bank account.
Last edited by phkb on Wed Jun 09, 2021 5:12 am, edited 2 times in total.
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

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

Post by montana05 »

phkb wrote: Wed Jun 09, 2021 4:16 am
Console messages are not customisable in that way. The only thing we can do is lengthen the time it's displayed for by making the line read this:

Code: Select all

player.consoleMessage("You have been awarded 500cr.", 10); // display message for 10 seconds
Actually you can switch the color:


this.$sendMsg = function(msgSender, msgText, msgColor)
{
var colorSwitch = player.ship.messageGuiTextCommsColor;

player.ship.messageGuiTextCommsColor = msgColor;

switch(msgSender)
{
case "this.ship":
this.ship.commsMessage(msgText);
break;
case "system.mainStation":
system.mainStation.commsMessage(msgText);
break;
default:
break;
}
log(this.name, " Lifeboat_home-color-F ", player.ship.messageGuiTextCommsColor);
player.ship.messageGuiTextCommsColor = colorSwitch;
return;
}


It's not particular flexible, and I only use it for communications from specific ships and stations.
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4596
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

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

Post by phkb »

montana05 wrote: Wed Jun 09, 2021 4:36 am
Actually you can switch the color:
Nifty! I'd forgotten about those properties. It would change the color for all messages, though, correct? Or just the ones that arrive while the color is changed?

There isn't a player.ship.messageGuiTextFlashing property though!
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

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

Post by montana05 »

phkb wrote: Wed Jun 09, 2021 4:46 am
montana05 wrote: Wed Jun 09, 2021 4:36 am
Actually you can switch the color:
Nifty! I'd forgotten about those properties. It would change the color for all messages, though, correct? Or just the ones that arrive while the color is changed?

There isn't a player.ship.messageGuiTextFlashing property though!
It changes the color for all messages, so I save the original color and replace after the specific message. As mentioned before this isn't flexible, you risk changing the color of an unrelated message in a different color following.
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4942
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

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

Post by Cholmondely »

Thank you, Nick, for the code for SothisTC! I was utterly befuddled... !

_______________________________________________________________________
Points 2 and 3.

I'm trying to make the experience of ferrying OB back home a bit more believable. So I want some croaking from him en-route.

One arrives at Soladies to pick him up.
Old Stage 2: I want to turn his speech into a formal accept/reject offer. I will probably need help there, but I've enough at the moment to be going on with.

New Stage 3: After arrival at Soladies, but before departure, I want him to announce that he is coming on board. Hence, I'd like a message or other screen to "pop up" after the player has pressed any of the F buttons (or any two of the F buttons, I'm not too fussed). Is this doable?

What I'd prefer would be if he could ask the player at stage 2 to buy him some special item from special requisitions on the F4 screen (a batrachian bubble bath, say, or a decent coffee machine) or some such. One could either have a special F4 screen Soladien ship-chandler with a selection of bizarre & bijoux bits, again - a mission screen set up. OB would pay for it, of course. And then after the transaction a mission screen announcement that OB is coming on board with his baggage.

Say 4 mission screens:
i) OB's offer needing a response, and tip about the bubblebath provider
ii) Bubblebath provider contacts player with offer
iii)Details of lengthy installation - I have one or two ideas about where to look for semi-decent sound effects
iv)Announcement of OB's embarkation...

But is this doable?

Stage 4: After arriving at either Usanat or Cetiisqu, I want him to make some small talk, and then announce that he's off to his bubble-bath (or to make a macchiato...). Hence my questions above.

Stage 5: Digebiti, centre of the Universe. I'd like him to visit a chum in the feudal lodge who will then arrange a visit to the Orbital Station for a conspirational confabulation and maybe the collection of a special package to go in the cargo hold. I would hope that by this stage I can do all this myself. But I would appreciate some advice about how to provide escorts to the Orbital!

Stage 5.5: somewhere between Digebit and Qubeen - another "dialogue" with OB. But I believe that this is not doable - I can't predict what will happen where - there is too much choice en-route as to where to go and how to get there.

Stage 6: Arrival at Qubeen , I'd like him to make a comment about coming home. Again, I would hope that by this stage I could do all this myself.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4596
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

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

Post by phkb »

Cholmondely wrote: Wed Jun 09, 2021 8:02 pm
But is this doable?
All of it is doable. It's all a question of complexity.

For instance, in Enhanced Passenger Contracts, I've got the passenger making comments to the player during flight, based on a variety of factors. I also have the passenger make requests of the player (eg "I don't want to go to X, I want to go to Y instead"), utilising the Broadcast Comms OXP to allow for player responses.

What it might be better to do is to switch this over to the Long Way Round thread, and we can discuss each of the steps and the various options for achieving them, rather than tying up the tweaking thread for something that is looking more like an expansion than a tweak.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4942
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

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

Post by Cholmondely »

Ion Cannon
montana05 wrote: Mon May 17, 2021 3:32 pm
I am toying for a while with an "ion cannon", probably light/standard/heavy. Instead of killing a ship the max energy, recharge rate and max speed is reduced or (best approach) set to 0 for a random time, most likely depending on the mass of the target. While I could easily do that for NPC's with a ship script, I still fail to add a player version via world script.

Anybody smarter than me could point me in the right direction ? :roll:

EDIT: I had a Eureka this morning, actually the solution was pretty simple. :oops:
Did this go anywhere?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

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

Post by montana05 »

Cholmondely wrote: Thu Mar 31, 2022 8:55 pm
Ion Cannon
montana05 wrote: Mon May 17, 2021 3:32 pm
I am toying for a while with an "ion cannon", probably light/standard/heavy. Instead of killing a ship the max energy, recharge rate and max speed is reduced or (best approach) set to 0 for a random time, most likely depending on the mass of the target. While I could easily do that for NPC's with a ship script, I still fail to add a player version via world script.

Anybody smarter than me could point me in the right direction ? :roll:

EDIT: I had a Eureka this morning, actually the solution was pretty simple. :oops:
Did this go anywhere?
Experimental and unbalanced. To make it somehow realistic, much more logic is required as originally intended. Currently, a Sidewinder still could knock out an Anaconda with 1 lucky shot.
Scars remind us where we've been. They don't have to dictate where we're going.
Post Reply