Search found 442 matches

by NMS
Mon Jul 09, 2018 7:12 am
Forum: The Drawing Board
Topic: Ship scanning ROM
Replies: 12
Views: 700

Re: Ship scanning ROM

I did some tests. Several points, in no particular order: - The exception is not entirely a problem with your code, but is caused by destroying a world-scale station. However, it is successfully destroyed. - Using a star-scale station instead also prevents it from appearing on LRS and avoids the exc...
by NMS
Sun Jul 08, 2018 10:57 am
Forum: Shipyards
Topic: various questions and stuff
Replies: 21
Views: 974

Re: various questions and stuff

I'll request that 'setExplored thingy' since it should be fairly easy. Thanks. https://github.com/kronosaur/Mammoth/pull/57/commits/66857881e1f9ae6297706799802e38231d2c7351 And I really wish that containers were still a hollow green square on the LRS. It makes sense and really helps in gameplay if ...
by NMS
Wed Jul 04, 2018 8:12 am
Forum: Shipyards
Topic: various questions and stuff
Replies: 21
Views: 974

Re: various questions and stuff

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 cou...
by NMS
Sat Jun 23, 2018 10:15 am
Forum: Shipyards
Topic: various questions and stuff
Replies: 21
Views: 974

Re: various questions and stuff

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 'exclu...
by NMS
Sat Jun 23, 2018 9:57 am
Forum: Shipyards
Topic: recurring code query
Replies: 4
Views: 102

Re: recurring code query

You're welcome.
relanat wrote:
Mon Jun 18, 2018 3:43 am
Couple of questions:
When the 'for' function is cycling through the values is each of these cycles what is called an 'iteration'?
And I assume that 'i' can only be a numerical value. Not alpha-numeric? It that correct?
Yes to both.
by NMS
Tue Jun 12, 2018 4:14 am
Forum: Shipyards
Topic: recurring code query
Replies: 4
Views: 102

Re: recurring code query

You're on the right track. You could do something like this: (block (desc (currList (typFind '$))) (for i 0 (- (count currList) 1) (setq desc (cat desc (typGetProperty (@ currList i) 'name) ": " (fmtNumber 'integer (plyGetCredits gPlayer (@ currList i))) "\n")) ) (scrSetDesc gScreen desc) ) But the ...
by NMS
Wed May 30, 2018 11:47 pm
Forum: The Drawing Board
Topic: Ship scanning ROM
Replies: 12
Views: 700

Re: Ship scanning ROM

The ' \n ' s need to be in quotes. If you still get the '= expected' error, it means there's an XML element that isn't correctly formatted. Are you trying to put the code to generate the text inside an XML attribute? That's tricky to format, especially when strings are involved, and should usually b...
by NMS
Wed May 30, 2018 7:04 am
Forum: Shipyards
Topic: various questions and stuff
Replies: 21
Views: 974

Re: various questions and stuff

Code: Select all

(map (sysGlobals) 'excludeNil v (if (isPrimitive (eval v)) Nil v))
Or if you also want to exclude functions:

Code: Select all

(map (sysGlobals) 'excludeNil v (if (or (isPrimitive (eval v)) (isFunction (eval v))) Nil v))
by NMS
Sun May 13, 2018 6:07 am
Forum: Shipyards
Topic: Basic ship modding tutorial?
Replies: 4
Views: 220

Re: Basic ship modding tutorial?

Yes, welcome! Entity declarations are used to convert human-readable text strings (entities) into the 32-bit integers used by the game (UNIDs), which are typically written as 8-digit hexadecimals. If you're planning to keep making mods, you should post in this thread to request a UNID range for your...
by NMS
Thu May 03, 2018 11:05 am
Forum: Shipyards
Topic: various questions and stuff
Replies: 21
Views: 974

Re: various questions and stuff

Testing shows the proper usage is "t +isEnemyOf:[sovereignUNID];".
by NMS
Tue Apr 24, 2018 1:09 am
Forum: Announcements
Topic: 1.8 Beta 1 is ready!
Replies: 75
Views: 27840

Re: 1.8 Beta 1 is ready!

Ordered a laser collimater @ CTS it arrived and was loaded into the hold, except it wasn't actually loaded. Apparently disappeared into thin air. So if you select the Order action again, do you get the "Sorry, only one order per customer..." message? Looking at the code, I don't see how that would ...
by NMS
Fri Apr 13, 2018 1:56 am
Forum: Shipyards
Topic: customPicker list counting query
Replies: 2
Views: 242

Re: customPicker list counting query

(enum (unvFindObject (cat "t +unid:" theUnid ";")) theEntry ([email protected] result (@ theEntry 2) (lnkAppend (@ result (@ theEntry 2)) theEntry)) ) Assuming result is Nil to start, this should set it to a struct where each key is a node and the corresponding value is a list of the entries returned by unvFind...
by NMS
Mon Apr 09, 2018 10:38 am
Forum: Ideas & Suggestions
Topic: mission feedback
Replies: 4
Views: 775

Re: mission feedback

These seem to be related to msKorolovAtCharon in KSMissionC01.xml. The ship classes are Ronin A and B and EI200. The orders are guard and dock. So the first set of errors are probably from the OnGlobalSystemStarted event, but I don't see why it wouldn't work. The other error is in the OnTimerAttack2...
by NMS
Thu Apr 05, 2018 7:07 am
Forum: Commonwealth
Topic: The Uzun Targeting Scanner is Real!
Replies: 2
Views: 354

Re: The Uzun Targeting Scanner is Real!

In all seriousness, I did manage to implement the Uzun. But George didn't want to pull it into Corporate Command because it's really hacky and complicated and he wants to do it by allowing tracking to be an enhancement, which would be useful for other purposes and break any saves using my version. F...
by NMS
Sat Mar 31, 2018 4:43 am
Forum: Modding Reference
Topic: Function List — 1.8b1 (API 40)
Replies: 5
Views: 671

Re: Function List — 1.8b1 (API 40)

Looks like you're using a version of the script that doubles % characters to escape them, and it's no longer necessary. I think this is my newest version, which excludes aliases of primitives, finally fixing the last out-of-place entry, and adds a list of lambda functions.