Jump to content

vkz89q

Members
  • Posts

    203
  • Joined

  • Last visited

Everything posted by vkz89q

  1. You can make new stage on your quest, tick "run on stop" and have this in it's fragment(first you need to click properties and make new quest property and select your next quest): MyQuestProperty.Start() or MyQuestProperty.SetStage(xx) ; xx is number of the stage you want to set in your next quest, for example 10 or select "Complete quest" in stage that completes the quest and select next quest in "Next quest". (I have not tried this method, but I don't see why it wouldn't work). Also note, even if you tick "Complete Quest", it won't actually stop running until you call "Stop()", in fragment or script. If you don't do "Stop()", "run on stop" won't run either.
  2. I don't know if it matter but the alias that I'm filling is "allow reserved", "optional" and in quest window in ck it's Ref Forced None.
  3. Yes, normally I use this: Event OnHit(ObjectReference akTarget, ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked, string apMaterial) Actor Victim = akTarget as Actor MyCompanionActor.DoCombatSpellApply(SpellProperty, Victim) EndEvent but I just tried this and it works the same: Event OnHit(ObjectReference akTarget, ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked, string apMaterial) MyCompanionActor.DoCombatSpellApply(SpellProperty, Self.GetReference() as Actor) EndEvent Not a single error in papyrus log either. Only way you can mess up not getting reference from alias, is if you call it before the alias is filled.
  4. Heres a video anyway.. it has 1 alias handling the dismembering. Debug.Notification is skipping some messages but trace shows them and you see all what's needed in the video. It's about 20sec. I'm not manually forcereffing anything, it's script on that companion that is switching between targets. Only power attacks are dismembering, so that's why it doesn't happen every hit. Sorry, I'll stop offtopic now.
  5. I'm not restarting the quest anymore. That was what I was doing. What I now do is call ForceRefTo and then call script function in that script that is attached to this actor I just used ForceRefTo. The alias changes several times every combat and it all works flawless without restarting the quest. I do not restart the quest anymore, unless I toggle this feature off in the holotape. I have 2 different scripts attached to this alias and I can see they work because they have things like casting magic effect, dismembering limbs etc attached to them. If you want I can post a video of 1 alias handling all hit events in combat if you want. All without restarting quest.
  6. I use it all time testing my mod. Last time today. But I just re-tested something and you are right. OnInit() and OnAliasInit() do not fire. The reason my script worked before was because OnInit() fired once so it get's the globals I needed and I used to restart the quest when the globals changed. But now I'm using ForceRefTo in another script, then calling function to check for the globals so no OnInit() is needed. It also used to GetReference() from alias that was already filled and never changed, so no problems there either. Other events seem to fire fine and OnInit() but only once when quest is started. My bad. So, when you call ForceRefTo() you also want to call function in your script.. like: SomeAlias.ForceRefTo(someActor) ScriptOfSomeAlias.DoFunctionThatImitatesOnInit()
  7. I don't know why it didn't work for you, but my ForceRefTo alias works with OnHit, OnInit or OnAliasInit(tested both) and OnDying events. Timers and EnterBleedOut etc work too. I remember once when event didn't fire and it was OnDying() event. The actor was having some degen damage(bleed?)? And I fast traveled just before he died, then fast traveled back, he was dead but the event didnt fire. Since this script needed the alias to clear when actor dies, I simply made slow timer that check if the actor is dead every 30sec or so and clears it then if OnDying() didn't fire.. But like I said, that happened only once so far and I have play tested my mod a lot. I even used AnotherAlias.GetReference() as Actor in OnInit event, without it working the whole script would not work, but I don't do that anymore. Now I just store it in the scripts property, another script fills this property since it doesn't need to change often. I do same for globals, they change but not often so they are not needed on every OnAliasInit() event, so now I just change them from another script when needed. It has worked so far with no problems. edit: My bad, OnInit() and OnAliasInit() do NOT work with ForceRefTo().
  8. There are some hidden things with enemy AI I believe. I made a custom Fog Crawler on my mod, he is a real killing machince but guess what happens when he fights against Mirelurk Queen or Behemoth? Nothing, he absolutely refuses to fight them and runs away :down: I even gave him magic effect that gives him "confidence" boost but it doesn't help since it's already maxed. Also Mirelurk King sonic attack seem to have "target run away" style of magic effect, it will even make companions hide that are set to Foolhardy(never hide or dodge fight).
  9. What makes you think that? I use forcerefto a lot and never had any problems. I use it on actors, doors, terminals, weapons, etc etc and not even once they failed to fill or had any problems with scripts. When I need to store variables I store them in properties so no problem there either. Only issue I know with ForceRefTo is if you use it on actor on a scene that is running package, if you too it several times a row (more than once per second), it can mess up actors scene package.
  10. https://www.creationkit.com/fallout4/index.php?title=Script_File_Structure and Header line section. There is answer why it doesn't compile. I'll give a hint, it has something to do with the error it gives and script's first line. Edit: Just take out the "const" in the first line where the script name is.
  11. Good good. I just renamed all my scripts and fragments on one of my mods. I wanted them to be organized. Let me tell you that was a HUGE pain with all the scripts that access other scripts, lol. But finally all is nice and clean :happy:
  12. I'm not sure. I have heal spell that uses vanilla RestoreHealthStimpak and it works. What's the conditions on your spell? My advice is try without conditions, try using bigger magnitude than 0.10, less duration and try Cast() or DoCombatSpellApply() instead of AddSpell() to see if it starts working. You can also copy the stimpak effect and add script on it that does this: Event OnEffectStart(Actor akTarget, Actor akCaster) Debug.Notification("hi from effect") Debug.Trace("caster" +akCaster) Debug.Trace("target" +akTarget) EndEvent
  13. It's hard to say with the info you posted. 1. Do you see these Debug.Notifications? 2. If you don't see them: How are you trying to trigger this magic effect in your post? When is it supposed to "fire"? 3. If you see them: What kind of effects are _LE_Spell and _LE_Spell_2? If you compare them to Potion Stimpak, what's the difference? You can use same magic effects in Potions and Spells so you can just copy paste how Stimpaks work and adjust the values how you want(magnitude, duration). Instead of AddSpell you can try PlayerRef.DoCombatSpellApply(_LE_SPELL, PlayerRef) or PlayerRef.Cast(_LE_SPELL) .
  14. Your attempt 1 has property of ASC_ and when you try to call function ASC. ? _ vs . I have several scripts that use functions from other scripts and all work just like this: ScriptNameSpelledRight Property SomeName Auto Event SomeRandomEvent() SomeName.SomeFunction() EndEvent This same method I call ReferenceAlias script function from magic effect for example and it works. Make sure your script property is filled and the script name is 100% correct. Casting As xxxxScript I don't have much experience.. other than copying what game does for companions like: (Alias_Companion.GetActorReference() as CompanionActorScript).SetHasLeftPlayerPermanently()
  15. Thats how I started modding. I would say yes they are good. You learn a lot and have to "reverse engineer" stuff like vanilla companion quests. When you have problem, you also have vanilla companions to look for help. It takes a lot of time too, I still haven't finished my companion that I started like 6 months ago, lol.
  16. I have one I made but I'm not 100% sure it works 100%. Want me to upload it for your testing? So far what it does is make that you do not get Commonwealth settlement attacks while in Far Harbor or Nuka world. But like I said, I'm not 100% sure it works since sometimes it takes forever to get attack and I'm working another mod now, so I do not have time to test it on a proper playtrough. edit: Here it is: http://www.nexusmods.com/fallout4/mods/24517/? I can't quarantee it works 100%.
  17. Hello. Problem with my fix is that it's very specific. I mean, unless you have exactly the same bug I had, it might break something instead of fixing. If you do this in the console "help DLC03DialogueV118 4" and then "sqv questid(number of the quest)", does it say Receptionist -> None?
  18. Quest alias packages only work while the actor is in the alias. When they are out of the alias, all "stuff" from quest alias is lost. That's why I love quests myself, I can do how many I want, I can turn them on/off when I want, I can have one quest to give actor some keyword/package/faction/etc etc and turn it off whenever I want. Updating is easy just turn off quests and turn them back on and even totally modified scripts are updated. Even uninstalling is easy, just turn off all the quests and disable/delete every alias. It's pretty easy to make good patrol/travel packages just using stuff ingame already, you can have already existing Xmarkers as destinations for example. What you could do with your system: You could have each spawnpoint have their own keyword that they add to the actors that they spawn, then you could start quest after they are spawned, finding matching reference and looking for actors that have your keyword. That way you could have own quest for each "spawn area" and then the quest alias(collection alias?) would have packages. Or, instead of starting/stopping the quest all time to fill aliases, there propably is function to add the actor to RefCollectionAlias in quest that is already running. You could also remove them from the alias in OnDying event in the alias, and mark them for delete etc.. But, honestly, I think just using quest for everything is super smooth. I'm not saying there's anything wrong in your system, actually I like it.. it's just a personal preference for quests, lol. I know in the other hand that some people absolutely hate quests and they do have their own problems too, like sometimes for no real reason, alias not filling or quest not starting etc. Just throwing out ideas. Waiting to see your new system in action :smile:
  19. Not sure if this works but worth a try: Make new .esp. Then, go to ck and pack the archive, manually select all textures you want and rename the ba2 correctly and enable the .esp in game. Don't forget to delete/move the loose texture files out of data folder. But yeah, I just pulled that out of my ass, so I don't know if it works or not, sorry. Atleast back up your textures before trying that.
  20. Try templating stats too. Maybe she starts at 0 life? Thats what Assaultron Race life is. Easiest way is to find EncAssaultronXX, rename it, select yes when it asks if you want to make new and pull that actor to your cell. Then you can tweak her stats, packages etc how you want.
  21. Have you checked creation kit wiki? Both of your answers are answered there. https://www.creationkit.com/index.php?title=Bethesda_Tutorial_Planning_the_Quest https://www.creationkit.com/fallout4/index.php?title=RemoveItem_-_ObjectReference If they are just generic Bos_holotags, you can have condition in your quest dialogue to check if player has enough of them. GetItemCount bos_holotag >= 10 Run on player Then, you can just remove them all in a fragment: int holocount = PlayerRef.GetItemCount(bos_holotagProperty) PlayerRef.RemoveItem(bos_holotagProperty, holocount) Game.GivePlayerCaps(10 * holocount) Or something like that. I didn't test it, it might have some errors but the idea is there.
  22. Here is an example: Let's say you have two actors, lets call them actor1 and actor2. Both have same script. Let's call it TestScript. Script is registered for player distance and is using busy state when player steps close enough. Player steps close to actor1 and then 0.5s later steps close to actor2. Actor1 makes TestScript instance 1 and goes to busy state. Actor2 makes script instance 2 but it has NO idea that Testscript instance 1 is in busy state, so both works like they have no idea other one exists. The only way to make them affect same things is to try them both change same globalvariable or access/change property on another script, or both try change players actor value etc.. What I think you might want to do is: Have your normal script, then that script calls function in Quest script and that quest script is using states, busy state. So, same example, now Actor2 is calling function, but the quest script is in busy state and nothing happens.
  23. I mean, if you want to make them hostile to you more than couple days, you have to make them "enemy", just like when you get kicked out of the Institute, the whole Institute faction turns permanently hostile to you. What crime faction does is, when you steal potato from Diamond City, whole city goes crazy BUT only for couple of days. So, if you are okay with that, you simply make Crime faction, lets call it CrimeFaction. Then you have NPC1, NPC2, etc.. then those npcs have their own faction.. lets call it PotatoFaction. Do not fill any crime tab info in this normal faction, only in CrimeFaction. Then, you make new form list, lets call it PotatoFactionCrimeList and pull PotatoFaction in there and go to your CrimeFaction, crime tab, select track crime and select Shared Crime Faction List and select PotatoFactionCrimeList there. Now, when you steal PotatoFactions item and they notice it, they will all attack you. You can also put any factions you want in the PotatoFactionCrimeList form list, and they will react when you do crimes vs any of those factions. See how Piper is done. She has crime faction named CompanionCrimeFaction_Piper that uses form list CompanionCrime_Piper, that has all workshop factions and some towns, caravans etc on the list. Then as last thing, you need to open Actor tab, pull the crime faction to his/her faction list, and then select the Crime faction in "Assigned Crime Faction". One thing I noticed that does not work is: if you pickpocket someone and he/she doesn't notice it, but you were detected by his friend, nobody gives a damn. But for stealing items from ground/table, using owned terminal, locked door etc should work fine. So TLDR; You make two factions, one normal and don't touch the crime tab, then another and fill the crime tab, then make form list with all factions you want them to react, select this formlist in Crime tab in your crime faction and finally pull the crime faction to NPC's actor tab and select Shared Crime Faction List. edit: Also tick "Attack on sight" on the crime faction.
  24. Thanks, thats actually clever idea. I'm really interested to see what are missing and why.. I will report back tomorrow.
  25. https://www.creationkit.com/fallout4/index.php?title=OnLooksMenuEvent_-_ScriptObject ? Never tested it but saw it before when browsing ck wiki. edit. how to actually detect if player changed his/her look or just went to surgeon chair(+menu) and left without doing anything, I have no idea.
×
×
  • Create New...