Jump to content

Dusty

Members
  • Posts

    672
  • Joined

  • Last visited

Everything posted by Dusty

  1. Okay, I know why OpenJK isn't working. It's because I had you replace their rdsp_vanilla dll with my own. For now, I would keep both rsdp_vanilla dlls in your Gamedata folder with different names and just rename them as necessary so you can play the mod you want. In a later version of the mod I won't have a renderer dll. As for my mod not working, you said you did a clean install. Did you try deleting my mod and re-downloading it? Just a few days ago I realized I made some mistakes in the readme's installation instructions, so that might be the problem, so if you download again and re-install it following the new instructions it might help. I suspect your problem is something else though...
  2. I never did do the bonus missions... probably still should. I guess I was too concerned with putting a fresh coat of paint on them (UI integration and scripting wise) when they are good enough as is. I have three suggestions for JA's default missions though. 1. Dosuun - Lengthen the prison break segment slightly. Give the player melee initially and force him to fight a few stormtrooper guards strategically placed around the room with weapons that can't be stolen, one holding a key to get out of the jail cell room. 2. Level with the Noghri - Have some swamptroopers spawn in the water and ambush you. 3. Korriban - make the atmosphere a little more epic. Instead of bright and sunny have the sky be dark and stormy in korriban2. More Jedi and more Reborn.
  3. Are there any inbuilt classes in the Quake3/Jedi Knight internal libraries for vectors/lists?
  4. A few questions... Do you still get this error? When exactly does it happen? (before the game window even appears, when loading a savegame...?) Does this happen when you try to play regular OpenJK single player? Do you have any mods that could be conflicting in your base folder? (other code mods for example) Do you have any custom settings or cvars on your game that could be causing a file conflict? (fs_readfilesfirst 1 for example) Also, what is your operating system on your computer?
  5. Perhaps instead of a branch of Jedi Academy enhanced, the mod would work better as a fork of it, for easier maintenance and synchronization?
  6. I edited the main post. I relayed some of my knowledge of Jedi Knight coding as well, hopefully I haven't made any glaring errors?
  7. Kewl. Maybe if we have enough non-code SP mods we could split that section up further. So its easy to find things.
  8. Can you post the parts of the file you changed? Sometimes if I can't remember exactly what I edited I use the GitHub Desktop application to help me look over any changes I made to a file, as it gives me a comparison between my own local edits and the older version of the file.
  9. ^I didn't look at your code yet, so maybe you already did this... wouldn't it be best just to use an array? No new code would have to be written. It could just be a more specific version of g_entities. I'm assuming it wouldn't be very memory intensive especially if it just held pointers and not the actual entities themselves. Quick recap to anyone reading this topic for help: g_entities is an array of entities maintained by the game listing all the active entities in the current game session. The player and NPCs are entities that are also clients (therefore ent->client would be non null). To figure out where your client of interest is kept in g_entities... put a breakpoint somewhere where you will have a pointer to the ent of interest (in this case our NPC). Then look at the information stored in that ent for s.number, and that number will correspond to the array index. So... lets say I have a pointer to some entity called ent which I know is a stormtrooper NPC. I will look in ent->s.number (you should be able to see all this in the locals tab if you put your breakpoint in a good spot). The number I see is say... 135. Then at g_entities[135] should be that stormtrooper.
  10. Both of you gave helpful answers, but Razor was first. On a side note Eez, isn't calling to an external library (std) a bit iffy? Wouldn't it be better to internalize the vector stuff into q_shared or something like that? (But then again, any std code might be pretty complex unless you wrote your own homecooked vectors...)
  11. The list of clients being composed of the player (client 0) and NPCs (clients 1 and up). I'm sure it's somewhere but I have not come across it. It would be helpful for debugging if you could keep tabs on a particular client throughout their lifetime in a game session.
  12. So what makes them a "Hidden" Bek? Or there other variations of Beks? (KOTOR joke)

    1. Dusty

      Dusty

      Also why Black Vulkars? Why can't they be Brown Vulkars? Or Plainly-Visible Vulkars?

    2. Bek

      Bek

      ¯\_(ツ)_/¯

    3. Ramikad

      Ramikad

      Then again since we have Calo Nord, will there be Calo South, East and West? Why are the Ubese not as fat as the name seems to suggest?

  13. The most drastic changes are cvar'd. Some of the code (like the NPC stuff) isn't cvared though. When I said your mod is like mine, I guess I just meant that it sounds like a gameplay improvement mod I guess
  14. Update 12/16/16: I want to expand and improve this article. As it is it's kind of a vague outline based only on my own limited knowledge. The purpose of this guide is teach how the source code of Jedi Academy and Jedi Outcast is structured, especially concepts that are not immediately obvious by just copying and editing the code. Please help me improve and correct this article by posting below with anything you think might be useful. Helpful Resources: IOQuake3 Wiki: http://wiki.ioquake3.org/Game_Development Contains a lot of useful information directly relevant to Jedi Knight coding. It explains a lot of conventions like entities, vectors, and the internal libraries (the Q functions) used by Jedi Outcast, Jedi Academy, and originally Quake 3. I highly recommend at least skimming this section and the main page linked above for anyone who wants to get into coding for OpenJK. Technically this is the wiki for a Q3 modification called ioquake3, like OpenJK except for the original Quake 3 game. OpenJK SP Coding guide: https://github.com/JACoders/OpenJK/wiki/Singleplayer-Overview Explains some concepts of how the Single Player game code is structured in OpenJK. Describes how to switch between JK2 SP and JA SP using the shared jasp executable, how networking support works in SP, a little bit about how to add new values for save games. Coding Tutorials Section on JKHub: https://jkhub.org/tutorials/category/1-coding/ Many helpful guides here if you are just getting your workspace set up or trying to do something specific. A few of these are referenced below. Overview: This guide to help people jump into making code modifications for Jedi Academy and Jedi Outcast without getting lost or confused. We strongly recommend using OpenJK to make SP and engine mods, and JA++ to make JA+ or general MP modifications, and this guide assumes you are using them. If you need to setup OpenJK for compiling, check here for a step-by-step walkthrough. This guide also assumes some basic knowledge of programming, but if you want to get your foot in the door with learning C/C++, check out this guide written by Eezstreet. If you are brand new to modding these games, keep this in mind: Jedi Knight II: Jedi Outcast (JO) and Jedi Knight: Jedi Academy (JA) both have two parts, Single Player (SP) and Multiplayer (MP). The two parts of the game are similar but they have their own code files and executables, and are written in very similar but different languages, that is, SP is written in C++ and MP is written in C. All you probably need to know is that C++ almost entirely contains and can be used to write C but has many new features, syntax, and external libraries added, some to replace old C functions. At this point, you may be wondering even with this guide, how will you ever find your way through this giant crazy mess of source code that is Jedi Academy and Outcast? Look at file names, and use the search function of Visual Studio. It is your friend. Raven writes a lot of comments in their code, and the functions and files are all named according to their purpose. If you've ever modded these games before outside the code, just try searching keywords like Class_Imperial or WP_BLASTER or FP_PUSH (the list goes on and on) and you'll get tons of hits. General Code structure --- The code of both Single and Multi Player is organized into client and server side; client-side files a cl_ (this is the .exe in SP) or cg_ (the cgame/client-game code), and server-side code has the g_ prefix . Files with code that is shared between the cgame and server game code start with the b_ or bg_ prefix. What effects does this have? Multiplayer: when you edit a bg_ file you must compile all projects/DLLs for the game to run properly (that means cgamex86, jampgamex86, and uigamex86 DLLs). You can also separate the code for clients and servers; clients don't necessarily need to have server code, and vice versa. Some mods like JA+ can be played without a client-side plugin. ClientThink (which calls many other gameplay functions) is called whenever a packet arrives which could be multiple times per frame, unless g_synchronous clients is set to 1. The G_RunFrame call tree is only called once per server frame (server fps is determined by sv_fps). SP: the game is actually run as if it were a multiplayer game in some ways, with the Player and NPCs actually treated as clients in the code and the gameworld and gameplay mechanics treated as the "server". The jagamex86 DLL contains the cgame and server game code, and the executable is called the client and it contains the UI/menu code. When the game loads up initially only the executable (and renderer DLL?) is loaded. The jagamex86 DLL is only loaded when you start a gameplay session by loading/saving/starting a new game. Other things to keep in mind are that the player is ALWAYS client number 0, and this is often used to separate code that the player uses from that of NPCs. ClientThink (the exact name in SP is ClientThinkReal or something similar) that is called every frame for every client as long as that client has a BSTATE that can be executed. Also worth keeping in mind is that with OpenJK, Jedi Academy SP and Jedi Outcast SP share the same executable file. More detail to be added later. Internal Libraries --- If you look through the source code, you might notice two things... some functions that start with Q_, and that nowhere in their code does Raven include or make calls to external libraries you might be used to using (like vectors or the C++ string class). The Q_ functions are Raven's versions of the functions normally included in the standard library for C (for example Q_strcat is their version of the strcat function in C), therefore most of these functions will have the same or a similar name and usage to a C function. Why did Raven write their own internal library? This way, they don't need to to import any libraries into their game logic code, nor do they have to worry about changes to an external library affecting their game logic code. In OpenJK, there is some support for external libraries from the STL, like std::vector. Can anyone add clarification for which libraries are supported? Look up C functions here: http://www.cplusplus.com/ (Don't let the name fool you, they have all the documentation for C as well, and C++ contains 98% of C anyway) Entities --- These are the meat of the game. These are the same as entities used in maps; that is anything from a button to a door, to an NPC or the Player(s). As previously stated, Players and NPCs are a special kind of entity that is also a client; this is true for both Single and Multiplayer in JA/JK2. In Single Player all entities are stored in an array called g_entities. (Can anyone confirm for multiplayer?) The index of the array where a client is stored in g_entities is equivalent to s.number. Example: I have an entity called ent that is a stormtrooper, and ent->s.number is 104. Therefore that stormtrooper will be in g_entities[104]). The player will always be stored in g_entities[0]. More info here. Vectors -- If you've taken a high school physics class, you should know a bit about what these are, but I'll try to explain anyway. Vectors are lines that have a length (or magnitude), a position (in x y z coordinates) and also a direction (in x y z values) in a 2D or 3D space. They can be used to make boxes or shapes (like for example, a rectangular box for collision detection around a lightsaber blade). These are used by the code to test for: collision, for a clear path to or line of sight, how close/far away something is, and probably more. The main type used in Q3 is vec3_t. Raven has their own functions to do vector operations like adding, subtracting, and dot/cross products which make vectors useful. More info here.
  15. Sounds like Dusty's Patch JK2 edition (however I suggest having a better name that doesn't have your own name in it )
  16. Fixed a few things I forgot in the file description. Sorry I keep taking down the file.
  17. Dusty

    Fork Megathread

    https://github.com/DustysPatch/OpenJK This is the code for Dusty's Patch for JASP. Basically a single player gameplay improvement/enhancement mod. It contains code only for jagamex86, rdsp_vanilla, and the SP exe.
  18. I've done enough JA coding to know that Eez. Red didn't do everything for me Basically it could be a branch of your mod and maybe instead of having 3 under-used forums for my mod I could just have one sub-forum for it under the JK: E forums.
  19. I would imagine it wouldn't be too difficult to add more single saber styles to duals and staff, however I think it would be kind of difficult to let the player change between duals AND staff. At least difficult enough for me both coding-wise and design-wise that I don't feel like figuring it out For the NPCs, I want to try and make it so you can set whether they can use kicks and karate in melee, and karate with the saber like kyle boss. The saber karate is easy since the game already supports it for NPCs, but right now I'm mainly trying to get them to be able to do melee kicks and katas like the player can, which I'm having trouble getting to work.
  20. I'm adding a few optional fields to npc files. One is called restrictJediPowers which keeps npcs that are using sword/jedi AI from using certain abilities without the proper force powers (dodging sniper shots without force speed, pushing out of grip locks without push). The changing weapons would be interesting. In general NPCs could use better multi-weapon support. Right now if you give them a few weapons and then pull one of their weapons they won't switch to another weapon.
  21. No, but it would be nice to make them compatible with each other I think.
  22. Maybe my mod could become a sub-mod of this? Code-wise I could #ifdef things. And then any assets I've created/altered could easily just be optional downloads.
  23. Is there something wrong with Dusty's Patch SP? I updated it 2 days ago and its been gone ever since. No hint of it anywhere. I can't even see it in the waiting list for files.

    1. Show previous comments  2 more
    2. Circa

      Circa

      No rest for the staff, eh? :P for what it's worth, we don't see a difference between an updated file and a new submission; they all just go into one queue. So even though updates are quicker to approve, we still don't necessarily know that would be the case.

    3. Circa

      Circa

      Also, we never delete files without notifying the user that we are planning on doing so. No need to jump to that conclusion. xD

    4. Dusty

      Dusty

      Good to know, thank you for telling me :)

  24. Unfortunately not at the moment.
×
×
  • Create New...