Search found 437 matches

by NMS
Tue Jun 12, 2018 4:14 am
Forum: Shipyards
Topic: recurring code query
Replies: 2
Views: 31

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: 9
Views: 489

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: 15
Views: 642

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: 173

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: 15
Views: 642

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: 26663

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: 200

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: 697

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: 298

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: 600

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.
by NMS
Tue Mar 27, 2018 5:59 am
Forum: Shipyards
Topic: various questions and stuff
Replies: 15
Views: 642

Re: various questions and stuff

relanat wrote:
Mon Mar 26, 2018 11:50 am
In the GAME LIFECYCLE section of digdug's events docs it says several events are "called for all design types".
eg <OnGlobalTopologyCreated> is called for all design types.
How does a design type differ from any other type?
I think "type" and "design type" mean the same thing in this context.
by NMS
Sat Mar 24, 2018 9:23 pm
Forum: Shipyards
Topic: various questions and stuff
Replies: 15
Views: 642

Re: various questions and stuff

The level 6 Centurion playership which has been added in 1.8b1 for ship broker screens is level 6 but I can't see where this is set. Is it auto-calculated by the game if no level is set in code? If not specified, it uses the highest level installed equipment. With github and pull requests, etc, how...
by NMS
Sat Mar 24, 2018 8:38 pm
Forum: Announcements
Topic: 1.8 Beta 1 is ready!
Replies: 75
Views: 26663

Re: 1.8 Beta 1 is ready!

I'll submit a pull request and Ministry ticket.

Edit: Nevermind, George has already got it in his version.
by NMS
Thu Mar 22, 2018 4:38 am
Forum: The Drawing Board
Topic: Derakon plays around with ideas
Replies: 20
Views: 1011

Re: Derakon plays around with ideas

If there's no code in the block after the local variable list, it evaluates to Nil, which in this event tells the game to fire the normal shot.
by NMS
Wed Mar 21, 2018 7:55 am
Forum: The Drawing Board
Topic: The Final Strike
Replies: 55
Views: 6295

Re: The Final Strike

Although the first 16 or so UNIDs in TheFinalStrike.xml have 8 digits after the '0x' as is usual, after that they all have 9 digits. eg, dsAquilaShipInterior is 0xDE1100801. Doesn't appear to affect anything though. A 32 bit int is equivalent to 8 hexadecimal digits, so I think all but the last 8 w...