eezstreet Posted August 27, 2016 Posted August 27, 2016 So I'm thinking about editing the UI and HUD code. I'd like to preface this by outlining some changes that I'm thinking of. For starters, I am thinking of adding a full blown menu for AI Workshop controls. It would also include an "NPC Spawn" feeder where you can pick NPCs from a list. (This list would be populated entirely by what's in your base/jke folders, so lists with static options like NpcSP would no longer be relevant) Basically it would include all of my AI Workshop stuff, except for a few commands (setting things that rely on position/what you're looking at won't be part of the menu, but setting BSTATE or BSET would be, as well as toggling notarget/god for an NPC) Secondly, I want to make the HUD a little more malleable in terms of what you can do with it, but I'm not sure what people could do with these changes. For starters, it should be possible to add new elements to the HUD, although they will most likely not be scripted in any way. Lastly, I want to add a cheat menu to the game. It would include controls for some things (such as toggle god/notarget on a bind) and some hidden options that could be considered cheating. I'm not sure whether to:Keep it hidden by default, and unlocked upon completing the gameLeave it out and open for people to useMake it some hidden thing, like clicking a tiny part of the menu that nobody looks at Bek, therfiles, Smoo and 3 others like this
eezstreet Posted September 8, 2016 Author Posted September 8, 2016 Bump, since I never got any feedback on this. Perhaps you have an opinion, @@therfiles ?
therfiles Posted September 8, 2016 Posted September 8, 2016 Ack! Sorry that I missed this! This is super exciting. So NpcSP has always been a nifty tool, but it is completely limited by the "smoke and mirrors" of soft-code UI and script changes, rather than deep coding additions. Your AI Workshop has all the features I've wanted to tackle. One thing that I could see being helpful would be a proper NPC freeze that also don't block scripting. For instance, I may want to freeze all the NPCs, go up to each of them and edit their options. In my my experience, simply using d_npcfreeze/icarus freeze block all further manipulations. I don't know if you've already figured out a work around. In addition, binding NPC spawn/presets could be awesome. In fact, it would be great to spawn an NPC with the presets from your pre-set edits with the press of the button. Also, a non-glitched NPC control feature would be excellent (and not the ghetto mind-trick/mouse droid control from JK2). From my experience, giving the user as many features and options to change is the best course: a toolbox for players. Gosh. I wish we had this cracked back when I modded more. HUD elements are super exciting for UI/scripter. You can add custom graphics to the HUD for objectives (kill 5 stormies, with icons...like LEGO Star Wars), new counters (for my Harry Potter mod, I added a custom counter for "magic" points). I would also love to be able to change how weapon/force icons are displayed. Perhaps vertically? Anyway, I think that could give a lot more freedom. However the VERY biggest roadblock with any HUD modding (even with OpenJK in my experience) is CVAR manipulation. For instance, say I wanted the icons of 5 stormtroopers to appear in the corner, and for them to disappear as I killed them. However, the only way I know to UI script an element like this is to use CVAR checks...and there is no way (in my knowledge) to change CVAR values by script/event (change cvar_Stormies_left to '4'). So HUD manipulation is great, but scripting these elements to get data from the actual gameplay is very important. As for the cheat menu, I'd say hide it somewhere. People who are going to use it know the game, and have played it. Hiding it is a cool feature that is fairly standard (IMO) for most games that choose to include it. And keeping it locked up by game completion is silly since people might use this mod just to spice up gameplay. The audience I see using it are people interested in spicing up the gameplay for a game they've beaten a bunch of times (this game is old after all). Finally: feel free to plunder or re-work any of my mods/menus if that would be helpful to you. Smoo and Archangel35757 like this
eezstreet Posted September 8, 2016 Author Posted September 8, 2016 Ack! Sorry that I missed this! This is super exciting. So NpcSP has always been a nifty tool, but it is completely limited by the "smoke and mirrors" of soft-code UI and script changes, rather than deep coding additions. Your AI Workshop has all the features I've wanted to tackle. One thing that I could see being helpful would be a proper NPC freeze that also don't block scripting. For instance, I may want to freeze all the NPCs, go up to each of them and edit their options. In my my experience, simply using d_npcfreeze/icarus freeze block all further manipulations. I don't know if you've already figured out a work around. In addition, binding NPC spawn/presets could be awesome. In fact, it would be great to spawn an NPC with the presets from your pre-set edits with the press of the button. Also, a non-glitched NPC control feature would be excellent (and not the ghetto mind-trick/mouse droid control from JK2). From my experience, giving the user as many features and options to change is the best course: a toolbox for players. Gosh. I wish we had this cracked back when I modded more. HUD elements are super exciting for UI/scripter. You can add custom graphics to the HUD for objectives (kill 5 stormies, with icons...like LEGO Star Wars), new counters (for my Harry Potter mod, I added a custom counter for "magic" points). I would also love to be able to change how weapon/force icons are displayed. Perhaps vertically? Anyway, I think that could give a lot more freedom. However the VERY biggest roadblock with any HUD modding (even with OpenJK in my experience) is CVAR manipulation. For instance, say I wanted the icons of 5 stormtroopers to appear in the corner, and for them to disappear as I killed them. However, the only way I know to UI script an element like this is to use CVAR checks...and there is no way (in my knowledge) to change CVAR values by script/event (change cvar_Stormies_left to '4'). So HUD manipulation is great, but scripting these elements to get data from the actual gameplay is very important. As for the cheat menu, I'd say hide it somewhere. People who are going to use it know the game, and have played it. Hiding it is a cool feature that is fairly standard (IMO) for most games that choose to include it. And keeping it locked up by game completion is silly since people might use this mod just to spice up gameplay. The audience I see using it are people interested in spicing up the gameplay for a game they've beaten a bunch of times (this game is old after all). Finally: feel free to plunder or re-work any of my mods/menus if that would be helpful to you.I will address more of these points later, but I wanted to comment on a few things first: 1. There is no feature to freeze NPCs yet but it's a good idea.2. Mind Trick level 4 is vastly improved in OpenJK3. Creating NPCs from a template sounds nice.4. Would you be interested in creating the .menu for me? Just assume that the buttons etc will do the things that they are supposed to, and that the feeder will work correctly. Thanks. Smoo likes this
therfiles Posted September 9, 2016 Posted September 9, 2016 Hit me up with a PM. I don't do much modding anymore (barely any, actually) but if you can stomach my lack of timely updates I will take a swing at it. It's usually the art that holds me up on UI stuff anyway. Similar to NpcSP this will just be some nice looking buttons and text.
eezstreet Posted September 9, 2016 Author Posted September 9, 2016 Hit me up with a PM. I don't do much modding anymore (barely any, actually) but if you can stomach my lack of timely updates I will take a swing at it. It's usually the art that holds me up on UI stuff anyway. Similar to NpcSP this will just be some nice looking buttons and text.Oh, well I was just going to use JK2's original styled menus. Unless you want to restyle all of the elements to look nicer, perhaps..? Smoo likes this
ensiform Posted September 9, 2016 Posted September 9, 2016 Well, a pop-up per say like that stuff technically is UI and not HUD. The HUD code can support most things already it's just they disabled and or stripped most of it out. Getting super dynamic HUD elements like adding a status with each NPC wouldn't be easy though. eezstreet likes this
therfiles Posted September 9, 2016 Posted September 9, 2016 Oh, well I was just going to use JK2's original styled menus. Unless you want to restyle all of the elements to look nicer, perhaps..?That's cool. Don't you need a clear background to see the NPCs? And then go all out for the cheat menu.
eezstreet Posted September 9, 2016 Author Posted September 9, 2016 That's cool. Don't you need a clear background to see the NPCs? And then go all out for the cheat menu.Yup. I'd take a look at the profile menu for a good idea on how this would look.Basically I am thinking of a three-tabbed menu for NPCs: Spawn (which has a list of NPCs, and basic details about the selected NPC as well as a model preview), Templates (which has a list of templates, "Create Template from Selected NPC", "Delete Template", "Spawn NPC from Template, and a stat list for the currently selected template as well as maybe a model preview), and lastly Workshop, which has all of the Workshop commands. Stoiss likes this
eezstreet Posted September 11, 2016 Author Posted September 11, 2016 Ack! Sorry that I missed this! This is super exciting. So NpcSP has always been a nifty tool, but it is completely limited by the "smoke and mirrors" of soft-code UI and script changes, rather than deep coding additions. Your AI Workshop has all the features I've wanted to tackle. One thing that I could see being helpful would be a proper NPC freeze that also don't block scripting. For instance, I may want to freeze all the NPCs, go up to each of them and edit their options. In my my experience, simply using d_npcfreeze/icarus freeze block all further manipulations. I don't know if you've already figured out a work around. In addition, binding NPC spawn/presets could be awesome. In fact, it would be great to spawn an NPC with the presets from your pre-set edits with the press of the button. Also, a non-glitched NPC control feature would be excellent (and not the ghetto mind-trick/mouse droid control from JK2). From my experience, giving the user as many features and options to change is the best course: a toolbox for players. Gosh. I wish we had this cracked back when I modded more. HUD elements are super exciting for UI/scripter. You can add custom graphics to the HUD for objectives (kill 5 stormies, with icons...like LEGO Star Wars), new counters (for my Harry Potter mod, I added a custom counter for "magic" points). I would also love to be able to change how weapon/force icons are displayed. Perhaps vertically? Anyway, I think that could give a lot more freedom. However the VERY biggest roadblock with any HUD modding (even with OpenJK in my experience) is CVAR manipulation. For instance, say I wanted the icons of 5 stormtroopers to appear in the corner, and for them to disappear as I killed them. However, the only way I know to UI script an element like this is to use CVAR checks...and there is no way (in my knowledge) to change CVAR values by script/event (change cvar_Stormies_left to '4'). So HUD manipulation is great, but scripting these elements to get data from the actual gameplay is very important. As for the cheat menu, I'd say hide it somewhere. People who are going to use it know the game, and have played it. Hiding it is a cool feature that is fairly standard (IMO) for most games that choose to include it. And keeping it locked up by game completion is silly since people might use this mod just to spice up gameplay. The audience I see using it are people interested in spicing up the gameplay for a game they've beaten a bunch of times (this game is old after all). Finally: feel free to plunder or re-work any of my mods/menus if that would be helpful to you.So now that I have a bit more time, I can respond to this further.I've added a command to freeze NPCs that works with ICARUS freeze (workshop_freeze will toggle freezing on an NPC). What would you like in templates? I am thinking two different approaches:Copy literally everything about the entity into a file. Pro: It's extremely comprehensive, small filesize (< 1 kb) and also extremely fast to copy a template. Con: The files wouldn't be human-readable/editable so you can't hack values into the template, and they might be broken with future updates. Make a human-readable JSON file with template values. Pro: Human-readable so you can hack stuff into the template. Won't break with future updates. Con: Game will freeze for a moment upon copying a template onto an NPC, or saving a template. Files may be a bit large (1-8kb each). Fields in the template have to be manually coded in.The idea of having new elements show up and use cvars is an interesting one, but for what you're doing, you might as well just use straight-up coding to accomplish that goal. Smoo likes this
therfiles Posted September 13, 2016 Posted September 13, 2016 Hmmm... Probably all the NPC's information in the templates: weapon, health, force abilities, behavior, etc. If you could figure out how to fix and put SET_SCALE and maybe the NPC's class in there, that would be incredible. And I'd say go with #1. Human readability is nice, but in my experience, any interruption of the game play is not ideal. Smoo likes this
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now