Senior Member
Join Date: Feb 2010
Posts: 874
|
One of the items in my XCOM campaign is the Nano-Fiber Vest. Unlike the normal situation in SW, this is supposed to stack with other armor (its the whole point in the item, after all). Since armor doesn't normally stack in SW I couldn't do it as normal armor. Currently I have it adjust the user's Toughness, but that doesn't work quite right (it doesn't show in the armor value, but the base toughness so it wouldn't be obvious at a glance that its armor). But since there's a temporary adjustment for armor value in the program, it seems like there should be a way to just tell the program when this item is present to do that.
Anyone have any idea how? |
#1 |
Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
Look at my High space data file - I had some armor that adds to other armor if armor is worn over it. I believe it was the stealth suit - Check it out. If it works alone it give a bonus to the stealth skill and it own armor, but if you ware armor over it then it adds it armor to the other suit of armor and the skill bonus isn't given.
|
#2 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
I'm guessing that's the Ghost Suit, looking at it, but can you direct me at what part of the coding overrides the armor rule? The ones in the EvalScripts all seem to have to do with the Stealth effect. The "defDefense" in the field entry, maybe?
|
#3 |
Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
Yes that's the suit - It has been so long since I did that but here is what I did:
This is the code I used on all of the different armors - In each one except the ghost suit. Pre-Traits 5000 if (hero.tagis[Armor.armHSOniM1] + hero.tagis[Armor.armHSGhost] >= 2) then perform hero.child[armHSOniM1].setfocus focus.field[defDefense].value += 2 (You change this number to what every bonus you want - Delete this colored line from code) endif You need to add this to every armor you have. The Unique ID in red is the armor that you put this in (this one needs to be changed to the Unique ID of that armor), The one in blue is the Unique ID of the item that will give the bonus. After you do this for every armor, when you check both the armor your wearing and the item that gives the armor bonus it will add that bonus to the armor. I sure there might be an easier way of doing it, but at the time I couldn't find one. Hope this helps you out - If you look at each of my armors that I made - you will see the above code and look how it's changed for each one. PS: you really don't even have to give anything to the item that gives the bonus, not unless it can be worn by it self and gives that bonus separately, then give it a bonus. If not just make it in the armor section and give it a description and the Unique ID. Last edited by jbearwillis; November 16th, 2014 at 12:41 PM. |
#4 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
Ah, its like the Knack I did, which the armors look for. Okay. Normally that'd be a bit of a nuisance, but since they'll all have to have that piece of code on them anyway, I can just do this too.
|
#5 |
Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
Glad I could help.
|
#6 |
Junior Member
Join Date: Apr 2015
Posts: 1
|
Hello, and sorry for tapping into an older post.
I'm trying to do the same thing for a Last Parsec campaign (I'm adding some Interface Zero items, such as "ED Underarmour", which is worn under clothes and stacks with other armour). jbearwillis, I'm sorry if it should be obvious but could you tell me how to find your "High space data file"? Thank you. |
#7 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
For what its worth, this is how I ported it over to the XCOM version:
Code:
if (hero.tagis[Armor.armXCBA] + hero.tagis[Armor.armNanFiVe] >= 2) then perform hero.child[armXCBA].setfocus focus.field[defDefense].value += 2 endif |
#8 |
|
|