Jump to content

Home

Making things compatiable


JediKnight707

Recommended Posts

Your link doesn't work.

 

As for making .2da files compatible, you just open up all the 2da files you want to make compatible and copy the lines all over into one of them. That is, of course, if the mod doesn't use stoffe's awesome patcher tool. Annoying, isn't it?

Link to comment
Share on other sites

Aah (from what I know) Stoffe~mkb~'s custom utility that will make an installer for your mod and take care of "adding" your entries into whatever 2da files and the like (say spells.2da) automatically.

 

That way if I have stoffe's force powers V1 and Darth333's both installed AND you have Stoffe's V2 force powers only; your new installer would work installing with both setups.

 

I'd highly suggest trying it out as more and more of us are using it for mods since it literally makes compat. a thing of the past. ;) I've not used it yet (but then again I've been lazy mod makin').

 

Hope that helps a bit :thumbsup:

 

:ben:

General Kenobi

Link to comment
Share on other sites

btw, if you click on the link above, you shoud now be able to access starwarsknights.com: i made a typo earlier on and this is why you couldn't get there. You can also click on the banner at the top of the forums (the one with Malak and Visas) and follow the modding tools link.

Link to comment
Share on other sites

I figured I would field your second question in the original post above that hasn't been addressed in regards to the custom workbench.

 

I simply had a script attached to the on_enter script for the Ebon Hawk. The script that gets fired creates a placeable where I wanted it to go. In order to get the menu to choose from with the workbench I simply assigned it a dialogue. Finally to get the whole custom itemcreate factor I created a set of different custom item create.2da files that are launched via script from the dialogue.

 

To make things even better here is a link to a tut I wrote in regards to custom itemcreate.2da files. It can also be found in the main tutorials under 2da editing.

http://www.lucasforums.com/showthread.php?t=148587

Link to comment
Share on other sites

Alright thanks for that DK! However, I know absolutly NOTHING about script, and I was wondering if you could help me. This is my scenario that I want to do: Inside the Ebon Hawk, I want their to be a workbench, and I don't really care where, but lets just say I want it in the security room (where the cameras are :)). There I want to do like exactly what you did; have seperate selections like yours. And thats about it...

Link to comment
Share on other sites

the easist way would be to go through the plugin files and locate a dlg file named dkwrkbench.dlg and change the name and change the dialogues. simply change the location entries for your placeable in the script. I'll upload my custom include for holowan which helps scripting go easier tonight.

Link to comment
Share on other sites

Alright here goes for the placeable scripting simply copy and paste the scripting as presented in there code blocks.

 

k_inc_holowan.nss

 

//::///////////////////////////////////////////////
//:: Holowan Labs Include
//:: k_inc_holowan
//:://////////////////////////////////////////////
/*
   This contains the functions for custom modding scripts.
*/
//:://////////////////////////////////////////////
//:: Created By: Darkkender
//:: Created On: August 4, 2005
//:://////////////////////////////////////////////

#include "k_inc_debug"

void RecruitNewNPC(int NPCIndex, string TemplateName);
void SpawnNewNPC(float Xloc, float Yloc, float Zloc, float rotation, string TemplateName);
void SpawnNewPlaceable(float Xloc, float Yloc, float Zloc, float rotation, string TemplateName);
void NPCAttackTarget(string NPCTag, string TargetTag);
void PCAttackTarget(string TargetTag);
void RandomLootOnObject(object oContainer = OBJECT_SELF, string sTemp0 = "a_robe_03", string sTemp1 = "a_robe_03", string sTemp2 = "a_robe_03", string sTemp3 = "a_robe_03", string sTemp4 = "a_robe_03", string sTemp5 = "a_robe_03");
void SpawnASittingNPC(float Xloc, float Yloc, float Zloc, float rotation, string PlaceTemplateName, string NPCTemplateName);
void StopNPCDancing(string NPCTag);


void RecruitNewNPC(int NPCIndex, string TemplateName)
{
  RemoveAvailableNPC(NPCIndex);
  AddAvailableNPCByTemplate(NPCIndex, TemplateName);
}

void SpawnNewNPC(float Xloc, float Yloc, float Zloc, float rotation, string TemplateName)
{
  vector vecNPC = Vector(Xloc,Yloc,Zloc);
  location locNPC = Location(vecNPC, rotation);
  object oNPC = CreateObject(OBJECT_TYPE_CREATURE, TemplateName, locNPC);
}

void SpawnNewPlaceable(float Xloc, float Yloc, float Zloc, float rotation, string TemplateName) 
{
  vector vecObj = Vector(Xloc,Yloc,Zloc);
  location locObj = Location(vecObj, rotation);
  object newObj = CreateObject(OBJECT_TYPE_PLACEABLE, TemplateName, locObj);
}

void NPCAttackTarget(string NPCTag, string TargetTag)
{
object oNPC = GetObjectByTag(NPCTag);
object oTarget = GetObjectByTag(TargetTag);
ChangeToStandardFaction (oTarget, STANDARD_FACTION_HOSTILE_1);
DelayCommand(0.5, AssignCommand(oTarget, ActionAttack(oNPC)));
}

void PCAttackTarget(string TargetTag)
{
object oPC = GetFirstPC();
object oTarget = GetObjectByTag(TargetTag);
ChangeToStandardFaction (oTarget, STANDARD_FACTION_HOSTILE_1);
DelayCommand(0.5, AssignCommand(oTarget, ActionAttack(oPC)));
}

void RandomLootOnObject(object oContainer = OBJECT_SELF, string sTemp0 = "a_robe_03", string sTemp1 = "a_robe_03", string sTemp2 = "a_robe_03", string sTemp3 = "a_robe_03", string sTemp4 = "a_robe_03", string sTemp5 = "a_robe_03")
{
   string sTemplate;
   int nRandom = Random(6);
   switch(nRandom)
   {
       case 0: sTemplate = sTemp0;  
       break;

       case 1: sTemplate = sTemp1;
       break;

       case 2: sTemplate = sTemp2;  
       break;

       case 3: sTemplate = sTemp3;  
       break;

       case 4: sTemplate = sTemp4;  
       break;

       case 5: sTemplate = sTemp5;  
       break;

   }

   CreateItemOnObject(sTemplate,oContainer);
}

void SpawnADancingNPC(float Xloc, float Yloc, float Zloc, float rotation, string TemplateName)
{
vector vecNPC = Vector(Xloc,Yloc,Zloc);
  	location locNPC = Location(vecNPC, rotation);
  	object oNPC = CreateObject(OBJECT_TYPE_CREATURE, TemplateName, locNPC);
AssignCommand(oNPC,ActionPlayAnimation(17,1.0,-1.0));
AssignCommand(oNPC,ActionPlayAnimation(16,1.0,-1.0));
}

void StopNPCDancing(string NPCTag)
{
object oNPC=GetObjectByTag(NPCTag);
AssignCommand(oNPC,ActionPlayAnimation(0,1.0,1.0));
}

void SpawnASittingNPC(float Xloc, float Yloc, float Zloc, float rotation, string PlaceTemplateName, string NPCTemplateName)
{
  	vector vecObj = Vector(Xloc,Yloc,Zloc);
  	location locObj = Location(vecObj, rotation);
  	object newObj = CreateObject(OBJECT_TYPE_PLACEABLE, PlaceTemplateName, locObj);
vector vecNPC = Vector(Xloc,Yloc,Zloc);
  	location locNPC = Location(vecNPC, rotation);
  	object oNPC = CreateObject(OBJECT_TYPE_CREATURE, NPCTemplateName, locNPC);
AssignCommand(oNPC, ActionPlayAnimation(36, 1.0, 1000.0));
}

 

jk707_wkbnch.nss (You can name this whatever you really want.)

 

]//::///////////////////////////////////////////////
//:: Custom Workbench Spawn script
//:: jk707_wkbnch
//::
//:: Created By: Darkkender
//:: Created On: September 20, 2005
//:://////////////////////////////////////////////

#include "k_inc_holowan"

void main()
{
   void SpawnNewPlaceable(0.0, 0.0, 0.0, 0.0, "jk707_wkbnch");
   /*
      Replace above 0.0 coordinates with those obtained from using the
      whereami armband.  The first number is your Xloc, the 2nd is your Yloc,
      the 3rd is your Zloc, & the 4th is your orientation.
      You need to create a custom workbench utp file, I used "jk707_wkbnch"
      as an example name for this.
   */
}

 

Now there will need to be at least a couple of other scripts wrote as well. One script for launching the dialogue. Also you'll need to insert this into the existing on_enter script for the Ebon Hawk if you wish to place it there. Simply refer to the source scripts with the Holowan Plugin and locate the Ebon Hawks on_enter script add another

ExecuteScript("jk707_wkbnch");

recompile and throw it in overide.

Link to comment
Share on other sites

You don't need k_inc_holowan. For a single one liner script I think using k_inc_holowan is way overkill. Let's keep it simple.

 

You can simply use this script:

 

void main()
{
CreateObject(OBJECT_TYPE_PLACEABLE, "jk707_wkbnch", Location(Vector(0.00,0.00,0.00), 0.0)); 
}

replace the 0.00,0.00,0.00 by the xyz coordinates you can get using the whereami armband: http://www.starwarsknights.com/tools.php

 

 

You'll find more infos on how to attach your script to the OnEnter event of a module in this thread: http://www.lucasforums.com/showthread.php?t=143536

 

You'll find instructions on how to compile a script and more in the scripting tutorials: http://www.lucasforums.com/forumdisplay.php?f=597

 

edit: and yes, use notepad.

Link to comment
Share on other sites

You don't need k_inc_holowan. For a single one liner script I think using k_inc_holowan is way overkill. Let's keep it simple.

 

Thx, but i think that you misunderstood what I meant, I meant do you need to include #include "k_inc_holowan" as words. Do I need to put that in there, or was that just part of this:

//::///////////////////////////////////////////////

//:: Holowan Labs Include

//:: k_inc_holowan

//:://////////////////////////////////////////////

/*

This contains the functions for custom modding scripts.

*/

//:://////////////////////////////////////////////

//:: Created By: Darkkender

//:: Created On: August 4, 2005

//:://////////////////////////////////////////////

 

And how do I save it as a .nss script (or do I even need to for that matter)? Whenever I save it, it tries to save it as a .txt.

Link to comment
Share on other sites

No, you don't need any of this. You don't need k_inc_holowan and you don't need to include it in you script at all so no need for the #include line.

 

Just forget about that part.

 

 

The only thing you need is this script (don't forget to put your coordinates - btw, you may also need to replace jk707_wkbnch by the template of your placeable if it is not correct):

void main()
{
CreateObject(OBJECT_TYPE_PLACEABLE, "jk707_wkbnch", Location(Vector(0.00,0.00,0.00), 0.0)); 
}

 

Paste it in notepad and save it as jk707_wkbnch.nss (make sure you don't save it as jk707_wkbnch.nss.txt) - choose save as type "all files".

 

You can also add the line directly to the On_Enter script that the HL plug-in uses. I would post it for you but I don't have the mod.

 

 

 

--------------------------------

@ Darkkender, your k_inc_holowan as well as the other script you posted above have some mistakes:

 

k_inc_holowan has some mistakes in it at lines 109 (PlaceTemplateName) and 112 ( NPCTemplateName). And finally, remove the void here:

#include "k_inc_holowan"

void main()
{
   [color=skyblue][s]void[/s][/color] SpawnNewPlaceable(0.0, 0.0, 0.0, 0.0, "jk707_wkbnch");
}

 

But in the circumstances, I think this method just complicates the process for nothing. It's a bit like going through the chimney when the front door is opened ;)

Link to comment
Share on other sites

@ Darkkender, your k_inc_holowan as well as the other script you posted above have some mistakes:

 

k_inc_holowan has some mistakes in it at lines 109 (PlaceTemplateName) and 112 ( NPCTemplateName). And finally, remove the void here:

#include "k_inc_holowan"

void main()
{
   [color=skyblue][s]void[/s][/color] SpawnNewPlaceable(0.0, 0.0, 0.0, 0.0, "jk707_wkbnch");
}

 

But in the circumstances, I think this method just complicates the process for nothing. It's a bit like going through the chimney when the front door is opened ;)

 

Thanks for that catch Darth333 with the error that was the most recent addition to the include file. I hadn't tested that one recently. I only threw the k_inc_holowan in for the ease of use of some of the functions. I hadn't thought about the fact that it would be still really complex for a Newbie. "Darkkender" flamthro "Darth333". I had done a copy paste and forgot to delete the void out of there.

 

@JK_707 Darth333 is very correct My above posted include file is really overkill for newbies to scripting. My desire for that was to provide ease of use and not further confusion. Please go with her suggestion.

Link to comment
Share on other sites

Alright I'll do that...are you guys going to release another version of TSL Plug-in?

 

Well I have been working on putting together an all inclusive updated one with all patches and some of the content that I cut from the original release. Maybe even a Installer. However this topic really should be discussed in The Plugins thread so we don't derail your own topic here.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...