jitspoe / godot_bsp_importer

An importer addon to import Quake BSP files.
MIT License
98 stars 9 forks source link

Gives parse error in Godot 4.1.1 #2

Closed marcospb19 closed 11 months ago

marcospb19 commented 11 months ago

Tried using it and:

Error: Static function "compute_convex_mesh_points()" not found in base "Geometry3D".
Invalid call. Nonexistent function 'new' in base 'GDScript'.
The full message ``` res://addons/bsp_importer/bsp_importer_plugin.gd:595 - Parse Error: Static function "compute_convex_mesh_points()" not found in base "Geometry3D". res://addons/bsp_importer/bsp_importer_plugin.gd:595 - Parse Error: Cannot infer the type of "convex_points" variable because the value doesn't have a set type. res://addons/bsp_importer/bsp_editor_plugin.gd:9 - Invalid call. Nonexistent function 'new' in base 'GDScript'. ```

What's the supported version? If possible, can you put that on the README?

Thanks for the tool!

jitspoe commented 11 months ago

Hey, sorry, that's part of some experimental code. Forgot about that. You can just comment it out -- that function isn't called, yet. I'm requesting a PR to add that functionality: https://github.com/godotengine/godot/pull/78871

jitspoe commented 11 months ago

Also realized there's a bug where the X and Z axis are negated. I'll try to fix that tomorrow.

marcospb19 commented 11 months ago

Thanks for clarifying, I guess we can keep the issue open while that code is broken.

Some context: I was trying to implement CS Bhop/Surf physics in Godot, and make a tiny game out of it, I tried using this importer to load surf_utopia_v3, but it didn't work.

Core dumped lol ``` Attempting to import res://assets/surf_utopia_v3.bsp Material path pattern: res://materials/{texture_name}_material.tres BSP version: 1347633750 textures offset: 0 ================================================================ handle_crash: Program crashed with signal 11 Engine version: Godot Engine v4.1.1.stable.arch_linux Dumping the backtrace. Please include this when reporting the bug to the project developer. [1] /usr/lib/libc.so.6(+0x39ab0) [0x7f5b0c162ab0] (??:0) [2] /usr/lib/libc.so.6(+0x1575ca) [0x7f5b0c2805ca] (??:0) [3] godot(+0x4adf361) [0x564aff187361] (??:?) [4] godot(+0x4a4655b) [0x564aff0ee55b] (??:?) [5] godot(+0x15928d2) [0x564afbc3a8d2] (??:?) [6] godot(+0x14726bf) [0x564afbb1a6bf] (??:?) [7] godot(+0x247bacd) [0x564afcb23acd] (??:?) [8] godot(+0x1ef8d5f) [0x564afc5a0d5f] (??:?) [9] godot(+0x1efe8c5) [0x564afc5a68c5] (??:?) [10] godot(+0x1eb09f5) [0x564afc5589f5] (??:?) [11] godot(+0x1eedafb) [0x564afc595afb] (??:?) [12] godot(+0x4b94e38) [0x564aff23ce38] (??:?) [13] godot(+0x306a41c) [0x564afd71241c] (??:?) [14] godot(+0x30afabd) [0x564afd757abd] (??:?) [15] godot(+0x30b7717) [0x564afd75f717] (??:?) [16] godot(+0x11da0c7) [0x564afb8820c7] (??:?) [17] godot(+0x11758d5) [0x564afb81d8d5] (??:?) [18] /usr/lib/libc.so.6(+0x23850) [0x7f5b0c14c850] (??:0) [19] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f5b0c14c90a] (??:0) [20] godot(+0x11843e5) [0x564afb82c3e5] (??:?) -- END OF BACKTRACE -- ================================================================ [1] 81561 IOT instruction (core dumped) godot -e ```

So are BSP formats different for each engine? Would I need to develop my own BSP-to-CSG converter in order to do something like this?

jitspoe commented 11 months ago

Yeah, bsp files all have different versions for different games. Currently only the Quake1 BSP format is supported, though I've started supporting others but nothing else is done, yet. Also, just updated this with some fixes and disabled the convex hull by default so it shouldn't have an error.