Syntax:
(objGetSizeInPixels obj)
EDIT: disregard the above, for the moment i thought many objects didn't have mass defined, a quick check proves otherwise.
Syntax:
(objGetMass obj cargo)
Argument list:
obj: the object, a ship or station.
cargo: if true cargo is included
description: returns the mass in kg of the object(or object and it's cargo).
this would be useful for returning the mass of something, it could be used to estimate mass to tow, price to hire, amount of ships needed to loot it, combat role, how much to accelerate it(tractor, booster), etc.
New functions
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
(sorry to be offtopic)
but any of that info can be storing in a static variable for space objects or even a event if it changes
but any of that info can be storing in a static variable for space objects or even a event if it changes
Crying is not a proper retort!
I am trying to find a way to get a vector that starts at one point (a ship) and goes towards another point (another ship). However, this is very hard to calculate with the functions available now.
It appears that, since vectors can be added, it is a form of x and y coordinates are used in the game. If I want to find the direction from one point to another, an easy way to do that is to take the x and y from the first object and subtract them from the x and y of the second, and then add the result. Thus
(getVectorX vector)
vector: the vector you want to get the X coordinate for
(getVectorY vector)
vector: the vector you want to get the Y coordinate for
If I wish to have a vector of a certain length, then I would also want to be able to get the magnitude or direction of the vector so I can create a new vector with the desired magnitude.
(getVectorMagnitude vector)
vector: the vector you want to get the magnitude of
(getVectorAngle vector)
vector: the vector you want to get the angle of
Of course, it would be even easier if I could just create a vector from one point to another.
(sysVectorFromPosition vector vector)
vector: the position you want to create a vector from
vector: the position you want to create a vector to
It appears that, since vectors can be added, it is a form of x and y coordinates are used in the game. If I want to find the direction from one point to another, an easy way to do that is to take the x and y from the first object and subtract them from the x and y of the second, and then add the result. Thus
(getVectorX vector)
vector: the vector you want to get the X coordinate for
(getVectorY vector)
vector: the vector you want to get the Y coordinate for
If I wish to have a vector of a certain length, then I would also want to be able to get the magnitude or direction of the vector so I can create a new vector with the desired magnitude.
(getVectorMagnitude vector)
vector: the vector you want to get the magnitude of
(getVectorAngle vector)
vector: the vector you want to get the angle of
Of course, it would be even easier if I could just create a vector from one point to another.
(sysVectorFromPosition vector vector)
vector: the position you want to create a vector from
vector: the position you want to create a vector to
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
syntax:
(scrSetBarText screen string)
Argument list:
screen: The screen on that you want to change the text.
string: What you want to change the text to.
Changes what is currently Credits and Cargo space. This is needed because when modding you sometimes want to show something other than credits up there (like rins or an arbitrary currency) or if you are making changes to the cargo system that information would be misleading. (I am currently making a trade mod)
(scrSetBarText screen string)
Argument list:
screen: The screen on that you want to change the text.
string: What you want to change the text to.
Changes what is currently Credits and Cargo space. This is needed because when modding you sometimes want to show something other than credits up there (like rins or an arbitrary currency) or if you are making changes to the cargo system that information would be misleading. (I am currently making a trade mod)
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
syntax:
(scrSetListPosition screen number)
arguments:
screen: the screen with the list of stuff (items or just custom picker)
number: the position that you want to set the cursor at
why I want this is so I can change what the list would be then go to the screen you are at so you can fake adding changing and removing list elements on the fly
(scrSetListPosition screen number)
arguments:
screen: the screen with the list of stuff (items or just custom picker)
number: the position that you want to set the cursor at
why I want this is so I can change what the list would be then go to the screen you are at so you can fake adding changing and removing list elements on the fly
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
I would like to request a modification to a set of functions:
shpRechargeItem
shpRemoveDevice
shpInstallDevice
All of this functions accept itemListCursors and ItemStruct
shpDamageItem
shpEnhanceItem
shpInstallArmor
shpRepairItem
All of this functions accepts only itemListCursors
Can you make all of them accept itemListCursors and ItemStruct, please ?
shpRechargeItem
shpRemoveDevice
shpInstallDevice
All of this functions accept itemListCursors and ItemStruct
shpDamageItem
shpEnhanceItem
shpInstallArmor
shpRepairItem
All of this functions accepts only itemListCursors
Can you make all of them accept itemListCursors and ItemStruct, please ?

creation of unknown items:
(crt-unknown number) create a random number of different unknown items
(crt-A-unknown unid number) create a specified unknown item
in general, it should be possible to create unknown items ...
encounters
access to the encounters of stations
(setencounterofstation list) something like that
I once experimented with the encounters and noticed that I would have to revise all stations to change the spawning system...
structuralhitpoints
(getstructrualhp spaceobject) returns a number
there must be a hidden number that defines why some wrecks are harder to destroy than others
could also be shown in the xml files ...
(crt-unknown number) create a random number of different unknown items
(crt-A-unknown unid number) create a specified unknown item
in general, it should be possible to create unknown items ...
encounters
access to the encounters of stations
(setencounterofstation list) something like that
I once experimented with the encounters and noticed that I would have to revise all stations to change the spawning system...
structuralhitpoints
(getstructrualhp spaceobject) returns a number
there must be a hidden number that defines why some wrecks are harder to destroy than others
could also be shown in the xml files ...
regards
Sheltem
What do you think about the endless stream of spawns ?
What about modding wandering spawns which dont attack the player directly ?
Sheltem
What do you think about the endless stream of spawns ?
What about modding wandering spawns which dont attack the player directly ?
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
I do some things alot in code and it would be nice if they could be done faster (as in not in script as that slows it down)
syntax:
(lstGetFirstIndex list element)
arguments:
list: The list that you are searching through.
element: The element you are searching for.
returns:
What index the element first appears or nil if not found.
syntax:
(multiply number number^1)
returns:
All the numbers multiplied together.
syntax:
(add number number^1)
returns:
All the numbers added together.
syntax:
(lstGetFirstIndex list element)
arguments:
list: The list that you are searching through.
element: The element you are searching for.
returns:
What index the element first appears or nil if not found.
syntax:
(multiply number number^1)
returns:
All the numbers multiplied together.
syntax:
(add number number^1)
returns:
All the numbers added together.
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
syntax:
(scrRefreshList screen)
arguments:
screen: The screen where you want the list to be refreshed.
description:
Makes the List element to be called again replacing the current list.
Why I want this. I would like to change what is on the custom picker screen dynamically (make it shorter or longer or different descriptions) in code at will).
(scrRefreshList screen)
arguments:
screen: The screen where you want the list to be refreshed.
description:
Makes the List element to be called again replacing the current list.
Why I want this. I would like to change what is on the custom picker screen dynamically (make it shorter or longer or different descriptions) in code at will).
Crying is not a proper retort!
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
I know it's a little late in the day for this.
(sysCreateRandomStation filter vector)
a function to create a random station using similar attribute filter as <RandomStation> in the System tags.
(objEnumTypes filter criteria)
a function to return a list of space objects similar to sysFindObject but from the pool instead of from the current system. Perhaps by filter (as sysFindObject) OR by criteria (as attributes). Or both to refine the search.
(sysFindObject - could this be altered to include everything in the system, including stars?
(sysFindLabel - the markers seem to be limited to use in objMove type functions, unless I am going about it the wrong way there just doesn't seem to be a way to use sysFindObject to detect a <Marker objName>.
(sysFindLocation criteria)
a function to script the equivalent of the <RandomLocation> criteria.
(sysUpdateSystemObject spaceobject)
a function to re-calculate the map and to update the object to add effects from objects that are placed when using script- for instance, spaceColor if a Star object is changed during OnCreate, Orbits if a planet has been changed, and Station support ships if a station is added. Basically a method to allow script to access the parts of creating objects that the system initial creation through the system tag gets to use to make the objects.
(sysCreateTable tableName position)
another idea I had was to access the system structure tables directly- if this could be done, then adding asteroid belts via scripting (and lot's of other things!) could be made available. Position might need to be able to accept the variables that the system tag uses- radius for one.
(How are you using Bode distance?)
(sysGetName node) Is it possible to retrieve a system name remotely?
(sysSetName node) Another item on my wish list.
(sysGetUNID node) or (sysGetSystemType node) to return the system definition being used in order to know what the system will be.
Those remote calls would only be possible if the topology defined them when it was created- does that happen?
(sysCreateRandomStation filter vector)
a function to create a random station using similar attribute filter as <RandomStation> in the System tags.
(objEnumTypes filter criteria)
a function to return a list of space objects similar to sysFindObject but from the pool instead of from the current system. Perhaps by filter (as sysFindObject) OR by criteria (as attributes). Or both to refine the search.
(sysFindObject - could this be altered to include everything in the system, including stars?
(sysFindLabel - the markers seem to be limited to use in objMove type functions, unless I am going about it the wrong way there just doesn't seem to be a way to use sysFindObject to detect a <Marker objName>.
(sysFindLocation criteria)
a function to script the equivalent of the <RandomLocation> criteria.
(sysUpdateSystemObject spaceobject)
a function to re-calculate the map and to update the object to add effects from objects that are placed when using script- for instance, spaceColor if a Star object is changed during OnCreate, Orbits if a planet has been changed, and Station support ships if a station is added. Basically a method to allow script to access the parts of creating objects that the system initial creation through the system tag gets to use to make the objects.
(sysCreateTable tableName position)
another idea I had was to access the system structure tables directly- if this could be done, then adding asteroid belts via scripting (and lot's of other things!) could be made available. Position might need to be able to accept the variables that the system tag uses- radius for one.
(How are you using Bode distance?)
(sysGetName node) Is it possible to retrieve a system name remotely?
(sysSetName node) Another item on my wish list.
(sysGetUNID node) or (sysGetSystemType node) to return the system definition being used in order to know what the system will be.
Those remote calls would only be possible if the topology defined them when it was created- does that happen?