Jump to content

afi

Members
  • Posts

    971
  • Joined

  • Last visited

Everything posted by afi

  1. Using strings in menus. This is pretty much a translation of my old tutorial that I wrote for darth-arth.de. Strings can be useful if you want to translate your mod in several languages or if you have a lot of text. It's just way more clearly than writing the text right into the menu file. The syntax in the menu files is like that: text @[stringfile]_[name of the string] For example: text @MENUS_NEWThis string is located in "MENUS.str" and the name of the string is "New". A string file needs to be in the folder strings/[language] For example strings/english . It needs to have the file extension .str and is for example looking like that: //example.str VERSION "1" CONFIG "W:\bin\stringed.cfg" FILENOTES "Text printed at console" REFERENCE MYLINK LANG_ENGLISH "This text is/n cool!" ENDMARKER At the beginning there needs to be the stuff with VERSION,CONFIG und FILENOTES. And in the end there is the ENDMARKER command.Reference is the "link" to your text. The actual text is written behind the command LANG_ENGLISH. Line breaks can be done with /n. This is an example of how it could look like in the menu: itemDef { name example text @example_MYLINK style WINDOW_STYLE_EMPTY rect 100 200 130 24 font 4 textscale 1.1 textalign ITEM_ALIGN_CENTER textstyle 3 textalignx 65 textaligny -1 forecolor 1 1 1 1 visible 1 decoration } In the game it would look like this: This text is cool! I hope you learned something new. Good luck with your menus
  2. Basic knowledge of coding menus Prior Knowledge Requirements: Creating/Modifying/Opening .Pk3s Tools: PakScape, a good text editor like EditPlus. Coding menus in Jedi Knight is not hard at all and can be compared to markup languages like HTML. Calling it "coding" is actually not completly correct but since everyone does so, I'm gonna do so as well. My goal with this tutorial is just to give you some small overview. I will go more into detail in future tutorials. Your first step is to open PakScape and to extract all the ui-files (located in assets1.pk3) to your hard drive. Now open the file main.menu with your text editor. As you can see a menu consists of several different parts. The assetGlobalDef affects all menu files and can only be found in the main.menu. The menuDef is the header of every menu and sets stuff like the resolution, the name of the menu, etc. The itemDefs are the actual elements of a menu. Text, images, buttons or videos are all itemDefs. To go more into detail: assetGlobalDef: For beginners there is actually not much that is important to alter (there is also a lot hardcoded). I will explain in a future tutorial how you can change the fonts though. menuDef: name - sets the name of the menu. Attention! The name of the menu file (e.g. main.menu) can differ from the actual name of the menu that is set in the menuDef. I will explain later why this is important. fullScreen - The main menu has to be fullscreen, other menus can open as a small window. rect - sets the position and the resolution of the menu. If fullScreen is set to 1, it should be always set to 0 0 640 480. visible - defines the visibility of the menu. Better set it to 1. focusColor - sets the color of the item that is in focus (= in contact with the mouse). desc... - the description-text that appears when you hover over the buttons (usually located at the bottom of the menu). descX, descY - the positioning of the desc-text. descScale - the size of the desc-text. descColor - the color of the desc-text. descAlignment - the alignment of the desc-text. Itemdef The Background (for example the Star Wars-logo on the top): name - sets the name of the item. Can be important if you want to open or focus items. group - can be useful if you want to centralize several items in one group. style - defines the style of the item. WINDOW_STYLE_EMPTY no background WINDOW_STYLE_FILLED filled with background color WINDOW_STYLE_GRADIENT gradient bar based on background color WINDOW_STYLE_SHADER gradient bar based on background color WINDOW_STYLE_TEAMCOLOR team color WINDOW_STYLE_CINEMATIC cinematic rect - the position and the resolution of the item. (Explanation in the end of the tutorial.) background - the path of the background-image. Can also be a path to a shader-file. forecolor - the fore color used in the item. Only useful if you use a color instead of an image as a background. visible - defines the visibility of the item. decoration - makes you not touching and picking the item with the mouse. The Button (for example the Loadgame-button) Pretty similar to the background-items. You can actually also use an image to be a button. But in JK:JA there are only text-buttons used. text - the path to the text-string (I will explain that in a future tutorial). descText - the path to the description text-string. font - the font used for the text (1-4). textscale - the size of the text. textaligny, textalignx - changes the position of the text. textalign - the alignment of the text. textstyle - there are different textstyles, like shadowed text. type - important command that can be used to implement listboxes, checkboxes, etc. ITEM_TYPE_TEXT simple text ITEM_TYPE_BUTTON button, basically text with a border ITEM_TYPE_RADIOBUTTON toggle button, may be grouped ITEM_TYPE_CHECKBOX check box ITEM_TYPE_EDITFIELD editable text, associated with a cvar ITEM_TYPE_COMBO drop down list ITEM_TYPE_LISTBOX scrollable list ITEM_TYPE_MODEL model ITEM_TYPE_OWNERDRAW owner draw, name specs what it is ITEM_TYPE_NUMERICFIELD editable text, associated with a cvar ITEM_TYPE_SLIDER mouse speed, volume, etc. ITEM_TYPE_YESNO yes no cvar setting ITEM_TYPE_MULTI multiple list setting, enumerated ITEM_TYPE_BIND multiple list setting, enumerated ITEM_TYPE_TEXTSCROLL scrolls text ITEM_TYPE_INTSLIDER mouse speed, volume, etc. The "on"-commands Only used in the menuDef: onOpen - stuff that happens when the menu gets opened onEsc - stuff that happens when the menu gets closed Used in the itemDefs: Action - gets executed when you click on the item. For example a new menu opens. mouseEnter - gets executed when you touch the item with the mouse. mouseExit - gets exectued when tou leave the item with the mouse. doubleclick - gets executed when you doubleclick the item. Rect The rect-command works like this: rect X Y W H X = horizontal position Y = vertical position W = width H = height Colors The colors work like this: color R G B T R = red G = green B = blue T = transparency All values can go from 0 to 1. Loading menu files. There are textfiles which are responsible for loading the actual menu files. For example the file that loads the singleplayer menus is called menus.txt. Please note that the engine loads the menus by their actual filename not their "menu-name" that is defined in the menuDef. This concludes my tutorial about basic menu coding.
  3. Basic knowledge of coding menus Prior Knowledge Requirements: Creating/Modifying/Opening .Pk3s Tools: PakScape, a good text editor like EditPlus. Coding menus in Jedi Knight is not hard at all and can be compared to markup languages like HTML. Calling it "coding" is actually not completly correct but since everyone does so, I'm gonna do so as well. My goal with this tutorial is just to give you some small overview. I will go more into detail in future tutorials. Your first step is to open PakScape and to extract all the ui-files (located in assets1.pk3) to your hard drive. Now open the file main.menu with your text editor. As you can see a menu consists of several different parts. The assetGlobalDef affects all menu files and can only be found in the main.menu. The menuDef is the header of every menu and sets stuff like the resolution, the name of the menu, etc. The itemDefs are the actual elements of a menu. Text, images, buttons or videos are all itemDefs. To go more into detail: assetGlobalDef: For beginners there is actually not much that is important to alter (there is also a lot hardcoded). I will explain in a future tutorial how you can change the fonts though. menuDef: name - sets the name of the menu. Attention! The name of the menu file (e.g. main.menu) can differ from the actual name of the menu that is set in the menuDef. I will explain later why this is important. fullScreen - The main menu has to be fullscreen, other menus can open as a small window. rect - sets the position and the resolution of the menu. If fullScreen is set to 1, it should be always set to 0 0 640 480. visible - defines the visibility of the menu. Better set it to 1. focusColor - sets the color of the item that is in focus (= in contact with the mouse). desc... - the description-text that appears when you hover over the buttons (usually located at the bottom of the menu). descX, descY - the positioning of the desc-text. descScale - the size of the desc-text. descColor - the color of the desc-text. descAlignment - the alignment of the desc-text. Itemdef The Background (for example the Star Wars-logo on the top): name - sets the name of the item. Can be important if you want to open or focus items. group - can be useful if you want to centralize several items in one group. style - defines the style of the item. WINDOW_STYLE_EMPTY no background WINDOW_STYLE_FILLED filled with background color WINDOW_STYLE_GRADIENT gradient bar based on background color WINDOW_STYLE_SHADER gradient bar based on background color WINDOW_STYLE_TEAMCOLOR team color WINDOW_STYLE_CINEMATIC cinematic rect - the position and the resolution of the item. (Explanation in the end of the tutorial.) background - the path of the background-image. Can also be a path to a shader-file. forecolor - the fore color used in the item. Only useful if you use a color instead of an image as a background. visible - defines the visibility of the item. decoration - makes you not touching and picking the item with the mouse. The Button (for example the Loadgame-button) Pretty similar to the background-items. You can actually also use an image to be a button. But in JK:JA there are only text-buttons used. text - the path to the text-string (I will explain that in a future tutorial). descText - the path to the description text-string. font - the font used for the text (1-4). textscale - the size of the text. textaligny, textalignx - changes the position of the text. textalign - the alignment of the text. textstyle - there are different textstyles, like shadowed text. type - important command that can be used to implement listboxes, checkboxes, etc. ITEM_TYPE_TEXT simple text ITEM_TYPE_BUTTON button, basically text with a border ITEM_TYPE_RADIOBUTTON toggle button, may be grouped ITEM_TYPE_CHECKBOX check box ITEM_TYPE_EDITFIELD editable text, associated with a cvar ITEM_TYPE_COMBO drop down list ITEM_TYPE_LISTBOX scrollable list ITEM_TYPE_MODEL model ITEM_TYPE_OWNERDRAW owner draw, name specs what it is ITEM_TYPE_NUMERICFIELD editable text, associated with a cvar ITEM_TYPE_SLIDER mouse speed, volume, etc. ITEM_TYPE_YESNO yes no cvar setting ITEM_TYPE_MULTI multiple list setting, enumerated ITEM_TYPE_BIND multiple list setting, enumerated ITEM_TYPE_TEXTSCROLL scrolls text ITEM_TYPE_INTSLIDER mouse speed, volume, etc. The "on"-commands Only used in the menuDef: onOpen - stuff that happens when the menu gets opened onEsc - stuff that happens when the menu gets closed Used in the itemDefs: Action - gets executed when you click on the item. For example a new menu opens. mouseEnter - gets executed when you touch the item with the mouse. mouseExit - gets exectued when tou leave the item with the mouse. doubleclick - gets executed when you doubleclick the item. Rect The rect-command works like this: rect X Y W H X = horizontal position Y = vertical position W = width H = height Colors The colors work like this: color R G B T R = red G = green B = blue T = transparency All values can go from 0 to 1. Loading menu files. There are textfiles which are responsible for loading the actual menu files. For example the file that loads the singleplayer menus is called menus.txt. Please note that the engine loads the menus by their actual filename not their "menu-name" that is defined in the menuDef. This concludes my tutorial about basic menu coding.
  4. Related topic: https://jkhub.org/topic/9348-open-source-jedi-knight-in-a-modern-engine/?do=findComment&comment=133837
  5. I cry when I see how the new Battlefront games handle lightsaber combat. I fucking cry. All aspects of these games (except for visuals and audio) are literally worse than in JK2, a 15 year old game. But that's a general problem with current AAA games, not only EA, making gold plated pieces of shit that look awesome but play profane af. A new Jedi Knight (which would be a reboot with a name as simple as "Jedi Knight") would be bad anyway. AAA developers and publishers don't take a risk. They would be like "Ok, Jedi Knight was this game where people played with lightsabers etc, so let's just implement a system where you have to press a single button and the game will handle everything else. That's what people want and everything else would be too complicated for the players anyway." So yes, the Jedi Knight series has been wasted. But now it's too late. We will not see another game with JK's lightsaber-combat and movement mechanics cause it's simply too complicated for what current AAA developers are aiming for. That's the only conclusion you can draw from reboots like Thief, Tomb Raider and Battlefront etc. I'd rather have no new Jedi Knight than another bad reboot (I was so angry about Thief...). The only option that I see are dedicated fanprojects. /rant
  6. There are way too many sound guys. Nice project
  7. Ah yea, you mentioned that before. Is that available somewhere?
  8. Can you explain please? The final goal of this project would be replacing all old assets with new assets tho.
  9. This here is pretty cool to convert maps btw: https://forums.unrealengine.com/community/community-content-tools-and-tutorials/123612-tool-quake-3-assets-maps-converter
  10. While it's easy to port to goldsource, source engine is using a different map format. You can maybe try to open your map in Hammer, then export it to goldsrc and from that to source. Not sure if theres a tool that makes it easier.
  11. I'm pretty sure Eridan Crisis will go for a saber combat system like in MBII
  12. No, there were literally 3 good dual saberists in the history of this game and even they had major problems when playing against staff.
  13. Why lol? Fast style on single is mostly useless compared to medium and strong. And dual sabers are too weak as well.
  14. https://jkhub.org/topic/9348-open-source-jedi-knight-in-a-modern-engine/ but this is only about multiplayer, no singleplayer
  15. New discord invite link (the other one expired): https://discord.gg/BCMhU3h We are still searching for people who wanna contribute
  16. afi

    SaberMod

    lul Messiah still playing?
  17. Defender and I don't really remember the staff hilts.
  18. I opened a discord channel: https://discord.gg/9MmT4q I suggest everyone who wants to contribute or is interested in this project joins it. Will make it easier to communicate and to see who is actually interested.
  19. I would see it like the difference between JK2 and JKA or Age of Chivalry and Chivalry: Medieval Warfare. Different, but still similar enough so people who played the older games will feel comfortable. Splitting the community is a huge argument. I think that should be avoided at any cost.
  20. I actually had a similar idea, having two rulesets: Original JK and one with new mechanics. But I agree with Boothand, this would confuse people. I think what is needed is a clear direction in terms of gameplay and no fear if things become a little different. Even tho I adore the gameplay and movement in JK, I don't think that this should be just a port of the same mechanics to a newer engine.
×
×
  • Create New...