Thor110

Modders
  • Content Count

    601
  • Joined

  • Last visited

  • Days Won

    33

Posts posted by Thor110


  1. It could be possible to install a mod to an empty folder by deleting the game directory and leaving perhaps the .exe and registry entry in order to extract the necessary contents for any mods that use an installer, to allow for their use on Mac, but this is just a thought.

    I believe most TSLPatcher mod installations have the relevant files sat next to them, so for most mods this would be easy, but TSLRCM & M478EP are packed into .exe's so would require some form of work around, my thoughts were to install with just a registry entry on a windows machine and perhaps the swkotor2.exe to get the relevant files from the mods without having to individually figure out what is new and or has been edited, but it is also possible the .exe install may require access to files that might be modified, though I doubt it I know that the TSLPatcher is capable or combining mods that edit 2DA files or from what I have read anyway, from there somebody could upload the base files for Mac users.

    • Like 1
    • Light Side Points 1

  2. Yeah, I understand this, I would basically need to rewrite the Endar Spire scripts to work for the Peragus level and this is the plan for a potential demo.

    ie : Hook the first script of the Endar Spire to the Peragus level instead of the Endar Spire level, then maybe even replace the original maps with the new ones in order to force it to load the correct module / map instead of the existing rim / map.

    But who knows, it is no doubt going to be very difficult to achieve and may not happen, but I do believe it is possible, just how much work it might be is the question, my thoughts were to re-purpose as many K1 scripts for K2 maps as possible in order to save on time, then just hook the starting script / endar spire map into skipping over to peragus.

    This would allow to leave the K1 menu intact and simply skip over any alterations that would need to be made, creating a new character might need some work in order for the save file to actually work, or add a quick conversation that serves the same purpose.

    • Like 1

  3. What's a game that you love but feel like no one else has played?

    I saw this posted on Facebook and I thought it an interesting topic that could reveal some gaming gems many of us may or may not know about!

    50334238_1046492315551244_1537300384446414848_n.jpg.be7a9f47489ea82e01ec97a660bb148c.jpg

    For me I decided Silent Bomber on the PS1 was one of my favourite games of which very few people I know have actually played it!

    Thor110


  4. He already knows this I believe, I may be pursuing the project once my Expanded Galaxy Project K2 to K1 files are completed, it would most likely require re-scripting most of the second game as well as re-creating each and every map / map piece in order to add any Placeable Objects that are not there due to the K1 limit.

    I have been slowly coming up with solutions / work around ideas for the limitations that would prevent this.

    Though I myself accept it may still be an incredibly difficult task that I may not be able to achieve.

    My main focus is the Expanded Galaxy Project - a small storyline for both and the overall ported maps for both games, if my K2 to K1 maps can be fixed to display properly then this could become more feasible, I have already managed to fix Dxun which did not display correctly, I also have a solution for both games ports lacking .vis files.

    But beyond the fixing of all the maps, there would be a lot of work to do, effectively and potentially re-building the entire second game in the first games engine.

    Thor110

    • Like 1

  5. That is a lot of mods, the best option is to examine which files each mod edits and combine any that replace each other, or to just remove the mod that overwrites anything, my main guess is anything that overwrites 2DA files should be the cause of this, because most of your list of mods are texture mods, but certain mods that you have included that heavily effect the storyline / gameplay are very unlikely to be compatible, for example Alternate Revan Romances will most likely change the dialog.tlk file, as will TSLRCM & M478EP, so your best bet is to slowly remove any mods that might effect the same files.


  6. Might be a little late to mention this but Piriform's Recuva program is a great tool for recovering lost files, I have used it several times to recover projects from accidentally formatted hard drives or emptied recycle bin contents, so keep it in mind for the future ^^ but it depends on how the drives were formatted, be it a quick or a full format.

    Sorry to hear about this loss.

    Thor110

    Note I once formatted the hard drive containing my GTA IV project which is also a large project that I set aside some time ago, I was able to use Recuva to get the files back and still have them to this day :)


  7. Update I have removed any areas not being used for the moment in both mods.

    K2 Areas Removed : ( Star Forge, Endar Spire, Ebon Hawk, Leviathan & Extra Modules )

    K1 Areas Removed : ( Peragus, Harbinger, Dantooine, Korriban, Ebon Hawk & Extra Modules )

    Removing Areas From The Game!

    Spoiler

    These areas have been removed for the moment to make the over-all package smaller, this will also mean less work when reconstructing all of the modules as I will not be reconstructing modules I do not need to use, I have set them aside and might still be using them, just for what I do not know yet.

    I am preparing for the v0_3_0 release which will have all planets added to the galaxy map, all area transitions fixed and all creatures, cameras, triggers, stores and unnecessary entries in the .git files have been removed already as well as having updated the music and sound entries for both games.

    On top of this I have constructed a new set of modules for each level in both games to allow me to build an entirely new galaxy for the Expansion, I believe I will need to create a new Ebon Hawk module to do this and use it to not only list the new planets, but the duplicates of the old planets using new modules.

    So for example K2 now has the original "201tel.rim" and now a "201tel++.mod" for each level in the game that will be re-used.

    I do have some rough plans for all of the content I have removed, but some of it may not be applicable due to story restrictions.

    To-Do List for things I am currently working on

    Spoiler

    K2 Mod To-Do List

    Unlock Dan++ & Kor++ doors.
    Remove Excess .git entries

    K1 Mod To-Do List

    Unlock / Check All Module Doors
    Remove Excess .git entries

    Both Mods To-Do List

    Add planets to the galaxy map
    Create an additional Ebon Hawk Map to store the new galaxy map after the main storyline.

    Create Missing Module Files for un-used maps in both games.

    This will allow to build all the new levels without having to build them on top of current levels
    and will save on a large amount of conditional statements that would need to be checked if the new story
    was built on top of the current levels

    Note : I have been archiving a lot of my old messages to make the topic easier for new viewers, I would appreciate it if others did the same or a moderator could do this for me, thank you.

    I will be leaving them here for the meanwhile and going through them again at some point in order to pick out any relevant information or ideas I have noted down here.

    Discord https://discord.gg/g9cnEvr - For Testing & Story Discussion.

    • Like 1

  8. Previous message and reply about story ideas and anybody who wishes to send me their story ideas.

    Spoiler

    The idea for a flooded ship is an interesting one! Perhaps I will look into this while I am learning to make maps for KotOR out of pieces already in the game.

    Spoiler
    On 1/13/2019 at 2:12 PM, JediArchivist said:

    I got this idea for the Expanded Galaxy Mod last night:

    Use the Ebon Hawk, Harbringer, Leviathan and the severly damaged Sith ship at the end of K2 before Malachor (i forgot how it's called) on Lehon (the Unknown World)! They could be some of the derelict ships that have crashed onto the planet in the past! Modules from the Endar Spire and the Harbringer could be used as the crashed Hammerhead-Class ship on the beach (imagine how awesome it would be to get inside it)! The entry poimt to the ship could be on the beach where the Ebon Hawk lands, to the upper right while facing the sea, there is a shallow road that narrows down and is blocked (i'll send a picture if You can't find it).

    There could be flooded portions of the ship (shallow water that the player can walk through like on the beach) and it must show signs of damage. Here the player would have to use some Power Couplings and other parts found on other derelict ships in order to restore emergency power to that ship, with the purpose of retrieving some data from the ship's navicomputer. The data could result in a new sidequest eventually. On the ship there could be some damaged, abandoned droids and turrets that attack the player because their targetting systems got damaged from the crash and also worn out in time.

    You could also find scattered datapads and terminals that tell the story of the surviving Republic soldiers that were on the ship when it crashed, as the ship was their temporary base on Lehon after the crash. They stayed on the ship a few years and after multiple Rakata attacks they eventually moved to one of the islands and left the ship, while a small number remained on the ship. You can find them in a section of the ship and one of them is a merchant giving you some unique items. There is also a workbench and lab station in that section. They tell you about another Sith ship that crashed nearby and give you some sidequests: investigate the Sith ship and kill the Sith faction there, retrieve some supplies and essential parts from that ship, turn of the malfunctioning security system on a deck, there could be a section that is inacessible because it is underwater, and you would need to activate a pump in order to drain the area and then it becomes accesible (in that area you would have to install the power couplings, etc.).

    There could also be a Sith scouting pary / commando searching the ship for a way to get off the planet as well and you would have to fight them.

    There would also be a crashed Sith ship (use modules from the Leviathan and the damaged ship from the end of K2) where there would be a Sith faction and you would have to fight them and explore the ship in order to get the power couplings and parts needed to restore power on the Republic ship! Through the cracks and gaps of the damaged ship you could see the Lehon landscape (sea, beach etc.) instead of the original space view!

    This would make and interesting addition, as i always had a thing for exploring / fixing (restoring power) / investigating derelict ships!

     

    My main story ideas are written in my first and last posts, K2 - Battle Over Belsavis, K1 - Fate of the Star Forge & both games free roam elements.

    For anyone looking to message me story ideas you can post them here or message me with them, but please try to keep them contained in spoilers so as to make the overall topic easier to navigate, I was also wondering if everybody who has posted previous messages could archive them within spoilers and leave just the most relevant part of the message as I have done with my previous messages.

     

    • Like 1

  9. On 12/14/2018 at 9:45 AM, JediArchivist said:

    Practical Result: Succeded in having partial KOTOR II TSL code execution and asset loading into KOTOR 1 IOS version. Specifically, the game crashes when launchimg a mew game, but loading a savegame works. Loading a savegame will display a black screen, however the background music plays, and the Inventory, Map and Quests screens can be accesed and they display the KOTOR II respective content. Accesing the Character screen crashes the game. I will upload a Youtube video showing the resulting functionality soon!

    To do next: Convert the modules, textures and animation files from KOTOR 2 format to the KOTOR 1 format and load them into the KOTOR 1 engine.

    Sounds like you are having success, perhaps you will write a tutorial for this process before me, a tutorial is the best and only legal approach to this.

    Don't forget to credit everybody that helped ^^ note : presumably you are having success with the steps I explained would most likely be necessary for porting the entire game, if so let me know, would be good to know that I guessed most of the process, I found getting the menu and either game to load most of the other games content on PC relatively easy, but it wouldn't start a new game ( I did not try loading a game ) and I do not have K1 mobile to test this on, so all I can really do is speculate.

    Let me know if you have any more trouble and I will see if I can help any more.

    If you do not have success I will pick this back up at some point and write a tutorial for the process.

    Thor110

    • Like 1

  10. I believe the issue with models not displaying animated textures could be a model issue and not a texture issue as during the conversion of model files for the Expanded Galaxy Project I found out that most of the models I converted no longer display animations.

    This means the problem for some of the weapons you mentioned could be due to issues with their respective model files, this could be fixed by converting them in the correct way.

    I hope to make more animated textures for the game for the Expanded Galaxy Project, so I will be looking into this and figuring out why some of the map models I converted do not display animations, my thoughts are that their respective surfaces must need a specific setting applied to them in order to display animations.

    Hopefully this is of some help, along-side the project I hope to overhaul every texture in the game with a new High-High resolution set of textures including animated textures moving the High texture pack down to the medium and leaving the low resolution textures intact.

    This information is very helpful as if converting to .dds will help I may do this for every texture in the game as well as properly converting and fixing all models in the game, which may be a large amount for the override but users could potentially remove the original models.bif and texture pack files as long as all of the new model files are in the override folder.

    Thank You for your great resource and information on converting to the .dds filetype as well as your reasoning behind why.

    Thor110


  11. Previous message containing story ideas, project overview and an old release.

    Spoiler

    Issues I have noticed are :

    Spoiler

    Animated textures do not work on my converted models ( for example Effix's Yavin Orbital Station #01 .mdl the animations work ) so I need to find a better way to convert maps between games, I believe using 3DS Max & KotorMax will be the best approach, doing this I will also be able to re-create visibility and layout files which should help the project overall.

    I have not fixed as much for the K2 to K1 maps, but I will fix so much in one project and then fix the same in the other.

    Spoiler

    As you have mentioned any of these issues should be ironed out, but I believe now all of the music and environmental sounds should be fixed, but I did not correct EnvAudio for some reason I thought it might have been the volume for the AmbientSndDay & AmbientSndNight entries because the other entries had a corresponding volume entry.

    On 1/12/2019 at 9:45 PM, mrmann said:

    installed it, it's definitely an improvement, but this is still early in development so there's still do iron out

    like what i found:

    some of ambience sounds are placed in the wrong modules and/or missing

    some of the level transitions are still don't work

    i tried going to the upper city cantine using tar_m02ae and it takes me to the lower city cantina instead, i think the lower city cantina was cuplicated

    but again, these issues will be corrected, obviously

    Always good to know that it works for somebody else, I am pleased with my first release and looking forward to the next.

    Thank you for your input, any issues besides area transitions, sound, music and the lack of planets on the galaxy map is what I am looking for at the moment.

    Expanded Galaxy Project - Exiles Expanded Galaxy Storyline

    Spoiler

    This is a short and rough description of the storyline, quests and galaxy crawls that I will introduce in the Expanded Galaxy Project for K2, I have been preparing ideas for the K1 portion of the project as well, but they are not quite ready yet.

    Battle Over Belsavis

    Spoiler

    This is an important storyline I have planned that will tie in HK-51 from SWTOR to the K2 game, during the long galaxy crawl of the expansion the player will be lured to Belsavis, trapped by a tractor beam and taken aboard the ship the player must fight their way through a battalion of HK-51 droids in order to shut down the ships engines and set it on a crash course for the nearby planet of Belsavis.

    The Imperial Transport Ship carrying HK-51 droids intended to hunt down the Exile will then crash causing both the players decisions and the Exiles decisions to be crucial in the overall storyline of all three games.

    Malachor V & The Credits Followed By The Expansion

    Spoiler

    Malachor V - KotOR 2 : TSL Ending / After the Credits.

    Yavin - Short Galaxy Crawl - Taris - Long Galaxy Crawl - Taris - Expansion Credits - Free-Roam Expansion

    On Malachor V find Datapad for the Yavin Orbital Station on the way back to the Ebon Hawk.

    Then proceed to the Yavin - Orbital Station to unlock its doors.

    During the short galaxy crawl, players will also be able to access any of the missions on the new planets available
    throughout the main storyline but not available during the expansion, there will be a note of this before continuuing
    at a certain point in the game.

    There will be a short galaxy crawl before getting the black market co-ordinates to Taris in order to tie up
    the storyline of the Orbital Station by having the player retrieve or deliver certain pieces of information
    in order to have the stations computers allow access to the co-ordinates or arrange a meeting with the black
    market contact.

    Pick up where the previous owner left off with some black - market co-ordinates and imperial codes to allow
    somebody to break through the Imperial Blockade and land on Taris in a safe zone.

    Meet up with survivors of the Taris Massacre and begin the long galaxy crawl to help the Taris Restoration Effort.

    Tie up galaxy crawl and Taris Restoration Storyline, then after new / expansion credits introduce free-roam.

     

    Expanded Galaxy Project - Revans Eternal Empire Storyline

    Spoiler

    This is a rough description of the mods storyline for the first game.

    As Revan you will either keep the Star Forge for yourself or destroy it.

    If you keep it, you will no longer pilot the Ebon Hawk around the galaxy but the Star Forge itself as you seek to take over the galaxy.

    With the light side ending Revan will destroy the Star Forge and pass through the galaxy one last time before drifting off into the outer rim and dissapearing forever.

    Both of these storylines follow alongside what I remember from both games, if anyone wishes to point out or note any serious plot-holes or story elements from either games that I might want to keep in mind, please do so.

    Note Looking for beta testers for various versions of the game, I also need to re-play them both myself.

    Spoiler

    I really need to sit down and play both games now that I have prepared most of the base of the mods so that I can start writing story and implementing the story after the main games credits, I also need to seek permission to include TSLRCM or look into what I would need to do to make it compatible with the Expanded Galaxy Project.

    If you know an author of a great mod or want to suggest a mod to include please message me or reply here, also if you are the creator of a mod or know anyone involved in developing any mods for the game, please let them know I am interested in including and making as many mods compatible as possible.

    Latest Release The latest release ( v0_2_9 ) contains just the relevant maps, modules and pieces I will be using for the K2 portion of the Expanded Galaxy Project, as there being some maps I can not use due to Story Implications & Restrictions such as the Star Forge, Leviathan, Endar Spire & Taris, but portions of these maps could be used and I have also set the files aside, this has trimmed the overall mod size down to around 1GB or 450mb compressed.

    I did have plans to re-use some of these areas or at least assets from, perhaps having bits of the Star Forge crashed down onto Lehon.

    There is also the possibility for using pieces of the Harbinger & Endar Spire to better map out that class of ship for re-use.

    As for Taris, I had next to no plans to use it, except for pieces of the underworld, though all of these pieces may be useful for anybody looking to make Total Conversions and are still backed up in v0_2_5 permanently as a modders resource.

    Link  https://www.moddb.com/mods/kotor-ii-tsl-expanded-galaxy/downloads/expanded-galaxy-k2-beta-v0-2-9

     

    • Like 1

  12. Previous message about fixing the environmental sounds, music, updates and community input.

    Spoiler
    On 1/12/2019 at 8:12 PM, mrmann said:

    From what I've examined the modules are well ported, (accept dantooine's enclave exterior which the ruins is missing the proper door), the only things that are not working properly are level transitions, enviromental sounds and music

    I look forward to see what you have in mind for these modules for this mod

    I have now fixed all environmental sounds and music as well as any level transitions that use a door, I have written in great detail in my first post and most recent post in this topic as well as my tutorial topic.

    Here is a patch to update all the modules, all that is left to do is to add the planets to the galaxy map and fix Area Transitions that do not use doors, then I will be ready to start writing script for both the Expansions I have planned.

    v0_2_9 Patch.zip

    Update I am currently working on adding a Merchant to the Yavin Orbital Station that I will release as a stand-alone mod / demo for the Expanded Galaxy Project.

    https://www.moddb.com/mods/kotor-ii-tsl-expanded-galaxy/downloads/yavin-demo

    This is the current version of the Yavin Orbital Station demo, featuring Kex, who does not yet work as a Merchant, I will update the demo to feature a high level Merchant and two NPC's that talk about both the K1 & K2 portions of the Expanded Galaxy Project, this won't feature much information but will highlight some of the planned features for both expansions and serve as a stand-alone mod for anybody that might want to add just the Yavin Orbital Station.

    Community Input I am seeking input from the community for the Expanded Galaxy Project as well as Beta-Testers for the Mod & Original Game as I intend to patch and fix as many problems as possible, including bugs, visual errors and adding more placeables, characters and access to areas from both games, if anybody knows of a list of current bugs for the game as well as suggestions for current community patches to include or make compatible this would be helpful.

    Any fans of the Old Republic Era and all three games can also help by offering story suggestions and quest ideas, bearing in mind my plans for maintaining as much of the Vanilla experience as possible while also updating and enhancing the game.

    If you wish to help please read this post, my first post and both ModDB pages in detail.

     

    • Like 2

  13. I have added a pazaak deck in front of a random twilek I picked from the .git file and tested it, I believe these are the dancers and the manager. ( I am pretty sure it wasn't there before but cannot tell for sure as I haven't played the original game in a while, I did load the original module and it was not there but the dancer / manager was not there either due to being set differently in the story for some reason even though I warped from the same place / save )

    Spoiler

    This is not the location you requested, I couldn't figure out which twilek it was, I will try again at some point.

    pazaak.thumb.png.5bcd98531137de41b85c583dc9caaae3.png

    If you or anybody has ideas for areas in either game that could be made to feel more alive by making changes like this please let me know as I will begin to integrate them into the Expanded Galaxy Project's overall revival of both games.

    1981131558_PurePazaak.thumb.png.e5f99b06aff14de21c1d10d5cb94e4d2.png

    This is where I have placed it for now, I will change it to "plc_pazaak2" and correct the co-ordinates at some point, once I have finalised which version of the game I will be updating ( currently using both official patches ) but I need to know if I will include any community patches or fixes, such as many of the geometry fixes to some maps, all of which should be compatible anyway.

    I will also document any ideas for areas that could be revised and enhanced to allow for better immersion into both games.

    Thor110


  14. This seems like it wouldn't be too difficult, I might do this as it would add to the overall feel of the game and not alter the Vanilla experience :) I will note it down and give it a go when I get a chance.

    Thor110

    • Thanks 1

  15. If I were you I would just repackage the module file from scratch using the same files you have edited and kotor tool, this is what I do every time I edit a level, I don't use the ERF Editor, I just build each module through kotor tool every time I want to update it, trying to make as many changes as possible before re-building.

    • Light Side Points 1

  16. 02 - [TUTORIAL] - Creating a Merchant - TSL

    Spoiler

    Merchants

    In order to add a merchant, you will need to first add a character to whatever module you want and create a .dlg (Dialog) file which is used by the .utc (Character) you will then need to add any relevant lines of dialog for your character to speak.

    628377620_thorutc.png.fccf2152946d08b3ba0fe2c791695098.png

    Make sure to name the dialog file in the Conversation section of the utc file.

    1083054639_thordlg.thumb.png.af2da43ef5204bd9c5f0d0b815fbae47.png

    From there you will need to link it to a script using a line of dialog.

    The following is an example of the script you will need to use to launch the merchants inventory window.

    
    void main()
    {
      object oStore = GetObjectByTag("merchant_file"); // this is the .utm file listing your merchants inventory
      if(!GetIsObjectValid(oStore))
      	oStore = CreateObject(OBJECT_TYPE_STORE, "merchant_file", GetLocation(OBJECT_SELF));
      if(GetIsObjectValid(oStore))
      	DelayCommand(0.5, OpenStore(oStore, GetPCSpeaker()));
    }

    this script then needs to be compiled using the KotOR Scripting Tool. ( Make sure to set it to KotOR 2 Mode )

    It will open the .utm (Merchant) file which contains a list of the items which are available for purchase.

    1026145840_thorutm.thumb.png.9db2c1b42681e8885a858681df5235c1.png

    Another example is to use global variables as conditions to determine what stock your merchant has available.

    The next example is a script I am using for the Yavin Orbital Station, it determines which merchant script to load dependant on how many Jedi Masters the Exile has already encountered during their playthrough. ( Between 0 & 4 )

    
    void main()
    {
      if((GetGlobalNumber("000_Jedi_Found") == 0))
      {
        object oStore = GetObjectByTag("thor0");
        if (!GetIsObjectValid(oStore))
        oStore = CreateObject(OBJECT_TYPE_STORE, "thor0", GetLocation(OBJECT_SELF));
        if (GetIsObjectValid(oStore))
        DelayCommand(0.5, OpenStore(oStore, GetPCSpeaker()));
      }
      else if((GetGlobalNumber("000_Jedi_Found") == 1))
      {
        object oStore = GetObjectByTag("thor1");
        if (!GetIsObjectValid(oStore))
        oStore = CreateObject(OBJECT_TYPE_STORE, "thor1", GetLocation(OBJECT_SELF));
        if (GetIsObjectValid(oStore))
        DelayCommand(0.5, OpenStore(oStore, GetPCSpeaker()));
      }
      else if((GetGlobalNumber("000_Jedi_Found") == 2))
      {
        object oStore = GetObjectByTag("thor2");
        if (!GetIsObjectValid(oStore))
        oStore = CreateObject(OBJECT_TYPE_STORE, "thor2", GetLocation(OBJECT_SELF));
        if (GetIsObjectValid(oStore))
        DelayCommand(0.5, OpenStore(oStore, GetPCSpeaker()));
      }
      else if((GetGlobalNumber("000_Jedi_Found") == 3))
      {
        object oStore = GetObjectByTag("thor3");
        if (!GetIsObjectValid(oStore))
        oStore = CreateObject(OBJECT_TYPE_STORE, "thor3", GetLocation(OBJECT_SELF));
        if (GetIsObjectValid(oStore))
        DelayCommand(0.5, OpenStore(oStore, GetPCSpeaker()));
      }
      else if((GetGlobalNumber("000_Jedi_Found") == 4))
      {
        object oStore = GetObjectByTag("thor4");
        if (!GetIsObjectValid(oStore))
        oStore = CreateObject(OBJECT_TYPE_STORE, "thor4", GetLocation(OBJECT_SELF));
        if (GetIsObjectValid(oStore))
        DelayCommand(0.5, OpenStore(oStore, GetPCSpeaker()));
      }
    }

    This script is used in the same way as the previous script which has only one merchant file but it will require 5 merchant scripts.

    1124842862_thorstorenss.png.41ed69e1cef04f4f603c16c6a07c452b.png

    Using the source script from the games files “a_playpazaak” you can also start a game of pazaak using the same process.

    The following script will open a door on the map when you interact with a placeable, it could also be used in a dialog if you wish.

    
    void main()
    {
      object oDoor = GetObjectByTag("yav50_airlock");
      ActionOpenDoor(oDoor);
    }

    In this example the placeable “yav_panel50x.utp” which is an invisible placeable loads the above script “yav_panel05” in the OnUsed section which can be found using the KGFF editor on a “.utp” (Placeable) file, the script then opens the door called “yav50_airlock”.

    Another useful property to note is the Static property of the doors, which can be used to determine whether or not the door can be selected by the player.

    03 - [ADDITIONAL] - Using ERFEdit

    Spoiler

    ERFEdit is useful for extracting the contents of other module files, this can be handy to look up an example from another level.

    In order to make use of the following three examples, you will want to use ERFEdit to extract the contents of the module, you will also need DLGEdit & K-GFF Editor, extract the files and examine them to hopefully save others time from searching through the Characters, Placeables and Alien Voice Overs.

    You can also just spawn in each module and look around, each character or placeable will have their number references as their name.

    Characters 0-700 approx

    Placeables 0-400 approx

    Dialog 0-42

    With all of these testing rooms I have still had the main three mods I am planning to provide compatibility for ( TSLRCM, M478EP & Jedi Temple ( Coruscant ) Mods ) installed to the game, so if you do not some of their appearances may be missing.

    04 - [ADDITIONAL] - Picking an NPC to place in your level - TSL

    Spoiler

    I was dreading finding a specific NPC to place around any of the levels I am working on so I drafted up these test levels with every NPC from TSL in them.

    Using these modules you should have no trouble picking an NPC and identifying what number entry they are in the appearance.2da file.

    Testing Rooms.7z

    Screenshots

    Spoiler

    099dia

    099dia.thumb.png.6e7b868b7357f68521edea0a356e7e0e.png

    199dia199dia.thumb.png.19e4558213ccd58b88eee33b5aefd46c.png

    299dia299dia.thumb.png.d6f9959f01f4034c569870adc976c37f.png

    399dia399dia.thumb.png.49f43e4a919aa2efdcb8e0930e13e245.png

    499dia499dia.thumb.png.c1499317e123261f17dda6aed437d965.png599dia599dia.thumb.png.34fdb632b850b7609df874b6f1fc61bb.png699dia699dia.thumb.png.0d82fc86889322975b8125661c0f136a.png

    I hope this will be useful for others, I haven't made full use of it yet, but I can now roam around and pick out which NPC's I would like to place and not have to worry about finding their entry number, as well as having the ability to view nearly all of them at once.

    05 - [ADDITIONAL] - Picking Placeables to fill your level with - TSL

    Spoiler

    I decided to do the same thing for placeables, so that I could not only look through them all at once but hopefully find it easier to populate the levels I am working on with placeables and NPC's.

    Testing Placeable Rooms.7z

     

    Screenshots

    Spoiler

    699plc699plc.thumb.png.e2a1d2a81e0e6b9b56b07cf28a782262.png

    799plc799plc.thumb.png.c4495f0911addb109c564f4b44f8a78d.png

    899plc899plc.thumb.png.d664401a36422973ca33e92731a2ea36.png

    999plc999plc.thumb.png.48d33fa6f512a2b2b197baafcd3899c6.png

     

    06 - [ADDITIONAL] - Picking Alien Voice Over Dialog for your level - TSL

    Spoiler

    In the same style as the placeables and characters, but contains one character per alien in the "alienvo.2da" file and a dialog entry for each type of voice over they can use, excluding null entries.

    Alien VO Dialog Testing Room.7z

    The Rakata & I think a few others don't have voice files even though the 2da file states that they do, I will go through these at some point.

    Screenshots

    Spoiler

    000voi

    1860657292_ALIENVOTESTINGROOM.thumb.jpg.a0640474c48174f01018943c68472d51.jpg

     

    07 - [ADDITIONAL] - Placement & Rotation

    Spoiler

    The bearing of a placeable is it's rotation, characters have an X orientation and a Y orientation which also pertains to their rotation.

    The below co-ordinates are what I am using for making a placeable rotate to face any of the cardinal directions.

    I have seen that sometimes people over rotate from these numbers until they get to the right position, for example to face East can also be 4.5 approximately, but I have found the below values to be the best, if someone knows better please let me know.

    I generally use KotOR Toolset to locate an item in an existing module and record its co-ordinates then I edit its co-ordinates using K-GFF Editor, from there I tend to test the level over and over again until I get the placement just right.

    North
    -3.1415901184082

    West
    -1.5707950592041

    South
    0

    East
    1.5707950592041

    I realise they are using Radians or Pi, so this can be positive or negative accordingly, Pi itself is *3.14159265359 ( so that might be a more accurate value to use ) though I haven't used that just yet, but it will be such a minute change in rotation that it would be practically impossible to notice anyway.

    But I have noticed some things in the game over rotate to get to the correct position, so I thought this might be worth noting for other users, I used other objects in game to determine North & South and went from there.

     

    I also found the below example which is probably a lot more detailed, quoted from Lucas Forums by e-varmint

    Spoiler

    The "bearing" measurements for doors
    and placeables in the .git file use radians instead of degrees. 

    Degrees Radians
    15= 0.261799388
    30= 0.523598776
    45= 0.785398163
    60= 1.047197551
    75= 1.308996939
    90= 1.570796327
    105= 1.832595715
    120= 2.094395102
    135= 2.35619449
    150= 2.617993878
    165= 2.879793266
    180= 3.141592654
    195= 3.403392041
    210= 3.665191429
    225= 3.926990817
    240= 4.188790205
    255= 4.450589593
    270= 4.71238898
    285= 4.974188368
    300= 5.235987756
    315= 5.497787144
    330= 5.759586532
    345= 6.021385919


    by e-varmint

     

    08 - [TUTORIAL] - Waypoint Markers

    Spoiler

    Below is the documentation left within the blueprint waypoint files within the game, when I have actually placed some myself and am more familiar with the process I will try to write a step by step for it as well.

    "This is the default waypoint you may place to set a patrol path for a creature or NPC.
    1. Create the creature and either use its current Tag or fill in a new one.
    2. Place or make sure the WalkWayPoints() is within the body of the On Spawn script for the creature.
    3. Place a series of waypoints along the route you wish the creature to walk.
    4. Select all of the newly created waypoints and right click. Choose the Create Set option. ( The set will be defined by their numbers )
    5. The waypoint set will have a set name of "WP_" + NPC Tag. Thus if an NPC with the Tag "Guard" will have a waypoint set called "WP_Guard". Note that Tags are case sensitive."

    Bullet Point #1 Create your creature. ( .utc file which will be spawned using the .git file for the module )
    Bullet Point #2 refers to what will be needed in the script. ( Example Scripts Below )
    Bullet Point #3 Place your waypoints. ( placing the .utw files along a specified path using the .git file of the module )
    Bullet Point #4 will be referring to the software they would have been using during development.
    Bullet Point #5 refers to naming the waypoint files. ( "WP_Guard_01.utc" etc )

    I have three script examples so far for NPC's walking, but I haven't used any of them yet so cannot confirm they work until I start populating the areas I am working with.

    Continue Walking Waypoints - "walk_continue.nss"

    Spoiler

    #include "k_inc_generic"
    #include "k_inc_debug"
    #include "k_inc_treas_k2"

    void main() {
        // Force them to continue walking waypoints. onEndDialog
      GN_WalkWayPoints();
    }

    Walk Around Randomly - "walk_random.nss"

    Spoiler

    void main() {
      // onHeartbeat
        AssignCommand(OBJECT_SELF,ActionRandomWalk())
    }

    Walk Waypoints On Spawn - "walk_spawn.nss"

    Spoiler

    #include "k_inc_generic"
    #include "k_inc_debug"
    #include "k_inc_treas_k2"

    void main()
    {
        GN_SetDayNightPresence(AMBIENT_PRESENCE_ALWAYS_PRESENT);
        GN_SetListeningPatterns();
        GN_WalkWayPoints();
    }

     

    09 - [TUTORIAL] - Scripting Basics

    Spoiler

    I will not cover much scripting, but when I am finished with the project all the source will be made available.

    You will need KotOR Scripting Tool & possibly DeNCS if you plan to use it ( it can be helpful to get examples from other scripts already in the game to see how they handle certain events and to get an idea of the common operators, functions and the syntax )

    The script is saved as a .nss file and then compiled into a .ncs file, I use KotOR Scripting Tool but I think KotOR Tools Text Editor can also compile scripts.

    Remotely Opening A Door

    Spoiler

    void main()
    {
        object oDoor = GetObjectByTag("yav50_airlock");
        ActionOpenDoor(oDoor);
    }

    The above script is called by an invisible placeable in front of the computer screens on the Yavin Orbital Station and the script itself is referenced in the OnUsed section of the associated .utp file, it is also getting the relevant door by its tag which is declared in the relevant doors .utd file.

    That's a very basic script, you can also scroll through the KotOR Scripting Tool to see all the available commands on the right hand side, I will be posting basic scripts in this section and hopefully they might be useful for others.

    Upon typing the command there is also a description shown in the bottom window of the program.

    If you have trouble compiling a script, make sure that "nwscript.nss" is located in the games override folder, also check that the tool is set to KotOR 1 or KotOR 2 accordingly, another possible problem is your relevant registry entry which can either be added back in manually, or just run the "swupdate.exe" and it will update the registry entry ( I had this problem as I was using two seperate installs of KotOR 2 for testing )

    10 - [EXAMPLE SCRIPT] - Spawning NPC's on Enter

    Spoiler

    Below is an example of an on Enter script spawning four NPC's via their utc file packaged with the .module but not placed in the levels git file.

    In order to do this you will also need to add a waypoint to the git file to point to where to spawn your NPC.

    This code can be used to spawn NPC's dependant on a Global Variable, it is also checking if the leader of the group already exists ( I should check if they all exist, but this works for the moment )

    Spoiler

    void main() {
      if(GetGlobalNumber("SLE_FIREBLOODS") == 1)
      {
        if (!GetIsObjectValid(GetObjectByTag("rodian2", 0))) {
          CreateObject(1, "rodian2", GetLocation(GetObjectByTag("wp_rodian2", 0)), 0);
          CreateObject(1, "rodian1", GetLocation(GetObjectByTag("wp_rodian1", 0)), 0);
          CreateObject(1, "rodian3", GetLocation(GetObjectByTag("wp_rodian3", 0)), 0);
          CreateObject(1, "rodian4", GetLocation(GetObjectByTag("wp_rodian4", 0)), 0);
        }
      }
    }

    Hopefully this short example helps.

    11 - [EXAMPLE SCRIPT] - Making NPC's Hostile!

    Spoiler

    The below code changes the above spawned NPC's to being hostile and changes the Global Number for the Variable storing the state of that questline / encounter.

    Spoiler

    void main() {
      object oRodian2 = GetObjectByTag("rodian2", 0);
      object oRodian1 = GetObjectByTag("rodian1", 0);
      object oRodian3 = GetObjectByTag("rodian3", 0);
      object oRodian4 = GetObjectByTag("rodian4", 0);
      ChangeToStandardFaction(oRodian2, 1);
      AssignCommand(oRodian2, ActionAttack(GetFirstPC(), 0));
      ChangeToStandardFaction(oRodian1, 1);
      AssignCommand(oRodian1, ActionAttack(GetFirstPC(), 0));
      ChangeToStandardFaction(oRodian3, 1);
      AssignCommand(oRodian3, ActionAttack(GetFirstPC(), 0));
      ChangeToStandardFaction(oRodian4, 1);
      AssignCommand(oRodian4, ActionAttack(GetFirstPC(), 0));
      SetAreaUnescapable(1);
      SetGlobalNumber("SLE_FIREBLOODS", 2);
    }
     

     

    12 - [EXAMPLE SCRIPT] - Trigger talking to an NPC!

    Spoiler

    The below code requires a trigger to be placed in the level, on entering the trigger this script will fire.

    It starts a conversation with the lead Rodian from the above examples.

    Spoiler

    void main() {
      if(GetGlobalNumber("SLE_FIREBLOODS") == 1)
      {
        object oEntering = GetEnteringObject();
        if ((!GetIsPartyLeader(oEntering))) {
          return;
        }
        object oRodian2 = GetObjectByTag("rodian2", 0);
        AssignCommand(oRodian2, ActionStartConversation(oEntering, "fireblood", 0, 0, 0, "", "", "", "", "", "", 0, 0xFFFFFFFF, 0xFFFFFFFF, 0));
        DestroyObject(OBJECT_SELF, 0.0, 0, 0.0, 0);
      }
    }

     

    13 - [EXAMPLE SCRIPT] - Make an NPC walk randomly

    Spoiler

    This script is assigned to the heartbeat function of the utc file for the NPC.

    Spoiler

    void main() {
      // onHeartbeat
        AssignCommand(OBJECT_SELF,ActionRandomWalk());
    }

     

    14 - [EXAMPLE SCRIPT] - Place a dead NPC

    Spoiler

    This script needs to be set in the spawn function for the NPC in the relevant .utc file.

    Spoiler

    void main() {
        effect efDeath = EffectDeath(0, 0, 1);
        ApplyEffectToObject(2, efDeath, OBJECT_SELF, 0.0);
    }

     

    15 - [EXAMPLE SCRIPTS] - Starting Conditionals

    Spoiler

    This script is an example of a starting conditional that can be used to check what module the player is in, this could be used for companion dialogs to check you are in a specific area in order to engage in a certain dialog option.

    Spoiler

    int StartingConditional()
    {
        if ( ( GetModuleName() == "end_m01aa") ||
             ( GetModuleName() == "end_m01ab") ||
             ( GetModuleName() == "tar_m11ab")) {
        return TRUE;
      }
      return FALSE;
    }

    The example I have provided checks if it is any of the three named modules, if so it returns TRUE to the DLG, if not it returns FALSE.

    It can be modified to check as many modules as required, I included three as an example to either cut down or expand upon.

    c_has_feat.nss

    This checks if the player has a specific feat using the number of the row in the feat.2da file.

    Spoiler

    //Thor110
    int StartingConditional()
    {
      int nParam1 = GetScriptParameter (1);
      if(GetHasFeat(nParam1,GetFirstPC()) == TRUE )
      {
        return TRUE;
      }
      return FALSE;
    }

    c_modname_diff.nss

    This is essentially c_modname_comp.nss, but it returns False instead of True if you are inside the level in question and I fixed a typo in the header.

    Spoiler

    /*
        Returns TRUE if the passed in string parameter is equal to
        the current module name.

        Created by: Anthony Davis-OEI
        Modified (hardly) by: Thor110
    */
    int StartingConditional()
    {
      string modName = GetScriptStringParameter();
      string currentMod = GetModuleName();
      if(modName == currentMod)
        return FALSE;
      return TRUE;
    }

    That's it for now, but I will add any more conditional scripts I write here when I write them.

    16 - [TUTORIAL] - Companion Vendor

    Spoiler

    I recently came up with an idea for a "Droid Companion Vendor" which will sell droids to the player to replace any lost or missed companions throughout the game.

    Screenshot_4.thumb.png.77a07860bc4e3ff6e4f6d13b9626a3bf.png

    Also given that it demonstrates control of the party / companions, I thought I would work this into a tutorial.

    When I have completed the level / vendor itself, I will come back here to write a tutorial, provide the files and give examples on how this could be used to create a Total Conversion

    Screenshot_6.thumb.png.d4295410266a24ecd6410e637fe69334.png

    There are a total of 50-55 Droid Types, the plan is to have either all or a select set of the best droids as options.

    Screenshot_9.thumb.png.c21aeb02d2bfa405753e615a9c361a68.png

    Maybe even spawning the droid next to the Vendor so that you can see them before buying them, or housing them in a store house with the droids you can purchase on display in the area.

    Screenshot_7.thumb.png.4c83c0d0d76815caf4fa5a97fcb212ed.png

    From here you will be able to purchase a new companion for any slot in the game.

    Screenshot_8.thumb.png.45a05cb4af648a0ddef10278523336fa.png

    for anybody interested here is the code for the conditional script I wrote to check if a specific players companion slot is free.

    Spoiler

    #include "k_inc_debug"

    int StartingConditional()
    {
        int nComp = GetScriptParameter( 1 );
        if ((IsAvailableCreature(nComp)) == FALSE)
            return TRUE;
        else
        return FALSE;
    }

    Here is a slightly different version that checks all companion slots at once.

    Spoiler

    #include "k_inc_debug"

    int StartingConditional()
    {
        if ((GetNPCSelectability(9)) == -1)
            return TRUE;
        else if ((GetNPCSelectability(8)) == -1)
            return TRUE;
        else if ((GetNPCSelectability(7)) == -1)
            return TRUE;
        else if ((GetNPCSelectability(6)) == -1)
            return TRUE;
        else if ((GetNPCSelectability(5)) == -1)
            return TRUE;
        else if ((GetNPCSelectability(4)) == -1)
            return TRUE;
        else if ((GetNPCSelectability(3)) == -1)
            return TRUE;
        else if ((GetNPCSelectability(2)) == -1)
            return TRUE;
        else if ((GetNPCSelectability(1)) == -1)
            return TRUE;
        else if ((GetNPCSelectability(0)) == -1)
            return TRUE;
        else
        return FALSE;
    }

    here is the code I use to preview the droid, spawning them at the location of the vendor.

    Spoiler

    void main() {
      string nDroid = GetScriptStringParameter();
      CreateObject(1, nDroid, GetLocation(GetObjectByTag("blackmarket", 0)), 0);
    }

    this code is then used to destroy them, if you don't purchase them.

    Spoiler

    void main() {
      string nDroid = GetScriptStringParameter();
      DelayCommand(0.1, DestroyObject(GetObjectByTag(nDroid), 0.0, 1, 0.0));
    }

    and here is the code I used to make them join the party.

    Spoiler

    void main() {
      string nDroid = GetScriptStringParameter();
      if ((IsAvailableCreature(9)) == FALSE) {
        AddAvailableNPCByTemplate(9, nDroid);
            ShowPartySelectionGUI("k_pend_reset", 9, 0xFFFFFFFF);
        }
        else if ((IsAvailableCreature(8)) == FALSE) {
        AddAvailableNPCByTemplate(8, nDroid);
            DelayCommand(0.1, ShowPartySelectionGUI("k_pend_reset", 8, 0xFFFFFFFF));
        }
        else if ((IsAvailableCreature(7)) == FALSE) {
        AddAvailableNPCByTemplate(7, nDroid);
            DelayCommand(0.1, ShowPartySelectionGUI("k_pend_reset", 7, 0xFFFFFFFF));
        }
        else if ((IsAvailableCreature(6)) == FALSE) {
            AddAvailableNPCByTemplate(6, nDroid);
            DelayCommand(0.1, ShowPartySelectionGUI("k_pend_reset", 6, 0xFFFFFFFF));
        }
        else if ((IsAvailableCreature(5)) == FALSE) {
            AddAvailableNPCByTemplate(5, nDroid);
            DelayCommand(0.1, ShowPartySelectionGUI("k_pend_reset", 5, 0xFFFFFFFF));
        }
        else if ((IsAvailableCreature(4)) == FALSE) {
            AddAvailableNPCByTemplate(4, nDroid);
            DelayCommand(0.1, ShowPartySelectionGUI("k_pend_reset", 4, 0xFFFFFFFF));
        }
        else if ((IsAvailableCreature(3)) == FALSE) {
            AddAvailableNPCByTemplate(3, nDroid);
            DelayCommand(0.1, ShowPartySelectionGUI("k_pend_reset", 3, 0xFFFFFFFF));
        }
        else if ((IsAvailableCreature(2)) == FALSE) {
            AddAvailableNPCByTemplate(2, nDroid);
            DelayCommand(0.1, ShowPartySelectionGUI("k_pend_reset", 2, 0xFFFFFFFF));
        }
        else if ((IsAvailableCreature(1)) == FALSE) {
            AddAvailableNPCByTemplate(1, nDroid);
            DelayCommand(0.1, ShowPartySelectionGUI("k_pend_reset", 1, 0xFFFFFFFF));
        }
        else if ((IsAvailableCreature(0)) == FALSE) {
            AddAvailableNPCByTemplate(0, nDroid);
            DelayCommand(0.1, ShowPartySelectionGUI("k_pend_reset", 0, 0xFFFFFFFF));
        }
    }

    This checks if the companion is available, it then adds the NPC to the party and shows the selection screen making sure that the correct slot is selected.

    For now this is a very roughly written idea for a tutorial, but I have created the level and when it is finished I will upload it here as a tutorial for people to make use of.

    I plan to continue to expand upon this idea and fill the level with scripts and examples provided here for people to pull apart and make use of.

    Fow now there is a bug that means if you buy the same droid twice, they remain there because it tries to destroy the NPC in your Party, instead of the one being previewed, this is a side-effect of the fact I wanted to try and have all 55 available droids in the game as options, but it seems without using a global variable the best way to do this will be to individually select each droid for the list. ( there might still be a better way, I have yet to try again )

    000dia.mod

     

    Feel free to learn from this example, the idea itself I plan to use and release as either a stand-alone mod or as a part of the Expanded Galaxy Project.

    17 - [TUTORIAL] - Upgradeable Items

    Spoiler

    Below is a list of the UpgradeLevel numbers that can be used in .uti files that I found posted by another user on DeadlyStream, I thought I would link through to it and repost it here.

    In order to make an item upgradeable the below entry needs editing in the associated .uti file to be in line with the numbers below by item type.

    Untitled.png.a4ce02069b3fae6e73ac3acd40c25020.png

    Robes (Knight & Master)        1
    Armored Robes (Zal Shey)    2
    Light Armors            2
    Medium Armors            3
    Heavy Armors            4

    Regular  (Non-Powered)        1
    Vibro Weapons (Powered)        2
    Lightsabers  (All Types)    3

    Blasters (Scope Only)        1
    Blasters (Scope,Chamber)    2
    Blasters (All Upgrades)        3

     

    Below is a link to the source from which I found this information.

    Source : https://deadlystream.com/topic/1488-question-on-making-an-item-upgradeable-in-game/

    18 - [ADDITIONAL] - Door Gallery

    Spoiler

    A recent request by another modder to make a similar room to my other testing rooms that displayed the available doors in the game.

    enjoy.thumb.png.d673918569c71c455f1067780f44fbbd.png

    Doors are all numbered appropriately according to their 2da entry in genericdoors.2da to make them easier to find. They also autoclose after being opened if you are far enough away ( same script as jekk jekk tarr tunnels )

    Door Gallery.7z

    19 - [ADDITIONAL] - Main Menu Details

    Spoiler

    In-case anybody ever want's to modify the main menu for a Total Conversion or general mod, you can use the following details to help you do so and the following line of code in a script to change the relevant variable.

    SetGlobalNumber("GBL_MAIN_SITH_LORD",4);

    Keep in mind for total conversions and big mods that this variable exists by default in globalcat.2da as do some other variables that you might need to keep.

    The most recently loaded save determines which menu is shown on the main menu while in-game and I think it might be the auto-save when starting the game up, the number variable "GBL_MAIN_SITH_LORD" sets which is shown.

    1 = mainmenu01.mdl = Darth Sion
    2 = mainmenu03.mdl = Darth Nihilus
    3 = mainmenu04.mdl = Kreia
    4 = mainmenu05.mdl = Player

    The player can also be changed to other appearances in the main menu using disguises or when the player character is set to something else such as when playing as Bao-Dur's Remote on Malachor V.

    At some point in future I might work on a script that can change the players appearance based on another variable using either disguises or changing the active character under a fade-in / fade-out so that the number of main menus can be almost infinitely expanded or at least to the limit of number values.

    This could then be spoofed so that any appearance could be shown on the menu, for example it could show the last NPC you spoke to.

    However I am not sure how efficient this would be under a save/load fade-in/fade-out cover. But it's an interesting thought or idea none-the-less.

    20 - [ADDITIONAL] - UI Customization

    Spoiler

    Where I have completely recoloured the GUI from green to blue for my port of the first game as well as helped out with a few other GUI changes I felt like I would write a short piece on how to quickly recolour the GUI files.

    First off you will need to collect all the original files needed or recolour those included in my release.

    For the TGA files, they can be quickly recoloured in GIMP using Color -> Colorisation and then picking a colour.

    The following five files differ between the Steam & 4CD versions of the game, so that is worth paying attention to.

    custpnl_p.gui
    equip_p.gui
    mainmenu8x6_p.gui
    optgraphics_p.gui
    saveload_p.gui

    For the Steam version of the game there are also a bunch of extra TGA files.

    This is the latest version of the K1 GUI for the Steam version of the game.

    K1 GUI.7z

    Lot's of details can be changed in the .gui files themselves, but for the most part it is the border, hilight and text colours you want to pay attention to.

    This can also be made easily viewable using the KotOR GUI Editor Visual KotOR GUI Editor (KGE) - Modding Tools - Deadly Stream

     

    I have had trouble changing some elements of the .gui, as best as I can tell the problem is caused by a mixture if incorrectly applied masks and colour values and that some of the buttons text seems to have hardcoded colours ( though I could be wrong and have just not found where they are stored yet )

     

    It seems as if in some instances the .tga files are supposed to act as masks while the colour values stored in the .gui files are supposed to colour those masks, however in some instances the .tga files themselves have been recoloured making it difficult to determine why the colour applied in the .gui file is wrong.

    21 - [ADDITIONAL] - Recolouring Textures

    Spoiler

    This sort of thing can pretty much be done at the click of a single button in GIMP.

    Simply open the .tga file, follow the instructions here, then click File - > Overwrite original file.

    Colors -> Colorize -> Colorizer -> Color

    simple.png.a9e77749aa58de14692f301f6657bfcb.png

    You can also use "Rotate Colors" after selecting an area of the image you are modifying.

    Colors -> Map -> Rotate Colors

    rotate.png.e342377bb938349d1302d8583044267d.png

    These two methods can allow you to quickly recolour an entire image or to manually select part of an image to recolour using the selection tools available.

    22 - [ADDITIONAL] - Recolouring the .GUI Files and Textures

    Spoiler

    To continue from recolouring textures to recolouring the .gui files I have prepared a basic mask to demonstrate how you can quickly and easily recolour part of an image using a mask.

    First open the file and make the "Pasted Layer" visible with the eye icon button and then use the Fuzzy Select Tool to select the mask.

    a.jpg.8229ab1400deca1e2624d3ed4e649c3a.jpg

    Next hide the "Pasted Layer" and switch back to the main layer as the active layer by selecting it.

    b.jpg.da9d1e1aca717019293c4798297c22c9.jpg

    From here go to Colors -> Colorize and select your profile or set one up.

    c.jpg.2b51425b9c1727ad05cf3dec52cdbee0.jpg

    Now the image will change colour according to your selection.

    d.jpg.a61999fc2aa278c80ce3850c3d892356.jpg

    This technique can be used in a lot of different ways for a lot of different tasks.

     

    In order to create the mask in the first place I had to slowly select the area I chose to recolour by using the Fuzzy Select Tool with a tolerance that was adequate.

     

    The following two files contain the mask and controller image shown in the above images.

    cntrl_ps3_fre.xcf

    cntrl_xb360_eng.xcf

    There are five in total that were added to the game as of the Aspyr patch on Steam.

     

    To recolour the rest of the GUI in the game you will need to single out the images used as well as the .gui files that also contain various colour values.

    The KotOR GUI Editor is a fantastic tool and visual aid for doing this, if you set up a folder with all of the game's gui textures in a folder as well as the .gui files, it makes it quick and easy to view and recolour many of it's pieces.

    At some point in the future I will try to have a complete .gui recolour pack prepared for users that will make it easier to recolour the entire .gui quickly or you can find a version of the K1 recolour in the following tutorial from this series. #20 - [ADDITIONAL] - UI Customization

    I advise using that as a base to pick out the original files and recolour those instead of recolouring the K1 recolours to preserve their original looks as best as possible.

    The following is a list of files that the user interface uses, though I might have missed a few because I pulled this list from an old set of files.

    Spoiler

    Aspyr Patch

    cntrl_ps3_eng
    cntrl_ps3_fre
    cntrl_ps3_ger
    cntrl_ps3_ita
    cntrl_ps3_spa
    cntrl_xb360_eng
    cntrl_xb360_fre
    cntrl_xb360_ger
    cntrl_xb360_ita
    cntrl_xb360_spa
    cus_gpad_bg
    cus_gpad_fper
    cus_gpad_gen
    cus_gpad_hand
    cus_gpad_help
    cus_gpad_map
    cus_gpad_save
    cus_gpad_solo
    cus_gpad_solox
    cus_gpad_ste
    cus_gpad_ste3

    Regular Game

    blackdot
    friendlyarrow
    lbl_force_neg
    lbl_force_pos
    lbl_icn_msg
    lbl_mibox00
    lbl_micombat
    lbl_micomeff02
    lbl_miscroll_f
    lbl_miscroll_f2
    lbl_miscroll_open_f
    mm_barrow
    mm_barrow_p
    uibit_abi_arrow
    uibit_abi_back
    uibit_arrowneg_p
    uibit_arrowneg_x
    uibit_arrowpos_p
    uibit_arrowpos_x
    uibit_arrow_l
    uibit_arrow_r
    uibit_brdr_16bct
    uibit_brdr_16bet
    uibit_brdr_16gc
    uibit_brdr_16ge
    uibit_brdr_16oc
    uibit_brdr_16oe
    uibit_brdr_16wc
    uibit_brdr_16wct
    uibit_brdr_16we
    uibit_brdr_16wet
    uibit_brdr_c3d_p
    uibit_brdr_c3d_x
    uibit_brdr_chr1
    uibit_brdr_chr1p
    uibit_brdr_chr2
    uibit_brdr_chr2p
    uibit_brdr_chr3p
    uibit_brdr_chr4p
    uibit_brdr_map_p
    uibit_brdr_map_x
    uibit_brdr_port
    uibit_brdr_portp
    uibit_checkbxoff
    uibit_checkbxon
    uibit_eqp_cnfg
    uibit_eqp_cnfg_p
    uibit_eqp_itm1
    uibit_eqp_itm2
    uibit_eqp_itm3
    uibit_eqp_shld
    uibit_eqp_shld_p
    uibit_fb_arrow
    uibit_fb_arrow_x
    uibit_fill_16b
    uibit_fill_16g
    uibit_fill_16gd
    uibit_fill_16o
    uibit_fill_2wt
    uibit_no_npc
    uibit_no_npc_p
    uibit_slider
    uibit_slider2
    uibit_slider2_p
    uibit_slider_p
    uibit_stf_abi3
    uibit_uparrowg
    uibit_uparrowo

     

    23 - [ADDITIONAL] - Different Camera Modes & Dynamically Spawned Grid Of Placeables

    Spoiler

    Came across this recently, there is a Top Down Camera Mode.

    As defined in nwscript.nss

    int CAMERA_MODE_CHASE_CAMERA          = 0;
    int CAMERA_MODE_TOP_DOWN              = 1;
    int CAMERA_MODE_STIFF_CHASE_CAMERA    = 2;

    Top Down

    topdown.jpg.a45e09a79292af577c157db48f1aa5c6.jpg

    Stiff Chase Camera

    top_down_chase_camera.jpg.a57ac3df4bfc1b4694f37136ba0c1f36.jpg

    Chase Camera

    chase_camera.jpg.e6bf55519d01318d9a54bf1b6f1c468e.jpg

    A script to change this value, this script is meant to be used in a dialog.

    Spoiler

    void main() {
      int cValue = GetScriptParameter( 1 );
      SetCameraMode(GetFirstPC(),cValue);
    }

    I was thinking about making a Chess mini-game.

    chessssss.jpg.d4872eebbc2e80389854e244fe481f98.jpg

    Having finished the script for generating the grid, I have made sure that the size can be altered with a single value, the value must be an even number otherwise the pattern doesn't work, I might look at fixing that later on for the fun of it.

    Below is the script I wrote to generate the grid, I have ensured to comment it fairly well to make it easier to understand.

    I am fairly certain it could be a lot more efficiently written, but this is what I ended up with when writing it from scratch.

    Spoiler

    void main() {
      float gridX = 0.0f;//Grid X co-ordinate
      float gridY = 0.0f;//Grid Y co-ordinate
      float gridS = 2.0f;//Grid Size ( Size or spacing of the object used as the tile is stored here)
      string gridO = "flpnl000";//Grid Object String = Template Res Ref
      location oLocation;//Object Location Variable
      int tCount=0;//tCount keeps track of the current tile being spawned
      int gridSize=8;//Length & Width have to be the same and multiples of 2
      int tLength=gridSize;//Equal to gridSize ( this variable get's modified so that the while statement in the for loop repeats
      int i;
      for(i = 1; i <= gridSize; i++)//count from 1 to grid size
      {
        while(tCount != tLength)
        {
          oLocation = Location(Vector(gridX, gridY, -2.6f), 0.0f);//Set up the location co-ordinates.
          CreateObject(64,gridO,oLocation,FALSE);//Create the object at the specified co-ordinates
          gridX+=gridS;//adding the grid spacing to the X co-ordinate
          tCount++;//increase the tCount counter by 1
        }
        tLength+=gridSize;//Adding gridSize to tLength each count so that the while statement repeats on the next count
        gridX=0.0f;//resetting the X co-ordinate to 0.0f
        gridY+=gridS;//adding the grid spacing to the Y co-ordinate
      }
      tLength=gridSize-1;//Reset tLength and remove one to account for it being used for the nTh value when setting the pattern and to match against tCount IE : 0-7 instead of 0-8
      tCount=0;//Reset tCount
      int test=0;//Used to alternate the pattern each row of the grid
      for(i = 1; i <= gridSize; i++)//count from 1 to grid size
      {
        while(tCount <= tLength)
        {
          if(test==0) {
            test=1;
          } else {
            AssignCommand(GetObjectByTag("FloorPanel00", tCount), ActionPlayAnimation(201, 1.0, 0.0));
            test=0;
          }
          tCount++;
        }
        tLength+=gridSize;//Adding tLength to gridSize each count so that the while statement repeats on the next count
        if(test==0) {
          test=1;
        } else {
          test=0;
        }
      }
    }

    322.jpg.0e5b0962fd3f108a679383251698b527.jpg

    Above is a 32x32 grid.

    In-case you are interested in checking out the level, I have included the .mod file here 000top.mod ( Version 17 )

    All source scripts are inside the archive, nothing really works yet but I have added a terminal and some test functions for using while I work out the specific interactions I want to use and the logic I need.

    217940059_ChessTerminal.jpg.d51a42352b479794250cbe0cf42bd512.jpg

    24 - [ADVANCED] - Hard Coded GUI Elements

    Spoiler

    For a while now it has bothered me that some of the GUI elements are hardcoded inside the executable and so I decided to take it upon myself to track them down and change them.

     

    Cursor Icons

    I used the application Resource Hacker, to replace the games cursor icons inside the executable for the game : https://github.com/qb40/resource-hacker

     

    Executable Addresses and Original Values

    As far as I can tell I have found all of the relevant values that effect the GUI colours in places that I am aware of.

    The only values I am uncertain of, is the Red & Green values for the text highlight on the GoG/Amazon/Aspyr versions of the game, it appears that they use the same value for both colours, but if anyone figures this out for certain, please let me know.

     

    The other value I haven't found for anything except the Steam version, is the Text Pulsing value, but the likelihood of finding this is pretty slim, it's also not really necessary to change.

     

    Initially I sourced values from the KotOR GUI Editor then entered them in HxD a hex editor to achieve the same colour as the rest of the GUI elements.

    But you can also preview colours here : https://rgbcolorpicker.com/0-1

     

    KEY

    This is how I have formatted the information presented here, in some cases I have provided more information in brackets.

    VALUE @ ADDRESS = ORIGINAL BYTES EXTRA INFORMATION )

     

    Reference Table

    I wrote up this table as reference while I was hex editing the executable, changing the values to 0.0 or 1.0 causes problems elsewhere in the game.

    It's likely that if the value was originally 0.0 or 1.0 for any of the RGB values used that that the values wouldn't have taken up four bytes and would have been compiled differently, though I am not certain.

    But I know that if I changed the red value for the text to 0.0, the game didn't load in and stayed stuck on a black screen and if I changed the blue value of the text to 1.0, models didn't load in properly starting with the main menu character.

    It's also possible that glColor3f or glColor4f just doesn't accept 0.0 or 1.0 but I am not certain.

    It will accept values such as 0.01 to 0.99 but I haven't included anything other than a simple set of references here.

     

    0.1 = CD CC CC 3D
    0.2 = CD CC 4C 3E
    0.3 = 9A 99 99 3E
    0.4 = CD CC CC 3E
    0.5 = 00 00 00 3F
    0.6 = 9A 99 19 3F
    0.7 = 33 33 33 3F
    0.8 = CD CC 4C 3F
    0.9 = 66 66 66 3F

     

    It is now possible to fully re-colour the entire GUI of the game for the following systems.

    • PC ( Amazon, GoG, Steam Aspyr & Disc )
    • Xbox

     

    The following systems cannot be re-coloured yet.

    • PC ( Steam LegacyPC )
    • Android
    • Mac OSX & iPhone iOS

     

    Health Colour Values

    Having said that, I have not yet tracked down the values for the colour of the health bar on the portraits, I thought it was contained in the .gui files but changing the progress colour value here makes no difference in-game, so it must also be stored in the .exe, changing the force colour in the .gui files does work however.

     

    Mac OSX & iPhone iOS

    I do not have access to a Mac or iPhone currently so I don't know when I will be able to look into finding the values for these systems.

     

    Android - Aspyr Patch

    Having extracted the android .apk file to try and track down these values for the mobile version of the game as well, I haven't actually tried editing any of them yet, but I have listed how many hits there are when searching for any of the values I am looking for.

     

    Determining which values to change is likely to take quite a while, unless they are all neatly stacked alongside one another which hasn't been the case for anything except the disc version of the game and the xbox executable.

     

    Even if I do successfully find the values that I need to alter, it might not be easy for the average user to install, so it's likely that I won't bother with altering the android .apk file, but it's something I am looking into for the sake of completing the search.

     

    Dialog Text ( RGB )

    0.10 @ = CD CC CC 3D ( 273 hits )
    0.69 @ = 33 33 33 3F ( 55 hits )
    0.55 @ = CD CC 0C 3F ( 8 hits ) ( Possibly @ 001CEEB44 )

     

    Button Border ( RGB )

    0.05 @ = CD CC 4C 3D ( 90 hits ) ( effects use item text and item icon highlight as well )
    0.34 @ = 33 33 B3 3E ( 31 hits ) ( effects use item text and item icon highlight as well )
    0.27 @ = 71 3D 8A 3E ( 7 hits ) ( effects use item text, use item button border and item icon highlight as well )

     

    Status Effects ( RGB )

    0.94 @ = 33 33 73 3F ( 20 hits )
    0.66 @ = C3 F5 28 3F ( 11 hits )
    0.30 @ = 9A 99 99 3E ( 122 hits ) ( effects use item button border in inventory and unused item button borders as well )

     

    Text Highlight ( RGB )

    Red & Green use the same address as the green value from the dialog text. ( I think but I am still searching )

    0.69 @ = 33 33 33 3F ( 55 hits )
    0.69 @ = 33 33 33 3F ( 55 hits )
    0.60 @ = 9A 99 19 3F ( 51 hits )

     

    Text Highlight Pulsing ( BYTE )

    A 3F somewhere amongst 164,432 3F's

     

    Amazon - Aspyr Patch

    The Amazon executable is practically identical to the GOG version. ( see below )

     

    GOG - Aspyr Patch

    Dialog Text ( RGB )

    0.10 @ 00585084 = CD CC CC 3D
    0.69 @ 00584B24 = 33 33 33 3F
    0.55 @ 005850C8 = CD CC 0C 3F

     

    Button Border ( RGB )

    0.05 @ 005864AC = CD CC 4C 3D ( effects use item text and item icon highlight as well )
    0.34 @ 00589ED8 = 33 33 B3 3E ( effects use item text and item icon highlight as well )
    0.27 @ 00589F08 = 71 3D 8A 3E ( effects use item text, use item button border and item icon highlight as well )

     

    Status Effects ( RGB )

    0.94 @ 00589F04 = 33 33 73 3F
    0.66 @ 00589EE8 = C3 F5 28 3F
    0.30 @ 00584B28 = 9A 99 99 3E ( effects use item button border in inventory and unused item button borders as well )

     

    Text Highlight ( RGB )

    Red & Green use the same address as the green value from the dialog text. ( I think but I am still searching )

    0.69 @ 00584B24 = 33 33 33 3F
    0.69 @ 00584B24 = 33 33 33 3F
    0.60 @ 00587BD0 = 9A 99 19 3F

     

    Text Highlight Pulsing ( BYTE )

    A 3F somewhere amongst 7349 3F's

     

    Steam LegacyPC

    Though I have not yet checked for these values in the LegacyPC executable, replacing the cursors resulted in error code : 51 from Steam, which means that those bytes are checked when launching the game to verify the integrity of the executable.

    Unfortunately that means that it cannot be edited as of yet, I believe the following are the addresses for the dialog text, however this also results in error code : 51 from Steam.

     

    Dialog Text ( RGB )

    0.10 @ 00426E34 = CD CC CC 3D
    0.69 @ 00426E38 = 33 33 33 3F
    0.55 @ 00426E3C = CD CC 0C 3F

     

    Steam Aspyr

    Dialog Text ( RGB )

    0.10 @ 005862FC = CD CC CC 3D
    0.69 @ 0058575C = 33 33 33 3F
    0.55 @ 0059DBB0 = CD CC 0C 3F

     

    Button Border ( RGB )

    0.05 @ 0058C530 = CD CC 4C 3D ( effects use item text and item icon highlight as well )
    0.34 @ 0058AA98 = 33 33 B3 3E ( effects use item text and item icon highlight as well )
    0.27 @ 005A03AC = 71 3D 8A 3E ( effects use item text, use item button border and item icon highlight as well )

     

    Status Effects ( R?B )

    0.94 @ 0059AF70 = 33 33 73 3F
    0.66 @ 0059CE40 = C3 F5 28 3F
    0.30 @ 00585760 = 9A 99 99 3E ( effects use item button border in inventory and unused item button borders as well )

     

    Text Highlight ( RGB )

    Red & Green use the same address as the green value from the dialog text. ( I think but I am still searching )

    0.69 @ 0058575C = 33 33 33 3F
    0.69 @ 0058575C = 33 33 33 3F
    0.60 @ 0058A978 = 9A 99 19 3F

     

    Text Highlight Pulsing ( BYTE )

    Found this by accident.

    63 @ 005861B7 = 3F

    The higher the value, the slower the pulsing.
    The lower the value, the faster the pulsing.

    Note : this byte is already at it's highest value.

     

    Disc

    Dialog Text ( RGB )

    0.10 @ 00425D34 = CD CC CC 3D
    0.69 @ 00425D38 = 33 33 33 3F
    0.55 @ 00425D3C = CD CC 0C 3F

     

    Button Border ( RGB )

    0.05 @ 00425D1C = CD CC 4C 3D ( effects use item text and item icon highlight as well )
    0.34 @ 00425D20 = 33 33 B3 3E ( effects use item text and item icon highlight as well )
    0.27 @ 00425D24 = 71 3D 8A 3E ( effects use item text, use item button border and item icon highlight as well )

     

    Status Effects ( RGB )

    0.94 @ 00425D40 = 33 33 73 3F
    0.66 @ 00425D44 = C3 F5 28 3F
    0.30 @ 00425D48 = 9A 99 99 3E ( effects use item button border in inventory and unused item button borders as well )

     

    Text Highlight ( RGB )

    0.69 @ 00425D28 = 33 33 33 3F
    0.69 @ 00425D2C = 33 33 33 3F
    0.60 @ 00425D30 = 9A 99 19 3F

     

    Text Highlight Pulsing ( BYTE )

    A 3F somewhere amongst 5897 3F's

     

    Xbox

    Because I plan to get my project on the original Xbox one day, I also tracked down these values inside the .xbe and luckily they all sat neatly alongside each other.

     

    Light Green Text ( RGB )

    0.10 @ 003F5B50 = CD CC CC 3D
    0.69 @ 003F5B54 = 33 33 33 3F
    0.55 @ 003F5B58 = CD CC 0C 3F

     

    Dark Green Border ( RGB )

    0.05 @ 003F5B38 = CD CC 4C 3D
    0.34 @ 003F5B3C = 33 33 B3 3E
    0.27 @ 003F5B40 = 71 3D 8A 3E

     

    Status Effects ( RGB )

    0.94 @ 003F5B5C = 33 33 73 3F
    0.66 @ 003F5B60 = C3 F5 28 3F
    0.30 @ 003F5B64 = 9A 99 99 3E

     

    Text Highlight ( RGB )

    0.69 @ 003F5B44 = 33 33 33 3F
    0.69 @ 003F5B48 = 33 33 33 3F
    0.60 @ 003F5B4C = 9A 99 19 3F

     

    Text Highlight Pulsing ( BYTE )

    A 3F somewhere amongst 9517 3F's

     

    The status effects colour effects items that you haven't viewed yet as well as the currently selected waypoint on the map.

    xemu-2024-05-17-19-23-56.png.3ec793253af87008ee7119926c5ee7d1.png

    While searching for these values, I also found another value that seems to change the border of one of the inventory button icons, not entirely sure why.

    xemu-2024-05-17-20-16-05.png.74658014a47c7ccdc200e6979cf733c4.png

    0.05 @ 003F68D8 = CD CC 4C 3D

     

    How strange.

    25 - One Line Dialogs

    Spoiler

    One line dialogs are a great way to give your background NPCs a bit of life.

    Starting Conditional Script

    Spoiler

    //Thor110
    //TSL One Line Dialog Random Starting Conditional Script
    int StartingConditional()
    {
      int i = GetScriptParameter(1);
      return Random(i) == 0;
    }

    This script can be used to have as many one line dialogs as you want that make use of the Random function to determine which line is spoken.

    one_liner.dlg

    This dialog file showcases how to make use of it, ensure to compile it and pass it the correct line number.

    simple.jpg.86b401ecbd6bf8e6e546a44ff7c50ad3.jpg

    Like this.

    26 - Writing a changes.ini for HoloPatcher

    Spoiler

    When writing a changes.ini for HoloPatcher or TSLPatcher, it is best to start with the documentation provided.

    However in some cases this isn't always as easy to navigate as one would hope.

    Generally I find it best to use a combination of techniques to generate a changes.ini

    If it's a small mod, use ChangeEdit to make your changes.ini, which will then be compatible with TSLPatcher and HoloPatcher.

    HoloPatcher has some unique features that TSLPatcher does not, so it's worth considering what your mod needs and weighing up the pros and cons of them both then deciding on which you want to use.

    For larger mods, you might need to generate the changes.ini file yourself, ChangeEdit locks up when adding too many files.

    One work around for this is to add the files in sections and have multiple install folders that point to the override.

    However I find it easier to simply generate a file list manually using batch scripting or any other programming language, just create a file list, then add "Replace#=" to the beginning of each line, increasing the number by 1 with each line, starting at 0.

    Feel free to learn from the changes.ini files contained within my project : https://github.com/Thor110/Expanded-Galaxy-Main/tree/main/Expanded Galaxy Main Installer/tslpatchdata

    As far as I am aware, my project makes use of a lot, perhaps even all of the new features that are made available by HoloPatcher.

    I also use a namespaces.ini to separate my changes.ini file into tailor made versions for each variation of the game. ( Amazon, GoG, Disc, LegacyPC, Steam & Xbox )

    Though in most instances this isn't exactly necessary, in some it is as each version of the game has their own bugs.

     

    The two main versions are Aspyr and the 1.0b patch.

     

    Amazon, GoG and Steam use the Aspyr Patch.

    Disc & LegacyPC use the 1.0b Patch.

     

    It is possible to have the Disc version without the 1.0b patch, but it is not advisable.

     

    In the future I will try to add more detail and examples to this tutorial, but for now it just outlines suggestions for getting started.

    99 - [REQUESTS] - Submit a tutorial idea!

    Spoiler

    If you have ideas for a tutorial feel free to message me and let me know.

    For a while now I have been considering creating a playground of sorts across a few maps and filling it with a combination of all possible interactions in the game, from animations, to dialog and the various alien responses so that people could play through them, seeing everything in action and use it to better pick out the pieces of code, voiceover, items, placeables, doors or characters that they might need to use in their modification of the game.

    TCTutorial.png.d14b7ed28fab2174fc4c14221edffb8f.png

    For now I have set up the Shuttle as an example Starship with access to the galaxy map, but there is a lot more work to be done before I release whatever this is.

    Very much like the testing rooms I have created that feature all the doors and characters in the game.

    I will continue to provide examples that I think might be useful to people, these are all for TSL so far.

    I hope these tutorials and any others I write will help people continue to make mods for KotOR 1 & 2.

    These tutorials are getting shorter and less detailed, I may or may not go back and re-write them at some point but if anyone struggles with anything feel free to message me and let me know what I haven't covered very well.

     

    Feel free to join the Discord for my project if you need help with anything related to KotOR modding and I will do my best to assist.

    Discord https://discord.gg/S3YyfTjMV8

    Base Game Scripts & How To Use Them

    Spoiler

    I am considering working on an index for the base game scripts and how they all function so that people can more easily use them in dialog files without having to constantly look up how they work, what parameters need to be passed along to the script and other such details.

    For now here is one such example that I discussed with another user recently.

    a_hitman.nss/.ncs - is used to turn an NPC hostile, if they are already hostile it will turn them insane.

    Spoiler

    //:: FileName a_hostile
    //:: Created By: Kevin Saunders
    //:: Created On: 07/20/04
    //::
    //:: Object with Tag = ScriptStringParameter becomes hostile.
    //  Modified: Tony Evans 9/9/04  (Added nInst parameter)
    //  Modified: Tony Evans 9/15/04 (Added OBJECT_SELF default and nSane param)

    void main()
    {

        string sCritter = GetScriptStringParameter();
        int nInst = GetScriptParameter(1);
        int nSane = GetScriptParameter(2);

        object oTarg;

        if (sCritter == "") oTarg = OBJECT_SELF;
        else oTarg = GetObjectByTag(sCritter, nInst);

        if (!nSane) ChangeToStandardFaction(oTarg,STANDARD_FACTION_HOSTILE_1);
        else ChangeToStandardFaction(oTarg,STANDARD_FACTION_INSANE);
    }

    a_hitman.png.d0b8cea6d1f81a4e016a31d3106541c7.png

    The above image shows how you would use this in a dialog file, example is from the Entertainment Promenade on Nar Shaddaa.

    KotOR Modding - Crash Course

    This 2 hour stream covers the basics of KotOR modding and some of the programs involved, I also regularly stream development of my mod project on Twitch/YouTube.

    Not all of this covers KotOR modding, there is about 10-20 minutes during the first hour where I get distracted and the second hour of it is mostly me playing games.

    Spoiler

    By the basics, I mean the very basics. An overview of the programs and filetypes associated with KotOR as well as the structure of level files.

    These are the testing rooms but for K1 the room is lacking a texture but I find this just makes it easier to look through the characters.

    If anything in any of my short tutorials isn't clear or you don't understand for some reason then let me know and I will do what I can to help.

     

     

    ADVANCED TUTORIALS

    Utilising the following batch scripts and suggestions might take a while to get to grips with for some users but I would always advise doing so, it's very handy to have the ability to quickly generate a file list or compare things in various ways utilising the power of batch scripting.

    Comparing Level Contents

    Let's say you have two levels and you need to compare the differences of the contents.

    Extract everything from the original level to a folder called "level-a" and the modified folder to "level-b"

    Run the following batch script inside the "level-a" folder.

    file-list.bat

    Then delete or move the .bat file and move "file-list.txt" that it just created outside of the folder.

     

    You can also use this script to check that all the files exist.

    check-if-file-exists-from-file-list.bat

    You will have to move the file-list.txt and this script inside the folder to run the script.

     

    Now run this script at the same location as "file-list.txt" to run a file check against the contents of both folders.

    compare-files-from-file-list.bat

    Hopefully this might help someone, where I recently had to transfer all of my changes from manual installs to a TSLPatcher changes.ini file, I found this process helped speed the process up a little bit.

     

    From here, you should know which files differ and you can then use ChangeEdit.exe that comes with TSLPatcher in order to generate the differences between GFF files.

     

    Compiling Scripts

    If you have made it this far into the tutorial, you should already be familiar with compiling scripts, however for large projects you might need to recompile a lot of scripts at once, so here is a batch script that I used to do it.

    compile.bat

    Simply edit the script so that it points to the location of nwnnsscomp.exe for you and then you will be able to put the script into any folder that you need to compile a lot of scripts in and use it to do it all at once.

     

    If the scripts don't work for you, you might need to edit them and read them a bit in order to understand them and then to make sure that you have all of the right files in the right places.

     

    Thor110

    • Like 8
    • Thanks 1

  17. Previous message about the KotOR Modding Tutorial Series I am writing that will show you how to create an entirely new planet with 2 levels as well as cover any information that could help people make small mods for the games as well as covering how to start a Total Conversion.

    Spoiler

    I will be writing a tutorial on new module creation, covering loading random module pieces into a 3D modelling program, taking down the new co-ordinates and creating a completely new level out of pieces already in the game, this should make it possible for lots of people to create total conversions and new levels for both games and my expanded galaxy mods.

    I have also updated my tutorials topic to become a general directory for all of my tutorials, I still only have the one but have prepared files for more and will be writing them soon : https://deadlystream.com/topic/6886-tutorial-all-of-my-tutorials-for-the-kotor-series/

    I look forward to seeing what people can make when I have made the tutorials, there are also files on the ModDB pages to help people easily view assets in the game.

    Total Conversion Template for the K2 Odyssey Engine

    Spoiler

    I have decided to release either a tutorial or as part of the final installer program an option to copy the default K2 install and trim all of it's content to the bare minimum (174mb) in order to allow people to easily create a total conversion for the Odyssey engine, for now I have trimmed down a copy to 174mb, but it needs to include the models.bif a further 845mb in order to actually start, I believe once I figure out which models are a part of the menu and simply place them in the override this will solve the issue, I have not tried to do this yet.

    This is the trimmed version of the game, I plan to just put the models used in the menu / throughout the menu in the override folder and remove the models.bif to finish the template example for which I will most likely write a tutorial for people to follow so that they can do the same.

    From here users will be able to pick and choose exactly what they want to be a part of their total conversion.

    A further 126mb can also be trimmed once I single out the gui files specifically used for the games interface and menus and remove anything KotOR2 related.

    This would trim the overall Odyssey engine down to 48mb.

    From here I hope to string together every tutorial I write while documenting every change I learn to make to the game making my mod that will show people how to do the same and create a Total Conversion using assets from K2 and the light version of the engine.

    BLANK_K2_00000.thumb.png.d324fef0163d08d958d9aa7e85f390eb.png

    Update The first post has been updated and re-formatted to include all information about the Expanded Galaxy Project and both mods, I will be posting story ideas, quest ideas and more when I am ready which will require feedback from the community as I would like to make sure it fits with the overall universe as well as the feel of the games.

    Progress I have updated all sound and music entries for the K1 to K2 maps, opened all the doors and fixed transitions between levels that are set up for doors, I still need to fix area transitions that are not attached to doors.

    I am currently working on creating an entirely new map made from pieces already in the game to export with a new .visibility and .layout file to go alongside the tutorial I will write for creating entirely new modules out of existing pieces.

    This should also allow me to fix the .visibility files for both mods, which I see as important, forcing the entire level to render at once is not a good option for poor performance machines, given that is is such an old game this is generally going to be fine for most users, but may cause trouble on other platforms, tablets, mobile and older computers.

    So I plan to fix this to prevent problems caused by rendering the entire level.

    Unfortunately I am not very good at 3D modelling or editing, so this may take me some time, but hopefully not too long to create a simple tutorial and some simple new maps for testing, using this process I hope to expand upon areas already in the game.

    New Map Ideas

    Such as the Telos Citadel Station which was mentioned to me and documented in detail by @Jorak Uln as well as Onderon.

    I would also like to restore the Jedi Enclave Sub-Level on Dantooine for the First game, Nar Shaddaa could also easily be expanded upon and given new areas made out of existing pieces, as could Taris and the Telos Restoration Zone.

    There was also the idea to add new areas to Dxun making the journey to the Mandalorian Camp take longer, or just adding new areas to explore, but this is just a thought for the moment as it could alter Vanilla gameplay experience, but new areas could still be added and given signs so players can just avoid them to maintain a Vanilla experience.

    Just by adding something like a Rakatan flag next to new areas and content could make it so that players who wish to maintain a Vanilla gameplay can do so without having to uninstall the mod ( unless they don't want to see the planets or new content in game either ) perhaps for filming.

    Lehon the Unknown World could also receive some expansions using areas already in the game as a template.

    What does everybody think about these ideas? & does anybody have any tips for constructing maps?

    I think this could prove great for constructing new map pieces and allowing for an incredibly diverse level creation system based on tutorials using Gmax, KotorMax and K-GFF Editor, for example you could take the Terrain from one map, buildings from another and extras from yet another map, using pieces from across maps in the game to construct entirely new pieces for use in your maps and for others to use.

     

    • Like 1

  18. Old message about what is edited in the Source Files released on ModDB.

    Spoiler

    Take a look and test it out, either way you need the Full Release to test it and or use the maps, but the module files I have created remove most references to a lot of story relevant content in the first game for the second game and the same goes for the K2 maps for K1 mod.

    On 1/8/2019 at 1:55 PM, JediArchivist said:

    Did you edit the K2 to K1 files and "empty" the levels, or are they as they resulted from the porting? I mean, are the placeables, characters, area transitions, scripts, etc. still in the level / module or have they been removed and the module is a "blank slate"? 

    A lot of stuff is edited out but mainly triggers in the .are, .git and .ifo files, if you wish to re-use anything from the main game you will need to re-extract every module from scratch and edit it to your liking using Kotor Tool ( the .rim and _s.rim files contained within the modules subsection of the program ) but bear in mind a lot of the scripts referenced will cause K2 to crash, the same goes for K1, I removed every entry necessary that might have crashed the game, referring to scripts in the first game, most if not all modules have the scripts in a separate folder if you plan to use them.

    But the .are, .git and .ifo files had to be modified for a stable release.

     

    • Like 1

  19. Old message about re-using module pieces from both games to create entirely new levels using content already available in the game.

    Spoiler
    On 1/8/2019 at 12:15 PM, N-DReW25 said:

    I like the sound of that. I'd like to point out though that the modules can also be used in different ways than just porting all of Tatooine to K2 for example, people could if they wanted to Port Anchorhead and maybe the K1 Dantooine and reskin it and add it as part of an Onderon Expansion where the player can leave Iziz and go explore the outside of the city, the possibilities could be endless.

    This is also the sort of thing I mean, would be perfect for creating new areas considering all the pieces available in both games! as well as the content that can be added.

     

    • Like 2

  20. Old message about first release of the modders resource.

    Spoiler

    The first release of the Expanded Galaxy Project is up! For both games! All modules are in both games! They can only be warped to as of yet, head over to ModDB to check it out and access news, tutorials, downloads and more as well as new resources plus both the latest versions of the mods. ( Beta v0_2_5 )

    To see regular updates check out the first post here and on the ModDB page.

    https://www.moddb.com/mods/kotor-ii-tsl-expanded-galaxy/downloads/k1-to-k2-exiles-expanded-galaxy this is for KotOR 2 ( K1 maps for K2 )
    https://www.moddb.com/mods/expanded-galaxy-project-kotor-12/downloads/k2-to-k1-beta this is for KotOR ( K2 maps for K1 )

    Note Both downloads include the files necessary to re-construct the modules these are the "modders resource" release versions as well as the beta for the Expanded Galaxy Project.

     

    • Like 3

  21. I really look forward to using some of these tools hopefully during the development of my mod if they are released during the development of my mod.

    Your overall work is amazing and have a few really interesting thoughts about things that could be done with this and wonder what your thoughts are on the idea for re-integrating online play and options for the game.

    My thoughts were to add a single player not part of the story-line who could join another player in their main story and follow alongside them at any point during the game.

    I already have this planned for my mod, but wonder what information you might have come across that could be useful for me in the process of this engines development.

    Stunning work once again and I really look forward to seeing more!

    Thor110


  22. Old message about the purpose and goal of the Expanded Galaxy Project.

    Spoiler
    On 1/8/2019 at 2:14 AM, Snigaroo said:

    I'm not a modder and typically I stay away from these sorts of things, so now in butting my head in I hope I'm not misreading your intent, but am I correct in saying you're suggesting that you would like to create an offsite for users to collaborate with you for the development of mods and porting of content in a way which you would define as being beneficial and compatible with the game's original aesthetic/design, and to reduce the frequency of projects created which are contrary to that interpretation?

    The online thing aside, I'm not sure I understand what you would want out of such an offsite, and why you're worried about alternate aesthetic/design interpretations--universes, as you call them--being developed. Is not the point of creating a mod to allow users and modders to decide what kind of content they would like to use, whether it be in their games, with compatible mods, or simply to draw inspiration from? What is the downside of users having open access to this content, if whatever mods come of it are the user's choice to utilize or not? The only mods which are ever going to be universalist are TSLRCM and a few assorted bugfixes, after all; there is no great likelihood that the entire KOTOR community would become so reliant upon the usage of one new mod that it would become a standard, as TSLRCM has. Forgive me if I am misinterpreting you, I'm simply not clear on this.

    I am not at all saying people cannot use it, the first upload will be purely [RESOURCE] / [MATERIAL] / [TUTORIAL] Content for people to freely use...

    What I mean is I would like to try and integrate as many mods as possible as well as future mods by creating a site for the mod that will document development and allow for voting on what will or wont be included overall as well as offering tutorials for people to include their own content and tutorials on how to integrate other mods if possiible.

    Think you misread my intent :) but someone was going to.

    I am not worried, simply think it could be troublesome for non-advanced users in the future to pick from what might become a lot of different mods and was simply suggesting they be more generally focused or used for Total Conversions, but not saying people cannot do what they want as this is being released as a resource, I literally only started this project to port the Yavin Orbital Station over to TSL and to have fun while I was playing both games through ( which I haven't actually done yet lol ) because I just loved having a random vendor to go to out in the middle of nowhere.

    Thor110

    Update : For example if TSLRCM & M478-EP did not work together, I was not sure I was going to bother with either.

    Additional Say two really great mods came out for either game using this as a base, but one didn't include the contents of the other in either a module ( map / level ) or overwrites the dialog.tlk file or replaces anything from one another in general.

    Was hoping to make some documentation for the dialog.tlk file about entries added, what they relate to by area and or mission, as well as hoping to integrate other peoples amazing work with their permission ( though you seem to not mind about that ) in a way I do not either, but I sort of do.

    As for actually making another site, it might never happen as I am not a big fan of web development, it's extremely boring, it might end up just being here and ModDB, but who knows what the future will bring, I did also have plans for my own website in general, so this could tie in and have a sub-page or something along those lines.

    Swoop Update A few pictures of the Taris Swoop map in K2. ( is actually Telos by the looks of it even though I changed the room models in the .are file, very strange )

    Spoiler

    The first time I loaded the map it seemed to work ( almost anyway, I took off but didn't collide with anything ) the second time I loaded the map after exiting the level it didn't seem to take off at all.

    For the moment I used the Telos Swoop maps scripts and such as a base but changed the rooms.
    K2_SWOOPING_00002.thumb.png.f223a3ecd1bf73ef5180e9ebeb76b9e9.pngK2_SWOOPING_00003.thumb.png.08e65270935a23edef82ff2de83cf827.pngK2_SWOOPING_00004.thumb.png.0aae1b65a2a840dca5f54409c082f273.png

     

     

    K2_SWOOPING_00000.thumb.png.43f19d604f3f704243b592114f9f02d9.png

    Additional : Thoughts of creating a configurable setting for headsets and soundsets, depending on the amount out there and if people think it's worth doing, as well as any other content that could be added to the game in a similar fashion.

     

    • Like 2

  23. Old message about patch information.

    Spoiler

    The conversion of all maps is ready for release for both games, but I am delaying it because I need a website to try and make sure the internet doesn't go wild over the next few years with my project / release, by wild I mean making too many different universes that change the kotor 1 or 2 storylines, I would prefer it was only used for total conversions where you are neither of the main characters from both games as well as the overall project I have planned.

    All of my files are split into folders within the override folder, this seems to work just fine so I have all three texture packs in folders names "swpc_tex_tpa" etc.

    On 1/7/2019 at 9:19 PM, JediArchivist said:

    Which texture pack are You using, since there are actually 3 versions of the same textures: TPA - High Texture Quality; TPB - Medium Texture Quality; TPC - Low Texture Quality, you said you mixed all 3 of them and dropped them into the Override folder? Though since it's a lighting issue, i don't believe the textures have any impact on that, just saying...

    Turns out I was being silly, for some reason lighting just isn't working in the second game for me  which is really good news in a way, but it seems the maps for both games that I put in the first game all work just fine, so in light of this I have prepared and compressed both modders resources ready for release as well as backed them up permanently, I am not sure what I want to do right now as I find myself at a little bit of a dilemma.

    Note : prior to porting all of the maps / modules I cannot remember what version of the game I used though this won't matter too much as I have reason to believe I may need to convert every map again for two reasons A to be thorough about the game version issue and B as I realised the Yavin models converted by @Effix allow animations to play on the relevant surfaces but the Yavin Orbital Station models I converted do not.

    Additional : Due to the realisation that the Kotor Toolset is capable of opening .module files this leaves every mod open to updating, integrating, patching and more. Though this is the case I would still appreciate all of the original authors permission as well as hopefully their co-operation, hopefully once I set up a website for the Expanded Galaxy Project they will be more willing ( Though I have not had anyone refuse I have not asked or looked into porting other mods that much yet ).

    Current Version : These are the file names for the updates I used obtained from deadlystream that I have sat next to my mod / installed on the most recent installation of the game I have tested with that was installed only hours before this update.

    "sw_pc_english_from200424_to210427" KotOR2 Patch I am currently using.

    "SWKotOR1_03" KotOR Patch I am currently using.

    I am looking forward to more input from everybody, will begin work on a website tomorrow so that I can try and keep things organised.

    Any more input about the best versions to use is welcome as I am open to re-extracting the files to use the best versions.

    • Like 2