Block Replacement Mod

Which feature are you most interested in?


  • Total voters
    18

WhitePaw2002

Modding Husky
Joined
Jan 7, 2016
Messages
934
Likes
2,001
Points
505
Age
17
Location
North-east America
Website
github.com
#22
Unity mono thing is not doing a work
Neither is your English, apparently.
Sorry, what I mean to say is that the Mono compiler that should be found in this Unity game is unable to work properly due to an error of how it is implemented: Most possibly due to the methods used to compile the script are unable to use what is provided internally, and therefore, cannot do anything with the raw code.
This could be fixed by either giving it a copy of Mono at the placement it asks for, which would be fairly undesirable due to the complications of it, or finding a different method group to compile the code that does not require what the currently attempted method does.
Other options include using pre-built code packaged as a .dll, which although possibly being much easier, could cause problems when attempting to reference objects in the game's code; or not allowing any form of custom block code at all. Which is also undesired.

Now that I think of it, I do believe I have found a way to make .dll files that are dependent on others with a decompiler.
 

Lord Zarnox

Founder of the IFTTES
Joined
May 31, 2017
Messages
1,865
Likes
2,401
Points
520
Age
20
Location
Australia
#23
Sorry, what I mean to say is that the Mono compiler that should be found in this Unity game is unable to work properly due to an error of how it is implemented: Most possibly due to the methods used to compile the script are unable to use what is provided internally, and therefore, cannot do anything with the raw code.
This could be fixed by either giving it a copy of Mono at the placement it asks for, which would be fairly undesirable due to the complications of it, or finding a different method group to compile the code that does not require what the currently attempted method does.
Other options include using pre-built code packaged as a .dll, which although possibly being much easier, could cause problems when attempting to reference objects in the game's code; or not allowing any form of custom block code at all. Which is also undesired.

Now that I think of it, I do believe I have found a way to make .dll files that are dependent on others with a decompiler.
Would it be simpler to store the information and/or code for the blocks in a custom file type, similar to how the game takes data from the .png snapshots and uses that to interpret it as a blueprint? After all, so long as you have a mod that can interpret the data and use it in-game, it doesn't entirely matter the exact file type you use to distribute the individual blocks, so long as all blocks use the same format and file extension.

Of course, I may have just completely misinterpreted your response, but then again, the only stuff I know about programming languages and the Unity engine are what I have learnt from trial and error, so it wouldn't be surprising.
 

WhitePaw2002

Modding Husky
Joined
Jan 7, 2016
Messages
934
Likes
2,001
Points
505
Age
17
Location
North-east America
Website
github.com
#24
Would it be simpler to store the information and/or code for the blocks in a custom file type, similar to how the game takes data from the .png snapshots and uses that to interpret it as a blueprint? After all, so long as you have a mod that can interpret the data and use it in-game, it doesn't entirely matter the exact file type you use to distribute the individual blocks, so long as all blocks use the same format and file extension.

Of course, I may have just completely misinterpreted your response, but then again, the only stuff I know about programming languages and the Unity engine are what I have learnt from trial and error, so it wouldn't be surprising.
In order to run C# code, it must be compiled. The original goal was to compile it at the time that the game boots up, but this is becoming more difficult than it should be. Just as for the game, I could have it compiled before-hand and loaded along with the other code. But a big problem with that is it needs to be done in a simplistic way that would allow others to try to do this. As for storing all of the data in one file? Well, that would definitely make it much cleaner than the original layout, but then I'd need to make a way to edit those files, and have the game read from them. (Right now, blocks have multiple files depending on what aspects of them are to be replaced, such as different slots in the textures, meshes, or colliders. And they are all in one place. Very disorganized.) I will try to allow for possibly loading from a .zip file, as long as I don't have to include the code to do it myself. Alternatively, I will allow for sub-folder loading, which is probably the closest it'll get to storing block data together.
 

WhitePaw2002

Modding Husky
Joined
Jan 7, 2016
Messages
934
Likes
2,001
Points
505
Age
17
Location
North-east America
Website
github.com
#25
Loading .dll files works! They can be made in Visual Studio and put in the Blocks folder, and then bound to the block they are named after.
I made .gifs of bananas wiggling and flying around, but they are not on this device. Now off to making a functional blimp block...
 

Fehn

Artificial and Intelligent
Joined
Oct 4, 2017
Messages
505
Likes
726
Points
500
Age
17
Location
The Internet
#27
Can you change the function ( turret, silo, wheel , etc. ) and stats of the replaced block?

Cuz I gots a few ideas.
Dedede Approves.jpg
 
Likes: Legionite

WhitePaw2002

Modding Husky
Joined
Jan 7, 2016
Messages
934
Likes
2,001
Points
505
Age
17
Location
North-east America
Website
github.com
#31
I UPLOADED IT!


Animated Blimp Block << Link, please click

(Special_Cake)
You can change the mesh of blocks, change their textures, and add script to them!
If you have any questions on how to do any of them, I tried to make simple instructions on the TTMM View page. Anything else, you can ask me here or on Discord!

GO MAKE BLOCKS!


pile of bananas with golden banana test (and proto blimp projector) (and glass (Special_LightBlue))
Also there are banana guns (GSO_minigun), just like duck lasers


Sentient bananas roaming the land
Not as mobile right now, but they do toss and turn. Even when you attach it on a tech, so be careful! (Special_Lemon)
 
Last edited:

Fehn

Artificial and Intelligent
Joined
Oct 4, 2017
Messages
505
Likes
726
Points
500
Age
17
Location
The Internet
#37
...itispossibletochangepropertiesofblocksbyinjectingcodetodosoalongtheircreationwhichisalreadypossibleatthispointbutiwouldfinditnotnecessarytoperformsuchactionatthismomentoftimeandday
That leads to my next question: can you tweak the ( size/shape/damage/speed/accuracy/explosion radius/model ) of projectiles? All or some or none?
 

WhitePaw2002

Modding Husky
Joined
Jan 7, 2016
Messages
934
Likes
2,001
Points
505
Age
17
Location
North-east America
Website
github.com
#39
Updated BRM
Now allows for editing corp groups instead of each block in it individually
Instead of 'GSOBlock_111.1.png', you can now use 'GS.1.png'

Example:
GSO - 'GS'
Venture - 'VE'
GeoCorp - 'GC'
HawkEye - 'HE'
Special - 'SP'
Experimental - 'EX'

Also made a modification to GSO 2x2 hovers to use Distance-Velocity Impulse: Code
 
Last edited: