VeiledInMisery Posted December 13, 2015 Posted December 13, 2015 I made a couple scripts for new perks. most of them work except for 3, which are all pretty much the same. I was wondering if someone could look this one over and tell me where I messed up maybe? I'm not really sure how I could check if it is firing or not even. ScriptName RadsDTtier1Script Short OnlyOnceNow float timer Begin ScriptEffectStart If getav radiationrads >= 200 && getav radiationrads <= 400 && OnlyOnceNow <= 0 Modav Damagethreshold 8 Modav UnarmedDamage 6 Modav Meleedamage 6 Set OnlyOnceNow to 1 Endif If OnlyOnceNow == 1 && getav radiationrads >= 200 && getav radiationrads <= 400 && timer <= 0 restoreav radiationrads 1 set timer to 1.4 Endif If Timer > 0 Set Timer to Timer - GetSecondsPassed EndIf If OnlyOnceNow == 1 && getav radiationrads < 200 Modav Damagethreshold -8 Modav UnarmedDamage -6 Modav Meleedamage -6 Set OnlyOnceNow to 0 Endif If OnlyOnceNow == 1 getav Radiationrads > 400 Modav Damagethreshold -8 Modav UnarmedDamage -6 Modav Meleedamage -6 Set OnlyOnceNow to 0 Endif End
Guest Posted December 13, 2015 Posted December 13, 2015 This part is completely useless: If Timer > 0 Set Timer to Timer - GetSecondsPassed EndIf It's a ScriptEffectStart, it will run only for 1 frame. Except that, the script compliles, but I cant' understand what you are trying to do. Would you explain more about it? when this happens, what triggers it etc. Because, for example, when you will have 200 radiations, in game it will be if nothing will happen.
Halstrom Posted December 13, 2015 Posted December 13, 2015 Yeah as AJ said ScriptEffect start only runs 1st time the effect is applied swap it to ScriptEffectUpdate
VeiledInMisery Posted December 14, 2015 Author Posted December 14, 2015 well thanks guys. the reason I added a timer was because it would drain all of the rads away at a rediculous rate, but as soon as I added it. the script stopped working all-together. and esentially I was creating multiple perks which would boost your strength based on the amount of rads you had. but would also drain rads as a cost of maintaining it. the other 2 are just this one, but for more severe radiation. it's triggered by getting the perk "low radiation shield", beyond that those conditions are meant to control how it functions( I.e only activating when you have minor rads sickness.). I've made multiple perks, 1 of them uses the timer for accumulating radiation when you're low health (it stops at about 640-680 rads) and it works perfectly. i'll post it below so you could compare maybe? either way i'm not even sure if this one is firing at all. as no threshold is added after the rads is reached. i'll give changing it to Scripteffectupdate a go though and see how that pans out. mind you i'm really new to scripting, I have messed around with skyrims scripting over the past couple years, but that's about it. scn IrradiateScript Float Timer Begin ScriptEffectUpdate If GetAV Health <=140 && GetAV Health > 0 && Timer <= 0 && Getav Actionpoints >=8 && Getav radiationrads <=680 damageav radiationrads 14 damageav Actionpoints 8 Set Timer to 1 EndIf If Timer > 0 Set Timer to Timer - GetSecondsPassed EndIf End
Guest Posted December 14, 2015 Posted December 14, 2015 well thanks guys. the reason I added a timer was because it would drain all of the rads away at a rediculous rate, but as soon as I added it. the script stopped working all-together. This is fine, but can't be applied on a block which runs only for a frame. One thing that you can do is splitting the script in 2 different blocks i.e. Begin ScriptEffectStart ; part of the code which needs to be executed only once End Begin ScriptEffectUpdate ; my timer End They'll run from top to bottom, in the same frame. The var values will be shared. --- <REST of DESCRIPTION> Maybe it could be possible to do the rest of the things simply tinkering with the effects / perks and their conditions, and leaving the scripting only for timed things or more complex math, but feel free to use the approach you prefer. Just don't forget that you will need a ScriptEffectUpdate or GameMode when you work with a timer, or it won't update. I also would like to explain how I assume the script would behave (should be tested in game with some good logging, but for now I just express my feelings about it). Let's assume you have less than 200 rads, and are on a zone with +1 rad. When you'll have 200, the first block will trigger (because OnlyOnceNow is zero), it will boost your stats and puts it to 1. But then, in the same frame, the script continues, so it will execute the second block (since now the conditions are verified), which will remove 1 rad point, going back to 199. But at that point, the third block will fire too, restoring the stats back to the original value, same for OnlyOnceNow. So in the next few milliseconds it will start again over and over, in a neverending loop. This of course depends by the initial rad value and the amount of instant radiations you are taking, but it's still a riskful situation, I believe you should script it in a different way.
VeiledInMisery Posted December 14, 2015 Author Posted December 14, 2015 well thanks for the suggestions. I always tested it by typing something like "player.damageav radiationrads 250" or "player.damageav radiationrads 630". but the rads were left as is. and the stats were neither given nor taken. if it did take me down back to 199 or 599 or 799 i'd be fine with it, I mean since theres no abilities nor casting (which sucks! I really want to make powers), it'd be the most realistic option. issue is it doesn't activate at all? I never seem to get the stats, no rads removed etc. I wish I knew a way to say put a message on each section so I could see what fires when. Like "Stats added" in top right. then maybe "Rads draining" and "Effect removed". I saw something like "messageEx "type stuff in here" but it didn't compile when I did it. also I can't really add conditions to effects? whenever I try, nothing pops up in the menu (although I saw something to do with that for w8, 10. and I tried adding them.. maybe that's why it isn't working lol because of a condition on the base effect I can't even see!). that's when I decided to go ahead with scripts. i've also had problems with using conditions in skyrim. on effects and spells etc. i.e. I tried to make a bleeding effect for sharp weapons that would take effect only when opponent isn't blocking (since there isn't a way to track hits without scripts) but the effect was added regardless. so whenever they stopped blocking, they'd drop dead from all the bleeding effects accumulated.. it was rediculous. that was for an equipment overhaul where I tried to make them more realistic. (like decaying equipment, and full coverage = no damage etc.) (I Could use help with that too lol, the whole mod. Ideas have never translated well into reality when I do the handywork)
Guest Posted December 14, 2015 Posted December 14, 2015 theres no abilities nor casting (which sucks! I really want to make powers) What do you mean? There are already mods for powers. Not many things are not allowed in modding NV. issue is it doesn't activate at all? When a script doesn't do what you expect, the issue could be different by what you think. Debugging it, is essential. I saw something like "messageEx "type stuff in here" Those kinds of NVSE functions will help you to debug. Something like this: If getav radiationrads >= 200 && getav radiationrads <= 400 && OnlyOnceNow <= 0 PRINTC "the first block fired" Modav Damagethreshold 8 Modav UnarmedDamage 6 Modav Meleedamage 6 Set OnlyOnceNow to 1 PRINTC "the first block has finished" Endif Putting MANY of them inside your script will let you understand exactly what's happening. There are some things that make the scripts silently crash, I mean it compiles but then in game it crashes and you find hard to understand why. But in game, you will be able to read until the last PRINTC before it crashes, so you can understand exactly which line causes you issue. There are times where I really can't debug an error, so I write a PrintC every line, to understand where it exactly stops... PS, printC prints on console. You can also use Print I use both, depending by the mood. You can chain sentences and variables, something like this: PRINT "My first var value is " + $iFirstVar + " and my second var value is " + $iSecondVar also I can't really add conditions to effects? Yes and I guess you already answered yourself. Can't confirm since I use 7, but I've read that both 8 and 10 have this issue. However the column should simply be hidden, like if you drag it you should see it. Here we can help you on NV scripting, but concerning Papyrus you should check on Skyrim's section, plenty of Papyrus brains out there
VeiledInMisery Posted December 15, 2015 Author Posted December 15, 2015 Haven't got it working yet, but I also haven't been messing with it nor have I tried all the solutions you suggested (Which are great by the way). I Just wanted to clarify one thing. What do you mean? There are already mods for powers. Not many things are not allowed in modding NV true. but they just add new weapons to your inventory. I haven't really seen any impressive spell implementations with a functioning power system.I also haven't seen much variations in effects. they're missing things like draining/absorbing, stat/skill reducers/hinderers/boosters, levitation, armor/weapon melting/conjuring, necromancy, creature conjuring, AOE destruction, channeled concentration beam attacks(which would be awesome), telekenesis etc. most of it feels like i'm firing of a rocket launcher or throwing a grenade, and those that don't are usually quite underwhelming. like Night vision or enhanced perception... there isn't really a fully working magic system i've seen modded in(please don't say just play the elder scrolls.. sometimes it's cool to have the best of both. it's annoying that most people asking about this always get complaints over a desire for magic or medieval weaponry in a "modern game" where it'd be "out-of-place", especially considering the gameplay extensions it has over oblivion and skyrim. and the fact that even people today collect and produce traditional pieces, making it both realistic and even slightly lore friendly/logical, considering a welly mantained and cherished collectible made of high quality steel/wood would survive far longer than most of the other pre-war junk that's featured. like those rusty rifles and crappy combat armour). I find it odd because the geck looks pretty much exactly same as the cs.. and it mentions magic effects in it, and the game looks and feels exactly like oblivion with a different name and a new paint job slapped on. which would make it seem like adding it should've been a breeze (yet obviously it must be quite difficult, considering the fact it hasn't been). god I wish I knew a way to add it in correctly. wouldn't even care if rads was the power source. as long as it functioned correctly.
Guest Posted December 16, 2015 Posted December 16, 2015 which would make it seem like adding it should've been a breeze (yet obviously it must be quite difficult, considering the fact it hasn't been) Not so sure. I most believe it's because of this: please don't say just play the elder scrolls.. Because yeah, I believe it's pretty obvious. It's not much a matter of lore, it's more a matter of game mechanics. Why modding a soccer match inside a basketball videogame? The mechanics are not so different. Why do they rip em? for the same reason they ported half FO3 assets and instead they ripped the other half - they ported what they needed, ripped what they didn't need. They probably ripped some hardcoded spell effect which was not needed, like they did with mounts. In FO, Destruction spells could be simply called "ranged weapons", health spell could be called "stimpak", a ward could be called "force shield", etc.etc. if you make some texture/mesh combo to create some nice shader, and mix it with the existing spell/perk mechanics, you'll have something pretty similar to OB. You can simulate many things via script, as I said you can do almost everything you have in mind. You can even introduce Magicka. But still, this all requires a certain degree of modding knowledge. I'd suggest to start with smaller / easier steps, just to take some lil confort with the scripting and the in existing game mechanics (and its limits)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.