JCarter426

M478_Staff
  • Content Count

    1,502
  • Joined

  • Last visited

  • Days Won

    124

Posts posted by JCarter426


  1. I was afraid of that. The grenade script is set up similarly... it doesn't use cases but it does have an if tree for all the grenade types to run. I'll have to think about which way I prefer but I think I can still manage it all in the same code. Not as efficient as it would be if I were allowed to define my own actions but ah well. Thanks.


  2. That was one of the things I forgot I had tried... when I do it like that, I get a type mismatch for the AssignCommand. And that really shouldn't be the case, because I can use a subroutine with AssignCommand just fine otherwise.

     

    Also, I'm not sure if removing the parenthesis would later allow me to run that subroutine with its own variables... I think it should, but obviously I can't test it until it actually runs at all.


  3. This is kind of a stupid question. I was working on a script earlier and I was saying you can do this with loops instead of 600 lines of code, and then... well, now I'm wondering if you can. Of course there must be a way to do it, I thought... but every attempt so far to compile resulted in errors.

    I'm trying to write a subroutine that will fire another subroutine repeatedly for any duration of time, and with any interval between each firing. For example, 5 seconds of blaster shot, with a quarter second between each actual shot. The code for the blaster shot goes in one subroutine, and all the looping code goes in another subroutine, and I want that to be able to fire the first subroutine as well as any number of others, and then finally I have the main body.

    This is essentially the code that I want:
     

    void JC_SUB_1() {
    
    //Subroutine contents
    
    }
    
    
    
    void JC_SUB_2() {
    
    //Another subroutine, why not
    
    }
    
    
    
    void JC_SUB_TRIGGER(void JC_SUB_HERE(), object oObject, float fDuration, float fInterval) {
    
    int nDuration = FloatToInt(fDuration / fInterval);
    
    int i;
    
    for( i = 0; i < nDuration; i++ ) DelayCommand(IntToFloat(i) * fInterval, AssignCommand(oObject, JC_SUB_HERE() ));
    
    }
    
    
    
    void main() {
    
    //Our first subroutine, with a duration of 5 seconds and an interval of one quarter of a second...
    
    JC_SUB_TRIGGER(JC_SUB_1(), OBJECT_SELF, 5.0, 0.25);
    
    //And later in the script, let's have the second subroutine, with a duration of 2 seconds and an interval of one tenth of a second...
    
    DelayCommand(30.0, JC_SUB_TRIGGER(JC_SUB_1(), OBJECT_SELF, 2.0, 0.1));
    
    }

     

    And the problem is right here:

     

    void JC_SUB_TRIGGER(void JC_SUB_HERE(), object oObject, float fDuration, float fInterval) {

     

    I can't get it to accept a subroutine as one of a subroutine's variables... or to be more specific, I can't get it to accept any data type for that variable. It won't take a void. it won't take an action because only nwscript.nss can use action. I looked up data types on the NWN Lexicon and tried command, but apparently KOTOR doesn't support that type, as the compiler wouldn't recognize it. And it wouldn't take a few other things I tried and forgot what they were.

     

    Now, I could get around this by removing the subroutine as a variable and defining it in the body, but that would mean duplicating all the trigger code for each different subroutine I want triggered. I could use ExecuteScript, but I'd rather keep everything in one script. So I know other ways to do it, but I want to do it my way.

     

    I thought of course there must be a way to do it... but I've tried everything I can think of. But most of my scripting knowledge comes from modifying video games, so maybe I missed something.


  4. index.php?app=downloads&module=display&section=screenshot&id=811

     

    File Name: JC's Saber Workshop

    File Submitter: JCarter426

    File Submitted: 06 Feb 2016

    File Category: Mods

    TSLRCM Compatible: Yes

     

     

    This mod adds a workshop to the Ebon Hawk's garage, with which you can construct or deconstruct lightsabers and lightsaber components.

     

    One of the things Obsidian did differently was the way you make your first lightsaber. In the first game, you build it at the Jedi Enclave, so they have all the parts there. In K2, the Jedi are all gone, so you're given a scavenger hunt. You have to find three components, bring them to your buddy Bao-Dur, and then you get to make your lightsaber. With that in mind, I have designed the workshop to deconstruct lightsabers, giving you a color crystal and those three parts. Double-bladed lightsabers contain an extra focusing lens and emitter. With all these parts in hand, you can use the workshop to create lightsabers, as well. Furthermore, you can use the workshop to create or breakdown the individual components (provided you have the schematics for them - i.e. you've gotten them through the Crafting a Lightsaber quest - and the right skill points). So that means you can create as many lightsabers as there are color crystals; those crystals won't be burning a hole in your pocket.

     

    In short, you have more control over your lightsabers; you can create sabers out of crystals and components, and you can change lightsaber type at will.

     

    Oh, and you do not need to start a new game or anything of that sort. The
    workshop will appear on the Ebon Hawk when you enter.

     

     

    Click here to download this file


  5. JC's Handmaiden Sisters


    This is a restoration of the original Handmaiden sister appearance. In the original release of the game, the Handmaiden and her sisters all look alike, even even though they comment on her difference in appearance. The developers actually made a unique head for the sisters, but it was left out of the final release of the game. I took that head and merged with the body model used for the Handmaiden sisters in the game, thus restoring their intended appearance.


    • Submitter
    • Submitted
      02/06/2016
    • Category
    • TSLRCM Compatible

     


  6. thumb-bff1f40f81b1c6fd676139c69e2dc10a-j

     

     

     

    File Name: JC's Minor Fixes for K2

    File Submitter: JCarter426

    File Submitted: 06 Feb 2016

    File Category: Mods

    TSLRCM Compatible: Yes


     

     

     

     

     

    This is a collection of various things that I found annoying enough to alter. It started with that crazy window on Nar Shaddaa, by the landing pad, that would mysteriously render anything that was behind it invisible. It turned out to be as simple as a missing TXI. But it was at this point that I decided to start collecting little things like that into a single mod, to be released to the general public when it became more substantial.

     

    Due to the nature of this mod, I haven't bothered to make a proper installer with the TSL Patcher. Just install whatever you want to install. Don't install what you don't want to install.

     

    Some of these fixes are included in TSLRCM, while others are not. Either way, it's compatible. Other mods may not be compatible; contact me if you have any questions.

     

    Contents as of v1.2:

     

    ASTEROIDS

    Replaced some background asteroid textures using high resolution renders of
    other asteroids from the game.

    - EBO_Astr.tga
    - PER_As02.tga


    ATRIS

    Added missing shader for Atris' head.

    - P_AtrisH01.tga
    - P_AtrisH01.txi


    BASTILA

    Added missing shader for Bastila's clothes. Although I don't think that solves
    the entire problem with them.

    - P_BastilaBB01.tga
    - P_BastilaBB01.txi


    BATTLE OF TELOS TURBOLASERS

    Turbolaser palette for the battle of Telos swapped to match their colors
    elsewhere in the game. Citadel Station and Republic fighters will now fire
    green; the Ravager and Sith fighters will now fire red. The loadscreen for
    221TEL has been corrected in the same manner.

    - load_221TEL.tga
    - tel_blst1.tga
    - tel_blst2.tga


    CITADEL STATION SKYBOX

    Citadel Station skybox completely redone, based on high resolution renders
    of the Citadel models with 3ds Max. New texture resolution is 4096x4096.

    - TEL_BDrp.tga


    COMMONER CLOTHING

    Fixed some issues with the fourth male commoner clothing variant.

    - n_commm04.tga


    DILLAN

    Dillan's head edited to make her hair less horrible looking.

    - n_tatcoma_f.tga


    EBON HAWK TEXTURES

    All Ebon Hawk textures replaced with the highest resolution texture I could
    find in the game assets. By Ebon Hawk textures I mean the ship's exterior.

    - DXN_EBOHWK.tga
    - KOR_EHOK.tga
    - NAR_EBOHWK.tga
    - PER_EH1.tga


    FIGHTER TEXTURES

    Republic and Sith fighter textures replaced with the highest resolution
    textures I could find in the game assets.

    - tel_sftr.tga
    - tel_rftr.tga


    GRASS TEXTURES

    Alpha channels for some grass textures improved. Shouldn't have any missing
    bits anymore. I haven't done them all yet, though.

    - DXn_grassfx.tga
    - DXN_jungfx.tga


    KHOONDA MILITIA ARMOR

    Reskinned the female Khoonda armor texture to remove the awkward painted-on
    breasts and strangely symmetrical dents.

    - PFBE10.tga


    KIOSK 2 MODEL

    Removed parts of the PLC_Kiosk2 model. There were some random metal things
    just hovering in the air, and I always thought the droid head looked a bit
    anachronistic. I mean, more like the droids of the film era than the ones
    in the game. It still has some terrible texture issues, but I didn't feel
    prepared to tackle them.

    - plc_kiosk2.mdl
    - plc_kiosk2.mdx
    - JC_Invisib.tga


    KREIA

    Added a fix for the Kreia models. I know there are others, but I decided to
    do my own. Not compatible with the others, obviously. So just don't install
    the P_Kreia**** files if you don't want that.

    - P_Kreia1hBB.mdl
    - P_Kreia1hBB.mdx
    - P_KreiaEvil0hBB.mdl
    - P_KreiaEvil0hBB.mdx
    - P_KreiaStunt.mdl
    - P_KreiaStunt.mdx


    LIGHTSABER PART ICONS

    Swapped the icons for two of the lightsaber components. They were clearly
    misplaced.

    - lspart01.uti
    - lspart02.uti


    LUXA

    Fixed a problem with Luxa's teeth and tongue. For some bizarre reason they
    used a different texture than the rest of her head. The UVW mapping did not
    match this texture, causing errors on that part of the model. I hex edited the
    model and reset everything to use the same texture.

    - JCLuxa.tga
    - n_lala_xuh.mdl
    - n_lala_xuh.mdx


    MANDALORIAN FLAGS

    Replaced the Rakatan imagery on the flags around the Mandalorian camp with
    the Mandalorian Neo-Crusader symbol. Loadscreen for 403DXN has been updated
    to reflect this.

    - load_403DXN.tga
    - PLC_RakatFlg.tga
    - PLC_RakatFlg2.tga
    - PLC_RakatFlg3.tga


    MIRA

    Some small adjustments to Mira's clothing. Green where there shouldn't be
    green, mostly, now removed. Not compatible with any other mods that alter
    Mira's clothing, of course.

    - P_MiraA.tga


    ONDERON BLOCKADE

    Fixed several texture errors concerning the Onderonian ships. Also redid
    the blockaded ships in the distance using high resolution renders of the ship
    models.

    - mg_cs.tga
    - mg_ms1.tga
    - mg_ms2.tga
    - mg_ms3.tga
    - MG_OFtr.tga
    - mg_sbk.tga


    PAZAAK CARDS

    Swapped the colors on the pazaak card placeable and item around so nobody's
    cheating anymore.

    - JCw_Pazaak.tga
    - PLC_Pazaak.tga
    - w_BlstrPstl_014.mdl
    - w_BlstrPstl_014.mdx


    RAVAGER

    Ravager texture redone, based on a snapshot from one of the prerendered Bink
    videos. By Ravager texture I mean the ship's exterior, which appears during
    the Battle of Telos.

    - TEL_Rav.tga


    TELOS SHUTTLE TEXTURE

    Replaced the texture of the shuttle in the Telos swoop track with the usual
    one. The original was low quality and had an orange stripe, bleh.

    - TEL_SShtl.tga


    TELOS SHUTTLE MOVIE

    Fixed an animation error in the Telos shuttle departure video. Duros in the
    background would just walk in place once he got to the door previously.

    I've only applied the fix to the the HD version (1600x680) that came with
    the High Quality Movie Patch.

    - TELMov03.bik


    VASH

    Vash's head edited to make her hair less horrible looking.

    - N_jedmast2h.tga


    VIS FILES

    VIS for 301NAR edited so the swoop platform doesn't disappear as you are
    entering or exiting the alley adjacent to the landing pad, and so the crates
    on the landing pad and the landing pad rails are always visible from the swoop
    garage.

    804DRO similarly fixed. But it doesn't do anything if you don't have an M4-78
    installed.

    - 301nar.vis
    - 804dro.vis


    MISCELLANEOUS RESOLUTION FIXES

    Replaced these with higher resolution textures found elsewhere in the game
    files.

    - TEL_wl06.tga


    MISCELLANEOUS SHADER FIXES

    Added missing shaders for these textures.

    - DAN_Wn02.tga
    - DAN_Wn02.txi
    - MAL_wn01.tga
    - MAL_wn01.txi
    - ond_eng1.tga
    - ond_eng1.txi
    - PLC_Hyper.tga
    - PLC_Hyper.txi


    INVISIBLE TEXTURES

    These are invisible textures that I use for when I hex edit a model to remove
    some part of it. Editing through hex editing does not allow for files names
    with a different number of characters, hence the multiple files,  but it
    ensures nothing else about the model is changed.

    Since these are all JC_ files it's safe to install them, and I would suggest
    you install them even if you don't see them listed as files you need, just to
    be safe. They are identical to files from my other mods, so you needn't worry
    about compatibility with those.

    - JC_Inv.tga
    - JC_Inv.txi
    - JC_Inv1.tga
    - JC_Inv1.txi
    - JC_Inv01.tga
    - JC_Inv01.txi
    - JC_Inv001.tga
    - JC_Inv001.txi
    - JC_Invisib.tga
    - JC_Invisib.txi

     

     

     

     

    Click here to download this file


  7. That's the standard PFBAM mdl, but heavily modified to match Mira's BB model almost perfectly (like the pronounced clavicles). My previous underwear mod was good, this one will be better.

     

    That's good to know. I'll keep it in mind as a last resort, since it would mean a whole bunch of extra work to re-weight the shirtless male & Mira undies models. If MDLops is tweaked to work the smooth groups better, then they would be ready now (I still have to re-do her dancer model before releasing it).

     

    I figured it had to be that, but I couldn't figure out how you had gotten it to be so accurate. You're scary sometimes.

     

    And I'm seconding the request for the smoothing groups. I've been fiddling around with it some more and while everything does seem to be doable, the way many the models are set up would require a lot of editing just to retain the smoothing as is. A lot of them have the forearms on a separate mesh, and in my experience editing the arms is one of the trickiest parts. Simply running it through MDLOps loses the smoothing because of that. In contrast, a lot of them have the feet on the torso mesh and splitting them is required to keep everything as is.


  8. 3ds Max only displays three decimal points for me... I don't know if that's just a setting that could be changed, or if it's a limit of the version I use. (3ds Max 8... no, not 2008. 8.) I usually use the snap toggle to have vertices overlap exactly, but even so, giving it a range three decimals or less would be safer. 0.01 sounds too broad to me, though. That's one centimeter, so accidental overlaps could happen. I'd say something between 0.001 and 0.005 should do it.


  9. For the model I was working on, with the shadow issues, I did have the shoes detached from the torso:

    swkotor2%202016-01-31%2002-51-37-82_zpsg

    ...and I haven't noticed any problems. I did just notice the same problem with the upper arms on mine, though.

     

    Also, out of curiosity, what model(s) are you using for Mira there?


  10. We've fixed the issue (either the face normals or plane distances) and uploaded a fixed version (now it's MDLOps 0.7 Alpha 2).

     

    Ah, that's great! Thanks for the update.


  11. Yeah, I noticed the shadows were coming from the bones. I was wondering about that. Like I said, though, I was still getting shadows with 0.6. And I've done it before without ever losing shadows. So I don't think it's a result of my messing... or not exclusively my messing, at any rate.

     

    I hadn't touched the bones when I tried running it through Taina's Replacer, so I could try that later. Might not have access to the files for the rest of the night though.


  12. Hadn't done the retexture yet... but the original model was PFBAM (in K2). The texture mapping is more or less the same, just the feet and the neck different.


  13. Sure:

    node skin Torso
    
      parent JC_HandA
    
      position 0.0 0.0 1.11
    
      orientation 1.0 0.0 0.0 0.0
    
      wirecolor 1.0 1.0 1.0
    
      alpha 1.0
    
      ambient 1.0 1.0 1.0
    
      diffuse 1.0 1.0 1.0
    
      specular 0.0 0.0 0.0
    
      shininess 0.0
    
      bitmap JC_HandA
    
      verts 564

  14. That's great work, guys. I can't understate the amount of mod ideas I've given up on because of smoothing issues, or the amount of time I spent looking through models in a hex editor to see if I could figure out the issue, to no avail. So this is a real boon to the community.

     

    However... yes, of course there's a however...

     

    However, I have a bug to report. I just edited a body model, and while the smoothing was retained very nicely, I noticed that the model's shadow is now gone, as you can see below.

     

    swkotor2%202016-01-24%2012-02-05-25_zpst

     

    There's the head's shadow, but the body's shadow is nowhere to be seen. Converting the model with version 0.6 does not result in this problem, but of course I lose the smoothing that way.

     

    I've yet to determine if I can get around this using Taina's Replacer, but even so it would be nice to have it all in one package. (EDIT: Taina's Replacer did NOT work. Same problem.)

     

    Since 0.6 didn't lose the shadow, I'm hoping it's just something missing from 0.7 that can be added back in.