newbspguy icon indicating copy to clipboard operation
newbspguy copied to clipboard

BaseClasses has no filter

Open Mikk155 opened this issue 1 year ago • 14 comments

BaseClasses in the FGD has not filter when displaying them in BSPGuy. i.e you have a entity that is PointClass and SolidClass as well.

Sample:

@BaseClass = bBBox
[
    minhullsize(string) : "Minimun BBox Size"
    maxhullsize(string) : "Maximun BBox Size"
]
@BaseClass base( bTargetname, bRenderamt, bRendercolor ) = bGeiger
[
    health(float) : "Minimun delay" : 0.1
    max_health(float) : "Maximun delay" : 1.0
    sound#1(sound) : "Sound FX" : "player/geiger1.wav"
    sound#2(sound) : "Sound FX" : "player/geiger2.wav"
    sound#3(sound) : "Sound FX" : "player/geiger3.wav"
    sound#4(sound) : "Sound FX" : "player/geiger4.wav"
    sound#5(sound) : "Sound FX" : "player/geiger5.wav"
    sound#6(sound) : "Sound FX" : "player/geiger6.wav"
]
@PointClass base(bGeiger, bBBox) = env_geiger : "geiger"[]
@SolidClass base(bGeiger) = env_geiger : "geiger"[]

min/maxhullsize will be displayed in both Class of the entity, in this example, hullsizes should only be displayed on the PointClass of the entity, would be easy to verify if the key model starts with asterisk * if so, use SolidClass, else use PointClass

Mikk155 avatar Mar 25 '23 09:03 Mikk155

An entity should not be both Point & Solid.

Qwertyus3D avatar Mar 31 '23 04:03 Qwertyus3D

An entity should not be both Point & Solid.

A entity can work as both, the model only defines if its solid and do things depending on that, an yet that's a custom entity made by me in Sven Coop. If point, it uses radius, if solid, it uses its bbox.

Mikk155 avatar Mar 31 '23 09:03 Mikk155

@Mikk155 newbspguy can't support duplicate names at this time

@Mikk155 what editor can works with this fgd ?

UnrealKaraulov avatar Dec 09 '23 13:12 UnrealKaraulov

Let's say i have a entity that is both a point entity and a brush entity, The game code just checks if it's a BSPModel and make the entity behave as.

The entity that is the last readed in the FGD will be the definitive fields, ignoring the others

This is a brush entity, doesn't have hullsizes fields

@SolidClass = antirush : "Anti Rush"
[
]

The point entity does have them

@PointClass= antirush : "Anti Rush"
[
    minhullsize(string) : "Custom Min Hull Size (X Y Z)" : "0 0 0"
    maxhullsize(string) : "Custom Max Hull Size (X Y Z)" : "0 0 0"
]

If i swap the point entity to be above the solid entity, it won't give hullsize to any of them, because the last entity in the fgd is overwritting the previous one, what i would want is BSPGuy to proper give the entity's keyvalue fields specific if point or brush, just as JACK/SDK does, you can't find trigger_changelevel in the point entities section, and even if you force it, it won't show any fields.

I didn't saw the code and to be honest i am newbie programing but that shouldn't take more than checking if the value of the key model starts with *

Mikk155 avatar Dec 09 '23 17:12 Mikk155

@Mikk155 please tell me name of Editor that can support your FGD file.

UnrealKaraulov avatar Dec 10 '23 05:12 UnrealKaraulov

This feature can not be supported if no map editor that support this feature.

UnrealKaraulov avatar Dec 10 '23 16:12 UnrealKaraulov

J.A.C.K and i guess Hammer does as well image

@SolidClass base(Targetname, Target) = test : "Test"
[
]

@PointClass base(Targetname, Target) = test : "Test" 
[
	radius(integer) : "Radius"
	maxhullsize(string) : "Max hullsize" : "0 0 0"
	minhullsize(string) : "Min hullsize" : "0 0 0"
]

In this case, BSPGuy will only read the last registered entity in the FGD and use that information for both if BRUSH or POINT

Mikk155 avatar Dec 10 '23 17:12 Mikk155

@Mikk155 now, in latest version, your fgd works?

UnrealKaraulov avatar Dec 17 '23 09:12 UnrealKaraulov

Doesn't seems to, i am using the example i previously sent. it is using the information of the first one loaded(not hullsizes nor radius shown), and if i open the propierty of the brush one, then in the point entity will appear the "model" keyvalue

Mikk155 avatar Dec 18 '23 01:12 Mikk155

@Mikk155 but you can't change point to solid class even in J.A.C.K

@Mikk155 try again https://github.com/UnrealKaraulov/newbspguy/releases/tag/NightBuild_2023.12.18_05-34

Now fixed merge two or more fgd files, and some fixes in "model" check.

UnrealKaraulov avatar Dec 18 '23 05:12 UnrealKaraulov

@Mikk155 if this issue not fixed, please tell me below.

UnrealKaraulov avatar Jan 26 '24 10:01 UnrealKaraulov

Sorry, i completely forgot, no, the problem still remains

image image

you can test by yourself with the FGD i previously sent in here

Mikk155 avatar Jan 29 '24 10:01 Mikk155

@Mikk155 and you can't change class to solid?

UnrealKaraulov avatar Jan 31 '24 07:01 UnrealKaraulov

didn't tried it, in any ways this issue was more like an improve, since BSPGuy never filtered repeated classes as other level design tools does

Mikk155 avatar Jan 31 '24 07:01 Mikk155