Jump to content

Vetril

Premium Member
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Vetril

  1. Hi, I'm tracking down some errors I get in my log in order to hopefully fix them. I came up with a few weird cases and I am not sure about what's happening. If you could suggest what to look for, I'd be grateful. Once I identify the problems I can take it from there. --- This error appears 4 times: ERROR: Property FiniteUse on script SoundTrap attached to (5C03631C) cannot be initialized because the value is the incorrect typeThe property is a bool defined in TrapTriggerBase and a bool is being passed. I have 3 versions of TrapTriggerBase (currently in this order in MO: base game, AmazingFollowerTweaks and Follower Trap Safety). All of them define the property FiniteUse as bool property FiniteUse autoand in the trap objects, the property is filled with a boolean. --- I get this error: [01/01/2018 - 08:33:42PM] ERROR: Property CityShadowmarkControl on script TGRQuestBasedShadowmarkScript attached to (5B0049A6) cannot be bound because <NULL form> (00055C08) is not the right typeCityShadowmarkControl is an ObjectReference. TGRQuestBasedShadowmarkScript extends ObjectReference and controls the visibility of some shadowmarks. 5B0049A6 is an XMarker placed near the Riften warehouse. 00055C08 is a reference of RTWarehouse01 (the warehouse 3d model itself, which has a form id of 0055C07). It seems to me that this might be caused by some mod overwriting the warehouse reference (maybe a lighting mod that slightly moves the warehouse, I speculate), and thus making the property point to the wrong form id. Should I look for that, or is this happening because of something else? This error also happens in other contexts, such as: [01/01/2018 - 08:33:42PM] ERROR: Property NPCTilma on script QF_SkyforgeSteelWeaponsQuest_02003DEF attached to SkyforgeSteelWeaponsQuest (51440015) cannot be bound because <NULL form> (0003BDE9) is not the right typeSo it seems to be a common problem. --- Last error (at least for now): [01/01/2018 - 08:33:42PM] ERROR: Property TweakCarryWeight on script tweakfollowerscript attached to TweakFollower (630012CE) cannot be initialized because the value is the incorrect typeTweakCarryWeight is an int defined in tweakfollowerscript. int Property TweakCarryWeight AutoTweakfollowerscript extends Quest, and in the quest TweakFollower the propriety is filled with 0. No idea about this one. --- Thank you guys.
  2. Hi, I'm writing a maintenance script responsible for registering events to a list of tracked actors and restore some changes that are supposed to persist through saves. I have coded this with a quest and an activemagiceffect attached to a spell which is assigned to the tracked actors. The code: ; rnpc_RandomizerEffect.psc ... rnpc_RandomizationQuest property rfqRandomization auto ... event OnPlayerLoadGame() rfqRandomization.NotifyAll() endEvent event OnRandomize(string sName, string sArg, float fArg, Form fSender) Actor aTarget = GetTargetActor() string[] sValues = new string[5] GetRandomization(aTarget, sValues) ApplyRandomization(aTarget, sValues) endEvent ------------------------------------------------------- ; rnpc_RandomizationQuest.psc ... FormList property RandomizedActors auto ... function NotifyAll() ... if (!bRandomizedActorsLock) bRandomizedActorsLock = true int nSize = RandomizedActors.GetSize() int i = 0 Actor a = None while (i < nSize) a = RandomizedActors.GetAt(i) as Actor if (a != None) a.RegisterForModEvent("Randomize", "OnRandomize") endIf i += 1 endWhile SendModEvent("Randomize") endIf ... endFunction The actors register for the events correctly, but OnRandomize is never called. My solution assumes that ModEvents registered for actors are also passed to the active magic effects (which I guess is not the case), as it happens for the regular events; I guess this isn't true? I can't attach the script directly to the actors in the CK as pretty much all of them belong to a leveled list. I thought about tracking the ActiveMagicEffect instances directly, and register the mod event on them, but there is no support for an ActiveMagicEffect list as its type does not extend Form. I'd like to avoid registering each actor for an update as that will trigger all the scripts that hook into the update event, be they from the vanilla game or from mods. I could maybe get away with removing the spell and reapplying it on each actor but I'd have to restructure the effect script. Isn't there a better way to code this? Can you get a handle to a specific ActiveMagicEffect instance, given the Actor it is running on? Thank you.
  3. Hi, I'm trying to figure out how to add new animations that will be exclusive to a custom race. This means I need to understand behavior files - unfortunately information is sparse at best. My idea is to clone the animations from an existing player race, and then to add the custom ones on top on those. So I copied the animations and the behaviors folder into my own actor\customrace\ folder, copied the skeleton, and edited the custom race form to use defaultmale/defaultfemale behavior files and the related skeleton. This should make the game look for the animations in the actor/customrace\animations folder, correct? What I don't understand is how the animations are added through the Gameplay > Animations tool. I expected to get the same 0_master.hkx graph of the original race, but instead under the 0_master.hkx of the custom race there is only a single LOOSE empty entry. Does this not depend on the behavior files? Can someone explain to me how the system works so that I understand what needs to be done? Thank you!
  4. Unfortunately I couldn't get past that problem I had. I gave up since I couldn't see any reason for my script to produce the buggy behaviour. I thought about it and it might have something to do with the ActiveScript compiler settings, but it's just a wild guess.
  5. An update. I've finished writing the Papyrus side of this mod. It runs a quest that retrieves and organizes the skill data (values, names, progress...). The user can define custom skills through an array that is a property defined on the quest. Right now, the custom skills should point to unused Actor Values, but support for arbitrary variables is easy to implement. The system should support an infinite number of custom skills (or virtually infinite - up to the number of elements that skse can allocate on a single array). I now have a good grasp of how things are handled in the StatsMenu swf file. I've successfully hijacked the function that pulls the skills data from the engine. Big problem: I can't get skse to pass data from papyrus to the UI. This is how I am doing it: // smpQuest.psc ... Function UpdateMenu() Update() string[] sSkillStats = Utility.CreateStringArray(5*nSkills) int i = 0 Debug.Trace("smpQuest.psc: UpdateMenu() - sSkillStats length is " + sSkillStats.length) while (i < sSkillStats.length) sSkillStats[i] = fValues[i/5] sSkillStats[i+1] = sNames[i/5] sSkillStats[i+2] = fMeters[i/5] sSkillStats[i+3] = sColors[i/5] sSkillStats[i+4] = nLegendary[i/5] Debug.Trace("smpQuest.psc: UpdateMenu() - sSkillStats[" + i/5 + "] = " + sSkillStats[i] + " " + sSkillStats[i+1] + " " + sSkillStats[i+2] + " " + sSkillStats[i+3] + " " + sSkillStats[i+4]) i += 5 endwhile UI.InvokeStringA("StatsMenu", "_global.StatsMenu.StatsMenuInstance.UpdateSkills", sSkillStats) EndFunction // StatsMenu.as function UpdateSkills(sSkillStats: Array): Void { _global.skse.Log("StatsMenu_UpdateSkills") _global.skse.Log("StatsMenu_UpdateSkills: sSkillStats length is " + sSkillStats.length.toString()) for (var i: Number = 0; i < sSkillStats.length; i += 5) { _global.skse.Log("StatsMenu_UpdateSkills: sSkillStats[" + (i/5).toString() + "] = " + sSkillStats[i] + " " + sSkillStats[i+1] + " " + sSkillStats[i+2] + " " + sSkillStats[i+3] + " " + sSkillStats[i+4]) } StatsMenu.StatsMenuInstance.AnimatingSkillTextInstance.InitAnimatedSkillText(testSkillStats); } Traces from both functions are as following: // smpQuest.psc output [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats length is 95 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[0] = 5.000000 $Alchemy 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[1] = 5.000000 $Illusion 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[2] = 5.000000 $Conjuration 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[3] = 5.000000 $Destruction 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[4] = 25.000000 $Restoration 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[5] = 5.000000 $Alteration 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[6] = 5.000000 $Enchanting 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[7] = 35.000000 $Smithing 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[8] = 10.000000 $HeavyArmor 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[9] = 15.000000 $Block 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[10] = 20.000000 $TwoHanded 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[11] = 35.000000 $OneHanded 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[12] = 30.000000 $Marksman 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[13] = 30.000000 $LightArmor 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[14] = 25.000000 $Sneak 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[15] = 5.000000 $Lockpicking 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[16] = 5.000000 $Pickpocket 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[17] = 10.000000 $Speechcraft 0.000000 #FFFFFF 0 [10/16/2015 - 08:47:26PM] smpQuest.psc: UpdateMenu() - sSkillStats[18] = 0.700000 $CombatHealthRegenMult 0.000000 #FFFFFF -1 // skse.log output StatsMenu_UpdateSkills StatsMenu_UpdateSkills: sSkillStats length is 8 StatsMenu_UpdateSkills: sSkillStats[0] = undefined undefined undefined undefined undefined StatsMenu_UpdateSkills: sSkillStats[1] = undefined undefined undefined undefined undefined Which looks just odd - it is firing but it's getting garbage data instead of the array. Am I doing something wrong? Some considerations: this system can be easily extended to reintroduce Attributes. I have not started looking at the perk trees yet, but I believe it could also be used to create new creature trees (like the two trees introduced by Dawnguard).
  6. So, adding custom skills to the statsmenu is probably possible. I had a few problems with the actionscript files from the SkyUI repository - they are not up to date and I guess that a patch changed some things in statsmenu, or that the decompiler messed up. Anyway, I caught a couple of bugs and now the original does work. I can add a skill UI object that will be visualized by the menu. Right now it breaks the skill names and sometimes the description (this was another bug with the actionscript file). Furthermore, the starry background goes out of sync (obviously, as the background sphere is divided in 18 sections but I'm visualizing 19 skill UI objects). Apart from these problems, it works fine and the game does not CTD. So it's a start.
  7. I'm actually suspicious of statsmenu.SetDescriptionCard, which has its own callback too - the function takes a parameter that differentiates between perk mode and skill mode... Whatever that means. Reading the code, it looks like it fills a descriptionCard object with stuff like a skill name, a skill value and the percent of a filled meter. It might actually be the function that sets up the data required to display skill progress. I'll see what happens in the menu if I start putting my own data in the descriptionCard. I need to look into it more, even if the skills array is handed down by the game engine, I could always divert the original functions towards another array initialized by a script that is run when the menu is opened. Will look into how SkyUI handles communication between UI files and scripts.
  8. Hi, I was looking into statsmenu.swf to see if it is possible to rewrite whatever function is responsible for pulling skills data from the game. I don't see any. As far as I can see, AnimatedSkillText - the class that builds the skills UI objects - is given an array containing the skills values. The StatsMenu class does pass this array to the AnimatedSkillText instance, but I can't find where the array values are initialized. I'm not a flash expert so I might be missing something obvious. Is the array fed by the engine itself instead of having the swf file access the data and build it on its own? The idea I had was trying to pull an unused AV from the engine and add it to the array, so that it is used by the menu to build a new skill object - effectively turning the AV into a new skill (albeit one that needs to be manager through scripts). Anyone?
×
×
  • Create New...