Jump to content

csbx

Supporter
  • Posts

    650
  • Joined

  • Last visited

Everything posted by csbx

  1. I removed the cast. Here is what I get when I added a debug that prints out : mapmarkerinformlist + "and " + BQ01MapMarker What comes back in-game is: "[objectreference <(0000162D2)>] and None" When I add the cast back in I get a similar result..
  2. Thanks ! The formlist is populated by -- yes, map markers dragged in from the cell view. And it seems to function in the code directly above that allows manipulation of those formlist objects via disabling those map markers.
  3. Exactly - that's what I'm judging the failure of satisfying the 'if' by. The following code works perfectly, if that tells you anything about the syntax of the code above. FormList Property csbmagMarkersAll Auto Formlist AllMarkers Int Index = 0 Int Index2 = 0 Index = csbmagMarkersAll.GetSize() While Index > 0 Index -= 1 AllMarkers = csbmagMarkersAll.GetAt(Index) As FormList Index2 = AllMarkers.GetSize() While Index2 > 0 Index2 -= 1 ObjectReference MapMarker = AllMarkers.GetAt(index2) As ObjectReference MapMarker.disable() EndWhile EndWhile Sorry - if not clear, I have a formlist containing multiple formlists each of which has a set of mapmarkers. As ugly as this seems to look, it works. But I'm still not sure what's wrong with the other portion.
  4. Thanks for taking the time - you solved my issue ! My next question (the script is almost done, just buttoning it up) is about the following (I've just copied the relevant portions). My failsafe is setting foundlocationtype = 99 for if I can't find a match. MapMarkerInFormlist refers to a bunch of REFR map markers in a formlist that I made. BQ01MapMarker is supposed to be a REFR map marker as pulled from the alias of the BQ01 quest. I've run this and the 'if' is never satisfied even when it should be--ie. should find the match in my formlist of markers. Can you see a problem ? It's probably regarding objectreference but I'm obviously not understanding. I suppose if I were to troubleshoot I'd debugmessage mapmarkerinformlist as a string and do the same to bq01mapmarker. They should obviously match when the quest alias marker matches one from my formlist. Scriptname csbmagLocationsQuestScript extends Quest Formlist Property csbmagmarkersNordR auto Int FoundLocationType Int FoundLocationIndex Int Index String Property CorrectReplacementText auto FoundLocationType = 99 Index = csbmagmarkersNordR.GetSize() While Index > 0 Index -= 1 ObjectReference MapMarkerInFormlist = csbmagmarkersNordR.GetAt(Index) As ObjectReference ObjectReference BQ01MapMarker = mapmarkerAlias.getreference() As ObjectReference If BQ01MapMarker == MapMarkerInFormlist FoundLocationIndex = Index FoundLocationType = 2 ;exit this whole while loop and other whiles debug.messagebox("I've matched to a nordic ruin") Endif EndWhile
  5. Thanks a lot - I'm increasingly discovering how certain functions--skse and otherwise--require certain contexts to function. It's just bafflingly arbitrary to my mind at this stage. I actually think something similar his occurring at my latest roadblock related to getref(). I'm building a script attached to a quest that takes the following form: alias property mapmarkerAlias auto ;from BQ01 Event Oninit() ObjectReference BQ01MapMarker = mapmarkerAlias.getreference() If BQ01MapMarker == MapMarkerInFormlist blahblah Endif EndEvent I'm using getreference() (to my eye) in exactly the way the CK site does in its example. But there's something structurally wrong with this. Basic stuff, but I'm totally baffled. Any ideas ?
  6. What's a basic SKSE function I can use to verify it's set up ? Everything I try to call just fails. Normally with Papyrus I can quickly sort out the syntax and get it working..
  7. @ scorrp10 - Thanks--have definitely put the psc files there. And when adding a script in the CK I can see that the armor.psc found is in fact embedded with SKSE code. So the scripts seem to be there. @ xkkmEI - Yeah, I don't get what's happening here. I embedded this in a working script--so nothing around it has a problem. Am I using this improperly ? Static Property myTextHolder Auto myTextHolder.setName("here is text")
  8. That's great - it turns out that injecting into a book actually makes more sense for what I'm doing, so this is perfect. Thanks again ! As soon as I figure out why my CK-PE isn't compiling / seeing the skse psc files I'll get right to work..
  9. Yep - I've copied the script psc files to the correct path, but skse functions do not compile. Right now I'm trying to use setname: (mytextholder is defined as a static property) myTextHolder.setName( "Whatever text you like!") But it's throwing errors at this line -- no viable alternative at input '.' Other SKSE functions don't run as well. How do I troubleshoot this ? I'm using CK platform extended from within MO2.
  10. I'm looking for a way to supplement quest objectives of some vanilla quests and was wondering if I could get some guidance about what's even possible. While I'm not trying to re-write objectives, I do want to add one of my own that would be dynamic in the sense that I would have to run some code to determine which among a set of strings I would be inserting. This would then sit below the original quest objective for that quest. So the first part would be to understand how to fill an alias with a string. The second part is how to display this without affecting the original quest's operations. edit: so for (1), I think I create an alias and then type the desired text into the Alias Name, clicking on 'stores text'. But what I'm not clear about is if that instantiates -- ie gets stamped into the quest journal so that alias is free to use again for a different quest's journal entry. I'm assuming yes ?
  11. I noticed that too recently. I was like: s#*&#33;--so many mods installed and that mf-er somehow slipped by. Definitely obnoxious on a modded system.
  12. You made several suggestions that really helped me get to a solution to my problem. Thanks very much. Here's how I have things set up now: 1) main quest has player alias that has onchangelocation that starts a separate quest, waits 5 seconds then shuts down that quest. 2) that second quest has an alias that looks for a mapmarker with conditions 'getisid mapmarker == 1' and 'getdisabled == 1'. It looks for an object in the loaded area / nearest. The mapmarker alias has this script: If Nearbymarker.getReference() != none ;if the conditions were satisfied and the alias filled by a mapmarker near the player ObjectReference Mymarker = NearbyMarker.GetReference() as objectreference MyMarker.enable() debug.notification("the alias seems to have been filled") Endif This all works--radiant quests don't add a map marker for the relevant location. But visiting the location does do that. Now that this works, I guess I have to create something that works more efficiently than this. The problems with what I have include: 1) player can just dip into a location and never notice the area the mapmarker pertains to, but it will be enabled anyway so will show on map when a quest points to it. I think that's not a major issue 2) this check on location change and looking for a mapmarker will occur every single time you cross into a new location. Seems maybe as ugly as just polling every 10s -- but maybe I'm wrong about that. 3) there may be map markers that are disabled in vanilla that I don't even know about that I will inadvertently be altering. I could run a check to see if alias_nearbymarker is in a formlist of mapmarkers - but that compounds the problem of (2) I actually had an earlier version that skips the start/stop of a second quest and just embeds everything in the player alias onlocationchange--it checks to see if the aknewloc = getcurrentlocation.mapmarker[index] where mapmarkers I've disabled are stored in a formlist. It worked, but seems like a demanding calculation if the formlist size is potentially in the hundreds.
  13. Thanks a lot. Yeah, I knew something was wrong when the != none was being satisfied but then the debug was printing out 'none' ! My problem now is that no objects (map markers) are satisfying the conditions I have on the alias: getdisabled = 1 and HasRefType (location ref type = mapmarkerRefType) = 1 I expect that standing near a disabled map marker will fill the alias but it isn't happening. One alias makes sense for my purpose. Once a mapmarker fills the alias and then is enabled, the alias should be emptied and await the next one satisfying the conditions. Is there an obvious way to set up an alias + conditions to nab map markers ?
  14. Thanks ! I've adjusted things a little--still have to work out the Active State. I'm not clear about what I'm doing.. Yes, exactly. If a map marker is already discovered by the player, I leave it discovered on the map. At the startup of my mod (after installation on a game in progress e.g.) it checks to see if a marker is on the map or not--if it is, it leaves it alone without attempting to sleuth and apply the new regime retroactively. So, yeah, ideal on a new game. I have no idea what I'm doing with aliases and the conditions, so would appreciate any assistance: Scriptname CheckForDisabledMapMarkers extends ReferenceAlias ReferenceAlias property NearbyMarker auto Event OnInit() RegisterForUpdate(10.0) EndEvent Event OnUpdate() If (Nearbymarker != none) ;(NearbyMarker.getReference() as ObjectReference) ObjectReference FoundAMarker = NearbyMarker.getReference() debug.notification(foundamarker as string) debug.messagebox("this thing just happened--------------------------------------------------->") FoundAMarker.enable() debug.notification(foundamarker) GoToState("Active") else GoToState("Disabled") GetOwningQuest().stop() ; stop() does not wait for the quest to be stopped while GetOwningQuest().isStopping() ; start() will fail if you don't wait Utility.wait(1.0) endwhile GetOwningQuest().start() Endif EndEvent State Active ;NearbyMarker.Clear() EndState State Disabled EndState My debugs are probably in the wrong spot, because I get 10s updates but the output is always 'none' even when near disabled mapmarkers. I've tried several conditions for filling the alias including (getdisabled = 1, HasRefType (mapmarkerRefType) = 1) But I've had no success.
  15. The scope of my mod includes modded locations but also vanilla quests like Azura. Maybe all radiant quests. Would you agree that it's not wise or efficient to muck around with making those adjustments across some large number of vanilla quests ? Isn't disabling the marker (an option the mod Atlas Map Markers offers, btw) the way to efficiently get that outcome ? That part works. It's the re-enabling that I'm working on. This mod would include many vanilla radiant quests--with locations that would be all over the map. Not knowing which location will be chosen would mean setting up triggerboxes for hundreds of locations. Ain't nobody got time for dat. You're told about the Shrine, it appears on your map. Or a quest mod mentions a location--it appears on the map. I just want to be able to pre-empt that. The polling method is what I'm working on now. I know it's very inelegant, but I'll do it the ugly way before getting to another option (skse ?). What I've done is create an alias 'NearbyMapMarker' / Find matching reference in loaded area, closest. Allow disabled. Optional. I've set conditions getdisabled=1, getdistance (from player to object) < 2500 and HasRefType MapMarkerRefType = 1. I'm not sure about that last one. I don't think the alias is getting filled because I'm not getting anything out of my code attached to the alias: Event OnInit() RegisterForUpdate(10.0) EndEvent Event OnUpdate() If (NearbyMarker.getReference() as ObjectReference) ObjectReference FoundAMarker = NearbyMarker.getReference() debug.notification("this thing just happened--------------------------------------------------->") FoundAMarker.enable() GoToState("Active") else GoToState("Disabled") Endif EndEvent State Active ;NearbyMarker.Clear() EndState State Disabled EndState There is probably a lot wrong with this code, given that I've never used onupdate or aliases before !
  16. Just for clarity - what I have is a formlist of mapmarkers; at quest startup I disable all of them which indeed gets me the result that a radiant quest pointing to the locations associated with the map markers in my set does NOT create a map marker on the map. So far so good. But the problem obviously is that if you walk around, the map markers having been disabled means that no discovery via their radius is occurring. I still feel like there's a super slick way to accomplish this and maybe I've already been given the answer. It's also possible that my disabling map markers will create unintended consequences I'm unaware of. Atlas Map Markers offers a similar option so it seems like it should be ok.
  17. Ok - this is interesting. Let me check this possibility out. EDIT: I've checked this and unless I'm mistaken, if someone tells you about the Shrine of Azura, the map marker becomes visible (but can't fast travel) and the only way to stop that is to disable that location marker beforehand. If I don't want any hint of a marker on my map for a location, disabling seems to be the only feasible way to do that. Radiant quests are pretty aggressive about getting their map markers on the map ! (B) - this approach is possible, but if I want to include some vanilla quests it gets very very ugly. The onlocationchange approach is interesting as well. I'll have a look ! Thanks for having a look at this.
  18. That's really good to know - had no idea that was an option ! Yep - that's close to what I'm looking for. I want to disable the location marker(s) so they do not appear on the map UNLESS the player has visited them; so even if a quest 'unlocks' it, it doesn't show. The first part (disabling markers) was easy to do. The second part is the problem. The markers will be disabled so will not show on map EVER (until I do something about it). I want for them to show on the map if and only if the player is close to them. Using primitives as a trigger to enable the marker would work. But I'm very reluctant to proceed in that direction because: 1) most map markers I see in game don't need that to work--just the map marker with its radius and some native handling of them re: player position seems to cover that. 2) I will potentially have a hundred or so location markers to adjust. It's just not feasible for me to do that. I found these two Power of Three's Papyrus Extender functions: OnLocationDiscovery, RegisterForLocationDiscovery. But my guess is that they only look for when the player has met the proximity check of an ENABLED activator--so likely won't be helpful here. I essentially need to run the following: script attached to map marker that checks for distance to player. if distance < x, enable map marker and unregister the check, remove from alias. I'm just not equipped to figure out if that's something that's possible or not.
  19. Doesn't skyrim handle that natively, though ? Ie. doesn't it check for player proximity to the marker so that it doesn't require some other mechanism [trigger] to accomplish ? The method you propose would definitely work in my case, but it would probably be too onerous if I have more than 1 marker (there could be a dozen or two dozen) to set up. But, yeah, it would definitely be doable using your method. Hopefully there's an easier way that doesn't involve adding objects to the cell view ! thanks for the suggestion !
  20. I'm looking to run some code whenever the player is close enough to a particular location marker that it would normally set the marker as 'discovered'. I have set the location marker for a location as disabled [for a reason]; and when the player approaches it, I want for it to be enabled and for the standard discovery / add to map process to proceed as normal. Obviously once this location's map marker is visible on the map, there is no longer a need to check for when the player has gotten close enough to that marker. I'm still a toddler when it comes to working with the CK and scripting, so I have vague ideas about how to do this, but am confused about where to start. Do I need an alias for the map marker with a quest attached to it ? Is there a cleaner way to do this ?
  21. I'm trying to run the following: myglobal.setvalueint(Ceiling((89 + level) / 10) * 10) level is player level It's complaining about Ceiling. I've looked at the documentation and I'm obviously misunderstanding something. I'd appreciate a pointer. edit: solved my own problem again. I just forgot to reference the script name--ie. math.ceiling is what was required.
  22. Same here--yeah. Maybe it's bc I'm using the extended version of the CK or maybe it's MO2 not behaving.
  23. I have a global variable embedded in a player line, but when the GV is changed, the display text does NOT change with it. I'm 100% the GV is changing bc it is involved in a calculation. I've listed the GV in the Text Display Global and that hasn't helped. Do i have to tell it to update ? Solved. there is an update function. I needed to add QuestName.UpdateCurrentInstanceGlobal(MyCustomGlobalVariable) after the global var was changed.
×
×
  • Create New...