Jump to content

how to make continous scripts


TheBlob2

Recommended Posts

Oh no. I'll sure add this mod to incompatible list for my mod.

 

this mod is still in the concept stage, and besides you still havnt even finished your mod yet (what ever it may be) and im not saying the spell route is going to be the final approach that i will be considering, but right now it seems like the easiest to use on a wide area

Edited by TheBlob2
Link to comment
Share on other sites

The idea is good but implementation is not at all. Scanning cell, giving NPC spells (to every one of them! and each spell wil continiously check for "IsInCombat") and changing ACTOR VALUE (with a risk of permanent save damage because if mod is uninstalled - all spells on NPC will be dispelled immediately and if NPC is still equipping weapon he will lose his original agility value forever. Or what if player just type "coc Goodsprings" when combat started and spell on NPC stops working (they do that) just to make weapon equipping slower?

 

Oh no. I'll sure add this mod to incompatible list for my mod.

 

that was pretty much my main concern, handling unexpected behaviours. And that's why he was writing about a possible uninstall plugin to clean things. Not much the loss of prestations, I feel that should be really marginal, but in case it could be easily replaced by something else like an event.

 

But please don't classify "console commands" under unexpected behaviours, if you do something unexpected by the game it's under your own responisibility of user and you can't complain if you make a mess. It would be like complaining because you TCLed past the fence and reached the small shacks on the Area 51 just to find they are empty... don't you think?

Link to comment
Share on other sites

If I execute "COC goodsprings" during cutscene or some event I wouldn't even complain. But author's mod will be running on the background and I what, shouldn't use console commands at all? Then in mods description there should be warning like "Don't use COC command at all".

 

His mod affects all NPC on the map (including those who are from my mod). Moreover it changes their stats! I don't know any other mod that do that. I don't want any mod to change stats of my NPC.

Link to comment
Share on other sites

I've been working on this script. if you could tell me if I've made any mistakes, or maybe a way of making something shorter, or maybe you can just tell me what you think

ref user
ref weapon

begin onload
set user to getself
set weapon to user.GetEquippedObject 5

end


begin onload
if user.IsWeaponInList (-0 agility weapon list)=1 && if user.getav agility > 1
user.damageav agility 0
endif





if user.IsWeaponInList (-1 agility weapon list)=1 && if user.getav agility > 1
user.damageav agility 1
endif

if user.IsWeaponInList (-1 agility weapon list)=1 && user.getav agility == 1
user.damageav agility 0
endif





if user.IsWeaponInList (-2 agility weapon list)=1 && if user.getav agility > 2
user.damageav agility 2
endif

if user.IsWeaponInList (-2 agility weapon list)=1 && user.getav agility == 2
user.damageav agility 1
endif




if user.IsWeaponInList (-3 agility weapon list)=1 && if user.getav agility > 3
user.damageav agility 3
endif

if user.IsWeaponInList (-3 agility weapon list)=1 && user.getav agility == 3
user.damageav agility 2
endif

if user.IsWeaponInList (-3 agility weapon list)=1 && user.getav agility == 2
user.damageav agility 1
endif




if user.IsWeaponInList (-4 agility weapon list)=1 && if user.getav agility > 4
user.damageav agility 4
endif

if user.IsWeaponInList (-4 agility weapon list)=1 && user.getav agility == 4
user.damageav agility 3
endif

if user.IsWeaponInList (-4 agility weapon list)=1 && user.getav agility == 3
user.damageav agility 2
endif

if user.IsWeaponInList (-4 agility weapon list)=1 && user.getav agility == 2
user.damageav agility 1
endif





if user.IsWeaponInList (-5 agility weapon list)=1 && if user.getav agility > 5
user.damageav agility 5
endif

if user.IsWeaponInList (-5 agility weapon list)=1 && user.getav agility == 5
user.damageav agility 4
endif

if user.IsWeaponInList (-5 agility weapon list)=1 && user.getav agility == 4
user.damageav agility 3
endif

if user.IsWeaponInList (-5 agility weapon list)=1 && user.getav agility == 3
user.damageav agility 2
endif

if user.IsWeaponInList (-5 agility weapon list)=1 && user.getav agility == 2
user.damageav agility 1
endif

user.unquipitem weapon
user.equipitem weapon
user.restoreav agility 10

end

Edited by TheBlob2
Link to comment
Share on other sites

There are two OnLoad blocks, probably is just a typo.

I guess the lines of code below can be reduced using some other math sign.

i.e.:

if user.IsWeaponInList (-5 agility weapon list)=1 && if user.getav agility > 5
user.damageav agility 5
endif

if user.IsWeaponInList (-5 agility weapon list)=1 && user.getav agility == 5
user.damageav agility 4
endif

if user.IsWeaponInList (-5 agility weapon list)=1 && user.getav agility == 4
user.damageav agility 3
endif

if user.IsWeaponInList (-5 agility weapon list)=1 && user.getav agility == 3
user.damageav agility 2
endif

if user.IsWeaponInList (-5 agility weapon list)=1 && user.getav agility == 2
user.damageav agility 1
endif

Can be simply:

if user.IsWeaponInList (-5 agility weapon list)=1 && user.getav agility <= 5
user.setav agility 1

I'm wondering: if you do it OnLoad, if during the fight they drop the weapon and take a new one the stats won't change; same if they swap from melee to ranged weapon or vice-versa. Is this ok for what you have in mind?

Link to comment
Share on other sites

its not always going to reduce agility to 1, i want the ability to restore the npc's agility back to its original value after they change weapons, because some npcs have high agility and some have low agility, and i want that to actually make a difference in combat. say a higher agility npc can change weapons quickly and that would make them more of a threat in a melee or close quarters situation. if all npcs drew their weapons the same speed that would just be predictable

 

I'm wondering: if you do it OnLoad, if during the fight they drop the weapon and take a new one the stats won't change; same if they swap from melee to ranged weapon or vice-versa. Is this ok for what you have in mind?

 

i had considered that, i still need to do some research. but in the end its gonna look something similar to this (keep in mind its not finished):

begin gamemode
if user.isincombat=0 
elseif user.getequippedobject 5=weapon
else
set weapon to getequippedobject 5
(insert agility damage bit)
user.unequipitem weapon
user.equipitem weapon
user.restoreav agility 10
endif

end
Edited by TheBlob2
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...