Jump to content

NpcSP (V2 Testers Needed!)


Recommended Posts

Posted

Hey guys :P

 

After people really liked CamSP, I thought about some other "KOTF exclusive" SP features that I could replicate and make better. I've been tossing around the idea of making an NpcSP - A very powerful NPC spawning utility that's going to give the player so much control.

 

But I'm at a bit of a mental roadblock. There are two roads I can take:

 

  1. Very simple approach. You select an NPC, it spawns, and you can spawn more of that NPC simply by pressing a key
  2. More complex approach. You can select an NPC, but then you are able to edit it in real-time. You can change parameters like Health, Weapons, Size, Behavior, Team, etc with the click of a button. Then you can go up to them and press the USE key in order to make further changes later. I'd also really like the player to be able to keep track of all the NPCs he/she has spawned by naming each one and being able to control them, remove them, or edit them from a "master command screen". However, this would require a limited number of "entries" in the system. I'm playing around with a max of 32 "data" entries at any one time.
  3. Or, combine the two and let the player toggle between them. This will be immensely difficult but possible.

 

What approach would be the most fun and enjoyable for all you SP players? Thanks!

Posted

h36j.jpg

little concept ide I came up with for jkg some time ago. But it didnt fit int to the game at all

So if you want something like this I can give you the files for it :-)

Can I try?

Posted

There is no menu files for it. It is only a draw concept. But it can be used to go on with materials there has been used to make it work in a menu file

Posted

@@Stoiss: That's pretty neat! Thanks for sharing that! Unfortunately though, I don't think a menu of that layout/setup could accomplish the ridiculous multitude of things I'm trying to cram into a .menu.

 

Also, I did a bit more thinking, and blending the two options wouldn't be that hard at all :P

 

After some more consideration, I've been able to create a rough mental structure on how the second option could work. The only puzzling bit is how to delete an NPC's data entry when he is killed. Basically, I'd need to be able to set a few cvars when the NPC is killed, but scripts (death scripts in particular) have no way to edit cvars effectively...Other than a few of the mission specific ones which would break SP compatibility.

Posted

I like what Circa said. A simple version first followed by a complex one in the future.

 

The only downside I can see is if you use the 'use' key for editing. IF another mod comes out that lets us issue commands to npc's it will probably make use of the 'use' key.

Not a problem now but MAYBE a future compatibility issue.

therfiles likes this
Posted

@@katanamaru - Ah...I didn't think of that! However, you'd only be able to use the "edit" feature on NPCs you personally spawn. But still, I could see how that can be confusing! And yeah, I'm all 'bout that compatibility! I've kinda ditched the whole "use" editor idea now, rather, I'd like to have one central menu where all the NPCs you've spawned are listed by the custom name you give them and edit/remove/control/kill/freeze them that way.

 

I think it seems like you guys want separate versions. Sounds good! I'm still going to see how much work each version would take, and how feasible it would be to combine them both, time-wise.

Circa likes this
Posted

So I was working on making a "Random" NPC spawner, and I ran into a rather odd error:

 

ERROR: About to overflow modelsAlreadyDone, increase MAX_MODELS_PER_LEVEL

 

Kinda sad. Sorry guys, but you'll only be able to spawn up to 48 unique NPCs at a time, rather than 50. :D Oddly though, if you save and load up the game, you can spawn more...

Circa likes this
Posted

So I was working on making a "Random" NPC spawner, and I ran into a rather odd error:

 

ERROR: About to overflow modelsAlreadyDone, increase MAX_MODELS_PER_LEVEL

 

Kinda sad. Sorry guys, but you'll only be able to spawn up to 48 unique NPCs at a time, rather than 50. :D Oddly though, if you save and load up the game, you can spawn more...

does MAX_MODELS_PER_LEVEL not have a bit value there can be change ?

Posted

@@Stoiss: Thanks for the suggestion, but I was unable to set it via console. I'm guessing it's a coding thing, and while some coding changes would help this project exponentially, my goal is to make this a plugin that is compatible with all mods. Thanks though! :D

Posted

@@Stoiss: Thanks for the suggestion, but I was unable to set it via console. I'm guessing it's a coding thing, and while some coding changes would help this project exponentially, my goal is to make this a plugin that is compatible with all mods. Thanks though! :D

yep, can't do it in OpenJK because this limit in particular will have effects on savegames as I believe

therfiles likes this
Posted

Yeah...that's what I was afraid of.

 

By the way...progress is still being made on this. It's just a heck of a job trying to consolidate this many NPCs, figure out how to name/sort them, and also making multiple functions for the player to perform on them. The plan now is that in basic mode, you can spawn them (however many you like). In advanced, you can spawn up to 32 NPCs, but you can name and edit the properties of each one.

Circa, Stoiss and katanamaru like this
  • 2 weeks later...
  • 4 months later...
Posted

npcsp_progress.PNG

 

Phew! This is proving to be my most ambitious project yet! I've got a crazy bunch done but a heck of a lot to code. I think there's about 2500 lines of UI code so far...and thats only about 1 of the 5 function I plan to offer in basic mode...that doesn't even include advanced! Still, it's really cool to see this take shape! Thoughts? The arrows by the category allow the user to collapse and hide all the respective NPCs, for a cleaner menu.

Jeff, Agent Jones, Circa and 1 other like this
Posted

npcsp_progress.PNG

 

Phew! This is proving to be my most ambitious project yet! I've got a crazy bunch done but a heck of a lot to code. I think there's about 2500 lines of UI code so far...and thats only about 1 of the 5 function I plan to offer in basic mode...that doesn't even include advanced! Still, it's really cool to see this take shape! Thoughts? The arrows by the category allow the user to collapse and hide all the respective NPCs, for a cleaner menu.

 

This is awesome keep up the good work

therfiles likes this
Posted

Thanks for the support guys! Unfortunatly, it looks like I'm going to have to do a page 1 page 2 kinda thing, because there simply isn't enough room!

 

By the way, my planned features for basic mode are:

  • Spawn NPCs
  • Kill NPCs
  • Control NPCs
  • Freeze NPCs
  • Spawn Items and Entities
  • Set NPC as Playermodel
Circa likes this
Posted

Ok, so ran into a roadblock today. Turns out, there is an arbritrary limit on itemDef (buttons, text, etc) of 150, which I blew past a long time ago. So, I'm trying to figure out a way to successfully layer 2 menus on top of each other, so it seems like one seamless menu, with a limit of 300. Wish me luck. A lot of silly things are just going wrong!

Circa and Keyten like this

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...