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

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5880
Joined: Wed Feb 28, 2007 7:54 am

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

Post by another_commander »

[commodity-name gold] is a string that gets expanded to "Gold". All expansions can be found in descriptions.plist. If you use "gold" in your code, then there are two issues with it:
a) there is a difference between "gold" and "Gold", which could lead to the commodity name not being recognized and
b) you may encounter problems with localization OXPs (although that is a bit of a stretch, still it's a possibility).

Try using Gold with a capital G or [commodity-name gold], as seen in the commodities.plist. Hopefully that should work.
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 717
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 »

I probably missed something but somehow I am not able to prohibit a station/carrier from selling equipment. "has_shipyard" = no; prevents ships and with "equivalent_tech_level" = 0; I was able to cut down most, unfortunate not all. Is there any way to prohibit all ?
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1627
Joined: Thu Jun 20, 2013 10:22 pm

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

Post by Redspear »

montana05 wrote: Sat Mar 06, 2021 2:02 pm "equivalent_tech_level" = 0;
That should result in only fuel being available from the core equipment.

You could try using allowAwardEquipment however and might not even have to set up a condition script if it were to be false for all items. Just be careful to confine it to that station.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 717
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 »

Redspear wrote: Sat Mar 06, 2021 2:32 pm
montana05 wrote: Sat Mar 06, 2021 2:02 pm "equivalent_tech_level" = 0;
That should result in only fuel being available from the core equipment.

You could try using allowAwardEquipment however and might not even have to set up a condition script if it were to be false for all items. Just be careful to confine it to that station.
You are correct, from the core equipment only fuel remains, the problem is that several OXP's add more to the list. allowAwardEquipment should fix this issue, I will run some tests tomorrow. Thanks a lot Redspear. :)
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1627
Joined: Thu Jun 20, 2013 10:22 pm

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

Post by Redspear »

montana05 wrote: Sat Mar 06, 2021 2:39 pm Thanks a lot Redspear. :)
You're welcome. I hope it helps.
The standard condition script for the core game equipment allows equipment to be barred using the "oolite-barred-equipment" key in script_info. If this key contains an array of equipment keys, then those items of equipment will not be sold at this station. In 1.79 and later, this script_info key may be applied to any ship, preventing those items being installed onto the ship. For example:

script_info = {
"oolite-barred-equipment" = ("EQ_WEAPON_MILITARY_LASER");
}

On a station, this would prevent it selling military lasers. On a ship in 1.79 or later, this would also stop the ship fitting military lasers.
Looks like you could apply the script to your 'station' rather than to each equipment item.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 717
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 »

Redspear wrote: Sat Mar 06, 2021 11:00 pm You're welcome. I hope it helps.
Well, I found kind of a solution, but it would require using equipment-overrides.plist to attach a simple condition-script to 30+ equipments (I am sure there are more, I just did a quick check) and additional add all of them to the script_info of the carrier in shipdata.plist. Another possibility would be just to override Techlevel 0 with 1. Personally I would prefer a more generic method I could revise after leaving the specific carrier so I will have another look into it.
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1627
Joined: Thu Jun 20, 2013 10:22 pm

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

Post by Redspear »

montana05 wrote: Sun Mar 07, 2021 11:26 pm Well, I found kind of a solution, but it would require using equipment-overrides.plist to attach a simple condition-script to 30+ equipments...
Have you considered overruling the GUI screen?
e.g. Player selects shipyard, player gets manifest.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 717
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 »

Redspear wrote: Wed Mar 10, 2021 6:04 pm
montana05 wrote: Sun Mar 07, 2021 11:26 pm Well, I found kind of a solution, but it would require using equipment-overrides.plist to attach a simple condition-script to 30+ equipments...
Have you considered overruling the GUI screen?
e.g. Player selects shipyard, player gets manifest.
Sorry for the late reply, somehow I missed your message. :oops:
No, I didn't consider that, since I am not doing much with the GUI screens I need to do a research first, it hopefully could be a better solution than the one I found until now.
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1627
Joined: Thu Jun 20, 2013 10:22 pm

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

Post by Redspear »

montana05 wrote: Thu Mar 18, 2021 8:41 am Sorry for the late reply, somehow I missed your message. :oops:
No worries :)

You might be able to divert to a simple mission screen: "No shipyard facility present", or similar.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 717
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 »

Redspear wrote: Sat Mar 20, 2021 12:52 pm
montana05 wrote: Thu Mar 18, 2021 8:41 am Sorry for the late reply, somehow I missed your message. :oops:
No worries :)

You might be able to divert to a simple mission screen: "No shipyard facility present", or similar.
Finally, found some time to refresh my Gui coding and found a simple solution:

Code: Select all

this.guiScreenChanged = function(to, from)
{
	if(to == "GUI_SCREEN_EQUIP_SHIP" && player.ship.dockedStation.primaryRole === "baakili_trader")
    	{
        	var options = 
		{
			"01_DONE": "Sorry for asking"
		};

        	mission.runScreen
		(
			{
				screenID: "baakili_equipment",
				title: "Ship Outfitting", 
				message: "We do not need or trade in your inferior technology !",
				overlay: "FA_baakili_image.png", 
				choices: options,
				exitScreen: "GUI_SCREEN_STATUS"
			}
		)
	};
};	
This is replacing the "Ship Outfitting" with a mission screen and therefore blocking any transaction:

Image

Thanks again for the tip. :)
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Cholmondely
Wiki Wizard
Wiki Wizard
Posts: 1112
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of Her Most Britannic Majesty
Contact:

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

Post by Cholmondely »

Goodness gracious me!
Denizen of the Dark and Dismal Deserts of Digebiti.

Milo wrote Dancing the Gavotte
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 717
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 25, 2021 11:51 am Goodness gracious me!
Baakili Far Trader, a ship with a "Warp Hole" as engine and a "Transit Portal" as dock :lol:
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 14450
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

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

Post by Cody »

Is that a Xevexeanian evil talking treeoid?
Who was it that set up a system, a supposedly democratic system
Where you end up always voting for the lesser of two evils?
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 717
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 »

Cody wrote: Thu Mar 25, 2021 3:02 pm Is that a Xevexeanian evil talking treeoid?
Maybe, for sure it's an alien from in the unknown regions outside of GalCop space. Their technology is far ahead of the Eight and even if you rescue on you can end up like that:

"You wake up and feel dizzy, you lost your memory for some hours. Your mysterious passenger is gone and so is his craft. However, you find Credits # he left behind." :lol:

I never played Space Rogue, so I can only use Zieman's code and my imagination. :wink:
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1627
Joined: Thu Jun 20, 2013 10:22 pm

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

Post by Redspear »

montana05 wrote: Thu Mar 25, 2021 11:14 am
Thanks again for the tip. :)
Youre welcome and nicely done :)
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors
Post Reply