PDA

View Full Version : [Tutorial] Scripts for adding Jedi-specific loot to 262TEL and 611DAN


Achilles
09-03-2009, 11:38 AM
According to the story, Atris has a collection of Jedi stuff stashed in her secret academy and enclave sublevel is allegedly brimming with goodies. However, your odds of finding "the good stuff" in either of these places is no better than anywhere else.

I've taken steps to correct this and thought others might benefit from these scripts as well. Feel free to do whatever you'd like with these.

To use, simply compile with appropriate "include" scripts and drop into your override folder.

k_plc_tresmillow:

//:: k_plc_tresmillow

//:: Created By: Kevin Saunders
//:: Copyright (c) 2004 Obsidian Entertainment
#include "k_inc_debug"
#include "k_inc_treas_k2"


void main()
{
object oContainer = OBJECT_SELF;

//Check to see if we're in the Jedi Enclave Sublevel or the Hidden Academy on Telos.
if(!GetLocalBoolean(oContainer,57) && (GetModuleName() == "610DAN") || (GetModuleName() == "262TEL"))
{

//Yes we are, so use "PlaceTreasureJedi" instead.

int numberOfItems = Random(2)+1;

PlaceTreasureJedi(oContainer, numberOfItems);

// CTJ-OEI 09-29-04
// Optimization - We don't want to keep executing this script
// over and over once it is done. Script execution, and the
// I/O associated with it, is very expensive.
RemoveHeartbeat(OBJECT_SELF);
}
else
{

//No, we're somewhere else. Just use the normal treasure bundle.

int numberOfItems = Random(2)+1;

PlaceTreasure(oContainer, numberOfItems);

// CTJ-OEI 09-29-04
// Optimization - We don't want to keep executing this script
// over and over once it is done. Script execution, and the
// I/O associated with it, is very expensive.
RemoveHeartbeat(OBJECT_SELF);
}

}


k_plc_tresmilmid

//:: k_plc_tresmilmid

//:: Created By: Kevin Saunders
//:: Copyright (c) 2004 Obsidian Entertainment
#include "k_inc_debug"
#include "k_inc_treas_k2"


void main()
{
object oContainer = OBJECT_SELF;

//Check to see if we're in the Jedi Enclave Sublevel or the Hidden Academy on Telos.
if(!GetLocalBoolean(oContainer,57) && (GetModuleName() == "610DAN") || (GetModuleName() == "262TEL"))
{

//Yes we are, so use "PlaceTreasureJedi" instead.

int numberOfItems = Random(4)+1;

PlaceTreasureJedi(oContainer, numberOfItems);

// CTJ-OEI 09-29-04
// Optimization - We don't want to keep executing this script
// over and over once it is done. Script execution, and the
// I/O associated with it, is very expensive.
RemoveHeartbeat(OBJECT_SELF);
}

else
{

//No, we're somewhere else. Just use the normal treasure bundle.

int numberOfItems = Random(4)+1;

PlaceTreasure(oContainer, numberOfItems);

// CTJ-OEI 09-29-04
// Optimization - We don't want to keep executing this script
// over and over once it is done. Script execution, and the
// I/O associated with it, is very expensive.
RemoveHeartbeat(OBJECT_SELF);
}

}


k_plc_tresmilhig

//:: copy of k_plc_tresmilhig

//:: Created By: Kevin Saunders
//:: Copyright (c) 2004 Obsidian Entertainment
#include "k_inc_debug"
#include "k_inc_treas_k2"


void main()
{
object oContainer = OBJECT_SELF;

//Check to see if we're in the Jedi Enclave Sublevel or the Hidden Academy on Telos.
if(!GetLocalBoolean(oContainer,57) && (GetModuleName() == "610DAN") || (GetModuleName() == "262TEL"))
{

//Yes we are, so use "PlaceTreasureJedi" instead.

// "More" containers have an increased chance of containing a rare item
IncrementGlobalNumber("000_RareItemChance",20);

int numberOfItems = Random(2)+3;

PlaceTreasureJedi(oContainer, numberOfItems);

// CTJ-OEI 09-29-04
// Optimization - We don't want to keep executing this script
// over and over once it is done. Script execution, and the
// I/O associated with it, is very expensive.
RemoveHeartbeat(OBJECT_SELF);
}

else
{

//No, we're somewhere else. Just use the normal treasure bundle.

// "More" containers have an increased chance of containing a rare item
IncrementGlobalNumber("000_RareItemChance",20);

int numberOfItems = Random(2)+3;

PlaceTreasure(oContainer, numberOfItems);

// CTJ-OEI 09-29-04
// Optimization - We don't want to keep executing this script
// over and over once it is done. Script execution, and the
// I/O associated with it, is very expensive.
RemoveHeartbeat(OBJECT_SELF);
}

}

Mono_Giganto
09-03-2009, 11:45 AM
Cool idea. Bookmarking this page, I'm definitely going to have to take advantage of it when I get my game reinstalled.

jonathan7
09-07-2009, 01:34 PM
This is a great resource, and fixes something that always bugged me, when I first played the game, I was expecting to find some goodies at the Jedi Academy, and was most disapointed when I found nothing.

I've encountered an interesting problem for Force Fashion 2, we've added the remaining Lightsaber fixtures into a custom utp where there is some Jedi loot. I presume its some sort of globals issue; as the game doesn't recognize that you have all the needed to build a new lightsaber. Anyone have any suggestions?

Achilles
09-07-2009, 02:57 PM
This is a great resource, and fixes something that always bugged me, when I first played the game, I was expecting to find some goodies at the Jedi Academy, and was most disapointed when I found nothing.

I've encountered an interesting problem for Force Fashion 2, we've added the remaining Lightsaber fixtures into a custom utp where there is some Jedi loot. I presume its some sort of globals issue; as the game doesn't recognize that you have all the needed to build a new lightsaber. Anyone have any suggestions?

Without more detail, I'm only guessing. I know that the other lightsaber parts do update the global, so if you're not following suit, then that's probably why it isn't working.

Have a look at a_give_quest_ls, a_give_quest_lsc, k_death_give_ls, k_dth_give_ls_lo, and k_dth_givels_rct (I think that's all of them :() for more info.