Cabal_Common_Library

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

Moderators: another_commander, winston

User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

A mirror for [EliteWiki] Cabal_Common_Library1.7 is available.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

The next version of Cabal_Common_Library will ship another toy for the inflight overlays - a way of combining a custom colored overlays with a decal map. It can be used to show accessoires like helmets etc.

The image is a rough example (graphics not really done yet), but enough to show the possibility.
Image
User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

Re: Cabal_Common_Library

Post by Rorschachhamster »

Wow! :shock:
I love that! I want to get a picture of my commander, too... :lol:
On further consideration... would it be hard to let you put your own photos into such a tool? A simple template for where the nose/beak/snout and eyes should be etc. :?: :wink: .
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

Rorschachhamster wrote:
Wow! :shock:
I love that! I want to get a picture of my commander, too... :lol:
On further consideration... would it be hard to let you put your own photos into such a tool? A simple template for where the nose/beak/snout and eyes should be etc. :?: :wink: .
It isn't that hard to put together a shader that uses multidecals (or a texture atlas), but its nothing for CCLs inflight overlays, because your own Commanders picture would only make sense on standard GUI screens and HUDs (and you can't display models on standard GUI screens). CCL does the shadered overlays inflight (see Overlays and Colored Overlay) to visualize NPCs and notifications. It can display up to 19 overlays - so I'm trying to keep it simple and fast.

But if you really want your picture onscreen and if your box supports shaders - you can.
Just place your pic (png, 128px x 128px) in the Textures folder and add the following line to any OXPs this.shipWillLaunchFromStation function.

Code: Select all

if(worldScripts.Cabal_Common_Overlay) worldScripts.Cabal_Common_Overlay.ovAdd({cclov_png:"mypicname.png",cclov_type:1,cclov_blend:-1,cclov_id:"MyName"});
To make it look better the picture should be a 32bit texture, with the alpha channel set to zero for 'unused' parts. CCL ships a frame for it (ccl_overlay.png) which can be used as template, but you can use it without as well.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

We are working on a addition for CCL to generate sentences - CCL_PhraseGen. It has matured already up to a point where it can be shown to other authors and if all is well it will be merged with Cabal_Common_Library.

CCL_PhraseGen0.97_public -> https://app.box.com/s/m7zgdpe7tg0492w9ikxi (38.4 KB) - Requires Oolite v1.77+ and Cabal_Common_Library1.7+.
A first attempt on documentation -> [wiki]Cabal_Common_Library_Doc_PhraseGen[/wiki]

The zip contains 2 parts, a OXP part and a additional tool part to be run in Firefox - just start the htm file (it may fail in other browsers) and play around with it. The tools basics should be selfexplaining. The OXP part spawns a testship on launching which uses generated output from CCL_PhraseGen Samples via .commsMessage() to test the inflight usability. You can use the complete thing as is, Oolite ignores the tool parts.

What is possible with it?
The shipped Samples are showing only a fraction of possibilities, names etc. But the next Snoopers version will sometimes generate complete news stories with it, or it can be used to 'create' ship2ship comms or character profiles. Lots of stuff is possible (and the tool itself is fun to play with ...).

So don't be shy - give it a try .-)

Disembodied and Svengali
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16060
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Cabal_Common_Library

Post by Cody »

<chortles> I've never been so insulted! Very cool!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6881
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: Cabal_Common_Library

Post by Disembodied »

Cody wrote:
<chortles> I've never been so insulted! Very cool!
Most of the time, nobody will ever have been so insulted ... it's the Dice Waltz of abuse. :D

(can't get the link to work in the text ...)
(cracked it - it's umlaut-phobic)
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Cabal_Common_Library

Post by Norby »

When I turned on script.javaScript.call and startup.progress in logcontrol.plist then I found the startup of Cabal_Common_OXPStrength.js need about 1.5s, but after a few optimization [EliteWiki] CCL v1.7.1 can start in 0.2s.
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Cabal_Common_Library

Post by Lone_Wolf »

For OxpConfig V3 i will need to introduce many (like 15+) new functions.
They fall in 2 categories :
- general functions that deal with objects/arrays mostly
- functions to allow oxps to interface directly with OxpConfig user-input screens.
This should make writing F4-interfaces easier.

Both would be useful for other oxp authors.

I've talked about it with Svengali , and while they could be added to CCL, he indicated CCL has become to massive already and there may be broken parts since 1.80 .

The oxz-manager makes it easy to have dependencies on multiple oxps, maybe we should look into splitting CCL into lots of new small libraries ?

This would make maintaining them much easier, and allow a purge of unused functions.

If others agree, i could start this by introducing 2 new libraries in separate oxps :
- CCL_common_functions
functions from CCL common that are actively used now could be moved there
The new object/array functions i need for OxpConfig v3 would also be put in that one

CCL_interface_functions
This would hold the functionality needed for OxpConfig configuration screens, making them available to all oxps WITHOUT having to install OXpConfig.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Cabal_Common_Library

Post by Norby »

Lone_Wolf wrote:
splitting CCL
As I thinked on this I started to feel myself within a minefield. For example, purging a function need to check through all existing oxps to be sure that it is not used anywhere. Furthermore regardless of you make an alternate CCL the original is not removable due to probably we can not remove the dependency within all OXPs need CCL.

I think the best if we leave the current CCL as is and you can make another library with similar and new fuctions, then authors can decide if worth to make updates in the existing works and use only the new one in the future.
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Cabal_Common_Library

Post by Lone_Wolf »

Understood, i'll just create new library oxps then and copy functions from CCL 1.7.1 i use in oxps to the new libraries where applicable.

I'd like to keep CCL in the name of those libraries, as i see them as the next step in CCL evolution.
To make the difference between CCL old and new clear, maybe prepending the library name with CCL2 would work ?
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Cabal_Common_Library

Post by Norby »

Lone_Wolf wrote:
CCL2 would work ?
Sounds good as name. In addition you can start the version number at 2.0 and we should keep the future versions of the original CCL below 2.0 to avoid disturbing clashes.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 466
Joined: Mon Sep 17, 2018 5:01 pm

Re: Cabal_Common_Library

Post by Milo »

While I realize CCL is deprecated in favor of Library, and I am not sure if anyone is using the feature, I see that Cabal_Common_SpecialMarkets references some of the commodity aliases that were removed in Oolite 1.82.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: Cabal_Common_Library

Post by dybal »

I got tired of seeing JavaScript exceptions in the Latest.log whenever some OXP would send a comm message using the Cabal Common Library and looked into it...

This is a fix if anybody is mantaining it (deprecated it might be, but it's still used by a lot of OXPs out there...):

Code: Select all

diff -Nurw cabalLibray-1.7.1/Scripts/Cabal_Common_Comms.js cabalLibray-1.7.1.mod/Scripts/Cabal_Common_Comms.js
--- cabalLibray-1.7.1/Scripts/Cabal_Common_Comms.js	2020-06-16 09:55:43.016684150 -0300
+++ cabalLibray-1.7.1.mod/Scripts/Cabal_Common_Comms.js	2020-06-16 09:55:42.468675952 -0300
@@ -42,7 +42,7 @@
 };
 this.commsMessageReceived = function(message,sender)
 {
-	if(sender.scriptInfo && sender.scriptInfo.ccl_secureChannel){
+	if(sender && sender.scriptInfo && sender.scriptInfo.ccl_secureChannel){
 		if(this.patchedIDs.indexOf(sender.entityPersonality)===-1){
 			var channel = sender.scriptInfo.ccl_secureChannel;
 			if(sender.script[channel]) this.checkEQ('EQ_CABAL_COMMON_COMM');
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Cabal_Common_Library

Post by phkb »

Because I'm a nice guy ( :D ), version 1.7.2 has been released which incorporates the two issues highlighted above.

More bugs squashed. Onto the next one...
Post Reply