Jump to content

Jedi Academy turned 20 this year! We celebrated in a ton of different ways: mod contest, server event, podcast, etc. Thank you to all who have been a part of this game for the last two decades. Check out the anniversary content!

Read more

Welcome to JKHub

This community is dedicated to the games Star Wars: Jedi Outcast (2002) and Jedi Academy (2003). We host over 3,000 mods created by passionate fans around the world, and thousands of threads of people showcasing their works in progress and asking for assistance. From mods to art to troubleshooting help, we probably have it. If we don't, request or contribute!

Get started

This game turned 20 years old this year, and it is still one of the greatest Star Wars games of all time. If you're new or returning from a long hiatus, here are the basics of getting started with Star Wars Jedi Knight Jedi Academy in 2023.

Read more

Entity Modding: Adding models, making them solid


MoonDog

Q: How do I insert models into my map? Why aren't they solid?

A: First, let me tell you that your model's will never be solid. Model's are never solid to begin with even in GTKRadiant. What makes a model solid is a brush called clip. Or physics_clip. There are several different types but they accomplish the same thing. It's an invisible structural brush that blocks the player. So, in GTKRadiant you make your model, and then you construct a "box" around it as close to the shape of the object as possible and then make that box Clip. (You could also add the spawnflag to the model to make q3map2 auto-clip the object, but that's beside the point.)

Obviously, in entity modding you cannot modify the map in this manner. Thus, your models will remain non solid.

HOWEVER!

The main method of inserting a model is using misc_model_health_power_converter entities and then specifying the "model" as the object you wish to use. Now, misc_model_health_power_converter has its own hitbox, which isn't very big. But it blocks the player, which is handy for simulating clipping around models. For example, in my FFA3 I have three consoles I use in my Logistics area. I'll show you one.

{
"origin" "258 2655 700"
"angle" "270"
"model" "models/map_objects/h_evil/control_station.md3"
"classname" "misc_model_health_power_converter"
"spawnscript" "unusablesetscale"
"parm1" "1.2"
}

As you can see I'm using the script I showed everyone how to make in my scripting tutorial to make the object unusable as a health power converter, and to increase the objects size to 120% of its normal size. The one downside of this method is that the object will still recover player's HP when you press use, but it's easily correctable with that script.

Scripting tutorial

Now, just ONE misc_model_health_power_converter hit box isn't enough to make the whole object solid. So, I'll need to make other ones exactly where I'd like the object to be solid, thus abusing them for my purpose. For this step, you don't need to specify a model, just a spawscript to make it unusable. That makes sure it's invisible. Like this:

{
"classname" "misc_model_health_power_converter"
"origin" "257 2655 729"
"spawnscript" "unusable"
}

It's that simple. Note that I didn't just magically specify "unusable" as the spawnscript making it unusable. I actually have a script by that name that only has one line, Seting player usable false. That's all. You'll need to make one as well.

 

There is a second method to make objects on your map, but I wouldn't recommend using it if you don't have to.

You make a func_static with a bmodel from your map specified in "model" field. Then, you make another key called "model2" and put the map_object/model whatever in that key. This is handy because you don't need a script for this entity. Not even to set the scale. You can use the key model2scale in order to change the scale of model2, which is the model you desire on your map. Keep in mind, there is no hitbox for this entity, and unlike misc_model_health_power_converter you'll be able to walk straight through it. I'll show you an example of what this would look like:

{
"classname" "func_static"
"model" "*2"
"model2" "models/map_objects/imperial/cell_door_frame.md3"
"origin" "X Y Z"
"angle" "45"
"model2scale" "150"
}

Note that you don't have to use !brushmoveorigin to place this entity. The origin for this entity can be wherever you actually want it.

It's very important that you don't go overboard. You can only have 256 entities at a time in one snapshot(area). If you go over this, it will truncate them down to 256 thus making things start to disappear. Also, certain entities like trigger_multiples may stop working. Don't place too many func_statics in one area or any other entities for that matter.

Also, only specify model's that come in the assets1.pk3. You want everyone to be able to enjoy your map. This means you have to work with what Ravensoft gave you. Good luck.


User Feedback

Recommended Comments

There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...