Page 25 of 29

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

Posted: Tue Feb 09, 2021 4:43 pm
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.

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

Posted: Sat Mar 06, 2021 2:02 pm
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 ?

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

Posted: Sat Mar 06, 2021 2:32 pm
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.

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

Posted: Sat Mar 06, 2021 2:39 pm
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. :)

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

Posted: Sat Mar 06, 2021 11:00 pm
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.

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

Posted: Sun Mar 07, 2021 11:26 pm
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.

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

Posted: Wed Mar 10, 2021 6:04 pm
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.

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

Posted: Thu Mar 18, 2021 8:41 am
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.

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

Posted: Sat Mar 20, 2021 12:52 pm
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.

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

Posted: Thu Mar 25, 2021 11:14 am
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. :)

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

Posted: Thu Mar 25, 2021 11:51 am
by Cholmondely
Goodness gracious me!

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

Posted: Thu Mar 25, 2021 12:22 pm
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:

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

Posted: Thu Mar 25, 2021 3:02 pm
by Cody
Is that a Xevexeanian evil talking treeoid?

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

Posted: Thu Mar 25, 2021 3:34 pm
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:

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

Posted: Wed Apr 21, 2021 1:18 pm
by Redspear
montana05 wrote: Thu Mar 25, 2021 11:14 am

Thanks again for the tip. :)
Youre welcome and nicely done :)