MasterClass: How to OXP (updating SoThisTC)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: MasterClass: How to OXP (updating SoThisTC)

Post by spara »

Thanks cim for correcting me once again. The code gets simpler in each iteration :D.

One more time, the populator:

Code: Select all

		system.setPopulator("sothis_tc", {
			callback: function(pos) {			
				system.addShips("sothis", 1, pos, 0);					
			}.bind(this),
			location: "PLANET_ORBIT",
			locationSeed: 507415,
			deterministic: true
		})
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: MasterClass: How to OXP (updating SoThisTC)

Post by spara »

And the final touches. I'm changing the sothis definition in shipdata-overrides.plist to this:

Code: Select all

"sothis_station" = 
	{
		market_capacity = 63;
		market_definition = (
			{
				"type" = "class";
				"name" = "oolite-business";
				"price_multiplier" = 1.2;
				"price_randomiser" = 0.3;
				"quantity_multiplier" = 0.7;
				"quantity_randomiser" = 0.4;
			}, 			
			{
				"type" = "default";
				"capacity" = 0;
			}
		);
		market_monitored = yes;
		
		ai_type = "oolite-stationAI.js";
		allegiance = "galcop";
		allows_fast_docking = "yes";
		has_shipyard = "no";
		max_defense_ships = 3;
		name = "Sothis Trade Center";
		requires_docking_clearance = "yes";
		roles = "sothis station inquirer_station";
		station_roll = 0.08;
		script_info = {
			"bgs_tunnel_shape"="5";
		};
	};
We've already covered the market part, so I'll just go through the other keys.
  • ai_type: I'm changing this to the more recent js-based core AI. If I were more ambitious, I might want to write my own AI to better fit the Sothis. I'm not, so this will do.
  • allegiance: Allegiance basically signals to the game what type of traffic is allowed. I'm using the same as the main stations: "galcop". The other options are listed here: http://wiki.alioth.net/index.php/Oolite ... allegiance
  • allows_fast_docking: Set to "yes" to allow fast docking. Disabled by default.
  • has_shipyard: I originally did not have shipyard in SothisTC, so set to "no".
  • max_defense_ships: Not really sure the real effect of this, but anyway I have set this to 3, which is the default for stations. After quite a few tests with different values, the station always seems to spit just one defense ship to get rid of me when I'm constantly hammering the station with my pulse laser. Maybe the AI thinks my pulse laser is a bit of a joke or something and sends some rookie pilot to get some practice :D
  • name: should be obvious
  • requires_docking_clearance: By default "no". Set to "yes" for consistency with the main stations.
  • roles: Three roles are defined. A unique role, "sothis", which can be used to spawn the station. A generic role "station", which to my understanding is used somewhere in the core game. At least was used at some point :D. The last one is "inquirer_station" which is used by Market Inquirer OXP to identify white listed stations.
  • station_roll: The default is a bit too much to my taste. Dialed down to the core station roll speed.
  • script_info: Some oxps use keys defined in script_info. Key "bgs_tunnel_shape" basically enables bgs tunnel effect, if the oxp is installed. More info http://wiki.alioth.net/index.php/BGS2_Doc
I'm not going to add a ship library entry, because the origin of the model seems to be in front of the dock. That makes the tumbling model in the library look very wrong as it tumbles around the origin.

Am I missing something? Are we done? If so, I'll post my final version to box, if someone wants to grab it and tinker further or something.
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: MasterClass: How to OXP (updating SoThisTC)

Post by montana05 »

spara wrote: Sat May 08, 2021 12:24 pm
ai_type: I'm changing this to the more recent js-based core AI. If I were more ambitious, I might want to write my own AI to better fit the Sothis. I'm not, so this will do.
While for standard AI's .js is working fine for a customized one I still would recommend .plist. Why ? Much better documented and different to the .js it is actually working, not sometimes just ignored.
spara wrote: Sat May 08, 2021 12:24 pm
allegiance: Allegiance basically signals to the game what type of traffic is allowed. I'm using the same as the main stations: "galcop". The other options are listed here: http://wiki.alioth.net/index.php/Oolite ... allegiance
Just a matter of how you look at it, personally I prefer "neutral" but it really depends on the system government and on your point of view.

spara wrote: Sat May 08, 2021 12:24 pm
max_defense_ships: Not really sure the real effect of this, but anyway I have set this to 3, which is the default for stations. After quite a few tests with different values, the station always seems to spit just one defense ship to get rid of me when I'm constantly hammering the station with my pulse laser. Maybe the AI thinks my pulse laser is a bit of a joke or something and sends some rookie pilot to get some practice :D
It is really setting the maximum of defense ships, when they launch is a different story. :lol: I usually encourage the defenders with a js, like:

Code: Select all

this.shipTakingDamage = function(amount, whom, type)
{
    if(type == "energy damage" && whom.isPiloted == true)
    {
		if(this.ship.isStation && this.ship.dockedDefenders > 0)
		{
			this.ship.target = whom;
			this.ship.launchDefenseShip();
		};
    };
};
spara wrote: Sat May 08, 2021 12:24 pm
roles: Three roles are defined. A unique role, "sothis", which can be used to spawn the station. A generic role "station", which to my understanding is used somewhere in the core game. At least was used at some point :D. The last one is "inquirer_station" which is used by Market Inquirer OXP to identify white listed stations.
The role of station is still used, and pretty strong. If it happens that you define a role for a ship like "station_defender" this ship will also be viewed as a station from the core. :roll:
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: MasterClass: How to OXP (updating SoThisTC)

Post by spara »

montana05 wrote: Sat May 08, 2021 1:51 pm
spara wrote: Sat May 08, 2021 12:24 pm
ai_type: I'm changing this to the more recent js-based core AI. If I were more ambitious, I might want to write my own AI to better fit the Sothis. I'm not, so this will do.
While for standard AI's .js is working fine for a customized one I still would recommend .plist. Why ? Much better documented and different to the .js it is actually working, not sometimes just ignored.
I never quite got the grasp for plist AIs, despite the quite exhaustive documentation. Js AI eats JS, which I find so much easier to edit :D. I have not noticed anything funky with JS AIs, but then again, it's been quite some time since I have actually played this game. Priority AI is also quite extensively documented http://wiki.alioth.net/index.php/Oolite ... umentation, but the page could be a bit more approachable.
montana05 wrote: Sat May 08, 2021 1:51 pm
spara wrote: Sat May 08, 2021 12:24 pm
allegiance: Allegiance basically signals to the game what type of traffic is allowed. I'm using the same as the main stations: "galcop". The other options are listed here: http://wiki.alioth.net/index.php/Oolite ... allegiance
Just a matter of how you look at it, personally I prefer "neutral" but it really depends on the system government and on your point of view.
Neutral allows pirates and other scum to loiter around or something. That can't be tolerated in the Truump empire.
montana05 wrote: Sat May 08, 2021 1:51 pm
spara wrote: Sat May 08, 2021 12:24 pm
max_defense_ships: Not really sure the real effect of this, but anyway I have set this to 3, which is the default for stations. After quite a few tests with different values, the station always seems to spit just one defense ship to get rid of me when I'm constantly hammering the station with my pulse laser. Maybe the AI thinks my pulse laser is a bit of a joke or something and sends some rookie pilot to get some practice :D
It is really setting the maximum of defense ships, when they launch is a different story.
I kind of assumed that :D. I've also written my own AI in some other OXP at some point to make the station spit more defenders. It would be nice if we could somehow set the aggressiveness of the defensive measures in shipdata.
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: MasterClass: How to OXP (updating SoThisTC)

Post by montana05 »

spara wrote: Sat May 08, 2021 2:30 pm
Neutral allows pirates and other scum to loiter around or something. That can't be tolerated in the Truump empire.
Scum attracts scum, you can see that currently in RL with the greedy, offensive punks (GOP) in the US. :wink:
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: MasterClass: How to OXP (updating SoThisTC)

Post by spara »

montana05 wrote: Sat May 08, 2021 2:51 pm
spara wrote: Sat May 08, 2021 2:30 pm
Neutral allows pirates and other scum to loiter around or something. That can't be tolerated in the Truump empire.
Scum attracts scum, you can see that currently in RL with the greedy, offensive punks (GOP) in the US. :wink:
:mrgreen: "Chaotic" might be the correct alignment here.
User avatar
Cholmondely
Archivist
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: MasterClass: How to OXP (updating SoThisTC)

Post by Cholmondely »

spara wrote: Sat May 08, 2021 12:24 pm
And the final touches. I'm changing the sothis definition in shipdata-overrides.plist to this:

Code: Select all

"sothis_station" = 
	{
		market_capacity = 63;
		market_definition = (
			{
				"type" = "class";
				"name" = "oolite-business";
				"price_multiplier" = 1.2;
				"price_randomiser" = 0.3;
				"quantity_multiplier" = 0.7;
				"quantity_randomiser" = 0.4;
			}, 			
			{
				"type" = "default";
				"capacity" = 0;
			}
		);
		market_monitored = yes;
		
		ai_type = "oolite-stationAI.js";
		allegiance = "galcop";
		allows_fast_docking = "yes";
		has_shipyard = "no";
		max_defense_ships = 3;
		name = "Sothis Trade Center";
		requires_docking_clearance = "yes";
		roles = "sothis station inquirer_station";
		station_roll = 0.08;
		script_info = {
			"bgs_tunnel_shape"="5";
		};
	};
We've already covered the market part, so I'll just go through the other keys.
  • ai_type: I'm changing this to the more recent js-based core AI. If I were more ambitious, I might want to write my own AI to better fit the Sothis. I'm not, so this will do.
  • allegiance: Allegiance basically signals to the game what type of traffic is allowed. I'm using the same as the main stations: "galcop". The other options are listed here: http://wiki.alioth.net/index.php/Oolite ... allegiance
  • allows_fast_docking: Set to "yes" to allow fast docking. Disabled by default.
  • has_shipyard: I originally did not have shipyard in SothisTC, so set to "no".
  • max_defense_ships: Not really sure the real effect of this, but anyway I have set this to 3, which is the default for stations. After quite a few tests with different values, the station always seems to spit just one defense ship to get rid of me when I'm constantly hammering the station with my pulse laser. Maybe the AI thinks my pulse laser is a bit of a joke or something and sends some rookie pilot to get some practice :D
  • name: should be obvious
  • requires_docking_clearance: By default "no". Set to "yes" for consistency with the main stations.
  • roles: Three roles are defined. A unique role, "sothis", which can be used to spawn the station. A generic role "station", which to my understanding is used somewhere in the core game. At least was used at some point :D. The last one is "inquirer_station" which is used by Market Inquirer OXP to identify white listed stations.
  • station_roll: The default is a bit too much to my taste. Dialed down to the core station roll speed.
  • script_info: Some oxps use keys defined in script_info. Key "bgs_tunnel_shape" basically enables bgs tunnel effect, if the oxp is installed. More info http://wiki.alioth.net/index.php/BGS2_Doc
I'm not going to add a ship library entry, because the origin of the model seems to be in front of the dock. That makes the tumbling model in the library look very wrong as it tumbles around the origin.

Am I missing something? Are we done? If so, I'll post my final version to box, if someone wants to grab it and tinker further or something.
Can't seem to get your rather splendid maps to show on my AppleMac.

And any chance of larger copies of them for the new Geography page on the wiki?
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?
User avatar
andrax_iON
Competent
Competent
Posts: 58
Joined: Fri Apr 09, 2021 12:55 am
Location: ζ Crucis

Re: MasterClass: How to OXP (updating SoThisTC)

Post by andrax_iON »

spara wrote: Sat May 08, 2021 12:24 pm
And the final touches.

<snip>

Am I missing something? Are we done?
Tested ok, thnx again spara.

I like the reduced roll rate better (is this 'related' to gravity generation within the station? I couldn't find a ref. on the wiki. If yes, then slightly lower than normal could work, due to high-tech/high-finance context?).

Also re the wiki - I think Sothis/SothisTC is deserving of a listing on the "Oolite Stations" page; happy to help with any work effort required.

(Is the math lesson still available, perhaps as an optional tutorial? I failed the alg&calc exam, so understand if concepts may be over my head.. 8~) )

cheers!
POEE CHAPLIN of the Diocese of Intemperate and Blasphemous Potentates (DIBP)
Hail Eris =><= All Hail, Discordia
I tell you: one must still have chaos in one, to give birth to a dancing star..
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: MasterClass: How to OXP (updating SoThisTC)

Post by spara »

Cholmondely wrote: Sat May 08, 2021 10:08 pm
Can't seem to get your rather splendid maps to show on my AppleMac.

And any chance of larger copies of them for the new Geography page on the wiki?
Wiki already has them in some form somewhere. The original pdf-versions can be found here: https://bb.oolite.space/viewtopic.php?f=2&t=6053
andrax_iON wrote: Sun May 09, 2021 2:55 am
(Is the math lesson still available, perhaps as an optional tutorial? I failed the alg&calc exam, so understand if concepts may be over my head.. 8~) )
:mrgreen: Sorry to hear that you failed your exam. Just keep practicing and you will prevail. Nowadays Youtube has a lot of premium content to help you. On top of your course materials of course.

And now, I'm going to leave this oxp be. More or less. If someone wants to take it over, finetune it, make it their own and publish their vision, go ahead.

There are endless possibilities to take the oxp further. If you can imagine it, you probably can oxp it. For example.

1. Get rid of possible deprecations errors.
2. Merge Sothis and SothisTC, find a way around the more or less missing license of Sothis and publish.
3. Make a custom AI for the station. How would a trade station react to offenders?
4. Create custom defenders for the station. Reskin a model or create your own defense force from scratch.
5. Make a nice story for the station.
6. Create missions to fit the story. Random ones would be really nice.
7. Tweak the market further to better fit the story.
8. Should there be a shipyard? If so, make it happen and tweak it to fit the story.
9. Other oxps. Could there be links to other oxps?

etc. etc.

Happy tweaking.
User avatar
Cholmondely
Archivist
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: MasterClass: How to OXP (updating SoThisTC)

Post by Cholmondely »

spara wrote: Sun May 09, 2021 9:12 am
Cholmondely wrote: Sat May 08, 2021 10:08 pm
Can't seem to get your rather splendid maps to show on my AppleMac.

And any chance of larger copies of them for the new Geography page on the wiki?
Wiki already has them in some form somewhere. The original pdf-versions can be found here: https://bb.oolite.space/viewtopic.php?f=2&t=6053
andrax_iON wrote: Sun May 09, 2021 2:55 am
(Is the math lesson still available, perhaps as an optional tutorial? I failed the alg&calc exam, so understand if concepts may be over my head.. 8~) )
:mrgreen: Sorry to hear that you failed your exam. Just keep practicing and you will prevail. Nowadays Youtube has a lot of premium content to help you. On top of your course materials of course.

And now, I'm going to leave this oxp be. More or less. If someone wants to take it over, finetune it, make it their own and publish their vision, go ahead.

There are endless possibilities to take the oxp further. If you can imagine it, you probably can oxp it. For example.

1. Get rid of possible deprecations errors.
2. Merge Sothis and SothisTC, find a way around the more or less missing license of Sothis and publish.
3. Make a custom AI for the station. How would a trade station react to offenders?
4. Create custom defenders for the station. Reskin a model or create your own defense force from scratch.
5. Make a nice story for the station.
6. Create missions to fit the story. Random ones would be really nice.
7. Tweak the market further to better fit the story.
8. Should there be a shipyard? If so, make it happen and tweak it to fit the story.
9. Other oxps. Could there be links to other oxps?

etc. etc.

Happy tweaking.
Spara: Thank you very much for all this: your time, your effort and sharing your knowledge!

Cholmondeley
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?
User avatar
andrax_iON
Competent
Competent
Posts: 58
Joined: Fri Apr 09, 2021 12:55 am
Location: ζ Crucis

Re: MasterClass: How to OXP (updating SoThisTC)

Post by andrax_iON »

spara wrote: Sun May 09, 2021 9:12 am
Sorry to hear that you failed your exam. Just keep practicing and you will prevail.
Kiitos 8~) That was some 20-odd Oorbits ago now, and I'd been out of school for 20+ more before that; old dog, new (ma)trix?
Cholmondely wrote: Sun May 09, 2021 10:43 am
Spara: Thank you very much for all this: your time, your effort and sharing your knowledge!

Cholmondeley
+1

cheers!
POEE CHAPLIN of the Diocese of Intemperate and Blasphemous Potentates (DIBP)
Hail Eris =><= All Hail, Discordia
I tell you: one must still have chaos in one, to give birth to a dancing star..
User avatar
Cholmondely
Archivist
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: MasterClass: How to OXP (updating SothisTC)

Post by Cholmondely »

spara wrote: Sat May 08, 2021 12:24 pm
And the final touches.
Alas, on my AppleMac,
1) I can't see the SothisTC markets on Market Inquirer when I am outside the station (neither on MFD or at the main orbital station).
2) I can't see the included Traderoute maps when I'm docked.

Are these quibbles also true for Linux/Windows?
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?
User avatar
Cholmondely
Archivist
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: MasterClass: How to OXP (updating SoThisTC)

Post by Cholmondely »

Cholmondely wrote: Sat May 08, 2021 10:08 pm
spara wrote: Sat May 08, 2021 12:24 pm
Am I missing something? Are we done? If so, I'll post my final version to box, if someone wants to grab it and tinker further or something.
Can't seem to get your rather splendid maps to show on my AppleMac.

And any chance of larger copies of them for the new Geography page on the wiki?
The maps issue was a conflict with XenonUI which suppresses them. When phkb publishes his fix, I will put it up on the wiki page. What a superb effect! I doff my hat to you, sir!

The issue of non-registration with Market Inquirer remains. I would rather expect to see the Sothis market details published in the same way that those of Liners are , so that I can read them on the MFD in flight - and am perplexed that they do not show up outside the orbital station itself.
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?
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: MasterClass: How to OXP (updating SoThisTC)

Post by spara »

Cholmondely wrote: Mon Jun 07, 2021 7:12 am
The issue of non-registration with Market Inquirer remains. I would rather expect to see the Sothis market details published in the same way that those of Liners are , so that I can read them on the MFD in flight - and am perplexed that they do not show up outside the orbital station itself.
Make sure you have

Code: Select all

roles = "sothis station inquirer_station";
in shipdata-overrides.plist in SothisTC.

That should be all it takes. At least it works in my installation. Both the station interface at the main station and the MFD. If it does not seem to work, try with a minimum set of OXPs (Sothis, SothisTC and Market Inquirer) to find out if there is a conflict somewhere. Anyhing interesting in the log?
User avatar
Cholmondely
Archivist
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: MasterClass: How to OXP (updating SoThisTC)

Post by Cholmondely »

spara wrote: Mon Jun 07, 2021 10:28 am
Cholmondely wrote: Mon Jun 07, 2021 7:12 am
The issue of non-registration with Market Inquirer remains. I would rather expect to see the Sothis market details published in the same way that those of Liners are , so that I can read them on the MFD in flight - and am perplexed that they do not show up outside the orbital station itself.
Make sure you have

Code: Select all

roles = "sothis station inquirer_station";
in shipdata-overrides.plist in SothisTC.

That should be all it takes. At least it works in my installation. Both the station interface at the main station and the MFD. If it does not seem to work, try with a minimum set of OXPs (Sothis, SothisTC and Market Inquirer) to find out if there is a conflict somewhere. Anyhing interesting in the log?
Thanking you, Sir.
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?
Post Reply