Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
ItemLogic -> randItem draw: missing attribute RandItemType173 in location IslaDeMuerte_shore_02
n = InitBuildingItemJRH(n, "gatedoor_w8", "gatedoor_w8"); //gatedoor metal on dark stones, also in Assassin
int InitBuildingItemJRH(ref ItemIndex, string id, string model)
{
ref bld;
int bldIndex = ItemIndex;
makeref(bld,Items[bldIndex]);
bld.id = id;
bld.name = "itmname_" + id;
bld.folder = "ammo";
bld.model = "BuildingItemsJRH\"+model;
bldIndex++;
return bldIndex
}
They should appear there, but you shouldn't be able to pick them up.My simple solution would be to just add itm.rare and itm.minlevel lines and see if that puts a stop to it.
That is easily done; should take just a few minutes.
If that is the case it sounds like the randitem radius is NOT set to 0.001.They should appear there, but you shouldn't be able to pick them up.
I think they are set on 0.1, so indeed setting them lower might help ...If that is the case it sounds like the randitem radius is NOT set to 0.001.
I have been playing" Castaway" for a long time with out any troubles, but yesterday itHas this started only recently? And it happens so very often?
That is very strange, I don't remember anything related being substantially changed.
Just in case, can you press F11 and see if that helps anything at all?
That could actually be a plausible reason. Since "minlevel" isn't defined, maybe the game treats those items as having some sort of "default minlevel".Im at level 32 now, dont know
if high levels could trig some thing to happen.
void RandItems_SpawnRandItem(int _index, aref _location, aref al)
{
aref randItem;
string lastSpawnTimeString;
int n = -1; // TIH initialize Aug24'06
string alName = GetAttributeName(al);
string alNameAttribute = "items."+alName;
// NK temporarily locations with named rand items will ignore the name. BUT if ID == blade1, will still gen that.
// NK 05-03-25 fix this so it checks location's randitemsstay attribute.
bool generate = true;// TIH name change for clarity
if (CheckAttribute(_location, alNameAttribute))
{
// TIH --> logic fix
bool locSetItem = false;
if ( RANDOM_DUNGEON_BLADES == 0 ) { locSetItem = true; }
if ( CheckAttribute(_location,"randitemsstay") && sti(_location.randitemsstay) ) { locSetItem = true; }
if ( locSetItem )
{
generate = false;
n = Items_FindItem(_location.items.(alName), &randItem);
if (n == -1) return;
lastSpawnTimeString = "LastSpawnTime"+_index;
_location.(lastSpawnTimeString) = Items_MakeTime(0, 15, 1, 2003);
}
// TIH <--
}
// else
if(generate)
{
// NK <--
// TIH --> rpg_style only
// use 'rare' in the formula for spawning a random item (adjusted scale)
// also will try at least RARE_RAND_RETRIES times to find an item (instead of just once)
// Nov21'06 fix: 'n' has now been set to -1 when it fails a check, so that the prior value of 'n' doesn't
// simply carry through to the end of the function, thus spawning an item that failed the checks!
if ( IT_RPG_STYLE ) {
int nn;
float itemProb
bool itmSelected = false;
int levelCut = makeint(RARE_MAXLEVEL_ABOVE + GetLevel(GetMainCharacter()) + makeint(CalcCharacterSkill(GetMainCharacter(),SKILL_SNEAK) / 2));
for ( nn = 0; nn < RARE_RAND_RETRIES; nn++) {
n = Items_FindItem(RandItems[rand(RANDITEMS_QUANTITY-1)].id, &randItem);
if ( n == -1 ) continue;
if ( CheckAttribute(randItem, "model") && randItem.model == "" ) {n = -1;continue;} // Nov21'06 // cant use items without models
if ( RARE_MAXLEVEL_ABOVE > 0 && sti(randItem.minlevel) > levelCut ) {n = -1;continue;} // Nov21'06 // cant use item if too much higher than player
if ( CheckAttribute(randItem, "rare") )
{
// TIH locator items are rare to begin with, so we beef the probability with pure luck:
itemProb = stf(randItem.rare) * makefloat(CalcCharacterSkill(GetMainCharacter(),SKILL_SNEAK));
if ( rand(1000) > (itemProb*1000) ) {n = -1;continue;} // Nov21'06 // its 1000 for a reason
}
if ( n >= 0 ) break; // Nov21'06 // if we get this far, then we have a candidate!
}
// TIH --> last ditch effort to give them SOMETHING Aug24'06
if ( n == -1 && frnd() > 0.5 )
{
switch ( rand(6) )
{
case 0: n = Items_FindItem("100gp", &randItem); break;
case 1: n = Items_FindItem("250gp", &randItem); break;
case 2: n = Items_FindItem("medical1", &randItem); break;
case 3: n = Items_FindItem("potion3", &randItem); break;
case 4: n = Items_FindItem("indian4", &randItem); break;
case 5: n = Items_FindItem("indian3", &randItem); break;
case 6: n = Items_FindItem("pistolrock", &randItem); break;
}
}
// TIH <--
if (n == -1) return; // TIH die on failed find Nov21'06
} else {
// prior basic method
n = Items_FindItem(RandItems[rand(RANDITEMS_QUANTITY-1)].id, &randItem);
if (n == -1) return; // TIH die on failed find Nov21'06
}
// TIH <--
lastSpawnTimeString = "LastSpawnTime"+_index;
_location.(lastSpawnTimeString) = Items_MakeTime(GetTime(), GetDataDay(), GetDataMonth(), GetDataYear());
}
if (!CheckAttribute(randItem, "model")) // Sulan: bugfix
{
Trace("ItemLogic -> randItem spawn: no model for item "+_location.id+"."+randItem.id);
return;
}
Items_LoadModel(&randItemModels[_index], randItem);
SendMessage(&randItemModels[_index], "lffffffffffff", MSG_MODEL_SET_POSITION, makeFloat(al.x), makeFloat(al.y), makeFloat(al.z), makeFloat(al.vx.x), makeFloat(al.vx.y), -makeFloat(al.vx.z), makeFloat(al.vy.x), makeFloat(al.vy.y), -makeFloat(al.vy.z), makeFloat(al.vz.x), makeFloat(al.vz.y), -makeFloat(al.vz.z));
lastSpawnTimeString = "RandItemType"+_index;
_location.(lastSpawnTimeString) = n;
}
void RandItem_OnEnterLocator(aref _location, string _locator)
{
int randIndex = sti(strcut(_locator, 8, strlen(_locator)-1));
string randItemAttribute = "RandItemType"+randIndex;
ref chr = GetMainCharacter();
if (CheckAttribute(_location, randItemAttribute))
{
int currentType = sti(_location.(RandItemAttribute));
if (currentType != -1)
{
chr.activeItem.Action = "Pick";
Log_SetActiveAction(chr.activeItem.Action);
Log_SetActionLabel(TranslateString("", "Item"));
chr.activeItem = randIndex;
chr.activeLocator = _locator;
chr.activeRandItem = true;
chr.activeItem.pick = true;
BLI_RefreshCommandMenu();
}
}
}
ItemLogic -> randItem draw: no model for item Tortuga_port.compass2