Search the Community
Showing results for tags 'script'.
Found 13 results
-
Version 1.0.0b1
32 downloads
A very simple CLI-based tool that'll take a folder of GUIs made for one resolution and patch them to work for another resolution. Please report any bugs. Simply input the path to the GUI file (or folder of GUI files) and the output location, your desired resolution, and let it work. GUI Resizer CLI Tool Overview This is a simple command-line interface (CLI) tool designed to adjust and scale GUI (Graphical User Interface) files based on different screen resolutions. The tool reads `.gui` files from the popular game Star Wars: Knights of the Old Republic and adjusts the layout to fit various resolutions and aspect ratios. It supports multiple resolutions and can handle batch processing of files. Features Multi-Resolution Support: The tool can adjust GUI files to fit several resolutions across different aspect ratios, such as 16:9, 16:10, 4:3, 5:4, 21:9, 3:2, and 1:1. Batch Processing: You can process multiple GUI files at once, making it easy to adjust a whole directory of files. Logging: Outputs logs to track the processing of files, including which resolutions were processed and where the output files are saved. Cross-Platform: Works on Windows, Linux, and macOS with Python 3.8+. Usage Basic Command To run the tool, use the following command: python3 gui_resizer.py --input <input-path> --output <output-path> --resolution <resolution> Parameters --input: The path to the `.gui` file(s) you want to process. You can specify a single file or a directory containing multiple `.gui` files. --output: The directory where the processed files will be saved. --resolution: The target resolution(s). Use the format `WIDTHxHEIGHT` (e.g., `1920x1080`). You can also specify `ALL` to process all common resolutions. Example To convert all `.gui` files in the directory `input_files/` to fit a 1920x1080 resolution and save them to the `output_files/` directory, run: python3 gui_resizer.py --input input_files/ --output output_files/ --resolution 1920x1080 Logging If logging is enabled, a log file named `output.log` will be created in the specified output directory. This file will contain details of the processing operations performed. How It Works 1. Input Handling: The tool takes in `.gui` files or directories containing these files and reads them using the `pykotor` library. 2. Resolution Scaling: The tool scales the GUI elements based on the specified target resolution(s). It calculates scale factors based on the original dimensions of the GUI and applies these factors to resize elements accordingly. 3. Output Generation: The processed GUI files are then saved to the specified output directory, organized by resolution. Credit: Cortisol for PyKotor (90% of the code) DarthParametric for testing and brainstorming the idea -
View File Lightweight GUI Patcher A very simple CLI-based tool that'll take a folder of GUIs made for one resolution and patch them to work for another resolution. Please report any bugs. Simply input the path to the GUI file (or folder of GUI files) and the output location, your desired resolution, and let it work. GUI Resizer CLI Tool Overview This is a simple command-line interface (CLI) tool designed to adjust and scale GUI (Graphical User Interface) files based on different screen resolutions. The tool reads `.gui` files from the popular game Star Wars: Knights of the Old Republic and adjusts the layout to fit various resolutions and aspect ratios. It supports multiple resolutions and can handle batch processing of files. Features Multi-Resolution Support: The tool can adjust GUI files to fit several resolutions across different aspect ratios, such as 16:9, 16:10, 4:3, 5:4, 21:9, 3:2, and 1:1. Batch Processing: You can process multiple GUI files at once, making it easy to adjust a whole directory of files. Logging: Outputs logs to track the processing of files, including which resolutions were processed and where the output files are saved. Cross-Platform: Works on Windows, Linux, and macOS with Python 3.8+. Usage Basic Command To run the tool, use the following command: python3 gui_resizer.py --input <input-path> --output <output-path> --resolution <resolution> Parameters --input: The path to the `.gui` file(s) you want to process. You can specify a single file or a directory containing multiple `.gui` files. --output: The directory where the processed files will be saved. --resolution: The target resolution(s). Use the format `WIDTHxHEIGHT` (e.g., `1920x1080`). You can also specify `ALL` to process all common resolutions. Example To convert all `.gui` files in the directory `input_files/` to fit a 1920x1080 resolution and save them to the `output_files/` directory, run: python3 gui_resizer.py --input input_files/ --output output_files/ --resolution 1920x1080 Logging If logging is enabled, a log file named `output.log` will be created in the specified output directory. This file will contain details of the processing operations performed. How It Works 1. Input Handling: The tool takes in `.gui` files or directories containing these files and reads them using the `pykotor` library. 2. Resolution Scaling: The tool scales the GUI elements based on the specified target resolution(s). It calculates scale factors based on the original dimensions of the GUI and applies these factors to resize elements accordingly. 3. Output Generation: The processed GUI files are then saved to the specified output directory, organized by resolution. Credit: Cortisol for PyKotor (90% of the code) DarthParametric for testing and brainstorming the idea Submitter th3w1zard1 Submitted 11/14/2023 Category Modding Tools
-
General scripting question as I am giving myself a crash course...I am trying to get a feel for how functions work together since I don't have any previous experience. Would something like the following be possible... Could you use "GetSkillRank" to dynamically alter the "nBonusMarkup" and "nBonusMarkDown" values within the OpenStore function? If you could, could it be as direct as just taking the value and using a formula like [Persuade/20]=X*100=nBonusMarkUp? Or would you need to set up a conditional to fire specific instances of "nBonusMarkUp" based on certain "greater than" values for persuade? If so, that feels like it would be a really cool mod! I'd be happy to give a stab at doing it, though it feels so easy I have to assume it wouldn't work or else someone would have done it by now 😅 I was inspired to ask based on this thread.
-
Hi. So the speedrunning community is trying to figure out how a glitch works that we call a "Displaced Loading Zone" (aka DLZ). And I've come here for some help solving this mystery. What is a DLZ? A DLZ is when you're just walking along in the game and suddenly, for no apparent reason, the game loads a different module - as if you had walked into a Loading Zone. Examples: Endar Spire Taris - Sith Base Dantooine Enclave Speedrunner DLZ info doc: What We Know This used to be a very rare occurrence and getting footage of it was even rarer. But as more people streamed the game, we got more and more examples. We eventually got enough info to start some early speculation on how this glitch was occurring. Long story short, we have a basic understanding of the circumstances needed for this glitch to fire. How does a DLZ work? What's Confirmed: A DLZ always occurs when the player is "below" or "south" of the Loading Zone on the map (in the negative Y direction). A DLZ can occur at any Y position below the loading zone, so long as it coincides with the trigger. Z position does not matter Camera facing does not matter Player facing does not matter? Which character is party leader doesn't matter A DLZ can trigger dialogue cutscenes as well as Loading Zones. Some maps in game are turned 90 degrees from the way they are actually oriented in the Toolset (example: Endar Spire - Command Module). If a party member is too far away from the party leader, a "Gather Your Party" dialogue occurs instead of the module transition and the player is placed outside the door at the transabort point. If there are 2 valid destinations above the player when a DLZ is triggered, it will not always go to the nearest one What's Theorized: A DLZ occurs when the player is within range of some sort of trigger or encounter, etc. A DLZ occurs when the player is "East" or "West" of any trigger on the map (in any X direction - not just when inside the trigger) A DLZ is caused because the game checks if the player position matches the Y coordinate of the trigger and the X coordinate of the loading zone. A DLZ cannot cause a player to reach a loading zone that is "East" or "West" of them (in the positive or negative X direction). A DLZ cannot cause a player to reach a loading zone that is "South" of them (in the negative Y direction) If there are 2 valid destinations above the player when a DLZ is triggered, it will always go to the farthest one (highest Y coord) A DLZ only fires when you're aligned at the very edge of the door's loading zone with your X value. Here's an example DLZ from the Endar Spire: Conceptual Semantics: There are various ways of conceptualizing this phenomenon and we often use them interchangeably. Expressing it in these different ways can cause confusion. All of these are conceptually more or less the same, even if it's not exactly how the glitch works. The Loading Zone is brought down to the player - (hence, "Displaced Loading Zone") The player is brought up to the Loading Zone Move along the Y-axis Move up/down from this X point Aligned at this X value Vertical DLZ Matching X coordinate of the Loading Zone and the Y coordinate of the Trigger. Consistent Results - Performing the Glitch at Will We just recently discovered a way to consistently perform the glitch. Up until now, we have been unable to perform the glitch at will. This made studying how it works next to impossible. The method involves continuously walking into a wall while angling left and right to continually pass over the X position where we know the glitch can occur. The Consistency varies wildly. But it's something. In fact, the new Endar Spire DLZ method is so consistent that anyone can do it in, at most, about 10 seconds. It's basically free. Consistent Endar Spire DLZ Finding Various DLZ coordinates - (X position is what matters) So, after trying this method on various DLZ locations, we set about determining precisely what X value needed to be achieved for it to fire. Some DLZ locations were harder to get to work than others. And some seemed to need extremely precise positioning to work. We suspect that there is something to this that we are missing. It appears that sometimes if we are moving too fast or too slow in the X direction, it doesn't happen. So, our current method is to pass over the X point as many times as we can to just hope it fires. Typical DLZ attempt by our most practiced DLZer WHY does a DLZ happen? Seeking the answer to this question is what led me here to make this post. I started combing through the source SCRIPTS of the game to try to understand how triggers and loading zones are handled by the game. It's a big pool to dive into. I can read the scripts well enough. It's all VERY thoroughly commented, which helps a lot. But I can't seem to find the scripts I'm looking for, even when going down an #include rabbit trail. The closest I've come to finding what I'm looking for is coming across the GetEnteringObject() function being used. But I have yet to find the NSS file where it's defined. What I'm looking for: How does the game track player position? How does the game know a player entered a trigger zone? How does the game know a player entered a loading zone? How could the player/loading zone coordinates be getting confused? My theory is something like: in the script, the programmer assumes the Y coordinate for the player is known and only checks to see that the X coord matches. Something like that. If you've read this far, thank you for your time. Any help or insights you could give would be greatly appreciated.
- 10 replies
-
- wrong warp
- source
- (and 7 more)
-
This is not in any way your go-to modding tools, though perhaps closer to *amazing new discoveries*, lol - so I dropped it here. 🍻 So, this list of texts and numbers below -- //::////////////////////////////////////////////////////////////// //:: [TSL] PlaySound Utility Script //::////////////////////////////////////////////////////////////// //:: File Name : eb_playsound_wav //::////////////////////////////////////////////////////////////// /* Param1/P1 - Delay that will be applied before playing the sound string sSoundName - sTemplate of the Sound in the game files to play Created By : ebmar [based on OEI's implementation] Created On : May 05, 2020 Modified On : June 11, 2020 -- v1.0.0 Credits : JCarter426 -- Odyssey++ : Fred Tetra -- KotOR Tool : tk102 -- DLGEditor : Don Ho -- Notepad++ */ //::////////////////////////////////////////////////////////////// void main() { int nDelay = GetScriptParameter(1); string sSoundName = GetScriptStringParameter(); DelayCommand(IntToFloat(nDelay), PlaySound(sSoundName)); } - is an equivalent to a_playsndobj, a TSL's utility script that plays the sound objects indicated by tag passed in. On the other hand, instead of using the oTag of sound objects/UTS in the game-world like its older-brother, this will use the sString that it gets from the String Param of the DLG. To use it is fairly simple: Drop the compiled script/NCS to the Override folder Insert the script name [default eb_playsound_wav] to either Script #1/#2 field in the relevant node of the DLG Use P1 to determine the delay applied before playing the sound Use String Param to determine which sound to play, based on their template/file name Notes: In my experience using this script -which is in TSL, and not K1- PlaySound action can only play custom files that placed in the Override. I have tried with customs placed in StreamSounds but I can't seem get it to work. You might though, perhaps I was missing something You can't input decimals. I don't know what the legit term is but you can only insert integers/INT; something like 0, 1, or 2, and not FLOAT, like 0.2, 1.25, or 4.20. You can though - but not with this script and using the DLG as the medium Anyway, here's the compiled script if you don't feel like compiling yourself -- eb_playsound_wav.ncs Hope that helps anything of your projects, and may the Force be with you!
-
I am trying to edit the .mod files in the game, at least some of them. I know that many of the files in the game, whether they are dialogue, .utc, ,uti, or etc, share the same name. This can create an issue when you want to edit one in particular. I want to be shown how to edit the .mod files so I can rename a particular dialogue, .utc, .uti, and etc file and edit it with aspects like scripts or adjusting inventory or saying I want so the game will recognize it as a separate file and provide them. I have already tried everything in KOTOR Tool and Mod Project Tool. Can someone please tell me what I need to do and which program I need to use. Please provide step-by-step instructions. For an example I will use the dialogue file sc16_converse. There are two of them. One is located in 10. ebo_m40aa_s.rim and the other in STUNT_16_s.rim. I need to rename one of the copies so they will be recognized as separate for the TSLPatcher and the Override Folder. I was told to use the K-Giff program to locate but I cannot find them after using the program. I download all the mod files (the ARE, GIT, and IFO Files) from both s.rim modules with KOTOR Tool but then when I searched for the sc16_converse file there was nothing there. I have included a screenshot of the search I have tried looking at topics from others who faced the same issue but could not understand them. I may have made a topic about this myself once but was not getting any replies so I wanted to try again. I ask to please be shown how to locate the files I am looking for and how to edit the labels and values to what I want. That way I can rename one of the dialogue files then change the value in the .mod to match it. That way I can place both all the files in the Override Folder and be able to use them both at once with the changes I made. Please provide step-by-step instructions. Thank you in advance.
-
machinima Order 66: Jedi Academy Machinima
DarthValeria posted a blog entry in Starıka's Jedi Academy Machinimas
My first Jedi Academy Machinima-
- old republic
- jedi academy
-
(and 5 more)
Tagged with:
-
I am trying to edit the .mod files in the game, at least some of them. I know that many of the files in the game, whether they are dialogue, .utc, ,uti, or etc, share the same name. This can create an issue when you want to edit one in particular. I want to be shown how to edit the .mod files so I can rename a particular dialogue, .utc, .uti, and etc file and edit it with aspects like scripts or adjusting inventory or saying I want so the game will recognize it as a seperate file and provide them. I have already tried everything in KOTOR Tool and Mod Project Tool. Can someone please tell me what I need to do and which program I need to use. Please provide step-by-step instructions For example I want to insert tar02_carth023 to be used in the first Taris Apartment Scene and leave the second tar02_carth023 file alone. You can view it yourself below. Please provide step-by-step instructions. The files I want to edit are attached below. The numbers are only to tell them apart here. In the game they are completely identical. Thank you in advance. Duplicate Files.zip
-
lightsabers Editing Placeable Items In KOTOR
ALPHA000102 posted a topic in General Kotor/TSL Modding
I want to know how to add items to containers in KOTOR. Specifically I want to add items from other mods and custom items that I created to the first footlocker on the Endire Spire. I cannot get them to appear in the custom items in the Inventory Editor of KOTOR Tool as shown in the image below. This way I can get them in the game itself without having to use a cheat code or the Save Game Editor. Please help me do this and provide all details. Thank you in advance.- 14 replies
-
- endar spire
- placeables
-
(and 7 more)
Tagged with:
-
Greetings, fellow Jedi! May the Force be with you all. I have the DeNCS I grabbed from this post, but its format is on JAR. I have no experience with JAR files before and I'm kind of lost. Can someone explain one-or-two basic move to have the DeNCS running? Many thanks for considering this!
-
I have some problems maybe you can resolve it. its a noob thing i think, i use this open store script: void main() { object oStore = GetObjectByTag("TAG_OF_STORE_HERE"); object oSpeaker = GetPCSpeaker(); if (!GetIsObjectValid(oStore)) oStore = CreateObject(OBJECT_TYPE_STORE, "RESREF_OF_STORE_HERE", GetLocation(OBJECT_SELF)); if (GetIsObjectValid(oStore)) DelayCommand(0.5, OpenStore(oStore, oSpeaker)); } Problem: If i open this store it works, but if i close it, it opens store again automatically unlimited times.. Can you help me a bit ? Note: I tried to fire the script both on PC and NPC lines.
-
Okay, if I remember right it was worked for me in k2, but in k1 I can't write working attribute script. void main(){ AdjustCreatureAttributes(GetFirstPC()), ABILITY_STRENGTH, 1); } please help me, I need a script in k1 for modify attributes.
-
One of the things I would like to do for a mod I'm working on is have non-droid units use special weapons like the flamethrower and carbonite emitter. The first problem with this, as far as I can see, is that when it comes to targeting enemies human characters use force powers in the spot where droids use item spells. So I've created a flamethrower item that can be equipped by both humans and droids but only one of them can use it to target enemies. There are some ways around this. I looked at a mod that implemented a flamethrower for human characters. Instead of targeting an enemy, the flamethrower would targeting the user like an energy shield. Then the script that resolves the spell finds an enemy near the user to fire the flamethrower. This is pretty clever, but I don't like it as a solution because you can't choose who to target. So I had another idea. I would simply create a force power called "Use Item". The power would activate a script that would find the item equipped on the armband and then activate it. This is where I'm having some trouble. I've created the following script and hooked up everything so it runs, but it doesn't activate the item. //:: k_sup_useitem // Custom script by Box // This is a script for using a custom weapon from a spell // This could be considerably more tricky #include "k_inc_debug" void main() { object oItem; // The item to use int nInventorySlot; // The inventory slot where we're keeping the item event evItem; // Event for activating item? object oTarget; // Item target location lTarget; // Item target location // Get the item we're trying to activate // This seems pretty simple so I imagine it works nInventorySlot = INVENTORY_SLOT_LEFTARM; oItem = GetItemInSlot(nInventorySlot, OBJECT_SELF); // Activate the item obtained // Not sure exactly what is going on here with "events" oTarget = GetSpellTargetObject(); lTarget = GetSpellTargetLocation(); evItem = EventActivateItem(oItem, lTarget, oTarget); // I'm guessing this is what we need to run next // If the last block returned an event for activating an item, this should perform the event and activate the item, right? SignalEvent(OBJECT_SELF, evItem); } I've never written a script like this using "events" before. I just found functions in the documentation that seemed like they would do what I wanted. Unfortunately while I can verify that the script is called, it doesn't actually activate the item. I don't know if there are only certain items that can be activated. Most consumable items seem similar in their .uti files with a property that determines what spell is cast when the item is used. I was assuming that an event activating an item would work similarly, but I can't even get this to activate a regular energy shield. On the other hand, I've considered a completely different approach. Instead of trying to activate the item from a script, I would instead just determine the identity of the item equipped and then perform the effect of the item right in this script. There's a problem with that though. I've been using weapons and energy shields with a cooldown effect, so instead of having 5-10 uses before disappearing, they have unlimited uses but can only but have to wait 60 seconds before being used again. If I bypass actually activating the item with this script, then I need to figure out a way to implement a cooldown system. I have no experience doing anything like that. I assume it would probably involve global variables and heartbeat scripts but I don't know where to start. So that's my situation. I think it's a pretty interesting problem and it would be really cool if we could figure it out. What do you guys think? Does anyone know how in-script item activation or cooldowns work? Or maybe you guys have a different way of looking at this problem.