Does any one have any experience with Charlie's item modifier? I've been struggling to restrict some item properties, but not having any luck.
Customizing Charlie's Item Modifier
#1
Posted 14 May 2016 - 01:47 AM
#2
Posted 10 June 2016 - 12:50 AM
I've looked at it and the appearance customizer, but to be honest, they're both quite a complicated creatures, and my own attempts to mess with them have ended disastrously.
#3
Posted 10 June 2016 - 07:41 AM
I've only used the appearance customiser, and it's quite simple to modify or extend the blueprints it uses to add new appearance options and get rid of the ones I never use. Can't advise on the item property modifier, though.
#4
Posted 10 June 2016 - 08:22 AM
what you mean "restrict some item properties"? As in, if an item has a certain ip ... don't allow its appearance to change?
#5
Posted 10 June 2016 - 01:26 PM
Hey everyone, thanks for the replies.
I am talking about the item modifier and not the appearance changer. I have both working fine, but as Sabranic stated, they are quite complicated. What I mean by "restrict some item properties" is this- when you use the item modifier in game, a gui comes up with a long list of possible modifications. I am hoping to exclude certain properties from that list. In other words, I want to disallow adding certain properties such as attack bonus vs. racial type or ac bonus vs. alignment.
Charlie Vale released a guide to help customize, but I'm having no luck.
#6
Posted 10 June 2016 - 01:49 PM
In that case, all you need to do is modify the XML of the interface. You don't need to touch the scripts unless they populate a scrollbox dynamically. I'm guessing it wasn't made that way.
#7
Posted 10 June 2016 - 03:27 PM
script: vn_mdp__inc
lines.52-53
const int MDP_RESTRICT_CRAFTER_IN_OVERRIDE = TRUE; //const int MDP_RESTRICT_CRAFTER_IN_OVERRIDE = FALSE;script: vn_mdp_check_custom_rules
line: 542+
int mdpGetModificationAllowedInModule(object oPC, object oModifyItem, int nType, string s2DA, int nIndex)
{
if (s2DA == "itempropdef")
{
switch(nIndex)
{
// case IP_CONST_DAMAGE_V_RACE:
case IP_CONST_DAMAGE_BONUS:
return GetDamageBonusAllowed(oModifyItem);
case IP_CONST_HOLY_AVENGER:
return GetHolyAvengerAllowed(oModifyItem);
case IP_CONST_KEEN:
return GetKeenAllowed(oModifyItem);
case IP_CONST_MASSIVE_CRITICAL:
return GetMassiveCriticalAllowed(oModifyItem);
case IP_CONST_REGENERATION:
return GetIsHelmAmuletRing(nType);
case IP_CONST_VAMPIRIC_REGENERATION:
return GetVampiricRegenerationAllowed(oModifyItem);
case IP_CONST_ABILITY_BONUS:
// case IP_CONST_AC_V_DAMAGE:
// case IP_CONST_AC_V_RACE:
case IP_CONST_AC_BONUS:
case IP_CONST_ARCANE_SPELL_FAILURE:
// case IP_CONST_ATTACK_V_RACE:
case IP_CONST_ATTACK_BONUS:
case IP_CONST_BONUS_FEAT:
case IP_CONST_BONUS_HITPOINTS:
case IP_CONST_BONUS_LEVEL_SPELL:
case IP_CONST_IMPROVED_SAVING_THROW:
case IP_CONST_IMPROVED_SAVING_THROW_SPECIFIC:
case IP_CONST_BONUS_SPELL_RESISTANCE:
case IP_CONST_CAST_SPELL:
case IP_CONST_DAMAGE_RESISTANCE:
case IP_CONST_DARKVISION:
// case IP_CONST_ENHANCEMENT_V_RACE:
case IP_CONST_ENHANCEMENT_BONUS:
case IP_CONST_FREE_ACTION:
case IP_CONST_HASTE:
case IP_CONST_IMMUNITY_SPELL_LEVEL:
case IP_CONST_IMMUNITY_MISC:
case IP_CONST_IMPROVED_EVASION:
case IP_CONST_VISUAL_EFFECT:
case IP_CONST_LIGHT:
case IP_CONST_MIGHTY:
case IP_CONST_SKILL_BONUS:
case IP_CONST_SPELL_IMMUNITY_SCHOOL:
case IP_CONST_SPELL_IMMUNITY_SPECIFIC:
case IP_CONST_TRUE_SEEING:
case IP_CONST_UNLIMITED_AMMO:
case IP_CONST_WEIGHT_REDUCTION:
return TRUE;
}
return FALSE;
}
// ... on & on ....I don't use the modifier, haven't tested *anything*Above is merely what i gleaned from Charlie's documentation. Remember to recompile all scripts after making changes similar to above
suggest: Copy everything to a backup first,
Edited by kevL, 10 June 2016 - 03:33 PM.
#8
Posted 10 June 2016 - 03:47 PM
Whichever's easier!
#9
Posted 11 June 2016 - 02:12 AM
I think I'll try the XML rout when I get a chance.
The code KevL posted is exactly what I was trying before I made this post. In Charlie's customizing notes it talks about changing the script as noted above, but is then followed up with-
The same can be applied to most item properties. Of course the trick here is to find the appropriate item property constant in the script. Placing IP_CONST_* in the script assistant and selecting “globals” will give you the list of all item property constants. You can then use find to locate them in the script “vn_mdp_check_allow”.
iirc when I attempted to find the item property constants in the script assistant they weren't there, and there was something funny about the script “vn_mdp_check_allow”.
I'm not at my toolset now, and it may be a few weeks before I can come back to this
#10
Posted 11 June 2016 - 07:37 AM
the buttons were removed when I did the edits above. However, instead of figuring out which of the 3-in-1 versions to use, I made the changes to all three versions and re-compiled *everything*
wham bam thank ye ma'am.
- Sabranic likes this
#11
Posted 11 June 2016 - 08:12 AM
You're a machine.
#12
Posted 11 June 2016 - 08:35 AM
Okay, if it's populated dynamically, forget what I said.
- Sabranic likes this
#13
Posted 11 June 2016 - 01:17 PM
. However, instead of figuring out which of the 3-in-1 versions to use, I made the changes to all three versions and re-compiled *everything*
I don't understand what you mean here. 3-in-1 versions? I have only one version. am I missing something?
#14
Posted 11 June 2016 - 05:08 PM
charlie - mdp - zRestrict
charlie-mdp - scripts
charlie-mdp - zFree
They all have the same sets of scripts ... In the Appearance Changer it's simpler to work out which one you'd want to use because there's only two, no-cost or charge-cost. Here it gets complicated, the instructions are kinda cryptic
3. (Optional) If you want acess to all properties, delete the folder 'charlie-mdp - zRestrict'.
4. (Optional) If you did the above, but do want to have to pay for your modifications, delete the folder 'charlie-mdp - zFree'.
... so i made the changes to all three and re-compiled all three. Again, each has the same sets of scripts,
- Sabranic likes this
#15
Posted 02 July 2016 - 01:03 AM
thanks kevL, and sorry it's taking me a long time to get to this. I still want to figure this out, but it will still be a few more weeks until I can get to the toolset.
#16
Posted 02 July 2016 - 01:34 AM
The way it's setup is kind of awkward in my opinion because it seems to rely on the idea that the game is going to choose a folder based on, uh, alpha-numeric supremacy. Hence the "z" in the folder names -- an attempt to ensure that charlie-mdp - scripts has priority. If you want to play with one of the other scriptsets, the 'top' directory needs to be deleted (or moved out of Override), and on down the line.
So, i guess, choose one, and poke at it till it does what you want. If you start by using WinMerge to run diffs, that might/should give an idea of their differences
ps. I don't trust the alpha-numeric thing, and less so when i see seemingly arbitrary spaces in the directory names. (other than that I respect Charlie's coding a great deal..)
#17
Posted 26 July 2016 - 12:52 AM
Ok, finally I have time again for the toolset. Yay.
I think you have pointed me in the right direction to solving my problem. I was changing the .erf module scripts I imported, but I forgot there was a copy of charlie - mdp - zRestrict in my campaign folder.
I just removed it from campaign, and copied the contents into the module dir, overriding any same files. It seems to work fine in-game.
the charlie - mdp - zRestrict files do basic restrictions, like max +5 enchantments or +1d6 damage. If just the base scripts are used, you could make a sword +20, +20d12 damage.
I think now I can restrict individual properties by commenting out the lines. I'll let you know how it works out.
Thanks!
#18
Posted 26 July 2016 - 03:53 AM
you could make a sword +20, +20d12 damage.
i wonder how much that costs ... lul





Back to top






