Page 1 of 3

[RELEASE] YAH_Haulers OXP V1.12 (updated 6 August 2016)

Posted: Fri Jan 17, 2014 8:12 am
by Keeper
YAH_Haulers_GriffR_v1.12.oxp
Download link, OXP format: http://www.keeper1st.com/Oolite/YAH_Hau ... _v1.12.zip
(but see the "Installation" section below for required other OXPs and OXPs that are superseded by this)

=== Description ===

So you have those lovely Constores near the witchpoints of certain systems, thanks to the YOUR_AD_HERE series of OXPs. But how do the stores get their merchandise? Surely big brand-name stores such as these don't rely solely on independent traders. That's where this OXP comes in.

With this OXP, when you enter a system that has a constore, there will be a 2/3 chance of a likewise-branded Hauler appearing. For example, if there's an Oodles store, then an Oodles Hauler (and Oodles Security escorts) may appear. When a Hauler does appear, it may be heading toward the store full of cargo, or be on its return run to the system main station, with no cargo (for the cargo has been delivered).

When the Hauler arrives at the store or the main station, it and its escorts will dock.

The ships: The "GriffR" in the OXP name indicates that this version of the OXP is designed for the Griff shadered replacement shipset. It will work without shaders as well since standard Oolite now uses the same models. However, if you use shaders you will need Griff's shader versions of the Anaconda and Boa (this OXP calls their shaders, normal maps and effects maps rather than duplicating them).

This OXP also corrects mistakes made by the Your Ad Here OXP with regards to the Constore defenders. YAH calls them up with the Sidewinder Escort model, but the textures were designed for the standard Sidewinder model. Also, this OXP uses my version of the textures which have specular maps.

As the haulers and escorts are spawned by role rather than by name, it will be easy to add ships that can be used by this OXP, so you could make your own additional branded store haulers and escorts.

This OXP also restores the individual colour schemes for the different branded stores, which got removed at some point in the history of the Your Ad Here OXP. It also restores an ad that had been inadvertently replaced due to a typo in the current version of YAH.

This OXP also replaces one of the two "Star" Con Stores with a "GalaxyMart" Con Store (a parody of the big Asian chain "FamilyMart"), and slows the rotation speed of all stores to a more sensible rate -- now you have time to read a sign or two before it spins out of sight. The new rotation speed wasn't necessary for this OXP, but I think you'll find it's a nice bonus.

Thanks go to dertien for most of the textures (which I have modified to add specular maps and some colour improvements here and there). He had made these textures a few years ago but they didn't have appropriate scripts to go with them, so this OXP puts them to good use. More thanks to dertien for providing templates to assist me in creating the GalaxyMart-branded ships.

Thanks also to eric walch, for I modified one of his scripts to make sure the hauler that heads for the store stays in the system. This is old plist-style AI, though, so it isn't as good as modern javascript AI, but that's beyond my current abilities. I'd love it if somebody could re-do the AI for javascript, because the plist AI has a problem with some or many of the escorts docking before the hauler does, leaving the hauler vulnerable. I'm told that new javascript AI could remedy that.

This OXP now needs at least Oolite 1.81.

=== Installation ===

To use this OXP, first you will need the following OXPs:

* YOUR_AD_HERE_4.2.2 and at least one of the "set" packages
Get from the OXP Manager in the game.

* Griff_Boa_v1.04.3 (or later, presumably) -- only required if you have shaders enabled
Get from the OXP Manager in the game.

* Griff_Anaconda_v1.04.3 (or later, presumably) -- only required if you have shaders enabled
Get from the OXP Manager in the game.

In addition, if the following OXPs are installed, you should/must remove them, as this OXP supersedes them:

* YOUR_AD_HERE_Z.oxp
* Z_GrOovy_YAH_Constore _L_Transports_.oxp
* Z_GrOovy_YAH_Sidewinder_Variety_Pack.oxp

Once you've done all that, simply place the YAH_Haulers_GriffR_v1.12.oxp folder in your Oolite\AddOns\ folder.

Optional: This OXP is compatible with Escort Formations OXP. https://bb.oolite.space/viewtopic.php?f=4&t=12117 (or get from the Manager in game)

=== Future Ideas ===

While I made sure that the empty returning haulers are not on the pirate-victim-roles list (pirates are smart enough to know that a hauler going from the store to the main station has already delivered its cargo), it might be nice to add a script that will make the empty hauler berate the player for attacking it. "We're not carrying any cargo, you moron!"

As mentioned before, rewriting the AI in javascript to ensure that the hauler always is the first to dock.

Currently, once the hauler docks, it never will re-appear (unless you're using Station Dock Control OXP). Also, when the 0-2 random number comes up as 2, no hauler is spawned. Maybe it would be nice, in that case, to make it possible for the hauler to launch from the store or the main station at some point in the future.

=== License ===

YAH_Haulers_GriffR_v1.12.oxp is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. http://creativecommons.org/licenses/by-nc-sa/4.0/

I encourage suggestions and/or updates. Want to make textures for haulers and escorts on different ship models? Please do; I can add the necessary lines to this OXP or you can simply incorporate them into your own OXP and this OXP will spawn them -- I can make the code for you if you like, to ensure compatibility.

Image

=== Changelog ===

V1.12 restores the individual colour schemes for the different store brands, which the current version of YAH had removed (making all stores orange). Also it overrides a line from YAH that contained a typo that was preventing one ad from displaying ("The Happy Trumble Restaurant" ad from the Pi-42 store was displaying on the Sainsboory's store by mistake, instead of the "Coriolis Preservation Society" ad).

V1.11 gives the escorts military lasers instead of beam lasers, and thus no longer overrides YAH's establishment of military lasers for the constore defenders. Let me know if you think that makes the escort team too strong.

V1.1 updates the OXP to work with Oolite versions 1.81 and above and the current version of YAH. It fixes a mistake created by YAH (calling the wrong Sidewinder model). This OXP calls the correct Sidewinder model for the texture used, and includes correct effects and normal maps for that model. Also the OXP now can work on systems that are not running shaders.

V1.02 adds compatibility with Escort Formations OXP. If you have Escort Formations OXP installed, you will see a variety of defensive formations taken by the hauler escorts. It is not necessary to have the OXP; without it, you'll still get the same default echelon formation as before.

V1.02 also alters the colours of the GalaxyMart store with JJP's suggestion -- a slightly different shade of green, and now blue lines introduced.

V1.02 also changes some distance values in the AI, to help avoid accidents. The haulers should enter the docking procedure earlier now. I had experienced one hauler crashing into a main station and another nearly crashing into the store before entering its docking procedure.

V1.01 changes the spawning of escorts to be by role instead of by name (when used with 1.79), so other OXPs can add ships that this OXP will use (thus there can be an assortment of ship models, for variety). This change facilitated incorporating overrides to implement a change from "Star" to "GalaxyMart" for the set_D store (there's still a Star store, in set_F), otherwise that hauler would end up with no escorts unless the player had modified their YOUR_AD_HERE installation in the same way I had.

V1.01 also adds Boa haulers for Pi-42 and Tescoo (in addition to their Anacondas). The ship types were added to their names, i.e. "Tescoo Hauler Anaconda", "Tescoo Hauler Boa", "Tescoo Security Sidewinder" so you'll be able to differentiate between various ship types that may appear now or in the future. Also, the number of escorts a hauler will have now varies when using Oolite 1.79. The Anacondas will have between six and eight escorts (in 1.77, always eight), and the Boas will have between five and seven (in 1.77, always six). I'm open to suggestions about what may be too many or not enough.

Re: [RELEASE] YAH_Haulers OXP

Posted: Fri Jan 17, 2014 8:35 am
by dertien
Downloading now , good work Keeper !

Re: [RELEASE] YAH_Haulers OXP

Posted: Fri Jan 17, 2014 6:17 pm
by cim
Keeper wrote:
=== Future Ideas ===
A lot of these are easier provided you don't need to still support 1.77, unfortunately.
Keeper wrote:
While I made sure that the empty returning haulers are not on the pirate-victim-roles list (pirates are smart enough to know that a hauler going from the store to the main station has already delivered its cargo), it might be nice to add a script that will make the empty hauler berate the player for attacking it. "We're not carrying any cargo, you moron!"
If it had a Javascript AI, you could set a custom communications role or personality, and add messages to that.
Keeper wrote:
When the hauler arrives at the store, some of its escorts dock before it does. This leaves it more vulnerable, since the station doesn't give a toss about anybody being attacked outside its walls. It looks like, in 1.79, it will be possible to "group" the hauler with the store (setting the store as a "group leader"), which presumably would mean that the store would launch defenders to protect the hauler. I can't see any details on how to set up such a "group leader" or anything in the current 1.79 AI documentation, but maybe in the future I can see how to do that -- or maybe there's a way in the current 1.77-compatible AI to insist that the hauler docks before its escorts do.
If you can't see how to do something in the 1.79 AI, the solution is to write your own behaviour (or condition, etc.) function rather than using the standard ones. The Constrictor AI has an example of that.

You can't really guarantee a docking order in either version - the docking queue is not particularly ordered. Hmm... actually, the sensible thing to do would be to have the mothership not tell its escorts to leave the escort group and dock until it has started its docking approach. I'll poke 1.79 so that it does that, and then you won't have to do anything here.
Keeper wrote:
Currently, once the hauler docks, it never will re-appear. Also, when the 0-2 random number comes up as 2, no hauler is spawned. Maybe it would be nice, in that case, to make it possible for the hauler to launch from the store or the main station at some point in the future. I just don't know how to do that, yet!
In 1.79, there's a function as part of the system populator routine which adds a ship to a position: the position can be a vector, but it can also be a station or a planet - if it's a station, the function will work out how to launch the ship from that for you - and then it can just get on with its normal AI. There's also a repopulator that runs periodically and will notify your worldscripts when it might be time to add more ships. You don't want to add one every time it asks, but perhaps every now and then you could use that to launch a new hauler. The populator script has lots of examples of this in action.

In 1.77 you have to handle all of that yourself, though.

Re: [RELEASE] YAH_Haulers OXP

Posted: Sat Jan 18, 2014 6:42 am
by Keeper
cim wrote:
A lot of these are easier provided you don't need to still support 1.77, unfortunately.
...which is why they're Future Ideas! Heheh... Well, the first one, simply having it remind you when you're shooting at an empty ship, I could do in 1.77. I just didn't bother, for as you point out, 1.79 will have javascript AI, so I'll have to redo that anyway in the future and can see to adding those radio messages in the future 1.79 version.
If you can't see how to do something in the 1.79 AI, the solution is to write your own behaviour (or condition, etc.) function rather than using the standard ones. The Constrictor AI has an example of that.
Examples are good things. I'm not a programmer; I'm just pretending! "Oh, I think I see how that works... Let's see if I can make something happen..."
You can't really guarantee a docking order in either version - the docking queue is not particularly ordered. Hmm... actually, the sensible thing to do would be to have the mothership not tell its escorts to leave the escort group and dock until it has started its docking approach. I'll poke 1.79 so that it does that, and then you won't have to do anything here.
Oh, so it isn't possible at all, then? Here I was thinking I just didn't know how... It's a good feature to add, at least for when formations enter a docking procedure at an OXP station outside the main system station aegis, where they wouldn't have police protection.
In 1.79, there's a function as part of the system populator routine which adds a ship to a position: the position can be a vector, but it can also be a station or a planet - if it's a station, the function will work out how to launch the ship from that for you - and then it can just get on with its normal AI. There's also a repopulator that runs periodically and will notify your worldscripts when it might be time to add more ships. You don't want to add one every time it asks, but perhaps every now and then you could use that to launch a new hauler. The populator script has lots of examples of this in action.
Cool. Sounds like it'll be easy to implement for 1.79 then -- depending on how often the repopulator runs, pick a random number from, say, 0-5 and if it's 0 and there isn't a hauler in system, add one to the store's launch queue -- likewise if the number is 1 (add to main station launch queue). I'll definitely look into that and see if I can implement it once 1.79 becomes the standard. For now, I want to keep the OXP 1.77-compatible, of course.

Re: [RELEASE] YAH_Haulers OXP

Posted: Sat Jan 18, 2014 7:42 am
by Keeper
A couple of pictures of it in action.

The Tescoo Hauler and its escorts (one visible here) arrive at the Tescoo Con Store:
Image

The Tescoo Hauler docking at the Tescoo Con Store:
Image

Re: [RELEASE] YAH_Haulers OXP

Posted: Sat Jan 18, 2014 11:46 pm
by dertien
I encourage suggestions and/or updates. Want to make a version for another shipset (such as the Griff Additions instead of Replacements)? Please do. I'll even host and maintain it, so any changes I make will get made to every variant.
Well I might have some good new for you then, I have found some Boas with constore and other liveries, that I made eons ago, but were never released, so use them as you wish:
They are PSD layered, so it would be easy to add the other constore brands to them and change the contour colors to fit the appropriate store color.

Download here: https://app.box.com/s/3zox5wk1sd9eji9uf9bh

Contents:

-Boa Pi 42 Livery
-Boa Tescoo Livery
-Boa with OonionPacific livery
-Boa with Texacoo Livery
-Boa with PnOO livery (passenger transport with lighted windows).

Hopefully coming to our Ooniverse soon with your new and great scripting.

On a gameplay note, what I also observed is that when you attack the Anaconda while it's docking, its escorts will not attack you. They will just dock.
And it would indeed be cool that the randomness of constorebrands were triggered by a new game, and that from then on, a constore would not change brands when reloaded in the same system.

Re: [RELEASE] YAH_Haulers OXP

Posted: Sun Jan 19, 2014 1:45 am
by Keeper
The docking situation is just inherent in Oolite. cim is fixing it for 1.79, so that'll be good.

Other ships should be easy to add, as the haulers are called by role.

Today I tried to change the scripting to call the escorts by role, using "escort_role", instead of the current "escort-ship" which called a specific ship by name (e.g. changing escort-ship = yah_set_B_sidewinder_defender to escort_role = tescoosecurity which is the role for the yah_set_B_sidewinder_defender as set by the YAH OXP). This would make it easy for other OXPs to add new branded escorts/security. Unfortunately, it doesn't work! The escorts end up being generic Cobras instead. I don't see any existing examples of "escort_role" actually working, so maybe it never worked. (EDIT: Apparently it does work on the Linux build. It doesn't work on the Windows version of Oolite, though.) It's going to be replaced by a more advanced "escort_roles" in 1.79, but I want to keep this OXP 1.77-compatible for now, so I guess for now it has to go back to having the Sidewinders called specifically.

Good news, though. Adding the "escort_roles" now does not cause problems running the OXP in 1.77, and it works properly in 1.79-trunk to call ships by role instead of by name (I commented out the escort-ship lines to be sure when testing it), so while 1.77 is forced to have only the Sidewinder escorts, 1.79 allows new store-branded escorts to be added by any other OXP and they'll get put into the mix automatically by this OXP.

Re: [RELEASE] YAH_Haulers OXP

Posted: Sun Jan 19, 2014 4:46 am
by dertien
Also Keeper, I had been working on new skins for Griff's Cobra Mk 1 before starting BBS and patterning its texture so they would be easy to change towards a coming variety skin pack like the Cobbie Mk3. They are the GrOop 4 seƱoritas now but can be easily adapted to be changed to sport various constore defender liveries. This means that you could rapidly have 2 sets of transports (anacondas-boas) and two sets of defenders (sidewinders and cobra Mk 1's). The cobras are more work though.

If you like this idea, I'll be happy to make them for you. I will leave the alpha blending to you as usual, and send you the relevant layer.

Let me know what you think.

Re: [RELEASE] YAH_Haulers OXP

Posted: Sun Jan 19, 2014 6:01 am
by Keeper
Sounds good, though the ability to spawn different ship types as constore-branded escorts will work only in 1.79, as I discovered today. It will allow me to set up Cobras as a tougher class of escort, and Oolite 1.79 can be made to weigh escort type distribution based on the overall security level in a system.

I just added the Pi-42 Boa and Tescoo Boa to the mix, and am compiling a new version update at the moment with other changes I made today.

Re: [RELEASE] YAH_Haulers OXP V1.01

Posted: Sun Jan 19, 2014 6:41 am
by Keeper
Version 1.01 is now online. The most significant change is that no longer will you have to modify anything to get a GalaxyMart constore to go with the GalaxyMart ships; overrides are included that will make the changes for you. Also, the OXP is available as an OXZ archive as well as the standard zipped OXP folder. See top post.

In addition, there's some variation in hauler ship types now: dertien has provided textures for Pi-42 and Tescoo branded Boas, so those have been added using the same "role" as the Anacondas, thus sometimes the Pi-42 or Tescoo hauler in a system will be an Anaconda, and sometimes it will be a Boa. (We'll have to make Boas for the other brands in a future update.) The Boa will have six escorts in 1.77, or between five and seven in 1.79. The Anaconda will have eight escorts in 1.77, or between six and eight in 1.79.

"Behind the scenes," the spawning of escorts is now made by role instead of by name (when used with 1.79), so other OXPs can add branded escort/defender ships that this OXP will use (thus there can be an assortment of ship models, for variety).

A manifest.plist for 1.79 has been created, but its "requires_oxps" and "conflict_oxps" have been commented out for now, because the required and conflicting OXPs don't have identifiers yet. In the future, when those OXPs get manifests of their own and have had identifiers created, this OXP's manifest will be updated to make it work well with the OXP management feature of 1.79.

Re: [RELEASE] YAH_Haulers OXP V1.01

Posted: Mon Jan 20, 2014 6:27 pm
by JJP
I like it! May I suggest two changes of a cosmetic nature though? To more closely resemble the GalaxyMart logo's colours, to get a blue decal, in the shipdata-overrides.list section yah_set_D_constore change DecalColor to:

Code: Select all

DecalColor =  {
    type = vector;
    value = "0.0000 0.3633 0.7266";
    };
and to change the colour green on the top side of the store to a darker green, add this to shipdata-overrides.list:

Code: Select all

"yah_set_D_griff_station_top" = {
    shaders = {
        "yah_griff_station_top.png" = {
            "fragment_shader" = "yah_griff_station_top_section.fragment";
            textures = (
                "yah_griff_station_top.png",
                "yah_griff_station_paint_mask.png");
            uniforms = {
                DecalColor = {
                    type = vector;
                    value = "1.0 1.0 0.0";
                };
                MainhullColor = {
                    type = vector;
                    value = "0.1875 0.5000 0.0195";
                    };
                "hull_heat_level" = hullHeatLevel;
                uColorMap = {
                    type = texture;
                    value = 0;
                };
                uEffectsMap = {
                    type = texture;
                    value = 1;
                };
                uTime = universalTime;
            };
            "vertex_shader" = "YAH-generic.vertex";
        };
    };
};

Re: [RELEASE] YAH_Haulers OXP V1.01

Posted: Tue Jan 21, 2014 12:01 pm
by Griff
fantastic work Keeper! Lovely textures too, the ships and station look fantastic with some nice strong colours

Re: [RELEASE] YAH_Haulers OXP V1.02

Posted: Sun Feb 09, 2014 9:53 pm
by Keeper
A small update; links in top post.

V1.02 changes some distance values in the AI, to help avoid accidents. The haulers should enter the docking procedure earlier now. I had experienced one hauler crashing into a main station and another nearly crashing into the store before entering its docking procedure.

V1.02 also adds compatibility with Escort Formations OXP. If you have Escort Formations OXP installed, you will see a variety of defensive formations taken by the hauler escorts. It is not necessary to have the OXP; without it, you'll still get the same default echelon formation as before.

V1.02 also alters the colours of the GalaxyMart store with JJP's suggestion -- a slightly different shade of green, and now blue lines introduced.

I wanted to add more haulers but never got around to making the textures, so that's all that's changed for now.

Re: [RELEASE] YAH_Haulers OXP V1.02

Posted: Sun Feb 09, 2014 10:28 pm
by Diogenese Senna
Downloaded. Used. Appreciated.

Re: [RELEASE] YAH_Haulers OXP V1.02

Posted: Sun Feb 09, 2014 10:49 pm
by Redspear
Looks great Keeper. Thanks :D