Cabal_Common_Library

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

Moderators: winston, another_commander

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

Re: Cabal_Common_Library

Post by Svengali »

Cabal_Common_Library1.1 is online.

Changes:

Cabal_Common_Functions
* .entGetScreenModel() marked as deprecated. Oolite v1.75 provides mission.displayModel.
* .pseudoRand() changed to Oolites v1.75 system.scrambledPseudoRandomNumber(n).
* .strScreenString() fixed.
* .strToWidth() behaviour changed to Oolites v1.75 new defaultFont.measureString(string).

Cabal_Common_Keyboard
* .start() changed. New optional parameters (scpic, scovl and scmod) added.
* .keyboard.model changed.
* .keyboard.modelSC added.
* .keyboard.pic changed.
* .keyboard.overlay added.

* Documentation updated
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: Cabal_Common_Library

Post by Okti »

Good work Svengali,

I will try to find out where it can be usefull.

As an example I always save my games as a number descending with every save. So I end up Commander 988889 in the mission screens rather than Commander Okti. If I can set my commander name rather than my save file name, this will be perfect. With 1.75 we have an event before saving a commander, I am not sure we have one after loading though?
My OXP's
And Latest Mission Coyote's Run
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

Okti wrote:
As an example I always save my games as a number descending with every save. So I end up Commander 988889 in the mission screens rather than Commander Okti. If I can set my commander name rather than my save file name, this will be perfect. With 1.75 we have an event before saving a commander, I am not sure we have one after loading though?
Thanks Okti, but I can't follow you here.

Cabal_Common provides only some functions that are not that easy to code for JS-beginners, but does not change OXPs and native objects. Stripping a string in your own OXPs only needs a .substr(), .substring() or via Regexp

Code: Select all

var test = player.name;
var restA = test.replace(/[^a-zA-Z]/g,"");
var restB = test.substr(0,5);
log(this.name,"test: "+test+" and restA: "+restA+" and restB: "+restB);
And after loading we have .startUp() and usually this is enough. A special case is BGS - it has to stop the looped sound before the player loads a new savedgame. Otherwise it would still play and the script couldn't do anything anymore.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

v1.2 is online.

Changes:
- Comms for missions (shipScript and worldScripts).
- Documentation updated.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

Cabal_Common_Library1.3 is online.

Changes:
- new method nBitsUsed()
- new method strDateFromMinutes() - Author: Commander McLane
- Documentation now online -> http://wiki.alioth.net/index.php/Category:OXPDoc

Special thanks to Commander McLane.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Cabal_Common_Library

Post by Commander McLane »

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

Re: Cabal_Common_Library

Post by Svengali »

Cabal_Common_Library1.4 is online.

Changes:
- Cabal_Common_Briefing.js - a set of tools for mission briefings.

A short demo is available too -> http://www.box.net/shared/v6ldutgl3l (331.1 KB)

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

Re: Cabal_Common_Library

Post by Svengali »

Cabal_Common_Library1.4.1 is online.

Changes:
- Briefing Demo simulates now laserfire and exhaust (both need shaders).
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

Cabal_Common_Library1.4.3 is online (he, v1.4.2 was only one day old)

Changes:
- new method mapCoordsDirection() - Author Eric Walch
- new method strNLZ()
- doc updated

Special thanks to Eric Walch .-)
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: Cabal_Common_Library

Post by DaddyHoggy »

Well done both!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
m4r35n357
---- E L I T E ----
---- E L I T E ----
Posts: 296
Joined: Wed Jan 19, 2011 4:00 pm

Re: Cabal_Common_Library

Post by m4r35n357 »

Has anyone given any thought to making this lib part of the core game? It would encourage its use, and be less of an imposition on users to install it themselves.
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Cabal_Common_Library

Post by Zireael »

m4r35n357 wrote:
Has anyone given any thought to making this lib part of the core game? It would encourage its use, and be less of an imposition on users to install it themselves.
Seconded.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

m4r35n357 wrote:
Has anyone given any thought to making this lib part of the core game? It would encourage its use, and be less of an imposition on users to install it themselves.
Personally I think CCL is strictly OXP related and Oolite itself doesn't need it. Additionally the methods are in some cases not flexible/fast enough for a 'official' lib and would need a overhaul to qualify for a Oolite lib. And shifting the work from OXPers to the devs is maybe another point to leave it as it is. What I really would like to see is a OXP-Manager, probably a 3rd party app, which updates/enables/disables OXPs based on the infos in Info.plist, requires.plist, RSS or whatever.

btw: Yesterday I've spent some time with Cabal_Common_Briefing to make the fcbSetBinding() working as intended. The next step will be to think about other ways of bindings, but I'm not that familiar with the Math behind it, so it may take some time .-)
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

Cabal_Common_Library1.4.4 is online.

Changes:
- Briefing - new getOri
- Briefing - new getPos
- Briefing - new prepareBindings
- Briefing - new prepareOrientations
- Briefing - new preparePositions
- Briefing - new prepareProps
- Cabal_Common - new strNLZ()
- Cabal_Common - new arrShuffle()

Additionally this version ships a testversion of Cabal_Common_OXPStrength.js.
It is deactivated (this.testFeatures = false;), but you can change this if you want to test it.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Cabal_Common_Library

Post by Svengali »

Cabal_Common_Library1.4.5 is online.

Changes:
- new Cabal_Common_Music, a helper for event driven mission music.
- new doc for Cabal_Common_Music.

Cabal_Common_Strength (still WIP preview for OXPers):
- added GJump for galactic jumps.
- added binary search for excluded entities.
- further tweaks on the suspend mechanism.
Post Reply