Jump to content

afi

Members
  • Posts

    965
  • Joined

  • Last visited

Everything posted by afi

  1. I loved the idea of having the academy level as a hub between the levels, as we discussed here: But I know that this would be a huge untertaking..
  2. 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_NEW This 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
  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. Have you tried testing an image-file that works by copying and renaming it to the one that doesn't work? Then you can be 100% sure that it's not the fault of the texture itself.
  5. Oh, don't get me started with that. I hoped JKHub would become the main place for all JKA players but in reality it always catered mostly to the modding community. I don't think that will change at any point.
  6. As someone who has spent way too much time on improving and contributing to the wiki: The wiki does what it's supposed to do and is not worse or better than any other wiki-system (for the most part). The only thing that is currently broken are the profile-pages. Like all wikis, the quality is a matter of the people who contribute and overall there are not more than 3 people who contribute regularly in the last years. The wiki already has a lot of unique and quality content but I think that many people are not even really aware of it's existence, the search engines rarely index the wiki on relevant subjects. If the wiki was part of the regular jkhub profile system, that would definitely help. But I don't think that wiki and tutorials should be mixed.
  7. It's very easy to decompile maps with q3map2 using -convert -format map. The only problems you will have is no point lights (unless the map creator compiled the map with a certain parameter) and bad texture alignment
  8. It's actually quite simple on the paper. I want that, for example on ffa3 people can just play normal ffa/tdm and after a certain time (for example 9 minutes), everyone ingame will be teleported to a new location, for example the bar in ffa3.
  9. Thank you! The problem is that the players wouldn't all be in one place. So I guess I would have to make a giant trigger over the whole map.
  10. So the infos that I need is time (ok, can do that in icarus itself), teamscore, individual score, health and I would like to be able to teleport players to a new location.
  11. Can you get actual gameplay information into icarus? Like current gametime, info about players and such?
  12. Thank you guys. This already helps me a lot.
  13. Yeah that was the idea, decreasing the playable area. The thing is, you can only activate scripts though triggers, right? So I couldn't do something like, if time = 9 min then activate script.
  14. I wondered if you could do something battleroyal-like. I'm especially interested in moving brushes on a timer or teleporting players.
  15. That map is pretty interesting. Didn't see stuff like that in multiplayer before.
  16. What can you do with icarus scripting in multiplayer for Jedi Academy? As far as I understood it's very limited but what exactly can you do with it and what are the limitations?
×
×
  • Create New...