Jump to content

Home

Yet More Modding Q's <GUI, TGA, Scripting/Placeables Assistance>


Fuu

Recommended Posts

Ok. So I’ve been working on this mod for awhile now and I have more questions:

 

1 Is there a way to manipulate the amount of backlight behind the (lightsaber) blade texture? I’ve been trying to create purple, but everything I do ends up pink, even after darkening and changing the colors some. I’m working in Photoshop CS2.

 

2 Is there a way to change the order in which the GUI displays properties, or is this hard-coded? This might sound odd, but I have a specific idea of how I want the properties to look at the workbench. Unfortunately I’m having a hard time getting it to look just right. (Did I ask this before? Grr, I can’t remember.)

 

3 I had an idea for how to get my sabers into the game, and I would like some assistance in doing so. Remember the broken droid you interact with in the pre-game sequence? I was thinking I could take that droid, re-skin and deposit into the Exiles room (right in front of the original footlocker). You could then interact with the droid in order to gain the sabers. (Some thing like “This droid is too damaged to be repaired, however several logs and one protocol seem to be intact” following with a couple logs and initiation of the protocol to get the sabers.) I can do the skinning, provide the logs and what the protocol should be, but I can’t script for crap (and I don’t know anything about placables ). If anyone’s interested I’d be more than happy to give due credit <and maybe some cookies!> .

 

 

Thanks!

Fuu

Link to comment
Share on other sites

1) Isn't the games purple purple enough. ;) when I make a new blade skin I make the core of it the color I want, then on a layer below I use an airbrush to make the glow with a slightly darker shade than the core and finnally I make a 2 pixel line down the center of the core.

 

2) I'm pretty sure that the properties will display in the order that you add them to the uti.

Link to comment
Share on other sites

Remember the broken droid you interact with in the pre-game sequence? I was thinking I could take that droid, re-skin and deposit into the Exiles room (right in front of the original footlocker).

 

You could then interact with the droid in order to gain the sabers. (Some thing like “This droid is too damaged to be repaired, however several logs and one protocol seem to be intact” following with a couple logs and initiation of the protocol to get the sabers.)

 

I can do the skinning, provide the logs and what the protocol should be, but I can’t script for crap (and I don’t know anything about placables ).

 

Most of this could be handled through a Dialog file on the droid. If you want the player to hack into the droid, you could set the dialog to use the computer interface screen instead of the normal camera dialog. You set what should appear in the text output as Entries and player menu choices as Replies as usual.

 

To give your custom sabers, use the standard script "a_give_item" in one of the Script# fields for the dialog node that should grant them, and set the corresponding StringParam field to the ResRef (filename without .uti extension) of the item template to give.

 

* * *

 

I assume you mean the Exile's room with the footlocker containing the armband in the Harbinger Crew Quarters area, right? If so, you could probably spawn the droid next to the footlocker by modifying the (already existing) heartbeat script of the footlocker (k_plc_it_up.nss) with something like:

//:: k_plc_it_up
//:: Places a normal upgrade item in a container.
//:: Created By: Kevin Saunders
//:: Copyright (c) 2004 Obsidian Entertainment
#include "k_inc_debug"
#include "k_inc_treas_k2"


void main() {
   object oContainer = OBJECT_SELF;
   if(!GetLocalBoolean(oContainer,57)) {
       // ST: SPAWN THE DROID ======================================
       if (!GetIsObjectValid(GetObjectByTag("DROID_TAG_HERE"))
           && (GetModuleFileName() == "152HAR")
           && GetIsObjectValid(GetItemPossessedBy(oContainer, "a_band_c01"))
           && (GetTag(oContainer) == "MilLowFootLker"))
       {   
           CreateObject(OBJECT_TYPE_CREATURE, "DROID_RESREF_HERE", GetLocation(oContainer));   
       }
       // ==========================================================       

       int numberOfItems = 1;
       PlaceTreasure(oContainer, numberOfItems, 200);
   }
}

 

Replace DROID_TAG_HERE with the Tag of your droid, as set in its UTC template (make sure to set it to something unique). Replace DROID_RESREF_HERE with the ResRef (i.e. filename without the .utc extension) you saved your new droid UTC template as. (See Below)

 

This would check that the droid doesn't already exist, that you are in the Harbinger Crew Quarters and that this is the Exile's footlocker (the one containing the armband). If these criteria are met, the droid would be spawned next to the footlocker.

 

In order to recompile that script, you'll need to extract the following include files from scripts.bif with KotorTool unless you don't already have modded variants of them: k_inc_debug, k_inc_treas_k2, k_inc_q_crystal, k_inc_treasure, k_inc_utility.

 

* * *

 

To make a utility droid, you can base it on the UTC template for a basic utility droid, c_drdastro.utc found in templates.bif with KotorTool. If you want a custom skin for it, add a new appearance to appearance.2da as usual, and set the Appearance_type to this new line in the UTC. Set the Tag to something unique, and save your new UTC file with a unique name (resref), max 16 (alphanumerical) characters long.

 

Don't forget to assign the ResRef of your custom DLG file allowing the player to interface with the droid to the Conversation field in its UTC template.

 

In order to make the droid appear broken when you find it, you could do like this:

  1. Set the droid's Current VP to 10% of its Max VP in its UTC file.
  2. Set the droid's Autobalancer MultiplierSet to 0 in its UTC file.
  3. Set the droid to the (5) Neutral faction so it won't react to what's going on nearby.
  4. Set the droid's OnSpawn script in the UTC to a custom script that may look something like:
    void main() {
       SetIsDestroyable(FALSE, TRUE, TRUE);
    
       // Make the droid emit electrical sparks to make it look broken.
       effect eSpark = EffectVisualEffect(VFX_DUR_ELECTRICAL_SPARK);
       ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSpark, OBJECT_SELF);
    
       // Make the droid play dead...
       PlayAnimation(ANIMATION_LOOPING_DEAD, 1.0, -1.0);
    }
    


Link to comment
Share on other sites

Yarr!

 

 

It seems I've hit another snag. I previously neglected to mention that I'm trying to make my mod compatible with the Holowan Plugin. It seems that the plugin uses a number of k_plc_it_up scripts. I'm assuming here that the k_plc_it_up.ncs included in the Plugin is used to fire the other k_plc_it_up scripts found therin.

 

In this case, is there anything I can create on my own to work around the "Holowan Plugin" k_plc_it_up scripts?

Link to comment
Share on other sites

Thanks :) I get the jist of what beancounter said, and I am confident in all aspects but one. I am confused as to what I would have to modify in the code he gives. I looked for the Weebul mod but it wasnt on PCGameMods <?huh?>.

 

OK so here are my scripts as they stand, I've changed what I figured out but I feel like something is missing.

 

k_plc_it_up_TD

 

//:: k_plc_it_up
//:: Places a normal upgrade item in a container.
//:: Created By: Kevin Saunders
//:: Copyright (c) 2004 Obsidian Entertainment



#include "k_inc_debug"
#include "k_inc_treas_k2"


void main() {
   object oContainer = OBJECT_SELF;

   if(!GetLocalBoolean(oContainer,57)) 
   {

       // ST: SPAWN THE DROID ======================================

       if (!GetIsObjectValid(GetObjectByTag("DrdExile"))

           && (GetModuleFileName() == "152HAR")

           && GetIsObjectValid(GetItemPossessedBy(oContainer, "a_band_c01"))

           && (GetTag(oContainer) == "MilLowFootLker"))

       {   

           CreateObject(OBJECT_TYPE_CREATURE, "TD-E7", GetLocation(oContainer));   
       }

       // ==========================================================       

       int numberOfItems = 1;
       PlaceTreasure(oContainer, numberOfItems, 200);
   }
}

 

k_152area_enter

 

void main()
{

    // make sure the PC is the only one who can trigger this script
    // otherwise if you spawn a creature the system will get in a infinite loop
    // of creating new creatures!

    object oEntering = GetEnteringObject();
    object DrdExile = GetObjectByTag("DrdExile");

    if (GetIsPC(oEntering))
    {


         //  Check if the Jawa Guard exists - if he does not then create him

         if (GetIsObjectValid(DrdExile) == FALSE)
         {
              ExecuteScript("k_plc_it_up_TD", OBJECT_SELF);
         }     
    }

    // Now we need to launch the original script

    ExecuteScript("k_152area_enter2", OBJECT_SELF);
}

 

of course I have my renamed copy of the original on enter script. So, what did I miss?

 

Thanks for the help everyone! It's most appreciated.

 

Fuu

 

Edit: after thinking about this for a bit I wondered..... Couldnt I just modify the .utd of PCDoor to run my k_plc_it_up as the OnOpen script?

Just a thoulght.

Link to comment
Share on other sites

OK so here are my scripts as they stand, I've changed what I figured out but I feel like something is missing.

 

k_plc_it_up_TD

 

//:: k_plc_it_up

(snip)

k_152area_enter

(snip)

 

of course I have my renamed copy of the original on enter script. So, what did I miss?

 

You do not need (and should not) run the k_plc_it_up script from the OnAreaEnter script. That script is part of the Random Loot Spawner system, and is automatically run on the Player's Footlocker as soon as you enter the area.

 

Edit: after thinking about this for a bit I wondered..... Couldnt I just modify the .utd of PCDoor to run my k_plc_it_up as the OnOpen script?

Just a thoulght.

 

If the door to the player's room has a unique resref gamewide, you can edit the template to run a script OnOpen if you wish, instead of modifying the heartbeat script of the footlocker as mentioned above. You'll have to make a new script that only spawns the items in the footlocker, and not assign the random loot container script to the door. Make very sure that the door ResRef is unique game-wide though, or it may cause trouble.

Link to comment
Share on other sites

  • 2 weeks later...

Yarrrrgh!

 

 

Ok so I took everything out of my Override and tried to do this with just my mod installed, but for some reason I cant even get the dorid to spawn. Im using the OnEnter code (D333) that I found in Redhawke's Scripting thread. Ive we written and compiled various scripts in multiple ways and I just cant seem to get it right.

 

 

Would anyone be willing to help me out on this? I can email a copy of my mod when I get off work @ 5 pm PST. I had the other parts of my mod <the sabers> correctly installed <allthough one didnt show up as buildable, I know I need to fix my change-edit on that part, but Im not sure whats wrong with it.> and just added in thefiles <copy/paste to override, the mdl,mdx,.utp, targa, txi, and my diolouge, along with the necessary scripts.> & the line in appearance.2da that I needed for my droid.

 

Im starting to understand the scripting part, but I dont get why it isint working for me.

 

 

Please help me oh great modding gurus!

 

Fuu

 

 

Also, I would like this to be compatible with the Holowan plugin/USM but I dont see how to do this without borrowing scripts. Mainly because the plugin/usm use both k_plc_it_up and k_152area_enter, and none of the doors/footlockers have unique tags..........;.;.

Link to comment
Share on other sites

It's probably just a little thing. In what module are you trying to spawn your npc?

 

What is the .utc file name and what is the tag?

 

To make k_plc_it_up compatible with the usm mod, you would have to add the line #include "usm_loot" and compile it with the usm and the game's random loot scripts. I can do this for you if you want but the whole package is included in the usm download. What are you trying to do with that script?

 

For the other script, it is simply a matter of combining both scripts but depending on what you want to do, there could be other alternatives.

Link to comment
Share on other sites

(snip)

Would anyone be willing to help me out on this? I can email a copy of my mod when I get off work @ 5 pm PST. I had the other parts of my mod <the sabers> correctly installed <allthough one didnt show up as buildable, I know I need to fix my change-edit on that part, but Im not sure whats wrong with it.

(snip)

Please help me oh great modding gurus!

If the great modding gurus are to busy to help I could take a look at it and see if I can spot any problems. Hard to tell what the problem can be without seeing how things have been done though. :)

 

Also, I would like this to be compatible with the Holowan plugin/USM but I dont see how to do this without borrowing scripts. Mainly because the plugin/usm use both k_plc_it_up and k_152area_enter, and none of the doors/footlockers have unique tags

If those Mods modify the same scripts you'll have to merge your script with theirs, I don't think there is any smarter way of solving it. You can either provide separate "merged" scripts that people using those mods can install, or you can try to make a merged script that works without causing problems even if those mods aren't installed. If this can be done depends on which script it is and what changes the other mods have done to it.

Link to comment
Share on other sites

152 har <crew quarters.> The wherami coords i have are:

> 12.14844

> 11.89196

> -0.03665

> Orientation: 1.14149

> Bearing: 0.01992

(This is supposed to be right in front of the PC footlocker. I had to re-install the wherami at one point though, so you might want to double check them...... XD)

 

My template is TD-E7.utc, The tag is DrdExile. The TemplateResref is c_drdtde7a. The conversation is set to TD-E7, which is also the name of my diolouge file. The OnSpawn script is set to k_def_spawn07, which is the name for my copy of the second script in

stoffe's first post <this thread.>.

 

 

I only wanted it to be compatible with the afforementioned mods because the rest of my mod already is, but at this point I'd be happy just getting him to spawn at all :/ . If something else is wrong with it, at least I can work from there.

 

Thanks for the help.

 

Fuu

Link to comment
Share on other sites

Sorry for the double post everyone.

 

@stoffe: My page was cached and I didnt see your post before I sent off my own. Can you PM me your e-mail? I dont belive I have it already <memory lapse?>. I'll send you a rar with the whole of my mod included :)

 

Out of curiosity, what is this "merging" you speak of? XD Can you please explain how you would do this in the first case <The Holowan Plugin is huge, so it seems like that latter way might not work.> I would of course, ask for permission before releasing another person's work with my own :).

 

Thank you again for all the help everyone. Every tiny tidbit of info helps me better understand what it is I'm doing.

 

 

Fuu

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...