Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modding Progress With PlanetbaseFramework #16

Open
erThewin opened this issue Oct 1, 2023 · 8 comments
Open

Modding Progress With PlanetbaseFramework #16

erThewin opened this issue Oct 1, 2023 · 8 comments

Comments

@erThewin
Copy link

erThewin commented Oct 1, 2023

So far I can:

  • Insert new OBJ models to the game
  • Resolved issue of unselectable and disappearing models
  • Attach OBJ to existing models

Here are some highlighted features that might be wanted by modders (not players):

  • Ability to create new "ComponentType" based on what already existing "BaseModuleType"..
  • a. Ability to create new type of Character. So far we have "Bots" and "Colonist." I've tried to create "Humanoid" long time ago, using the old patcher, a character with human model but act like a robot, doesn't need astronaut suits, oxygen, meal, sleep, and water..
  • b. Ability to add OBJ model for characters..
  • Ability to create new type of "Ships." So far we have "Colonist Ship," "Visitor Ship," and "Merchant Ship." I imagined to create new ships with new models..
  • Ability to add new "ResourceType" with custom OBJ model..

And some of my ideas:

  • Create a "Merchant Building" to trade or buy resources without waiting for merchant ships..
  • Create a production ComponentType that can produce money. I've failed to make this one as a "Recycling Machine." The production is running, but when it's finished, it gives exception error..

screenshot_7_41_31_22
screenshot_4_39_27_10

@erThewin
Copy link
Author

erThewin commented Oct 2, 2023

Some aspects that need to be underlined:

  • Adding rotation routine to an object seems locked by the assembly. Tried:
    transform.Rotate (0,0,50*Time.deltaTime);` and never works..
  • Adding animation to an object also giving same result. This part required by modders since OBJ file doesn't save animations, anchor points, lights, etc..
  • Change or add shader to an object also doesn't work. Tried to change `Shader.Find("Transparent/Diffuse") and giving the "pink texture "result. This part also required by modders because OBJ file doesn't save material rendering. Making transparent PNG texture and changed alpha value in MTL file doesn't give glass like material in the game. It's always opaque..

@erThewin
Copy link
Author

erThewin commented Oct 2, 2023

For modders/3D modelers:

  • Keep the models in mid or low poly. Maximum size of the OBJ file is about 10MB.
  • Don't make any model without texture, any applied colors by application will turn white in the game.
  • Make sure to add axes or anchor points manually before using OBJ file in the game, because all placed axes or anchor points will lost when a model exported as OBJ file..

@erThewin
Copy link
Author

erThewin commented Oct 7, 2023

Change or add shader to an object also doesn't work. Tried to change `Shader.Find("Transparent/Diffuse") and giving the "pink texture "result.

Found a quick solution for this one. Planetbase hides their internal shaders inside the mainData, maybe need another addition to the framework to be able to add new custom shaders..

I've tried to make OBJ files with parts, and tagged each part with
"DomeFloor"
"DomeBase"
"DomeOpaque"
"DomeTranslucent"
and was hoping that the tag will automatically make my translucent part be translucent. But that's not happened, even if the texture we used for that part is a transparent image, or if we make the part transparent in 3D software (i.e. Blender, 3DS Max, etc).

Then I made another OBJ with all materials set to opaque, and set MTL files to "d 1.00"
tagged the parts again, with this addition:

gameObject5.findNamedObject("sphere").tag = "DomeOpaque";
gameObject5.findNamedObject("sphere").GetComponent<Renderer>().material.shader = Shader.Find("Planetbase/BumpSpecularCube");

And it works. No matter it's tagged "DomeOpaque" or "DomeTranslucent," the shader just override it
Screenshot:
screenshot_1_02_54_08

@erThewin
Copy link
Author

erThewin commented Oct 7, 2023

List of Planetbase Shaders (Unsorted):

Standard

Legacy Shaders/Transparent/VertexLit
Legacy Shaders/Transparent/Cutout/VertexLit
Legacy Shaders/Diffuse
Legacy Shaders/VertexLit
Legacy Shaders/Specular
Legacy Shaders/Bumped Specular

Sprites/Default

Particles/Additive
Particles/Additive (Soft)
Particles/Alpha Blended Premultiply
Particles/VertexLit Blended

Custom/LightningBoltShaderMeshNoGlow
Custom/LightningGlowShader
Custom/LightningBoltShaderMesh

Hidden/BlendOneOne
Hidden/MultipassHollywoodFlares
Hidden/BlitCopy
Hidden/NFAA
Hidden/FXAA II
Hidden/FXAA III (Console)
Hidden/FXAA Preset 2
Hidden/FXAA Preset 3
Hidden/SSAA
Hidden/DLAA
Hidden/CubeCopy
Hidden/CubeBlur
Hidden/CubeBlend
Hidden/SeparableBlurPlus
Hidden/Camera-DepthNormalTexture
Hidden/BrightPassFilterForBloom
Hidden/LensFlareCreate
Hidden/Vignetting
Hidden/Blend
Hidden/InternalSplashShadowReceiverSimple
Hidden/InternalSplashShadowReceiver
Hidden/InternalSplashShadowBlur
Hidden/InternalSplashShadowCaster
Hidden/InternalClear
Hidden/Internal-CombineDepthNormals
Hidden/Internal-PrePassCollectShadows
Hidden/InternalErrorShader
Hidden/Internal-DeferredShading
Hidden/Internal-Flare
Hidden/Internal-Halo
Hidden/Internal-GUITextureClip
Hidden/Internal-GUITextureClipText
Hidden/Internal-PrePassLighting
Hidden/Internal-GUITextureBlit
Hidden/Internal-GUITexture
Hidden/TerrainEngine/Splatmap/Standard-Base
Hidden/TerrainEngine/Splatmap/Standard-AddPass
Hidden/TerrainEngine/Splatmap/Diffuse-AddPass
Hidden/TerrainEngine/BillboardTree
Hidden/TerrainEngine/Details/BillboardWavingDoublePass
Hidden/TerrainEngine/Details/WavingDoublePass
Hidden/TerrainEngine/Details/Vertexlit

Nature/Terrain/Standard
Nature/Terrain/Diffuse

UI/Default Font
UI/Default

GUI/Text Shader

Unlit/Texture
Unlit/Transparent Cutout

FORGE3D/Planets/Terrestrial
FORGE3D/Planets/Ring
FORGE3D/Planets/Sandstorm
FORGE3D/Planets/Ice
FORGE3D/Planets/Gas
FORGE3D/Planets/Moon
FORGE3D/Planets/Atmosphere

Planetbase/ActionRadius
Planetbase/AlphaTestSpecular
Planetbase/Backdrops
Planetbase/BumpSpecularCube
Planetbase/BumpSpecularTint
Planetbase/ComponentTranslucent
Planetbase/ComponentUnderConstruction
Planetbase/DomeOpaque
Planetbase/DomeTranslucent
Planetbase/DomeTranslucentFlat
Planetbase/FloorDecals
Planetbase/GuiLine
Planetbase/Heads
Planetbase/Laser
Planetbase/LinkLines
Planetbase/Liquid
Planetbase/OpaqueColorEmission
Planetbase/OpaqueEmission
Planetbase/ParticleSunLit
Planetbase/ParticleSunLitAdditive
Planetbase/PlainColor
Planetbase/PowerGauge
Planetbase/SelectionCharacters
Planetbase/SelectionExtruded
Planetbase/SelectionStencil
Planetbase/Skydome
Planetbase/SkydomeClose
Planetbase/SkydomeCloseInterpolated
Planetbase/Sprite
Planetbase/TerrainDiffuse
Planetbase/TerrainDiffuseAddPass
Planetbase/TerrainSpecular
Planetbase/TerrainSpecularAddPass
Planetbase/VideoScreen
Planetbase/WaterTank```

@solidDoWant
Copy link
Owner

  • Ability to create new "ComponentType" based on what already existing "BaseModuleType"..

This has been added in 8b209d5

@solidDoWant
Copy link
Owner

  • Ability to add new "ResourceType" with custom OBJ model..

This has been added in 9ef28c5

@erThewin
Copy link
Author

erThewin commented Nov 1, 2023

Issues:

  • The newest framework caused many of old mods not functioning. For example, the VERY IMPORTANT Building Aligner.
  • The new system for adding ModuleType only works with OBJ model that is a single solid mesh, created errors when using multi-part OBJs.
  • Not really suitable for most modders since it changes lots of aspect from the original game by making too many patches.
  • The older version still works very good and got no issues with JPFAria's mods, only lack abilities to place OBJs for ComponentType and ResourceType, these are the most important demands from the players.

@NeoRider7
Copy link

Pics-001-v1 4 0-v01-400x225
Hi! How are you? From the description of the game update news 1.4.0 about Unity versions: "Planetbase was initially developed in 2015, using Unity 5, this update brings is up to date to Unity 2022.3, which is the latest stable. "

In light of this, has anything changed now in your Framework, "Mod Patcher 2", add-on "Planetbase Framework JPFarias compatibility layer", and mods?
Maybe now there will be more possibilities to create mods (textures, items, buildings)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants