Search found 515 matches

by NMS
Tue May 07, 2019 12:18 pm
Forum: Shipyards
Topic: Inconsistency in UnvGetElapsedGameTime
Replies: 3
Views: 138

Re: Inconsistency in UnvGetElapsedGameTime

Clever. There are no discontinuities in the future, so that will be accurate. I don't think fmtNumber currently handles time, but I was saying it could be added since a lot of the necessary code already exists for unvGetElapsedGameTime.
by NMS
Sat May 04, 2019 8:58 am
Forum: Shipyards
Topic: Inconsistency in UnvGetElapsedGameTime
Replies: 3
Views: 138

Re: Inconsistency in UnvGetElapsedGameTime

When the player gates, a random amount of time is added to the elapsed game time, and it keeps track of what ticks these "discontinuities" happened at.

If you need a function to convert ticks to human-readable game time, that could be added to fmtNumber pretty easily.
by NMS
Sat Apr 27, 2019 2:03 am
Forum: Shipyards
Topic: searching multiple levels of items help please
Replies: 3
Views: 89

Re: searching multiple levels of items help please

I'd do it like this: (block (resultList resultStruct) (enum '(p l r s a) theCategory (block (foundItem level) (setq level 10) (loop (and (not foundItem) (gr level 0)) (setq foundItem (random (itmGetTypes (cat theCategory " =" level ";")))) (setq level (- level 1)) ) ; Pick one: (lnkAppend resultList...
by NMS
Sat Apr 20, 2019 10:20 pm
Forum: Shipyards
Topic: ship orders help please
Replies: 7
Views: 122

Re: ship orders help please

Oh, huh, that is a built-in order. It may or may not do what you want in terms of how long it takes, which items it loots if cargo space is too full for all of them, etc.
by NMS
Sat Apr 20, 2019 8:24 pm
Forum: Shipyards
Topic: ship orders help please
Replies: 7
Views: 122

Re: ship orders help please

Again, I don't think you actually want to use an OnOrdersCompleted event for this. For one thing, it would replace the existing event on autons and wingmen if you add the code to them. So you'd have to include the functionality of those events, and keep it up to date when they change. Yours already ...
by NMS
Fri Apr 19, 2019 11:32 pm
Forum: Shipyards
Topic: ship orders help please
Replies: 7
Views: 122

Re: ship orders help please

Actually, it does seem like it would be useful to use an event handler here. Just create a generic Type with the necessary Communications, Events, and Language elements, then you can add that code with eventHandler= in the ShipClass or (objSetEventHandler obj unid). If you use the latter, you might ...
by NMS
Mon Apr 15, 2019 5:51 am
Forum: Shipyards
Topic: various questions and stuff
Replies: 39
Views: 5833

Re: various questions and stuff

Event handlers basically just allow you to add the XML of another type onto the XML of an existing object, usually to add Events and Language elements. You don't need them if you just want to change how one type behaves at all times. To change Salvagers' behavior without modifying the engine, you'd ...
by NMS
Mon Apr 08, 2019 8:30 am
Forum: Shipyards
Topic: ordering newly found systems suggestions please
Replies: 1
Views: 81

Re: ordering newly found systems suggestions please

Maybe just always generate the list of known systems with (filter (sysGetNodes) node (sysIsKnown node)) ? With a bunch of non-contiguous systems known, allowing manual reordering and deciding how to maintain the order as you discover systems seems like more trouble than it's worth. I guess you could...
by NMS
Thu Apr 04, 2019 5:43 am
Forum: Commonwealth
Topic: What's up with loot in 1.8?
Replies: 8
Views: 296

Re: What's up with loot in 1.8?

Seems like there might be yet another bug. I think "level=9" is supposed to override the system level, so the loot shouldn't depend on system level. "x=" multiplies the total value of the items to be generated, and there's some formula to determine how much to multiply the number appearing of each i...
by NMS
Thu Apr 04, 2019 5:36 am
Forum: Shipyards
Topic: various questions and stuff
Replies: 39
Views: 5833

Re: various questions and stuff

It's hard-coded in the engine, I believe, but I haven't looked at it.
by NMS
Thu Apr 04, 2019 12:57 am
Forum: Beginner's Luck
Topic: quick WMD question
Replies: 1
Views: 86

Re: quick WMD question

Currently the in-game display is in 10ths (rounded), so 2 = 25%, 3 = 32% ... 10 = 100%. I'd like it to be more clear, too, but George didn't seem to like my suggestions.
by NMS
Mon Apr 01, 2019 8:38 am
Forum: Commonwealth
Topic: A new adventure awaits in Armor Shop!
Replies: 3
Views: 197

Re: A new adventure awaits in Armor Shop!

Nice! I'm looking forward to this never coming out so I can not play it!
by NMS
Sat Mar 30, 2019 7:04 pm
Forum: Shipyards
Topic: struct format and editing help please
Replies: 3
Views: 160

Re: struct format and editing help please

Thanks again. More great info explained really well. Using this code will remove a heap of list handling code from the mod. I couldn't make the 'adding a value' code work unless the 'theStruct' already existed. I misunderstood what you meant by "theStruct can be Nil to start". Once I set 'theStruct...
by NMS
Fri Mar 22, 2019 7:48 am
Forum: Stable (v1.7) Bug Reports
Topic: drone sheild bug
Replies: 2
Views: 58

Re: drone sheild bug

They don't function normally. They collapse more easily, maybe if they take any damage at all.
by NMS
Fri Mar 22, 2019 4:32 am
Forum: Shipyards
Topic: looking for auton check suggestions
Replies: 3
Views: 116

Re: looking for auton check suggestions

SysFindObject finds autons in OnGlobalPlayerLeftSystem for me. Try something like this:

Code: Select all

(enum (sysFindObject Nil "s +auton; +property:playerWingman;") obj
	(if (eq (objGetData obj 'behavior) 'waiting)
		; Store some data about the auton
		)
	)