A Question on Gems
#11
Hey Miscr3ant,

Have you tried:

change: return(Mods >= FORGE_MAX_ENHANCEMENTS);
into: return (Mods -1 >= FORGE_MAX_ENHANCEMENTS);

(Credit, and Blame if this doesn't work, to my good friend who has a Masters in Computer Science from the Illinois Institute of Technology, and was kind enough to try his hand at solving our issue here)
Currently Playing:

Galambos Thrune - Griffon Knight
Archibold Vanderdaghast - Palemaster
Anders Maerklos - Spellsword
Chessala Zolond - Yathrin d'Lolth
Reply
#12
Unfortunately, something that easy isn't going to work. 'Mods' is the total number of enchantments on the item. So with that suggested revision, say you did have 4 enchantments on an item. That would mean Mod-1 would equal 3 and indeed 'work' - but that also means you could have 4 enchantments on an item, which I do not want for game balance purposes. Or, in essence, the suggested revision is really no different than leaving the calculation as it is and simply increasing FORGE_MAX_ENHANCEMENTS to 4 as Miscr3ant 'suggested'. ;)
Reply
#13
How about this:
Quote:Define this function somewhere, it tests to see if a property is already exisistant on an item:

int IsImprovement( object oTarget, int improv_ipType){
int Mods = IPGetNumberOfItemProperties(oTarget);
itemproperty ip = GetFirstItemProperty(oTarget);
int ipType;
while(GetIsItemPropertyValid(ip)){
ipType = GetItemPropertyType(ip);

if ( improv_ipType == ipType ){
return 1;
}

ip = GetNextItemProperty(oTarget);
}
return 0;
}

// Somewhere in the forging process, there should be a call to IsModMax to determine if an item has room for the forging. Replace this call with:

if( IsImprovement( oTarget, improv_iptype) ){
// it's a valid forging, continue
//....
//...
//..
}
else{
if( IsModMax (oTarget) ){
//failed, reject the forging, per earlier
}
else{
// room on item to be applied
}
}
Currently Playing:

Galambos Thrune - Griffon Knight
Archibold Vanderdaghast - Palemaster
Anders Maerklos - Spellsword
Chessala Zolond - Yathrin d'Lolth
Reply
#14
The issue, I would think is, there isn't a way to determine if the enchantments on a weapon are created using the forge or some other magical item (i.e. Gem).

So, when a gem enchants an item, that item needs some kind of tag.

When the item is placed on the forge, the forge not only counts the number of enchantments on the item, but, it would also need to count the number of gems used on the item and subtract that from the total enchantments.

Just thinking out loud.
NOITCA
a.k.a
LrabvR Hillrll, Lieutenant Lapendrar Legion -=LH=-
Reply
#15
Our gems use the same system; this is the issue with using gems to "boost" an existing property. The gems do basically the same thing, count the number of properties on an item, and say "Oh...too bad, you already got 3" and go no further.
[Image: 41O%2BW8JvvcL._SX300_.jpg]
Reply
#16
Bishop, if you test it and it works, let us know here.

The gem system is indeed tied to the forge system, and uses the IsModMax function as well. So a breakthrough with this function will help in both cases. To apply this to both the forge system and the gem system is likely going to take more than just changing this function though. There are other things to consider as well - like the enchantment forge conversation will need to be modified (at least slightly) so it does something like not using this function until the very end when someone tries to apply a 4th enchantment, or else using a modified version of this function to allow the PC to pass a first check to get to the list of enchantments if there are 3 enchantments on an item, but then not apply a selected enchantment if a 4th is added. Or if a gem is used, which has no conversation tree and check, how does it determine if the item property from the gem would be an addition to, or an increase to, the enchantments already on the item.

So while this function is the root 'cause' of part of the current situation, don't get too hung up on just trying to fix it as other parts of this system need to change as well.
Reply
#17
I got this on the new Vault forums. I'm not seeing where it ties what you are trying to add to the already existing item, but I'll see what can find in testing.

Quote:You'll need to pass the requested item property type to the function as a second parameter:

int IsModMax(object oTarget, int ipTypeRequested)

then add it to the list of properties that don't count:

if( ipType == ipTypeRequested ||

ipType == ITEM_PROPERTY_VISUALEFFECT ||
ipType == ITEM_PROPERTY_USE_LIMITATION_ALIGNMENT_GROUP ||
ipType == ITEM_PROPERTY_USE_LIMITATION_CLASS ||
ipType == ITEM_PROPERTY_USE_LIMITATION_RACIAL_TYPE ||
ipType == ITEM_PROPERTY_USE_LIMITATION_SPECIFIC_ALIGNMENT)

Of course, the limit of 4 is an arbitrary cap on the Forge. To reflect the Bioware rules, you could read the MaxProps from baseitems.2da, which would give 8 in many cases, but personally I agree that 4 is plenty, for game balance.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)