Post Reply 
 
Thread Rating:
  • 6 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SpinBlocksMadness
2017-05-05, 03:41 PM (This post was last modified: Yesterday 07:55 PM by Gladyon.)
Post: #1
SpinBlocksMadness
The SpinBlocksMadness mod add new features to the SpinBlocks in order to make them more enjoyable.
Among these new features, you can now place spinblocks on subconstructs.
[Image: yjulkgX.jpg]


Version for FtD v2.02 (stable version):
.zip  SpinBlocksMadness.zip (Size: 623.7 KB / Downloads: 301)
Steam Workshop
WARNING Check that you have the latest version of the ProtecTech Industries's modding tools mod
Installation procedure:
  1. Disable Steam cloud synchronization for FtD
  2. Delete the "\My Documents\From The Depths\Mods\SpinBlocksMadness\" directory
  3. Ensure that the ProtecTechTools mod is properly installed
  4. Unzip 'SpinBlocksMadness.zip' in the "\My Documents\From The Depths\Mods\" directory

The file 'SpinBlocksMadness.dll' must be in the following directory: "\My Documents\From The Depths\Mods\SpinBlocksMadness\"

Changelog:
Code:
1.2.9: Updated for FtD v2.02
- [added] It is now possible to set a default set of values for the custom explosion algorithm. These values provides good explosions feelings but they still need to be balanced a bit
- [changed] Block explosions (such as the ammo barrel explosion or the laser pump explosion) are now always using the standard FtD algorithm, so they cannot damage any block out of their given radius

1.2.8: SpinBlocks Lua fix
- [added] 'ConvertSubConstructIndexToSpinnerIndex' function, to convert a SubConstruct index (returned by 'GetSubConstructIndex') into a FtD compatible Spinner index (use only for spinners, not turrets or pistons)
- [added] 'ConvertSpinnerIndexToSubConstructIndex' function, to convert a FtD compatible Spinner index (only for spinners, not turrets or pistons) into a SubConstruct index (to be used by 'GetSubConstructName' for example)

1.2.7: Explosion fix
- [changed] The power to apply to AC is now only applied to flak explosions
- [changed] The threshold under which a block is unaffected by an explosion is now computed based on the current health of the block divided by its size (4 for a beam)
- [fixed] The explosions can now damage the subConstructs again
- [fixed] The 'power lost to blast' is now correctly calculated in the log

1.2.6: More explosions...
- [added] It is now possible to set a threshold value, if a blocks should take less damage than this threshold due to an explosion, then no damage will be dealt
- [added] The blast effect percentage can be different for not-damaged blocks

1.2.5: Explosions improvement
- [added] Explosions now visit less cells when there are several simultaneous explosions (less slowdowns)
- [added] Some more logs to help balance the explosions
- [fixed] False-positive error message when placing a turret, SpinBlock or piston on the MainConstruct removed

1.2.4: Explosions improvement
- [added] More configuration possibilities for the explosions
- [added] Some profiling for the explosion algorithm
- [changed] Optimization of the explosion algorithm for maximum radius larger than 35m. Under that there's a 3% increase in calculation time
- [changed] The radius of the explosions isn't used as a radius anymore, but as a variable used to calculate the air-bleed if using the 'formula'
- [changed] The maximum radius for the explosion can now be extended to 99m
- [fixed] Avoid negative radius for explosions that are 'teleported' next to the vehicle
- [removed] A few methods 'Replacement' have been removed, so it's now more compatible with other mods using ProtecTechTools

1.2.3: Explosions fixes
- [fixed] Better range and precision for the power to apply to AC
- [fixed] The 'moving center of the explosion near the target' thing added back to the custom algorithm

1.2.2: New explosion algorithm
- [added] A new explosion algorithm is available (To activate and/or configure it, open the debug menu using the 'Page down' or the '.' (period) key in-game)
- [added] A block named 'RubberWithFriction' has been added just under the 'Rubber' block. For now it is a 'Boom block' used to balance the explosions. In the future it should be a rubber block with a 100% friction

1.2.1: More pistons
- [added] A new 1x1x1 piston from the amazing Glayn
- [added] 1x1x1 and 2x1x1 extendable pistons that can extend up to 6x1x1 and 12x1x1
- [added] The maximum radius of the explosions is now configurable (be careful, it's highly CPU intensive)

1.1: Update for the stable FtD v2.0
- Nothing more, just changed the version number and a few internals things

1.1.6: Bug fixes
- [added] It is now possible to stop the rotation of a SpinBlock with its GUI
- [added] It is now possible to stop the extension of a piston with its GUI
- [fixed] The pistons do not stay stuck anymore after having collided with something
- [fixed] When removing the block under a piston / spinblock / turret which is on the mainconstruct, the piston / spinblock / turret is now removed
- [fixed] Small pistons can now be controlled by ACB
- [fixed] Small pistons can now be controlled by Lua
- [fixed] Debug log removed when using the ACB on pistons

1.1.5: New piston
- [added] A 1x1x1 piston that can extend up to 3x1x1 (thanks to Glayn for the models)
- [changed] When loading a SubConstruct, it is now possible to change its type only if the heights are the same (which means that a turret can be converted in a 1x1x1 piston but not a 2x1x1 piston)

1.1.4: Bug fixes
- [fixed] The health value set in the ACB weren't loaded correctly in vanilla if saved with this mod. *** WARNING *** The values saved with this mod in version 1.1.2 or 1.1.3 will not be loaded correctly

1.1.3: Explosion bug fixed
- [fixed] The FtD 'explosions going through walls' bug is fixed

1.1.2: Updated for FtD v2.0
- [added] The health input in the ACB is now from [0..100] in order to have a better precision
- [fixed] The turret rotation speed limitation of Dahak's APSA mod is now compatible with SpinBlocksMadness mod
- [fixed] ToolsTips added for the SpinBlock extended options

1.1.1: Bug fix
- [fixed] ACBs do not control ALL pistons anymore, only the ones in range

1.0: Finish touch
- [changed] The 'vanilla' configuration for the collisions between SubConstructs has changed. Now it's the default to use when placing new Turrets / SpinBlocks / Pistons. The turrets and SpinBlocks of vehicles coming from non-SpinBlocksMadness mod are automatically set to have no collisions with other SubConstructs
- [fixed] The piston models are now real pistons (thanks to Glayn)

1.0.7: More features!
- [added] Turrets can now be placed on a SubConstruct
- [added] Pistons (possible to place on the MainConstruct and any SubConstruct)
- [changed] When saving a SubConstruct, if the type is the same as the SubConstruct already in the chosen slot, then the name of the slot will be proposed by default (instead of changing it to 'Turret of <shipname>')
- [changed] The SpinBlocksMadness Lua functions that access the SpinBlocks have changed their names. You have to replace 'SpinBlock' by 'SubConstruct'. There are also more Lua functions, please see the in-game help page for more details
- [fixed] Crash when a PAC is on a SubConstruct

1.0.6: Bug fix
- [fixed] Rare case where FtD crash when loading a blueprint fixed

1.0.5: Full SubConstructs collisions
- [added] Collisions are now detected between SubConstructs
- [added] It is now possible to set the rotation speed of a SpinBlock using floats (it was rounded to the closest integer)
- [added] The specific rotation speed, the collisions between SubConstructs and the loading position/velocity of the SpinBlocks can be set as in vanilla (main configuration menu: 'F1' in the main menu)
- [changed] Destroyed blocks will still collide (in order to avoid a SubConstruct to go in a position when it can't come back from when repaired)
- [fixed] A light block on a SubConstruct will not detect collision anymore
- [fixed] The little green arrow on the SpinBlocks is now correctly oriented
- [fixed] It is now possible to place a saved SubConstruct (that were on a SubConstruct) on the MainConstruct without any problem

1.0.4: Bug fixes
- [added] Lua functions to access SpinBlocks easily (by name, parent, children)
- [added] Help page for the additional Lua functions
- [added] New tips of the day related to the SpinBlocks' new functionalities- [added] The name of the SpinBlock is now displayed in its GUI and its tooltip
- [fixed] The laser transceivers now work over the SpinBlocks that are on a SubConstruct
- [fixed] It is now possible to place a loaded subobject of type 'SpinBlock' on a subconstruct
- [fixed] It is now possible to palce a spinblock on a subconstructable via the GUI, not only via the shortcut keys
- [fixed] It is now possible to paint again
- [fixed] Subconstructs on subconstructs can now be repaired
- [fixed] Rare crash when a vehicle is loaded

1.0.3: Some optimization
- [changed] SpinBlocks rotation optimization phase 4: micro-optimization

1.0.2: Some optimization
- [added] ACB can now be placed on subconstructs. An ACB will control the blocks that are on its children subconstructs if the SpinBlock is in range (same as FtD), but it will not control their children, and it will not control the SpinBlock of its subconstruct
- [changed] SpinBlocks rotation optimization phase 1: avoid most calculations for the SpinBlocks that are on the mainconstruct
- [changed] SpinBlocks rotation optimization phase 2: avoid some calculations when the rotating SpinBlock has no children
- [changed] SpinBlocks rotation optimization phase 3: pre-calculate most of the calculations in the other cases

1.0.1: Initial pre-release
- [added] Placing Spin-blocks on sub-constructs is now possible
- [added] It is possible to control the angle and speed of a spinblock from its GUI
- [added] When loading a blueprint, the spinbocks are set at their last state (either position or speed)

Features:
- Placing SpinBlocks on SubConstructs
- Placing turrets on SubConstructs
- Placing ACBs on SubConstructs
- Pistons (possible to place on the MainCosntruct and any SubConstruct)
- Loading SubConstructs onto a SubConstruct the SubConstructs on SubConstructs will not be saved along with their parent)
- Controlling SpinBlocks using their GUI
- Restoring saved position and speed to the SpinBlocks
- Giving a name to SpinBlocks
- Accessing SpinBlocks via Lua and their name (instead of their index)
- Collisions between SpinBlocks
- It is possible to restore Vanilla configuration (via the main configuration menu: 'F1' in the main menu)
- The long standing FtD bug with 'explosions going through walls' is fixed
- Explosion radius is now configurable
- A new explosion algorithm is now available, and fully customizable (the customization will be removed when the balancing will be done)

Planned in some future:
- fixing the detection-SubConstructs bug
- fixing the drag-SubConstructs bug


Issues:
- Turrets and SpinBlocks rotations are slower than vanilla FtD
- Network will not work
- The dotted design (that can be viewed when loading a vehicle or using the ToolBox) will not render the SubConstructs that are on a SubConstruct at the correct position
- Sails will probably not work if their mast is not directly on the MainConstruct (I haven't tried and I don't even know how sails work...)
There are probably more problems, but these ones are the ones that have been identified.
- The turrets constraints may not work very well at some angles...
- It is not possible to transform a SubConstruct from or to a Piston, because a Piston size is different than the size of a Turret or SpinBlock
- Not really a bug, but it's not possible to have the Pistons in the ToolBox of the ProtecTech Industries mod


The network problem is a real one. I am facing a wall as I don't have easy means to alter the type of data transmitted over the network.
In short: I don't even know how to make it work... sorry...

The dotted design thing would probably require several hours, maybe more than 10.
As it is very minor I have decided not to fix it.

The sails are another big problem.
I haven't looked at them yet as I don't even know how they work...
For now it's in stand-by.
If someone is kind enough to provide me with a blueprint of a sail which is on a SubConstruct and do not work as intended, along with another blueprint with a sail on the MainConstruct and which works well (so I can see the difference), then I may take a look.



Mod specific information:
v1.2.9
MIT License (see the included 'License.txt' file)


General information:
The zip contains a Readme.txt, Install.txt and Changelog.txt if you need more technical informations about this mod.

Modders information:
This mod fully use the ProtecTechTools mod API.

Important notes:
The blueprints saved with this mod will not be compatible with FtD if you have at least one SpinBlock on a subconstruct.
Otherwise, the blueprints will be compatible.
Find all posts by this user
Quote this message in a reply
2017-05-05, 03:43 PM
Post: #2
RE: SpinBlocksMadness [WIP]
I forgot one thing: I need volunteers to try this mod and find out the bugs that aren't yet listed.
Find all posts by this user
Quote this message in a reply
2017-05-05, 07:49 PM
Post: #3
RE: SpinBlocksMadness [WIP]
A small update before the week-end:
1.0.2: Some optimization
- [added] ACB can now be placed on subconstructs. An ACB will control the blocks that are on its children subconstructs if the SpinBlock is in range (same as FtD), but it will not control their children, and it will not control the SpinBlock of its subconstruct
- [changed] SpinBlocks rotation optimization phase 1: avoid most calculations for the SpinBlocks that are on the mainconstruct
- [changed] SpinBlocks rotation optimization phase 2: avoid some calculations when the rotating SpinBlock has no children
- [changed] SpinBlocks rotation optimization phase 3: pre-calculate most of the calculations in the other cases

It's still a lot slower than vanilla FtD for the rotations, but now it's reduced to something that is bearable.


And I had to choose a behaviour for the ACB with the children subconstructs, fell free to discuss it as I'm not sure that I've made the best choice.


Do not forget to update ProtecTech Industries's plugins tools as I made a modification that is used by SpinBlocksMadness.
Find all posts by this user
Quote this message in a reply
2017-05-06, 11:34 AM (This post was last modified: 2017-05-06 11:58 AM by Gladyon.)
Post: #4
RE: SpinBlocksMadness [WIP]
New update, no need to download again ProtecTech mod this time.
1.0.3: Some optimization
- [changed] SpinBlocks rotation optimization phase 4: micro-optimization

That optimization removed 28% of the time taken to rotate the spinblocks and turrets that are on the mainconstruct, and the gain on the spinblocks on subconstructs will be about the same.
I am now at a point where I have 2 possibilities for optimizations:
- a large one with some limitations
- no more optimization, but a lot less limitations

Here are the limitations if I optimize more:
- the subconstruct will not be able to collision with other subconstructs
- only the subconstructs on the mainconstructs will be optimized

And there's another side effect:
If I choose not to optimize any further, that means that I will have all the subconstructs projected in the mainconstruct array.
The meaning of that is very very important for explosion management.
That means that it would be possible to change the explosion algorithm to be applied to the maincosntruct and the subconstructs at the same time, which means that it would be possible for mainconstruct blocks to protect a subconstruct from the explosion of another subconstruct.

And, but on that I'm not sure (I'd need to look into it further, but that's becoming very complex, or to discuss it with Nick), but it may also offer the possibility to optimize the gridcasting that are done in the game, and they are done everywhere every time.


I'm strongly in favor of stopping there the optimization, and having the all-subconstructs collisions and improved explosions things.
But that would significantly slow down FtD (on a 42k blocks ship with large turrets and a lot of small ones it takes 3.9% instead of 0.2%, which translates to about 2fps lost).
I may have an idea to soften the slow down (let's say divide it by about 3) for subconstructs that are one the mainconstructs.

At this point I'd like to have your point of views.
Is performance more important than having subconstructs collision and more accurate explosions?
Find all posts by this user
Quote this message in a reply
2017-05-06, 05:00 PM
Post: #5
RE: SpinBlocksMadness [WIP]
Go for possibilities, as long as it is not in main game performance isn't big concern. 2 fps seems acceptable for given benefits. I supose integrating that with main game would improve performance as less dirty hacks would be needed ;-)
Find all posts by this user
Quote this message in a reply
2017-05-06, 05:13 PM
Post: #6
RE: SpinBlocksMadness [WIP]
(2017-05-06 05:00 PM)Fernir Wrote:  Go for possibilities, as long as it is not in main game performance isn't big concern. 2 fps seems acceptable for given benefits. I supose integrating that with main game would improve performance as less dirty hacks would be needed ;-)

Without the ugly hacks it would be faster, but only marginally I think, no more than 0.01fps unfortunately...
99% of the time is spent inside one function, and that one would be hard to optimize... maybe someone better than me in quaternion calculations could unroll them better than what I did and remove a few multiplications.

I think I'll go for the possibilities, except if someone can find a very good reason not to.
But before I need to fix a few bugs, I just saw that it's not possible to paint anymore.
Can you believe it? On a vehicle without a spinblock or turret, you cannot paint because of this mod??
I never touched something about painting and there shouldn't have any connection between spinblocks and painting!!
This is not fair.
Find all posts by this user
Quote this message in a reply
2017-05-07, 04:03 PM (This post was last modified: 2017-05-07 05:34 PM by Klayn_Rogue.)
Post: #7
RE: SpinBlocksMadness [WIP]
I've always wanted this, thanks !

Edit: I installed the mod but it appears to not work, i cant place spinblocks on spinblocks.

Ur mum is a nice lady.
Find all posts by this user
Quote this message in a reply
2017-05-07, 09:47 PM
Post: #8
RE: SpinBlocksMadness [WIP]
(2017-05-07 04:03 PM)Klayn_Rogue Wrote:  I've always wanted this, thanks !

Edit: I installed the mod but it appears to not work, i cant place spinblocks on spinblocks.

I saw that a little late.
I usually place the spinblock by assigning it a shortcut number.
That way you can place it on a subconstruct.

In a day or two I will update the mod again.
I have nearly finished to fix everything I listed, and even a little more.
Find all posts by this user
Quote this message in a reply
2017-05-08, 07:21 AM
Post: #9
RE: SpinBlocksMadness [WIP]
Gladyon. You bastard. You have done it. What everyone was pulling their hair for. You shall forever be remembered as the man who allowed for AT-AT's to be built. Thank you man.

Now, something I would like to mention: subconstruct collision sounds dangerous. Simply for one reason: you see, subconstruct clipping is extremely important for many builds. Without going any further, the Marauder from campaign relies on it. Most of my realistic tripod masts depend on this clipping. Making aircraft in a decent scale often requires spinblock clipping too. If the subconstructs were to collide, madness would ensue. I think that such a change would make people not download the mod for fear of breaking their stuff, and none of us want that at all, do we?
I insist, AT-AT's...

My blueprint thread: http://www.fromthedepthsgame.com/forum/s...?tid=27459
[Image: 7IUuNau.png]
Find all posts by this user
Quote this message in a reply
2017-05-08, 08:15 AM (This post was last modified: 2017-05-08 08:22 AM by Gladyon.)
Post: #10
RE: SpinBlocksMadness [WIP]
(2017-05-08 07:21 AM)skratchR Wrote:  Gladyon. You bastard. You have done it. What everyone was pulling their hair for. You shall forever be remembered as the man who allowed for AT-AT's to be built. Thank you man.

Now, something I would like to mention: subconstruct collision sounds dangerous. Simply for one reason: you see, subconstruct clipping is extremely important for many builds. Without going any further, the Marauder from campaign relies on it. Most of my realistic tripod masts depend on this clipping. Making aircraft in a decent scale often requires spinblock clipping too. If the subconstructs were to collide, madness would ensue. I think that such a change would make people not download the mod for fear of breaking their stuff, and none of us want that at all, do we?
I insist, AT-AT's...

I fear that AT-AT may not be possible, because I think there's no friction in FtD.
A new block with friction applied on it may have to be created.


As for the clipping issue, I don't use it much myself, so I don't know how it is used.
If it is placing a spinblock, rotating it a bit, and then adding blocks on it that clips with other blocks, then there's no problem.
The collision checks I speak about are only active when the spinblock is rotating.
But you can still add blocks to a subconstructs that are on the same spot than other subconstructs or the mainconstruct.
It's just that you won't be able to move these spinblocks afterwards, that's all.

Is that OK or is there something more about clipping?


[edit]
I just thought about it, but it's very possible to add an option to allow a spinblock not to check and/or not to be checked for the collisions.
I think that would solve most potential problems.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)