various questions and stuff

Freeform discussion about anything related to modding Transcendence.
relanat
Militia Captain
Militia Captain
Posts: 546
Joined: Tue Nov 05, 2013 9:56 am

Thu Jun 14, 2018 1:56 am

Is there a way of determining with code if an object is highlighted? As in 'setShowAsDestination'ed with the green or red circles showing around the object.

NMS
Militia Commander
Militia Commander
Posts: 442
Joined: Tue Mar 05, 2013 8:26 am

Sat Jun 23, 2018 10:15 am

relanat wrote:
Mon Jun 04, 2018 2:29 am
I commented out the Exclude nil code in AP's example and it works just as I needed. Those pesky little variables pop up everywhere in my code. But not for long!
Ah, good. AP's addition of showing the values is nice, but you probably don't want to exclude the variables whose value is Nil. The 'excludeNil in my version was to strip the Nils from the list that resulted from the (if) returning Nil when the condition is met.
relanat wrote:
Thu Jun 14, 2018 1:56 am
Is there a way of determining with code if an object is highlighted? As in 'setShowAsDestination'ed with the green or red circles showing around the object.
Apparently not. You'll have to keep track of them some other way. Probably add their IDs to a list stored as data on a type when you call objSetShowAsDestination, then remove them when you call objClearShowAsDestination. If this won't work and you really need the feature, you could open a ticket.

relanat
Militia Captain
Militia Captain
Posts: 546
Joined: Tue Nov 05, 2013 9:56 am

Wed Jul 04, 2018 1:12 am

Thanks. The highlighting stuff isn't critical, just easier. Its only for 'modding' mods which highlight "Find Objects". I'm optionally highlighting all objects of a type and then clearing the highlights by 'enum'ing all objects in a system on system exit. Not ideal but good enough. Eventually I'll store the station IDs as they are highlighted but it has a low priority.

How does "the greying out of shipwrecks after the playership has docked with them" work? Is there a way to make this happen with code?
As in you destroy a ship and it appears as a hollow green square on the LRS. But then will appear as a greyed-out square on the LRS after you dock the playership with it.
It would be very handy if this could happen when an auton docks with the wreck to loot it instead of needing the playership to do it.

NMS
Militia Commander
Militia Commander
Posts: 442
Joined: Tue Mar 05, 2013 8:26 am

Wed Jul 04, 2018 8:12 am

There is not currently a way to interact with this in TLisp. When the player docks with something, the SetExplored() function is called and sets m_fExplored to true. It's only used for determining the color of wrecks. It seems like it would be fairly simple to add this as an object property that could be checked and set.

I've been considering trying to make some other SRS improvements. See this ticket and the first two related ones (Archcannon implemented the third, but George didn't like it). It's also worth considering if stations should change color when looted and if the colors should depend on whether there were items left when the player undocked.

relanat
Militia Captain
Militia Captain
Posts: 546
Joined: Tue Nov 05, 2013 9:56 am

Sat Jul 07, 2018 1:49 am

I'll request that 'setExplored thingy' since it should be fairly easy. Thanks.
And I really wish that containers were still a hollow green square on the LRS. It makes sense and really helps in gameplay if objects that you want to loot all appear the same and all change color after looting/docking. Your idea of having abandoned stations change color after looting is a good one. As is the different sizes of icons; a Cryson Magister (sp?) would probably returns a larger scanning signal than a Hornet!
The changing of the nav beacons to a solid green dot from the previously confusing hollow square was excellent.

And that gives me an idea for a mod that leaves a marker if you want to return and loot more gear later. I've already tried setting wrecks to 'don't let NPCs or Salvagers loot them' but it didn't work very well.


Is there a way of filtering for weapons that fire in dual configuration? Multishot looked good but returns TK10, IM90, etc which fire from a single point. Looking to set weapon slots that fire dual weapons from a point on the ship where it doesn't look really odd!

'typGetDataField' and 'itmGetProperty' both return the same thing for 'configuration on dual weapons but it is a hideous string of numbers which I can't decipher or work out how to use.

NMS
Militia Commander
Militia Commander
Posts: 442
Joined: Tue Mar 05, 2013 8:26 am

Sun Jul 08, 2018 10:57 am

relanat wrote:
Sat Jul 07, 2018 1:49 am
I'll request that 'setExplored thingy' since it should be fairly easy. Thanks.
https://github.com/kronosaur/Mammoth/pu ... 231d2c7351

relanat wrote:
Sat Jul 07, 2018 1:49 am
And I really wish that containers were still a hollow green square on the LRS. It makes sense and really helps in gameplay if objects that you want to loot all appear the same and all change color after looting/docking. Your idea of having abandoned stations change color after looting is a good one. As is the different sizes of icons; a Cryson Magister (sp?) would probably returns a larger scanning signal than a Hornet!
The changing of the nav beacons to a solid green dot from the previously confusing hollow square was excellent.
Agreed, but unfortunately they're the same change, and separating various containers from other small stations is a little tricky. It would be relatively simple to check for an attribute in the attributes list, but it seems like these are generally not supposed to have effects on the engine. So it would be better to add an XML attribute, but this is a bit more complicated. I'll probably try to do it soon though.

relanat wrote:
Sat Jul 07, 2018 1:49 am
And that gives me an idea for a mod that leaves a marker if you want to return and loot more gear later. I've already tried setting wrecks to 'don't let NPCs or Salvagers loot them' but it didn't work very well.
I'm not sure how you'd do that other than making them radioactive.

relanat wrote:
Sat Jul 07, 2018 1:49 am
Is there a way of filtering for weapons that fire in dual configuration? Multishot looked good but returns TK10, IM90, etc which fire from a single point. Looking to set weapon slots that fire dual weapons from a point on the ship where it doesn't look really odd!

'typGetDataField' and 'itmGetProperty' both return the same thing for 'configuration on dual weapons but it is a hideous string of numbers which I can't decipher or work out how to use.
Yes, I want to fix this too. Something like 'dualConfiguration (dual or alternating) or 'multiOrigin (also including any other configuration where the shots don't all come from the same point) would be useful. Also see http://ministry.kronosaur.com/record.hexm?id=77653.

relanat
Militia Captain
Militia Captain
Posts: 546
Joined: Tue Nov 05, 2013 9:56 am

Tue Jul 10, 2018 1:27 pm

Wow. Thanks for the Mammoth - explored work. That's excellent.

RE looting; I'm pretty hazy on the details, it was a couple of version ago, but obj data is added to wrecks after they have been looted, something like '0000c100_marked', to stop NPCs and, I think, salvagers from relooting them. System traffic/ship controller stuff or similar.
I was adding this data but if the other ships had already been ordered to loot the wrecks before this was added they ignored it. I figured it needed either an event or a change in ship orders to prevent this and I still struggle with those. One day!

Post Reply