Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
Me again.
I am having trouble with adding in some new materials for weapons and armor. I can adjust damage and weight with no problems but I cannot get the item costs to change. Here is my eval script Code:
Phase First Priority 10000 index 1 ~ Divide our weight by 2 container.parent.field[gWeight].value /= 2 ~ Reduce our damage by 1. container.parent.field[wDamBonus].value -= 1 ~ Set our 'general cost' field to the items cost times 0.5 container.child[gCustMagic].field[gCustCost].value *= 0.5 |
#1 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
Anyone have any ideas on how to do this?
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Let me fiddle with this later on after I am finished with my current thing and I'll get back to you.
|
#3 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
One of my problems is that the develop tab enable data file debugging does not work on the pop up windows so there seems to be no way to see the field names.
|
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Of which pop up windows do you speak?
|
#5 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
Under custom weapons. When trying to choose what material then weapon is made out of.
|
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Ok, so looking at the different materials in the program it looks like there is one material that multiplies the base item cost (which is what you're shooting for, right?). Cold Iron doubles the base item cost and has this eval script:
First 10000 ~ Double our weapon cost. container.child[gCustMagic].field[gCustSCost].value *= 2 Comparing that to the relevant portion of your code: container.child[gCustMagic].field[gCustCost].value *= 0.5 It seems that the only problem is that you are multiplying the "gCustCost" field, but you should be multiplying the "gCustSCost" field |
#7 |
Senior Member
Join Date: Mar 2011
Location: USA
Posts: 383
|
Thanks, wow, I feel dumb that I missed that.
Oh, it works now. |
#8 |
|
|