Page 30 of 63

Posted: Wed Oct 07, 2009 1:09 pm
by Commander McLane
... and OpenStep in itself is so much easier to read than XML, as far as scripts are concerned.

Posted: Wed Oct 07, 2009 2:39 pm
by Screet
I've had a very strange problem:

When I use OSE without the Caduceus oxp, my ship is in, but it has no shipyard entry, thus some eq cannot be repaired or bought and the trade in value is 0 Cr.

That's astonishing, as the caduceus-omega-player has two entries: ose shipyard and shipyard-override.

Any ideas?

Screet

...

Posted: Wed Oct 07, 2009 2:49 pm
by Lestradae
Screet, can you test the following conjunctions concerning the "0 Cr ship" bug:

1) With caduceus oxp in

2) With caduceus oxp and OSE in

3) Only OSE in

4) OSE in, but delete the shipyard-overrides.plist

5) With caduceus oxp in and OSE with deleted shipyard.plist

... and then report what happens in these five cases? When we know their result(s), perhaps this puzzle gets less mysterious.

:idea:

L

PS: Thought of something else ... Screet, did you buy that Caduceus with the old caduceus oxp, the one ClymAngus wanted changed?

The old Caduceus was removed and altered to one of the new ones on CA's request. Hope it's not that.

Re: ...

Posted: Wed Oct 07, 2009 3:02 pm
by Screet
Lestradae wrote:
1) With caduceus oxp in

2) With caduceus oxp and OSE in

3) Only OSE in

4) OSE in, but delete the shipyard-overrides.plist

5) With caduceus oxp in and OSE with deleted shipyard.plist

PS: Thought of something else ... Screet, did you buy that Caduceus with the old caduceus oxp, the one ClymAngus wanted changed?
It's from neocaduceus oxp - and I don't know of any changes to that one.

1 works
2 works
3 does not work
4 does not work
5 works (virtually the same as 2)

It looks like I need the caduceus oxp only for it's shipyard entry, although the ship in there is using the same name as in the OSE files!

Screet

...

Posted: Wed Oct 07, 2009 3:40 pm
by Lestradae
Screet, could you be so good and post me the complete shipdata and shipyard plist entries of the player ship that has these issues from the original neocaduceus oxp you bought it from here?

I will look into the matter letter for letter in comparison to the original oxp, as this seems to work and the OSE version not really :?

Thanks for finding this :(

L

..

Posted: Wed Oct 07, 2009 9:53 pm
by Lestradae
* sigh *

Screet, the shipdata and shipyard plist entries of the neocaduceus oxp you were using originally ... guess what: They are completely indentical down to the last letter & semicolon with the OSE version. :shock:

Next attempt: Could you post or send me via PM or EMail the complete insides of your savegame, please?

Trying himself on Occam's Razor here :?

L

PS: Oh, and, can you try using the OSE.js below instead of yours and see if the crashes persist?

Code: Select all

this.name = "Oolite Shipyards Extension";
this.author = "Paul Wilkins";
this.copyright = "(C) 2009 Paul Wilkins";
this.description = "Converted from the 0.70 version of ose.js to use proper ship loading techniques";
this.version = "0.71";

var ANARCHY = 0,
        FEUDAL = 1,
        MULTIGOVERNMENT = 2,
        DICTATORSHIP = 3,
        COMMUNIST = 4,
        CONFEDERACY = 5,
        DEMOCRACY = 6,
        CORPORATESTATE = 7;
var RICHINDUSTIAL = 0,
        AVERAGEINDUSTRIAL = 1,
        POORINDUSTRIAL = 2,
        MAINLYINDUSTRIAL = 3,
        MAINLYAGRICULTURAL = 4,
        RICHAGRICULTURAL = 5,
        AVERAGEAGRICULTURAL = 6,
        POORAGRICULTURAL = 7;

// startUp only runs once at startup before the demoscreen shows up.
this.startUp = function()
{
    this.reset(); // this.reset() fires not for a cmdr Jameson. When needed for a Jameson, call it here.
}

// this runs after loading in a saved game. missionVariables are read in at this point.
this.reset = function()
{
        if (oolite.compareVersion("1.73.4") > 0) {
                log("script." + this.name, "This Oolite Shipyards Extension does not run under Oolite version " + oolite.versionString + ". Oolite Shipyards Extension is disabled.");
                delete this.shipWillDockWithStation;
                delete this.shipExitedWitchspace;
                delete this.shipLaunchedFromStation;
        } else {
                this.mustPopulate = true;
        }
   /* used for adding ships after a first launch.
   This way you don't have to time consuming check every launch if a ship was already there.
   */
}

this.shipDockedWithStation = function(station) {
        // another eventhandler could have launched the ship already when it fires before this script.
        if (player.ship.docked) {
                this.freeTradeZoneDocking(station);
        }
}

// Ships that are added to the system, and to interstellar space
this.setUpGlobalShips = function()
{
        this.addNavyPatrolShips();
        this.addMissionaryShips();
        this.addDredgerShip();
        this.addHardPirateShips();
        this.pimpMySystem();
}

// Ships to be added to the system
this.setUpSystemShips = function()
{
        this.addOoBayShips();
        this.addInraPatrolShips();
        this.addSIRFYardStation();
        this.addFrogRickshawShip();
        this.addMissionaryShips();
        this.addClipperShip();
        this.addDredgerShip();
        this.addExecutiveFlightShips();
        this.addSalezaShips();
        this.addSuperCobraShips();
        this.addIxianShips();
        this.addHardPirateShips();
        this.addFreeTradeZone();
        this.addPirateCove();
        this.pimpMySystem();
}

// add global and system ships
this.setUpShips = function () {
        this.setUpGlobalShips();
        if (system.isInterstellarSpace) {
                return;
        }
        this.setUpSystemShips();
};

this.shipExitedWitchspace = function()
{
        this.setUpShips();
}

this.shipLaunchedFromStation = function()
{
  /* The first launch after a restart the system must be populated after a launch.
  The other times it happens after a WitchspaceJump */
        if (this.mustPopulate) {
                this.mustPopulate = false;
                this.setUpSystemShips();
        }
}

this.addOoBayShips = function () {
        if (system.countShipsWithPrimaryRole('Auction-Station-Storage') <= 9) {
                system.legacy_addShipsAtPrecisely('Auction-Station-Node1', 1, 'pwp', [0, 0, 1.4]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node2', 1, 'pwp', [0, 0, 1.6]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node3', 1, 'pwp', [0, 0, 1.8]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node4', 1, 'pwp', [-0.2, 0, 1.4]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node5', 1, 'pwp', [-0.2, 0, 1.6]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node6', 1, 'pwp', [-0.2, 0, 1.8]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node7', 1, 'pwp', [-0.4, 0, 1.4]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node8', 1, 'pwp', [-0.4, 0, 1.6]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node9', 1, 'pwp', [-0.4, 0, 1.8]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node10', 1, 'pwp', [0, 0.2, 1.4]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node11', 1, 'pwp', [0, 0.2, 1.6]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node12', 1, 'pwp', [0, 0.2, 1.8]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node13', 1, 'pwp', [-0.2, 0.2, 1.4]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Beacon', 1, 'pwp', [-0.2, 0.2, 1.6]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node14', 1, 'pwp', [-0.2, 0.2, 1.8]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node15', 1, 'pwp', [-0.4, 0.2, 1.4]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node16', 1, 'pwp', [-0.4, 0.2, 1.6]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node17', 1, 'pwp', [-0.4, 0.2, 1.8]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node18', 1, 'pwp', [0, 0.4, 1.4]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node19', 1, 'pwp', [0, 0.4, 1.6]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node20', 1, 'pwp', [0, 0.4, 1.8]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node21', 1, 'pwp', [-0.2, 0.4, 1.4]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node22', 1, 'pwp', [-0.2, 0.4, 1.6]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node23', 1, 'pwp', [-0.2, 0.4, 1.8]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node24', 1, 'pwp', [-0.4, 0.4, 1.4]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node25', 1, 'pwp', [-0.4, 0.4, 1.6]);
                system.legacy_addShipsAtPrecisely('Auction-Station-Node26', 1, 'pwp', [-0.4, 0.4, 1.8]);
        }
};
this.addInraPatrolShips = function () {
        if (system.techLevel >= 15) {
                system.legacy_addShipsAt('INRA', 1, 'pwu', [0, 0, 0.7]);
                system.legacy_addShipsAt('INRA', 1, 'pwu', [0, 0, 0.3]);
        }
};
this.addNavyPatrolShips = function () {
        system.legacy_addShipsAt('police', 2, 'pwu', [0, 0, 0.9]);
        system.legacy_addShipsAt('militarybig', 2, 'pwu', [0, 0, 0.8]);
        system.legacy_addShipsAt('interceptor', 2, 'pwu', [0, 0, 0.65]);
        system.legacy_addShipsAt('militarycarrier', 2, 'pwu', [0, 0, 0.5]);
        system.legacy_addShipsAt('militarymedium', 2, 'pwu', [0, 0, 0.2]);
        system.legacy_addShipsAt('hunter', 2, 'pwu', [0, 0, 0.1]);
};
this.addSIRFYardStation = function () {
        if (system.techLevel >= 11) {
                if (system.countShipsWithPrimaryRole('SIRF-YARD') === 0) {
                        system.legacy_addShipsAt('SIRF-YARD', 1, 'pwu', [1, 1, 3]);
                }
        }
};
this.addFrogRickshawShip = function () {
        if (system.economy <= MAINLYINDUSTRIAL) {
                system.legacy_addSystemShips('rickshaw', 1, 0.1);
                system.legacy_addSystemShips('rickshaw', 1, 0.9);
        }
};
this.addMissionaryShips = function () {
        if (player.ship.fuel >= 5 && Math.random() < 0.90) {
                system.legacy_addSystemShips('missionary', 1, 0.3);
                system.legacy_addSystemShips('missionary', 1, 0.7);
        }
};
this.addClipperShip = function () {
        if (system.techLevel >= 8 && Math.random() < 0.65) {
                system.legacy_addSystemShips('clipper-rescueship', 1, 0.9);
        }
};
this.addDredgerShip = function () {
        if (system.techLevel >= 9 && Math.random() < 0.10) {
                system.legacy_addShipsAt('dredger', 1, 'pwp', [0.3, 0.3, 3.5]);
                system.legacy_addShipsAt('dredger', 1, 'pwp', [0, 0, 1.5]);
        }
};
this.addExecutiveFlightShips = function () {
        if (system.countShipsWithPrimaryRole('trident') === 0) {
                if (system.government <= COMMUNIST && Math.random() < 0.25) {
                        system.legacy_addSystemShips('trident', 1, 0.5);
                }
                if (system.government >= CONFEDERACY && system.techLevel >= 7 && Math.random() < 0.75) {
                        system.legacy_addSystemShips('trident', 1, 0.4);
                }
                if (system.government >= CONFEDERACY && system.techLevel >= 10 && Math.random() < 0.20) {
                        system.legacy_addSystemShips('strelka', 1, 0.8);
                }
        }
};
this.addSalezaShips = function () {
        if (system.government === CORPORATESTATE && system.techLevel <= 9 && Math.random() < 0.60) {
                system.legacy_addSystemShips('rigel', 1, 0.3);
                system.legacy_addSystemShips('saiph', 2, 0.6);
        }
        if (system.government >= CONFEDERACY && Math.random() < 0.30) {
                system.legacy_addSystemShips('saiph', 1, 0.4);
        }
        if (system.government === DICTATORSHIP && system.techLevel >= 10 && Math.random() < 0.80) {
                system.legacy_addSystemShips('rigel', 1, 0.4);
        }
        if (system.government === CORPORATESTATE && system.techLevel >= 10 && Math.random() < 0.60) {
                system.legacy_addSystemShips('bellatrix', 1, 0.3);
        }
};
this.addSuperCobraShips = function () {
        system.legacy_addShipsAt('policesupercobra', 1, 'spu', [0, 0, 0.2]);
        system.legacy_addShipsAt('supercobratraderminerhunter', 1, 'spu', [0, 0, 0.9]);
        system.legacy_addShipsAt('militarysupercobra', 1, 'spu', [0, 0, 0.75]);
        system.legacy_addShipsAt('piratesupercobra', 1, 'pwu', [0, 0, 0.4]);
};
this.addIxianShips = function () {
        if (system.government >= FEUDAL) {
                if (system.population < 30 && Math.random() < 0.20) {
                        system.legacy_addShipsAt('ixian_ship', 1, 'pwu', [0, 0, 0.75]);
                }
                if (system.population < 25 && Math.random() < 0.50) {
                        system.legacy_addShipsAt('ixian_ship', 1, 'pwu', [0, 0, 0.45]);
                }
        }
};
this.addHardPirateShips = function () {
        // Add a base level of pirate ships
        if (system.government === ANARCHY) {
                if (Math.random() < 0.30) {
                        system.legacy_addSystemShips('hardpirate', 4, 0.1);
                }
                if (Math.random() < 0.20) {
                        system.legacy_addSystemShips('hardpirate', 2, 0.4);
                }
                if (Math.random() < 0.10) {
                        system.legacy_addSystemShips('hardpirate', 6, 0.6);
                }
                if (Math.random() < 0.05) {
                        system.legacy_addSystemShips('hardpirate', 4, 0.8);
                }
                if (Math.random() < 0.04) {
                        system.legacy_addSystemShips('hardpirate', 4, 0.9);
                }
        }
        if (system.government === FEUDAL) {
                if (Math.random() < 0.25) {
                        system.legacy_addSystemShips('hardpirate', 2, 0.2);
                }
                if (Math.random() < 0.15) {
                        system.legacy_addSystemShips('hardpirate', 2, 0.1);
                }
                if (Math.random() < 0.10) {
                        system.legacy_addSystemShips('hardpirate', 4, 0.5);
                }
                if (Math.random() < 0.05) {
                        system.legacy_addSystemShips('hardpirate', 2, 0.8);
                }
                if (Math.random() < 0.03) {
                        system.legacy_addSystemShips('hardpirate', 4, 0.9);
                }
        }
        if (system.government >= MULTIGOVERNMENT && system.government <= CONFEDERACY) {
                if (Math.random() < 0.10) {
                        system.legacy_addSystemShips('hardpirate', 2, 0.1);
                }
                if (Math.random() < 0.08) {
                        system.legacy_addSystemShips('hardpirate', 4, 0.4);
                }
                if (Math.random() < 0.06) {
                        system.legacy_addSystemShips('hardpirate', 2, 0.3);
                }
        }
        if (system.government === DEMOCRACY) {
                if (Math.random() < 0.10) {
                        system.legacy_addShipsWithinRadius('hardpirate', 2, 'swu', [0, 0.45, 0], 10000);
                }
                if (Math.random() < 0.05) {
                        system.legacy_addShipsWithinRadius('hardpirate', 2, 'swu', [0, 0.30, 0], 10000);
                }
                if (Math.random() < 0.03) {
                        system.legacy_addShipsWithinRadius('hardpirate', 2, 'swu', [0, 0.90, 0], 10000);
                }
        }
        if (system.government === CORPORATESTATE) {
                if (Math.random() < 0.05) {
                        system.legacy_addShipsWithinRadius('hardpirate', 2, 'swu', [0, 0.55, 0], 10000);
                }
                if (Math.random() < 0.03) {
                        system.legacy_addShipsWithinRadius('hardpirate', 2, 'swu', [0, 0.75, 0], 10000);
                }
        }
        // Add additional pirate ships
        if (system.government === ANARCHY && Math.random() < 0.30) {
                system.legacy_addShipsWithinRadius('hardpirate', 2, 'swu', [0, 0.3, 0], 10000);
        }
        if (system.government <= FEUDAL && Math.random() < 0.20) {
                system.legacy_addShipsWithinRadius('hardpirate', 2, 'swu', [0, 0.45, 0], 10000);
        }
        if (system.government <= MULTIGOVERNMENT && Math.random() < 0.10) {
                system.legacy_addShipsWithinRadius('hardpirate', 4, 'swu', [0, 0.65, 0], 10000);
        }
        if (system.government <= COMMUNIST && Math.random() < 0.05) {
                system.legacy_addShipsWithinRadius('hardpirate', 2, 'swu', [0, 0.75, 0], 10000);
        }
        if (system.government <= CONFEDERACY && Math.random() < 0.03) {
                system.legacy_addShipsWithinRadius('hardpirate', 4, 'swu', [0, 0.85, 0], 10000);
        }
        if (system.government >= DEMOCRACY && Math.random() < 0.04) {
                system.legacy_addSystemShips('hardpirate', 2, 0.5);
        }
        if (system.government >= DEMOCRACY && Math.random() < 0.03) {
                system.legacy_addSystemShips('hardpirate', 4, 0.3);
        }
};
this.addFreeTradeZone = function () {
        if (system.government === MULTIGOVERNMENT) {
                system.legacy_addShipsAt('free_trade_zone', 1, 'wpu', [0, 0, -0.3]);
                system.legacy_addShipsAtPrecisely('ftzpirate', 2, 'wpu', [0, 0, -0.25]);
                this.freetradezone_marked = false;
                if (Math.random() < 0.25) {
                        system.legacy_addShipsAtPrecisely('pirate', 2, 'wpu', [0, 0, -0.25]);
                }
                if (Math.random() < 0.70) {
                        system.legacy_addShipsAtPrecisely('ftzpirate', 2, 'wpu', [0, 0, -0.2]);
                }
                if (Math.random() < 0.30) {
                        system.legacy_addShipsAtPrecisely('ftzpirate', 4, 'wpu', [0, 0, -0.15]);
                }
                if (Math.random() < 0.50) {
                        system.legacy_addShipsWithinRadius('ftzhauler', 1, 'wpu', [0, 0, -0.2], 5000);
                }
                if (Math.random() < 0.25) {
                        system.legacy_addShipsWithinRadius('ftzhauler', 1, 'wpu', [0, 0, -0.25], 5000);
                }
                if (Math.random() < 0.10) {
                        system.legacy_addShipsWithinRadius('police', 6, 'wpu', [0, 0, -0.3], 5000);
                }
        }
};
this.freeTradeZoneDocking = function (station) {
        if (station.name === 'Free Trade Zone') {
                if (this.freetradezone_marked !== true) {
                        player.bounty += 5;
                        this.freetradezone_marked = true;
                }
        }
};
this.addPirateCove = function () {
        if (system.countShipsWithPrimaryRole('pirate') >= 10 && system.countShipsWithPrimaryRole('pirate-cove') === 0) {
                system.legacy_addSystemShips('pirate-cove', 1, 0.12);
                system.legacy_addSystemShips('asteroid', 8, 0.12);
        }
};
this.pimpMySystem = function () {
        system.legacy_addShipsAt('uber', 1, 'spu', [0, 0, 0.9]);
        system.legacy_addShipsAt('uber', 1, 'wpu', [0, 0, 0.5]);
        system.legacy_addShipsAt('uber', 1, 'wsu', [0, 0, 0.5]);
};

Posted: Sat Oct 10, 2009 7:52 pm
by matthewfarmery
Hi, I found the game through another forum, really like it, first post here, anyway, thought I would give OSE a try, got the latest version of both OSE and Oolite, however, I tested Realistic Shipyards V3.02b first, being browsing the forum for a while but not bothered with a account, but I have run into problems with OSE so I created a account both to say hi and create a bug report, as Im getting radom crashing with OSE, with RS, or Oolite by itself, the game doesn't crash, but with OSE, it crashing a lot, and random, docking at a station or dog fighting, or being near a battle zone, I started a fresh, not got any other extensions running apart from OSE, I deleted all other extensions, duel booting win XP and 7, on the same computer, crashing on both, so its not a OS problem, but a OSE one, this is my log file, hopefully you can make something from it and work out why its crashing, as its annoying as anything

as the log file is too large to post, you can find the file

http://matthewfarmery.net/oolite/Latest.rar

PS its not a bad mod, but its pretty hard to start off in, not sure about the fuel stations, its a little annoying having to go out of their range to engage the J key, but the mod seems to be ok, PS how do I revert back to the original font? as Im not keen on the new one


thanks in advance and Oolite is a great game in general

edit guess I need to do a bit of posting before URL are allowed for new users, then I will post the link to the log file

Posted: Sat Oct 10, 2009 8:18 pm
by Screet
Hi Matthew!
matthewfarmery wrote:
Im getting radom crashing with OSE, with RS, or Oolite by itself, the game doesn't crash, but with OSE, it crashing a lot, and random, docking at a station or dog fighting, or being near a battle zone
One known problem is in the included file "frame_fuel_collector.js" in the scripts subfolder. Somehow that code did work with previous oolite versions, but newer ones now do crash :?

If you open that file and search for 301, then you should modify it according to this:

Code: Select all

                                           if(this.theplayer.position.distanceTo(pl_target) < 301)
                                            {
                                                    log("Fuel Collector", "distance below 301")
													let isRunning = false
                                                    if(this.DerelictCheckTimer)
                                                    {
														log("Fuel Collector", "this.DerelictCheckTimer is " + this.DerelictCheckTimer)
                                                            if(this.DerelictCheckTimer.isRunning)
                                                            isRunning = true
                                                    }
 
Then a very big source for problems is gone.

However, I also currently try to identify further problems - which is difficult as my machine also suffers from a general bug with timers. Somewhere should be a "timer-crash-test.oxp" linked. It would be interested if that oxp does cause instant crashes for you, and if so, which operating system you use. To me it appears that 64bit OS versions currently suffer from a nasty crash with timers.

If you are not using the latest test release, but build trunk yourself, you might also suffer from a machine-dependant bug with the OreProcessor. That thing itself is fine, but on my 64bit machines it started to crash a few revisions ago :?

If you disable the op_splinter.js and OreProcessor.js, you should be safe from that one, but it's only necessary if scooping splinters with your oreprocessor-equipped ship does crash. Same there: It would be interesting to know your OS type, as it's not a bug affecting every machine.

Finally, if you use the new OSE javascript world script or the old OSE-XML.plist worldscript, please disable those and give it a try. You will still get many different ship types from OSE and have all the EQ, but you cannot earn money by stations then (or create a minimal OSE-XML.plist with your stations only). When I did that, I did not encounter a single crash (until the new oreprocessor bug struck me). I'm still investigating at what part of the script did cause the crash in the OSE worldscript. Currently it seems to be the addition of further hardpirate ships, but I'm not entirely sure about that yet. If it's the hardpirates, you simply can disable the lines which add them in the OSE.js or remove the hardpirate triggers in OSE-XML without losing other functionality.

Screet

Posted: Sat Oct 10, 2009 8:34 pm
by matthewfarmery
Hi I will test out the frame_fuel_collector.js fix you have said, as for OS, windows 7 64bit and windows XP 32bit, I tried the latter first then I thought I would try it in 7 and got the same thing, but will try the fix and let you know the outcome, haven't tried any of the trunk builds, only 1.73.4 and OSE from the link from the first page in Lestradae post, anyway going to try the fix and report back if it works or not

thanks for the help

Posted: Sat Oct 10, 2009 8:40 pm
by Screet
matthewfarmery wrote:
Hi I will test out the frame_fuel_collector.js fix you have said, as for OS, windows 7 64bit and windows XP 32bit, I tried the latter first then I thought I would try it in 7 and got the same thing, but will try the fix and let you know the outcome, haven't tried any of the trunk builds, only 1.73.4 and OSE from the link from the first page in Lestradae post, anyway going to try the fix and report back if it works or not
If it still crashes, try to disable OSE-XML.plist by adding .disabled next.

Please remember that you have to load Oolite with shift down in order to force a flush of the cache, otherwise a modified script will not be detected and thus you won't experience any change.

As for the timer-test: The first message in this thread does have a link to it:
https://bb.oolite.space/viewtopic.php?t=6578

It would be very interesting to know the results for both your machines. Either nothing happens or the game crashes shortly after you launch.

Screet

Posted: Sat Oct 10, 2009 9:37 pm
by matthewfarmery
I have done the frame_fuel_collector.js fix and so far so good, still playing the same session which I first ran after the fix, tried it on win 7, will try on XP tomorrow, so the fix seems to work ok, thanks for that, will update if anything changes

..

Posted: Sun Oct 11, 2009 12:08 am
by Lestradae
Hi matthewfarmery,

First, welcome to the board which might even be the friendliest this side of Riedquat! (Whatever "this side" may be) :D

You have to stay aware of the fact that OSE is a test version, not an already completed oxp. It is published here for the purpose of finding bugs, and using it to play your normal game already is a bit risky. RS - the old version of this - should be a bit more stable, but is much more bug-prone than even the test WiP of OSE here and of course has fewer nice features inbuilt ...

So if you use OSE before it's finished, I am very happy if you report any bug or strange behaviour here in this thread, but don't expect everything to work as intended all the time atm!

After looking into your log, you are suffering from a stack overflow problem with the AI's that steer certain missiles in the game, and that was probably the reason for your crashes, at least the crash that your posted log indicates.

The next OSE test version will come out somewhen this month and will probably have this one fixed, if Screet provides me with his "ship already stunned" - indicating new java scripts for the lawmaker and override missiles (the likely crash culprits) :wink:

Hope you still have fun, worst case it might be better to fall back to RS if you don't want to be a game tester, that is :D

L

Re: ..

Posted: Sun Oct 11, 2009 12:23 am
by Screet
L, I already sent it to you via email...however, maybe more people want to update their OSE WIP with some scripts that are much more safe now:

rmb-law-missile-script.js

Code: Select all

this.name = "rmb-law-missile-script";
this.author = "Ramirez";
this.copyright = "January 2009";
this.description = "Prevents an Orange Tear lawmaker missile from being used against stations and other stationary objects";
this.version = "1.0";
this.checkTargetVulnerability = function()
 {
if(!this.ship.target || (this.ship.target.isStation && this.ship.target.maxSpeed == 0) || this.ship.target.scanClass == "CLASS_ROCK") return
if(this.ship.target.isPlayer) return
if(this.ship.target.AI == "rmb-stunnedAI.plist") {
	log("RMB-LAW-MISSILE-SCRIPT.JS","Target already stunned, aborting.");
} else {
	log("RMB-LAW-MISSILE-SCRIPT.JS","Stunning target.");
	this.ship.target.setAI("rmb-stunnedAI.plist")
}
}
rmb-override-missile-script.js

Code: Select all

this.name = "rmb-override-missile-script";
this.author = "Ramirez";
this.copyright = "January 2009";
this.description = "Prevents a Violet Flax override missile from being effective against stations and other stationary objects.  If player is the target, a random piece of equipment is damaged";
this.version = "2.0";
this.damageSystems = function()
 {
if(!this.ship.target || (this.ship.target.isStation && this.ship.target.maxSpeed == 0) || this.ship.target.scanClass == "CLASS_ROCK") return
if(this.ship.target.isPlayer)
  {
         var list = ["EQ_ADVANCED_COMPASS", "EQ_DOCK_COMP", "EQ_ECM", "EQ_FUEL_INJECTION", "EQ_TARGET_MEMORY",         "EQ_SCANNER_SHOW_MISSILE_TARGET"]
          let equipment = list[Math.floor(Math.random() * list.length)]
          if(player.ship.hasEquipment(equipment))
        {
        player.ship.setEquipmentStatus(equipment, "EQUIPMENT_DAMAGED")
        player.commsMessage("Warning: Missile detonation caused failure of " + EquipmentInfo.infoForKey(equipment).name, 5)
        this.ship.reactToAIMessage("DETONATE");
        }
  }
  else
  {
	if(this.ship.target.AI == "rmb-overrideAI.plist") {
		log("RMB-OVERRIDE-MISSILE-SCRIPT.JS","Target already affected, aborting.");
	} else {
		log("RMB-OVERRIDE-MISSILE-SCRIPT.JS","Overriding target.");
        this.ship.target.setAI("rmb-overrideAI.plist")
	}
  }
}
frame_fuel_collector.js is too long to completely post here, simply change two things which can be a problem:

1) search for 301 and then update the lines to this (or remove the logging of the timer)

Code: Select all

                                           if(this.theplayer.position.distanceTo(pl_target) < 301)
                                            {
                                                    log("Fuel Collector", "distance below 301")
													let isRunning = false
                                                    if(this.DerelictCheckTimer)
                                                    {
														log("Fuel Collector", "this.DerelictCheckTimer is " + this.DerelictCheckTimer)
                                                            if(this.DerelictCheckTimer.isRunning)
                                                            isRunning = true
                                                    }

and then search for setAI, which will return one line. This has to be changed to switchAI as dumbAI will never exit:

Code: Select all

               this.trapship.switchAI("dumbAI.plist")
Screet

Posted: Sun Oct 11, 2009 11:28 am
by matthewfarmery
Don't mind being a tester, I may not post here much, but testing is what Im good at, either I become a Dev's best friend or worst enemy :wink: depending on your point of view, I thought I would test OSE out, was playing RS for a while, it was fun, but thought I would give OSE a go, will be happy to help test it, anyway, OSE is looking good, nice work on this huge extension :D

haven't tried the game on XP yet, and PS that frame_fuel_collector.js fix seemed to work for me, at least on windows 7, game was stable after that, going to try on XP and see if I still have problems or not, will update the log link if I do suffer a crash

..

Posted: Sun Oct 11, 2009 11:58 am
by Lestradae
Then I welcome you to playtesting OSE, matthewfarmery!

Actually, you are my best friend if you test, as I need to know where and how exactly problems arise to be able to fix them - and the size of this meta-oxp simply prevents me from doing that completely myself. I would only be angry if someone told me "oh, that's really buggy" and then not telling me their exact observations so that I can do something about it. Otherwise, it's fine and the whole purpose of this thread!

Gaming with test versions is a bit playing with fire, I play my regular game with the OSE WiP too (test 1) and under "1.74" trunk Oolite (test 2) - so I can't complain if the whole edifice comes down on me every now and then.

So, have fun and by all means report if you find something problematic

L