I like this idea!CaptSolo wrote:HyperRadio 1.26:
Reason for tweak: Did not like podMusic quiting with condition Red Alert (i.e. I like radio blasting during battle).
Tinkerer's Workshop - OXP tweaking for fun and profit!
Moderators: winston, another_commander
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
This going to seem like a kind of odd request, but does anyone here know how I'd go about making a modification to how stations spawn in Stations for Extra Planets OXP? I'm trying to stick to a more-or-less vanilla artstyle, and need something to make those systems more interesting besides RRS stations and the occasional HoOpy Casino. Some of the stations work nicely for this, and I've already got the OXP working without system restrictions, only spawning globe stations and habitats. However, I'm overall pretty bad at js, and I have no idea where I'd add an appropriate TL and or system government-related if-statement in the populator script to actually make it affect where things spawn, instead of just breaking things.
I've tried looking at other station oxp populator scripts but it seems like Stations for Extra Planets works in a much more complex way, which I guess isn't a surprise. Any ideas?
I've tried looking at other station oxp populator scripts but it seems like Stations for Extra Planets works in a much more complex way, which I guess isn't a surprise. Any ideas?
Conducting a deepspace mining operation out in Orrira. Thanking various dieties for the existence of cargo shepherds. Flying the rugged Python Prospector Errant.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
The script has three groups of stations: this.$corStations, this.$dodStations and this.$icoStations. When techLevel < 11, stations from this.$corStations get spawned. Otherwise stations from all groups get spawned. This roughly follows the population rules of the core game. If I have understood your request correctly, you want to group the stations into TL dependent groups and draw from those groups. If that's the case and you need more than three groups, you need to define more groups the same way the groups are already defined and then edit the ifs starting from line 54:Twisp wrote:This going to seem like a kind of odd request, but does anyone here know how I'd go about making a modification to how stations spawn in Stations for Extra Planets OXP? I'm trying to stick to a more-or-less vanilla artstyle, and need something to make those systems more interesting besides RRS stations and the occasional HoOpy Casino. Some of the stations work nicely for this, and I've already got the OXP working without system restrictions, only spawning globe stations and habitats. However, I'm overall pretty bad at js, and I have no idea where I'd add an appropriate TL and or system government-related if-statement in the populator script to actually make it affect where things spawn, instead of just breaking things.
I've tried looking at other station oxp populator scripts but it seems like Stations for Extra Planets works in a much more complex way, which I guess isn't a surprise. Any ideas?
Code: Select all
if (system.techLevel < 11)
var stations = this.$corStations.concat();
else
var stations = this.$corStations.concat(this.$dodStations, this.$icoStations);
Code: Select all
if (system.techLevel < 5)
var stations = this.$corStations.concat();
else if (system.techLevel < 10)
var stations = this.$dodStations.concat();
else
var stations = this.$icoStations.concat();
Note also that system.techLevel differs from TL shown in the game by one
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Thank you so much Spara! That really helps. I was also looking to organize by government level, would I simply have to turn the "if 'x'" statement into an "if 'x' and 'y'" statement in order to define government levels under which each station appears?
Like so?
Should this restrict station spawns to democratic and corporate state governments only, or will I need to change it somewhat?
Like so?
Code: Select all
if (system.techLevel < 9 && system.government > 5)
var stations = this.$corStations.concat();
else if (system.techLevel <13 && system.government > 5)
var stations = this.$corstations.concat(this.$dodStations);
else if (system.government > 5)
var stations = this.$corStations.concat(this.$dodStations, this.$icoStations);
Conducting a deepspace mining operation out in Orrira. Thanking various dieties for the existence of cargo shepherds. Flying the rugged Python Prospector Errant.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
My pleasure .Twisp wrote:Thank you so much Spara! That really helps.
Without testing it and just by looking at it, I would say that you're almost there . One typo fixed and an "else" is needed to make it work. Like this:
Code: Select all
if (system.techLevel < 9 && system.government > 5)
var stations = this.$corStations.concat();
else if (system.techLevel <13 && system.government > 5)
var stations = this.$corStations.concat(this.$dodStations);
else if (system.government > 5)
var stations = this.$corStations.concat(this.$dodStations, this.$icoStations);
else
var stations = [];
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
AsteroidStorm adds a lot of variety to the asteroids, but also suppresses asteroid, asteroid-alternative, boulder and boulder-alternative from the core game. With 1.77 this is ok, but with 1.79 and replacements I would rather keep the core ones in the mix. Easy to fix, just disable Config/shipdata-overrides.plist by renaming it.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
I on the other hand wanted more Random Hits Seedy Space Bars...at least enough that I didn't have to jump as far to find one.CaptSolo wrote:Random Hits 1.4.18:
Reason for tweak: Did not want Seedy Space Bars spawned at every anarchy system.Code: Select all
this.setupShips = function () { if (system.isInterstellarSpace) return; if (system.government === 0 && system.economy === 2) // only spawn at poor industrial systems { var barNumber = Math.floor(system.ID/16); // generates 0...15 (bar number 1...16) // max of 16 unique bar names var barPosition = new Vector3D(this.spacebarPositions[this.modulo(barNumber,5)]); // generates 0...4 barPosition = system.mainPlanet.position.subtract(barPosition); // translate pwu into wpu barNumber++; this.setupSpacebar(barNumber, barPosition); // Random Bar Attacks if (Math.random() < 0.15) { system.addGroup("random_hits_big_boss", this.anyInt(3,6), barPosition, 10000); system.addGroup("random_hits_big_boss_fighter", 6, barPosition, 10000); } } }
So I added them to Multi-Government systems in all the Galaxy Charts except #4, which has 2x as many Anarchy systems as the others:
Code: Select all
if (system.government === 0 || (system.government === 2 && galaxyNumber != 3)) // makes them appear in Multi-Gov systems as well! But not in Galaxy Chart 4!
- Tricky
- ---- E L I T E ----
- Posts: 821
- Joined: Sun May 13, 2012 11:12 pm
- Location: Bradford, UK. (Anarchic)
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
That's going to make the Factions OXP interesting.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Not an existing oxp tweak but not really worth of a new oxp either, so I'll post it here for those interested. I've been playing as a miner (from the miner start) for a while and been missing info about the cargo hold status while scooping. This one fills that bill nicely.
1. First of all you'll need a Config folder in your AddOns folder. Create, if missing. That's the same folder you have your modified keyconfig.plist in .
2. Then you'll need to create a a script.js file into that Config folder. Assuming that you don't already have that file of course.
3. And finally put this into that file:And the result looks like this:
1. First of all you'll need a Config folder in your AddOns folder. Create, if missing. That's the same folder you have your modified keyconfig.plist in .
2. Then you'll need to create a a script.js file into that Config folder. Assuming that you don't already have that file of course.
3. And finally put this into that file:
Code: Select all
this.name = "my_own_tweaks";
this.shipScoopedOther = function(whom) {
player.consoleMessage("Cargo load " + player.ship.cargoSpaceUsed + " of " + player.ship.cargoSpaceCapacity + " t.");
}
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
spara, that needs to be part of the core game!
-
- ---- E L I T E ----
- Posts: 288
- Joined: Sat May 31, 2014 9:02 pm
- Location: Melbourne, Australia
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
I'm assuming this would appear for every item scooped, but (thanks to the cargo shepherd) there are times when I scoop a whole bunch of cargo containers at once. Getting a long list of them in the console messages. I'd prefer such a message to only appear once at the bottom rather than after each. How could this code be modified to wait until no cargo has been scooped for second then display the message once?spara wrote:And the result looks like this:
- Neelix
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Since 1.80 is now in feature-freeze, perhaps it would be best handled with a MFD until work starts on 1.81.Switeck wrote:spara, that needs to be part of the core game!
Come to think of it, a MFD specifically designed for miners might be a good idea anyway. (Though I realise this particular feature would be handy for all players, not just miners)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Since the splinters get scooped one by one, there is no (at least no practical) way of achieving that as a message. Sorry. MFD would be different case though...Neelix wrote:I'd prefer such a message to only appear once at the bottom rather than after each. How could this code be modified to wait until no cargo has been scooped for second then display the message once?
Maybe, maybe. A general status MFD might come handy. Wasn't there something like that from Zirael some time ago? Ah yes, here. There's room in that General Info MFD to include cargo hold status too.Diziet Sma wrote:Come to think of it, a MFD specifically designed for miners might be a good idea anyway. (Though I realise this particular feature would be handy for all players, not just miners)
I'll see what changes it needs.
Edit: Checked the MFD and it would require quite a lot of tweaking to make it work properly. It would be required to use framecallback constantly monitoring the cargo status, as not all cargo changes trigger events. Especially jettisoning cargo and processing ore with ore processor. Doable, but feels a bit overkill.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Hi Commanders!
Here are my 2 cents. I really like the commander log extension and wanted it to log also what equipment was bought or sold or repaired. I replaced function this.playerBoughtEquipment. See code below.
I know that ship entity has equipment property that returns a list of equipment ship has. It will be nice if ship had a function like GetEquipment(equip) that would return EquipmentInfo to avoid implementing a for loop every time I need just one piece of equipment. Or is there another way of getting only one equipment by the key?
At the moment above function shows if user bought Equipment with _REMOVAL. How do I detect if equip string contains “_REMOVAL” to set a proper wording when equipment was sold.
My next step will be logging message if equipment was repaired.
Thanks,
vsfc
Here are my 2 cents. I really like the commander log extension and wanted it to log also what equipment was bought or sold or repaired. I replaced function this.playerBoughtEquipment. See code below.
Code: Select all
this.playerBoughtEquipment = function(equip)
{
this.clockString = clock.days + ":" + clock.hoursComponent + ":" + clock.minutesComponent + ":" + clock.secondsComponent;
this.dateArray.push(this.clockString);
var eqCounter = 0 ;
for(eqCounter = 0; eqCounter < player.ship.equipment.length; eqCounter++)
{
if(player.ship.equipment[eqCounter].equipmentKey == equip)
{
this.textArray.push(player.ship.equipment[eqCounter].name + " purchased at " + system.name + " for " + (this.oldCredits - player.credits) + "cr");
}
}
this.trimArrays();
this.oldCredits = player.credits;
}
At the moment above function shows if user bought Equipment with _REMOVAL. How do I detect if equip string contains “_REMOVAL” to set a proper wording when equipment was sold.
My next step will be logging message if equipment was repaired.
Thanks,
vsfc
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
EquipmentInfo.infoForKey(...)vsfc wrote:Or is there another way of getting only one equipment by the key?
vsfc wrote:At the moment above function shows if user bought Equipment with _REMOVAL. How do I detect if equip string contains “_REMOVAL” to set a proper wording when equipment was sold.
Code: Select all
if (string.match(/_REMOVAL/)) { ... } else { ... }