Jump to content

Home

[TSL]Armband


Recommended Posts

What you can do is create your armband that has a new line in Spells.2da that will fire this script:

void main(){
   object User = GetFirstPC();
   AssignCommand(User, ActionStartConversation(User, "[color=cyan]your_dialog_resref[/color]");
}

Then you need to create a dialog.dlg file and replace your_dialog_resref with your file name.

In the dialog you will have to manually type in each module down in a list of options for the player and attach this script to each node, setting the appropriate script parameter 1 on the dialog node.

void main(){
   int iModule = GetScriptParameter(1);
   string Module;
   switch (iModule){
       [color=red]case 0;
           Module = "001PER";
           break;[/color]
       case 1;
           Module = "002PER"
           break;
       [color=cyan]//You need to continue this list, just follow the same format as above and list all the modules.[/color]
    }

    StartNewModule(Module);
}

In the dialog file you need to put the number for iModule, take your reference from this script. So if you wanted to go to the first module on Peragus, then the number you would set in the dialog script parameter 1, would be "0". Because of this part of the script.

 

I would finish the list of modules for you but I have to go now :p

Link to comment
Share on other sites

Ah, suddenly it becomes easier! Well like I said, you need a new line in Spells.2da and the script you need is:

void main(){
   StartNewModule("[color=cyan]your_new_module[/color]");
}

You need to replace your_new_module with the file name for the module you have made. If you are struggling to add a new line to Spells.2da then just copy row 99: ITEM_ABILITY_ENERGY_SHIELD, and then just change the Label and the impact script. Then save and compile the impact script above.

 

Then you need to put that in your override and make a new UTI file, so you can open kotor tool.

BIFs > Templates > Item Templates > And choose an armband, then hit enter or double click on it to open it.

Then save that file, and the filename you save it as you need to write in the "Template ResRef" field and the "Tag" field. Flick over to "Properties", click on the "Activate Item" property in the table, and you will see an arrow appear to indicate which row you are on. Double click on it to open another window. Where you can see the "Subtype" field, if your edited Spell.2da file is in your override then you should be able to scroll down and select your new row. If not then go back to kotor tool, click Tools > Options and check in "Other", "Look in games override for 2da files".

 

Hope that helps ;)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...