Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   How would I script an Item to only give it's bonus when armor is activated. (http://forums.wolflair.com/showthread.php?t=30998)

jbearwillis November 30th, 2012 05:15 PM

How would I script an Item to only give it's bonus when armor is activated.
 
I have a few scripting questions I need help on.

1) When I bootstrap a piece of gear that raise a die or gives a bonus, how do I script that piece of gear to only give it's bonus when the armor is activated (checked) and not to give it all the time or a piece of gear bought to only give it's bonus when the armor is checked as equipped.

2) How do I script the gear to only be able to be bought only when you have one of the three types of powered armor I have (They are light, Medium, and heavy powered armor).

3) How would I script armor to allow only so many pieces of gear (Lets call them Mods) to be attached to them.

That's all I can think of as of right now - any help is most appreciated.:)

CapedCrusader December 7th, 2012 11:06 PM

1. You can check the value of the grIsEquip field (field[grIsEquip].value = 1)

2. This one's a little more involved. It depends on how you want it to work - Prevent the item from appearing in the list of things available, displayed but greyed out, or give a warning if you purchase the item?

3. You could create the armor as a container, and "store" the mods in the armor. The armor could have a validation script to check how many items are in the container and give a warning if it exceeds the limit.

jbearwillis December 8th, 2012 01:10 PM

For
1. How would I write the script to work on for the piece of gear exactly, to make it work for the 3 different armors.

2. Either having them prevented from appearing in the list of things available until one of the powered armors are picked, or displayed but greyed out, how would I go about making that script. Please explain examples out so a dumbbell like me can understand.

3) ok will that work for gear that you buy separate from the armor, because I have 3 Base powered armors and them you can buy special upgrades (Gear) to improve said armor, but only a limited amount (3,5,8) for light, medium, heavy.

jbearwillis December 26th, 2012 06:04 PM

Just wondering if there is any answers on the scripts.

jbearwillis December 27th, 2012 01:33 PM

Well I figured out how to get my Battle Dress (Powered Armor) and Combat Armor to work with adding modifications to those armors. You can take so many depending on what powered armor or combat armor you have. If you take more then you are allowed it throws a silent error and will show up on the validation report if you did. So my NightFall space game is coming along nicely, slower then I thought, but still much better then I hoped.

I pulled the practice I got from helping with the forgotten Realms user files (I did the Regions part in that file) in Pathfinder. Believe it or not it help with what I was trying with this game file.:)

zarlor December 27th, 2012 04:41 PM

I would figure overall syntax is essentially the same, and most everything seems to revolve around treating whatever it is you want to mess with as generic "things" with dynamic tags being allowed to be created almost anywhere, so in that way it makes sense to me that work on one of the other systems would be of some use here, too. Glad to hear it's coming along and I look forward to checking it out when you're done! Maybe I can get a few clues on doing a few different things from it. ;)

jbearwillis December 27th, 2012 04:45 PM

LOL I don't know if it's an efficient way of doing it, but I would have to say it is working and that's all that matters to me. Others might not like the way it works but I guess I can't please everybody. Right now I have to of my players testing out area's for me and they seem to like how it works so I'm please with it so far.

Oh and as far as the Pathfinder files compared to the Savage World files, so far seems very different. I have to think hard to figure out that difference to make things work - On a lot of the things I have to think much simpler on how to write things and others not so much. there is enough of a difference that I have to retrain my brain on how to do things and that's tough sometimes LOL.

CapedCrusader December 31st, 2012 12:03 PM

1. eval on Traits/5000
if (field[grIsEquip].value <> 0) then
~make your adjustments
endif

2. Something like this in an evalrule:
foreach pick in hero from Gear
validif (eachpick.tagis[thingid.wpSpear] <> 0)
nexteach

jbearwillis December 31st, 2012 12:37 PM

Thanks cape I will give it a go. It's good to have you prowling the night again from the holidays.

Gumbytie August 2nd, 2023 04:17 AM

Not sure if any of the old users here are still active but throwing this question out to jbearwillis just in case.

I came across this thread while researching other things. You mention you "solved" the problem of allowing armour to have limited modifications and even an eval script to throw out errors.

Any chance of sharing how you resolved this? I have a scifi setting that would benefit from this.


All times are GMT -8. The time now is 09:04 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.