Tinkerer's Workshop - OXP tweaking for fun and profit!
Moderators: winston, another_commander
-
- Quite Grand Sub-Admiral
- Posts: 6680
- Joined: Wed Feb 28, 2007 7:54 am
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
[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.
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.
- montana05
- ---- 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!
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.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
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.
- montana05
- ---- 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!
You are correct, from the core equipment only fuel remains, the problem is that several OXP's add more to the list.Redspear wrote: ↑Sat Mar 06, 2021 2:32 pmThat 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.
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.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
You're welcome. I hope it helps.
Looks like you could apply the script to your 'station' rather than to each equipment item.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.
- montana05
- ---- 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!
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.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Have you considered overruling the GUI screen?
e.g. Player selects shipyard, player gets manifest.
- montana05
- ---- 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!
Sorry for the late reply, somehow I missed your message.
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.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
No worries
You might be able to divert to a simple mission screen: "No shipyard facility present", or similar.
- montana05
- ---- 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!
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"
}
)
};
};
Thanks again for the tip.
Scars remind us where we've been. They don't have to dictate where we're going.
- Cholmondely
- Archivist
- Posts: 5364
- 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!
Goodness gracious me!
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?
•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?
- montana05
- ---- 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!
Baakili Far Trader, a ship with a "Warp Hole" as engine and a "Transit Portal" as dock
Scars remind us where we've been. They don't have to dictate where we're going.
- Cody
- 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!
Is that a Xevexeanian evil talking treeoid?
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!
And any survivors, their debts I will certainly pay. There's always a way!
- montana05
- ---- 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!
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."
I never played Space Rogue, so I can only use Zieman's code and my imagination.
Scars remind us where we've been. They don't have to dictate where we're going.