I also have a question for those more knowledgeable than myself:
In trying to update the Missionaries.oxp, I've come to the suspicion that the legacy script
script.plist is rendered nonfunctional in the current version of the game. I've been testing and using conditions set in a planetinfo.plist which works great for the system I'm doing the spawn tests in. But I was relying on the original oxp's ability to spawn the role missionary across all systems, and I can't see any sign on the logs that it's working. I suspect the only reason these ships appeared was because of their dual role as trader.. There is always the chance that some little error somewhere is the actual problem, but I would love to solve it with a javascript populator.
One example I have at hand is the hOopy populator, which it would be nice to simply modify to my needs.
Code: Select all
"
//add casino to system
this.systemWillPopulate = function (){
// add in high tech level systems, but not in comunist systems. But, always in systems famous for their casinos.
if (system.techLevel >= 10 && system.scrambledPseudoRandomNumber() > 0.55 && system.government != 4 || system.info.description.indexOf('hoopy casinos') > -1) {
//no main station, no casinos.
if (system.mainStation) {
var coords = system.mainStation.position.subtract(system.mainStation.position.direction().multiply(50000));
system.setPopulator("hoopy_casino", {
callback: function(pos) {
system.addShips('casinoship', 1, pos);
}.bind(this),
location: "COORDINATES",
coordinates: coords
})
}
}
}
My needs are much simpler, just to establish a 90% chance that one or two ship with role missionary are spawned somewhere in the main lane. How much surgery would that require?