Cabal_Common_Library
Moderators: winston, another_commander
Cabal_Common_Library
A while ago there was a discussion about functions libraries, but JS was new for nearly all of us. He - the situation has changed a little bit and OXPers are doing cool things in all kinds of flavours and we thought it's time... The Cabal_Common_Library is a collection of helpers and snippets and a documentation for OXP-Developers is available too.
A special thanks to Micha - your input and help was absolutely great and has improved it so much.
WIKI page - Cabal_Common_Library
Authors: Cmd.Cheyd, PhantorGorth and Svengali
Last edited by Svengali on Fri Feb 18, 2011 8:13 pm, edited 3 times in total.
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
- Commander McLane
- ---- 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
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
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
- Okti
- ---- 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
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?
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?
Re: Cabal_Common_Library
Thanks Okti, but I can't follow you here.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?
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);
Re: Cabal_Common_Library
v1.2 is online.
Changes:
- Comms for missions (shipScript and worldScripts).
- Documentation updated.
Changes:
- Comms for missions (shipScript and worldScripts).
- Documentation updated.
Re: Cabal_Common_Library
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.
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.
- Commander McLane
- ---- 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
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.
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.
Re: Cabal_Common_Library
Cabal_Common_Library1.4.1 is online.
Changes:
- Briefing Demo simulates now laserfire and exhaust (both need shaders).
Changes:
- Briefing Demo simulates now laserfire and exhaust (both need shaders).
Re: Cabal_Common_Library
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 .-)
Changes:
- new method mapCoordsDirection() - Author Eric Walch
- new method strNLZ()
- doc updated
Special thanks to Eric Walch .-)
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Re: Cabal_Common_Library
Well done both!
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.