Search found 522 matches

by NMS
Sat Jun 15, 2019 8:54 am
Forum: Shipyards
Topic: basic game maths function and number formats explanation please
Replies: 4
Views: 92

Re: basic game maths function and number formats explanation please

Stochastic rounding randomly rounds up or down based on how large the remainder is. So 1.6 has a 60% chance of rounding up, 40% of rounding down. This keeps the expected average value of the output equal to the input.
by NMS
Thu Jun 13, 2019 5:31 am
Forum: Shipyards
Topic: storing single save data for continual use query
Replies: 2
Views: 48

Re: storing single save data for continual use query

If there's a limited number of fixed values for the data, you could also store it in a list or struct in a type's StaticData.
by NMS
Wed Jun 12, 2019 8:26 am
Forum: Shipyards
Topic: couple of weapons fire/effect queries
Replies: 1
Views: 30

Re: couple of weapons fire/effect queries

The Wolfen's nacelles stick out a bit farther forward than its nose, so positioning the weapon fire points optimally would require separate slots for single and dual weapons, which wasn't possible until recently. Now that it is, I suppose we should do that. But due to the angle the images are render...
by NMS
Wed Jun 12, 2019 7:45 am
Forum: Shipyards
Topic: Some help with playerships please?
Replies: 19
Views: 367

Re: Some help with playerships please?

George created maneuvering thrust effects that some ships can show when they start or stop rotating. But apparently most players didn't like them, so they're disabled by default. You can enable them in settings.xml for ships that have them. It's common for ship images not to be quite centered in eac...
by NMS
Wed Jun 12, 2019 6:15 am
Forum: Beginner's Luck
Topic: Saving Jenna
Replies: 4
Views: 196

Re: Saving Jenna

I once got a heavily enhanced Fusionfire howitzer and a bunch of other stuff confiscated. I was playing the EI500 with no backtracking and I failed to do any of the things that let you get Militia missions, so I never got military ID. Back then I think some Corporate stations would install military ...
by NMS
Fri May 31, 2019 6:19 am
Forum: Shipyards
Topic: basic game maths function and number formats explanation please
Replies: 4
Views: 92

Re: basic game maths function and number formats explanation please

The short answer is that add, subtract, multiply, and divide all work only with integers (called "int32" by typeOf), while +, -, *, and / work with floating point numbers ("real"). The int32 type can hold integers from -2147483648 (0x80000000) to 2147483647 (0x7FFFFFFF). They give exact results as l...
by NMS
Fri May 31, 2019 5:03 am
Forum: Shipyards
Topic: Some help with playerships please?
Replies: 19
Views: 367

Re: Some help with playerships please?

There is an engine feature to help with models where the center of mass is in the wrong place: rotationOffset. For example, the Corsair has <Image imageID="&rsCorsairHD;" imageWidth="52" imageHeight="52" rotationCount="120" rotationColumns="12" viewportRatio="0.00375" rotationOffset="-10" /> This sh...
by NMS
Tue May 07, 2019 12:18 pm
Forum: Shipyards
Topic: Inconsistency in UnvGetElapsedGameTime
Replies: 3
Views: 169

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

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

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

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

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

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: 40
Views: 6036

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

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...