itemListCursor

Freeform discussion about anything related to modding Transcendence.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

What is itemListCursor? Is there a way to simulate it without going through the screens?
There are several functions that use this that I would like to use in code.
Crying is not a proper retort!
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Do you mean the objEnumItems function or something? The only reason to use the itmAtCursor function is when you have a cursor (i.e. on a dockscreen)
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

well I am mostly concerned with equipping armor in code without the dockscreen, there are some others too that use it.

as for objEnumItems you can use objGetItems to do things that does in code (it would be nice to be able to use objEnumItems without the screen though)
Crying is not a proper retort!
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

objEnumItems isn't limited to dockscreens.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

well I mean player interaction. All the examples I have seen require the player to choose.
Crying is not a proper retort!
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

I'm still not clear on what you are trying to accomplish. Could you give an example?
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Code: Select all

(shpInstallArmor gPlayerShip ?? (itmCreate &itBlastPlate; 1))
what do I put instead of ?? to equip the blastplate on the forward armor
and in general how do you do use functions that use itemListCursor without player interaction such as shpEnhanceItem

ps: I found that objEnumItems doesn't really use itemListCursor it is just a simple walk through.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Code: Select all

(shpInstallArmor gPlayerShip ?? (itmCreate &itBlastPlate; 1))
what do I put instead of ?? to equip the blastplate on the forward armor
and in general how do you do use functions that use itemListCursor without player interaction

ps: I found that objEnumItems doesn't really use itemListCursor.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Code: Select all

(shpInstallArmor gPlayerShip ?? (itmCreate &itBlastPlate; 1))
what do I put instead of ?? to equip the blastplate on the forward armor
and in general how do you do use functions that use itemListCursor without player interaction

ps: I found that objEnumItems doesn't really use itemListCursor.
Crying is not a proper retort!
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

ahhh! triple post!
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

It's more like

(shpInstallArmor gPlayerShip (itmCreate &itBlastPlate; 1) (armor segment to replace))
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

sorry about the triple post the board was acting up
Burzmali: that code doesn't work the listcursor is the second argument as seen in the function list and the examples in the xml

hmm is there a way to get the itemListCursor of something you just created?
Crying is not a proper retort!
User avatar
dvlenk6
Militia Captain
Militia Captain
Posts: 519
Joined: Sun Mar 05, 2006 6:56 am
Location: Sanctuary and beyond
Contact:

Code: Select all

(shpInstallArmor gPlayerShip (scrGetItemListCursor gScreen) gArmorSegment)
That is from &dsreplacearmor; dockscreen. It looks to me as if the scrGetItemListCursor is being used to pick an armor slot for the new armor segment to be installed to. I believe that the slots are numbered 1,2,3,4 in the same order they appear when at a repair/replace armor dockscreen, from top to bottom. So you could, I think, replace (scrGetItemListCursor gScreen) with an armor slot number; and put your item create code in the last argument position (Where gArmorSegment is).

Where you trying to make the armor install automatically without any player input?
Or did you just want to be able to install armor without being docked at a station?

The scrGetItemListCursor can work from a usescreen="xxx' call in an item description, like it does for the Longzhu Sphere. It is really a dockscreen, but one you can invoke to access with the 'U' key.
"War is hell."
-William Tecumseh Sherman
http://dvlenk6.blackraven3d.com/transgals.html
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

I am trying to get it to install automatically without any player input.
I have been trying to do what you said but it keeps on saying integer expected on the listcursor part. It never gets to the armor creation part.

Code: Select all

(shpInstallArmor gPlayerShip 1 (itmCreate &itBlastPlate; 1))
Crying is not a proper retort!
User avatar
dvlenk6
Militia Captain
Militia Captain
Posts: 519
Joined: Sun Mar 05, 2006 6:56 am
Location: Sanctuary and beyond
Contact:

Code: Select all

(shpInstallArmor ship itemListCursor armorSegment)
Is the format.
Maybe itemListCursor is the armor that you are trying to install, and armorsegment is the slot number?

Try this:

Code: Select all

(shpInstallArmor gPlayerShip (itmCreate &itBlastPlate; 1) 1)
The second '1' being the armor slot location.
"War is hell."
-William Tecumseh Sherman
http://dvlenk6.blackraven3d.com/transgals.html
Post Reply