I'm working on 0.99 and I'd like to add some new script functions that people have been requesting. Unfortunately, I've lost track of who needs what and why.
Could you please post your requested functions as responses to this message?
Here are the ground rules:
1. Please be very clear in your description of the function. Use the same format that Betelgeuse has been using in his function list. Be as explicit as possible.
2. Please explain the exact circumstance that you need the function for. In particular, describe the desired outcome (not just the mechanics).
3. Your request is more likely to be granted if the following apply:
a. The function is easy to implement.
b. The function fits in with existing functions.
c. The function can be used in many circumstances.
d. You need the function for a mod that you are currently working on.
Thanks!
New functions
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
I don't know as this would be a function, per se, George, but what are the possibilities in getting the <Device> tag to accept <table> entries for equipment? And maybe a way to place a random selection in other areas of the ship equipment- such as in the Armor tag.
My all time standby choice for functions, of course, is:
Name: plySetNewPlayership
Switching the playership in game would be a dream come true for me!
My all time standby choice for functions, of course, is:
Name: plySetNewPlayership
Switching the playership in game would be a dream come true for me!
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
I know. Both of those requests are reasonable and they both will be implemented someday. But not for 0.99--both are scheduled for the post 1.0 timeframe.Periculi wrote:I don't know as this would be a function, per se, George, but what are the possibilities in getting the <Device> tag to accept <table> entries for equipment? And maybe a way to place a random selection in other areas of the ship equipment- such as in the Armor tag.
My all time standby choice for functions, of course, is:
Name: plySetNewPlayership
Switching the playership in game would be a dream come true for me!
Sorry about that.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
cool thread
Syntax:
(objInstallArmor spaceObject itemStruct number)
Argument list:
spaceObject: The object you want to install armor on.
itemStruct: The armor you want to install at numbers location.
number: The number corresponding to what objRepairArmor repairs
Description:
Installs the item struct's armor at the number's location.
Why I want this function is to equip armors in code. This would allow for random variation in armor for stations and ship that is currently not possible from code.
Syntax:
(dbgFileOutput string)
Argument list:
string: The string you want outputted to the log file.
Description:
Outputs the string to a new line of the log file.
Why I want this function is so I can debug without worrying about scrolling in the dbg console and to be able to debug infinite loops and hard crashes.
Syntax:
(bindKey string function)
Argument list:
string: The key you want bound.
function: The function you want run when the key is pressed.
Returns:
True if successful, Nil if not (like there is already a binding to that key)
Description:
Binds the given key to the given function allowing whenever in normal flight when the key is pressed the function is run.
Why I want this function is to allow many things, quick use of items, custom quick keys like quick refuel, extra weapon mounts so you can fire multiple weapons at once, custom gates that allow the coder to verify the network and create new gates from in code.
Syntax:
(plyClearGateHelpText player)
Argument List:
player: The player to stop the gate help text from playing.
Description:
Stops the gate help text.
Syntax:
(subString string number number)
Argument List:
string: The string you want to get a part of.
number: The number you want to start at starting at 0.
number: The number you want to end at.
Returns:
string: A smaller string created from the larger string starting at the first index ending at the second index.
Why I want this function the string manipulation is greatly lacking in Transcendence and much can be done due with eval and more string manipulation.
Syntax:
(strLength string)
Argument List:
string: The string you want to get the length of.
Returns:
number: How long the string is.
Syntax:
(objInstallArmor spaceObject itemStruct number)
Argument list:
spaceObject: The object you want to install armor on.
itemStruct: The armor you want to install at numbers location.
number: The number corresponding to what objRepairArmor repairs
Description:
Installs the item struct's armor at the number's location.
Why I want this function is to equip armors in code. This would allow for random variation in armor for stations and ship that is currently not possible from code.
Syntax:
(dbgFileOutput string)
Argument list:
string: The string you want outputted to the log file.
Description:
Outputs the string to a new line of the log file.
Why I want this function is so I can debug without worrying about scrolling in the dbg console and to be able to debug infinite loops and hard crashes.
Syntax:
(bindKey string function)
Argument list:
string: The key you want bound.
function: The function you want run when the key is pressed.
Returns:
True if successful, Nil if not (like there is already a binding to that key)
Description:
Binds the given key to the given function allowing whenever in normal flight when the key is pressed the function is run.
Why I want this function is to allow many things, quick use of items, custom quick keys like quick refuel, extra weapon mounts so you can fire multiple weapons at once, custom gates that allow the coder to verify the network and create new gates from in code.
Syntax:
(plyClearGateHelpText player)
Argument List:
player: The player to stop the gate help text from playing.
Description:
Stops the gate help text.
Syntax:
(subString string number number)
Argument List:
string: The string you want to get a part of.
number: The number you want to start at starting at 0.
number: The number you want to end at.
Returns:
string: A smaller string created from the larger string starting at the first index ending at the second index.
Why I want this function the string manipulation is greatly lacking in Transcendence and much can be done due with eval and more string manipulation.
Syntax:
(strLength string)
Argument List:
string: The string you want to get the length of.
Returns:
number: How long the string is.
Crying is not a proper retort!
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
Is it possible to implement <ShipClass> to accept <Imagevariants> ?
It will be useful to have various colored ships, or minor graphic variations to ships, or even different animations in ships.
It will be useful to have various colored ships, or minor graphic variations to ships, or even different animations in ships.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
should we also ask for elements that would be useful in this thread too?
if so I would like static data in items and the functions needed to work with them.
if so I would like static data in items and the functions needed to work with them.
Crying is not a proper retort!
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
No, please. I'm only interested in functions right now. Thanks!Betelgeuse wrote:should we also ask for elements that would be useful in this thread too?
if so I would like static data in items and the functions needed to work with them.
Alright... I'd say sysFormatDrivegeorge moromisato wrote:No, please. I'm only interested in functions right now. Thanks!Betelgeuse wrote:should we also ask for elements that would be useful in this thread too?
if so I would like static data in items and the functions needed to work with them.

Neah...how about full access to the Win32 API?

- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
Syntax:
(objGetWMDLevel spaceObject)
Argument list:
spaceObject: The object you want to retrieve the the WMD Level of the main weapon.
Description:
The object retrieve the WMD level of the main weapon of the spaceObject as a number from 0 to 7.
Useful to implement various text messages depending on the situation, very useful if random weaponry will be used throught the game.
Examples:
"Hey, you have a real nutcracker installed on that Sapphire!"
"You are not going to hack an Ares Shipyard armor with that watergun, want to install something better ?"
During missions: "Defend us! That huge destroyer is going to fry our station with that xxxx Cannon !"
As a filtering tool to select ships with powerful weapons for missions (from the random created ships of a station), for example using at the same time the staGetDockedShips function.
"We are going to take our revenge ! Only guys with real weapons can follow me !"
---
Syntax:
(staSetImmutable station True/Nil)
Argument list:
station: The station you want to make immutable or remove the attribute.
Description:
Useful during missions, to set the immutable attribute or remove it when necessary for stations. Think about a station with barriers, they should stay immutable until the mission starts, then you can destroy them and fry the enemy station.
---
Syntax:
(sysPlaysound audiounid)
Argument list:
audiounid: the unid of the soundfile
Description:
Play arbitrary sounds inside code.
Useful for:
working neuros media player
melodramatic music during missions
play sounds when install/remove/build/broke devices
plays sounds during rewards, when gaining a new Domina power or a new rank-level.
(objGetWMDLevel spaceObject)
Argument list:
spaceObject: The object you want to retrieve the the WMD Level of the main weapon.
Description:
The object retrieve the WMD level of the main weapon of the spaceObject as a number from 0 to 7.
Useful to implement various text messages depending on the situation, very useful if random weaponry will be used throught the game.
Examples:
"Hey, you have a real nutcracker installed on that Sapphire!"
"You are not going to hack an Ares Shipyard armor with that watergun, want to install something better ?"
During missions: "Defend us! That huge destroyer is going to fry our station with that xxxx Cannon !"
As a filtering tool to select ships with powerful weapons for missions (from the random created ships of a station), for example using at the same time the staGetDockedShips function.
"We are going to take our revenge ! Only guys with real weapons can follow me !"
---
Syntax:
(staSetImmutable station True/Nil)
Argument list:
station: The station you want to make immutable or remove the attribute.
Description:
Useful during missions, to set the immutable attribute or remove it when necessary for stations. Think about a station with barriers, they should stay immutable until the mission starts, then you can destroy them and fry the enemy station.
---
Syntax:
(sysPlaysound audiounid)
Argument list:
audiounid: the unid of the soundfile
Description:
Play arbitrary sounds inside code.
Useful for:
working neuros media player
melodramatic music during missions
play sounds when install/remove/build/broke devices
plays sounds during rewards, when gaining a new Domina power or a new rank-level.
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
oh! I remember what I was interested in that would qualify as a function or two:
functions to get and set ship data-
Mass, Maneuver, Thrust, Speed would be my first priority.
maybe in the form shpGet* shpSet* (*mass, maneuver, thrust, speed, others)
Max devices could be a big one.
I know it may seem slightly redundant with the existing propulsion upgrades, but it might be very fun to play around with- not necessarily just to exploit in favor of the player (i.e. now have more loot with faster turns!), but to have things happen that changed a ship for the worse and then you have to get it repaired.
More ability to change hard data, or to change 'static' data in game would be grand. Allowing some improvement in maneuvering, on it's own, would be fantastic.
functions to get and set ship data-
Mass, Maneuver, Thrust, Speed would be my first priority.
maybe in the form shpGet* shpSet* (*mass, maneuver, thrust, speed, others)
Max devices could be a big one.
I know it may seem slightly redundant with the existing propulsion upgrades, but it might be very fun to play around with- not necessarily just to exploit in favor of the player (i.e. now have more loot with faster turns!), but to have things happen that changed a ship for the worse and then you have to get it repaired.
More ability to change hard data, or to change 'static' data in game would be grand. Allowing some improvement in maneuvering, on it's own, would be fantastic.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Syntax:
(itmFireEvent itemStruct string)
Argument list:
itemStruct: The item that you want to run an event of.
string: The name of the function you want to run.
Returns:
Whatever the event returns.
Description:
Runs the event on the item named by the string.
Why I would like this is because it fits with the current functions, can make more events for items, and can be used to mimic static data without static data having to be in.
(itmFireEvent itemStruct string)
Argument list:
itemStruct: The item that you want to run an event of.
string: The name of the function you want to run.
Returns:
Whatever the event returns.
Description:
Runs the event on the item named by the string.
Why I would like this is because it fits with the current functions, can make more events for items, and can be used to mimic static data without static data having to be in.
Crying is not a proper retort!
Syntax:
(objLockSovereign spaceObject) -> True/Nil
Argument list:
spaceObject: The object you want to lock the sovereign that's been set.
Description:
Locks a set sovereign so it cannot be changed unless a given condition is met.
Why I want this function is for my mod "Communications Array" and any variations of it. This would negate anyone from switching sovereigns from certain ships that you "George" could set that you wouldn't want switched (such as CSC's, Iocrym Command ship, station turrets...etc.)
Edit: Perhaps an (objIsLockedSovereign spaceObject) could come in handy as well, such as for example;
(switch (if (objIsLockedSovereign spaceObject) ...
Could be used for modders to "Nil and plyMessage" whenever any ship's sovereign has been locked in your main code.
(objLockSovereign spaceObject) -> True/Nil
Argument list:
spaceObject: The object you want to lock the sovereign that's been set.
Description:
Locks a set sovereign so it cannot be changed unless a given condition is met.
Why I want this function is for my mod "Communications Array" and any variations of it. This would negate anyone from switching sovereigns from certain ships that you "George" could set that you wouldn't want switched (such as CSC's, Iocrym Command ship, station turrets...etc.)
Edit: Perhaps an (objIsLockedSovereign spaceObject) could come in handy as well, such as for example;
(switch (if (objIsLockedSovereign spaceObject) ...
Could be used for modders to "Nil and plyMessage" whenever any ship's sovereign has been locked in your main code.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Not to rain on your parade but this can be done with a static data and a global data for that ship type. (a static initial value (only need to put the true ones), and a global isSovereiegnLocked (I would make it something other than true and Nil to tell when to use the static value))FAD wrote:Syntax:
(objLockSovereign spaceObject) -> True/Nil
Just wrap some helper functions around them and you have those exact functions.
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
syntax:
(shpSetDirection ship number)
argument list:
ship: The ship you want to turn.
number: Where you want the ship to face.
Why this would be cool, I would like a weapon that when fired turned your ship randomly not just your standard recoil back. Another use for it would be having cinematics.
syntax:
(plySetControl player conditional)
argument list:
player: The player.
conditional: True if the player can control Nil if you want to take it away.
description:
Makes it so the player can not control its ship (or can if true) and can not go into the ship (pausing and esc menu are fine)
Why this would be cool, you can make cinematics in game if you could do this. This would help a ton in getting the player immersed in the game.
(shpSetDirection ship number)
argument list:
ship: The ship you want to turn.
number: Where you want the ship to face.
Why this would be cool, I would like a weapon that when fired turned your ship randomly not just your standard recoil back. Another use for it would be having cinematics.
syntax:
(plySetControl player conditional)
argument list:
player: The player.
conditional: True if the player can control Nil if you want to take it away.
description:
Makes it so the player can not control its ship (or can if true) and can not go into the ship (pausing and esc menu are fine)
Why this would be cool, you can make cinematics in game if you could do this. This would help a ton in getting the player immersed in the game.
Crying is not a proper retort!