Collection of modding questions and answers

Freeform discussion about anything related to modding Transcendence.
User avatar
Supardi88
Anarchist
Anarchist
Posts: 6
Joined: Fri Oct 12, 2007 12:16 am
Location: Detroit, MI
Contact:

[tag]
F I G H T T H E P O W E R
e_____e
Miner
Miner
Posts: 33
Joined: Sun Sep 30, 2007 6:40 pm

You missed something.

(objSetSovereign obj sovereignID)
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

can I get a list of various list functions? I didn't see them in the main post.
I see things like item and count but would like to see them all and have simple explanations.

There are also some functions missing from the list like apply and eval and most likely others.
Crying is not a proper retort!
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

wow. I'm going to have to mess around with this.
Image
Image
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

What is the difference between objGetData and objGetGlobalData?

Looking at PointJuno and Antarctica code, I just can't figure out why some variables are set by objSetData and some others by objSetGlobalData. They both seem to be saved in the object so their lifetime spans across game sessions (save & reload).

I thought maybe 'Global' means it's shared between all objects of the same type? But there is only one CSC Antarctica, so what use would that be?

Oh, and what about objGetStaticData? What attributes can that command retrieve (there is no corresponding objSetStaticData...)
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

You are correct on the globaldata vs data. As the xml evolved over time if you look enough you will see many things that do the same thing but in different way due to new functions being added.

StaticData is a great thing. It is basically custom data from the xml. (and thats why you can't change it) Hopefully it will be added for items soon because it will help alot with some mods.
Crying is not a proper retort!
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Betelgeuse wrote:StaticData is a great thing. It is basically custom data from the xml. (and thats why you can't change it) Hopefully it will be added for items soon because it will help alot with some mods.
Ahh, so if I add some random attribute to a ship class, I can retrieve it that way. Nice.

BTW, for items, can't you do this in the meantime?
george moromisato wrote:I haven't actually tried this, but after looking at the code, you should be able to do this:

data="(1 2 3)"

and get back a list with the numbers 1, 2, and 3. In other words, you can enter normal script syntax in the data field and get it back with itmGetTypeData.

Remember that this data is associated with the type, not the instance (in other words, all items of that type will have the same data).
Just put whatever you need in the data attribute and then retrieve it with
(item (itmGetTypeData obj) n) where n=0,1,2,3... etc.
Post Reply