Search found 562 matches
- Fri May 31, 2019 6:19 am
- Forum: Shipyards
- Topic: basic game maths function and number formats explanation please
- Replies: 5
- Views: 2118
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...
- Fri May 31, 2019 5:03 am
- Forum: Shipyards
- Topic: Some help with playerships please?
- Replies: 21
- Views: 5530
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...
- Tue May 07, 2019 12:18 pm
- Forum: Shipyards
- Topic: Inconsistency in UnvGetElapsedGameTime
- Replies: 3
- Views: 1860
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.
- Sat May 04, 2019 8:58 am
- Forum: Shipyards
- Topic: Inconsistency in UnvGetElapsedGameTime
- Replies: 3
- Views: 1860
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.
If you need a function to convert ticks to human-readable game time, that could be added to fmtNumber pretty easily.
- Sat Apr 27, 2019 2:03 am
- Forum: Shipyards
- Topic: searching multiple levels of items help please
- Replies: 3
- Views: 1803
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...
- Sat Apr 20, 2019 10:20 pm
- Forum: Shipyards
- Topic: ship orders help please
- Replies: 7
- Views: 2166
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.
- Sat Apr 20, 2019 8:24 pm
- Forum: Shipyards
- Topic: ship orders help please
- Replies: 7
- Views: 2166
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 ...
- Fri Apr 19, 2019 11:32 pm
- Forum: Shipyards
- Topic: ship orders help please
- Replies: 7
- Views: 2166
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 ...
- Mon Apr 15, 2019 5:51 am
- Forum: Shipyards
- Topic: various questions and stuff
- Replies: 43
- Views: 14080
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 ...
- Mon Apr 08, 2019 8:30 am
- Forum: Shipyards
- Topic: ordering newly found systems suggestions please
- Replies: 1
- Views: 1453
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...
- Thu Apr 04, 2019 5:43 am
- Forum: Commonwealth
- Topic: What's up with loot in 1.8?
- Replies: 8
- Views: 3262
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...
- Thu Apr 04, 2019 5:36 am
- Forum: Shipyards
- Topic: various questions and stuff
- Replies: 43
- Views: 14080
Re: various questions and stuff
It's hard-coded in the engine, I believe, but I haven't looked at it.
- Thu Apr 04, 2019 12:57 am
- Forum: Beginner's Luck
- Topic: quick WMD question
- Replies: 1
- Views: 1623
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.
- Mon Apr 01, 2019 8:38 am
- Forum: Commonwealth
- Topic: [April Fools 2019] A new adventure awaits in Armor Shop!
- Replies: 3
- Views: 2442
Re: A new adventure awaits in Armor Shop!
Nice! I'm looking forward to this never coming out so I can not play it!
- Sat Mar 30, 2019 7:04 pm
- Forum: Shipyards
- Topic: struct format and editing help please
- Replies: 3
- Views: 1786
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...