Jump to content

cerebii

Premium Member
  • Posts

    36
  • Joined

  • Last visited

Nexus Mods Profile

About cerebii

Profile Fields

  • Country
    United Kingdom

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cerebii's Achievements

Contributor

Contributor (5/14)

  • First Post
  • Collaborator Rare
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. It's just the default CustomItemQuestScript script, attached to a quest. Spawns the item on game load-in (when the quest starts, I think). I wouldn't think it would be a good use of time to completely re-write the script if it works ok? Just need to work out how that Function fits in....
  2. Edit: Seems like I have to use this?: Function SetMotionType(int aiMotionType, bool abAllowActivate = true) native Me and my smooth brain are having a hard time lol
  3. Ah, hello SKK, thanks for the help once again. Option a) seems promising, I assume it would look something like this: Scriptname CustomItemQuestScript extends Quest Struct ItemDatum String ID {Indentifier - used to help identify items in array. Not otherwise used.} int QuestStage {Spawn item at this quest stage} LeveledItem LeveledListToSpawnFrom {List to spawn from} Formlist ModsFormlist {List of mods to install on item ****IMPORTANT NOTE*** THIS BYPASSES ALL NORMAL ITEM INSTANTIATION RULES} ObjectReference ReferenceToSpawnIn {Where to spawn item} ReferenceAlias AliasToSpawnIn {Where to spawn in, overrides ReferenceToSpawnIn} bool PlaceAtMeInstead {Place AT instead of IN ReferenceToSpawnIn} ReferenceAlias AliasToForceItemInto {if set, item will be forced into this alias} EndStruct ItemDatum[] Property ItemData const auto Event OnStageSet(int auiStageID, int auiItemID) int foundIndex = ItemData.findStruct("QuestStage", auiStageID) ItemDatum FoundDatum if foundIndex >= 0 FoundDatum = ItemData[foundIndex] endif if FoundDatum && auiItemID == 0 ObjectReference spawnInRef if FoundDatum.AliasToSpawnIn spawnInRef = FoundDatum.AliasToSpawnIn.GetReference() elseif FoundDatum.ReferenceToSpawnIn spawnInRef = FoundDatum.ReferenceToSpawnIn else Game.Warning(Self + "OnStageSet() didn't find ReferenceToSpawnIn, using Game.GetPlayer() instead.") spawnInRef = Game.GetPlayer() endif SpawnCustomItem(FoundDatum.LeveledListToSpawnFrom, FoundDatum.ModsFormlist, spawnInRef, FoundDatum.PlaceAtMeInstead, FoundDatum.AliasToForceItemInto) endif EndEvent form Function SpawnCustomItem(LeveledItem LeveledListToSpawnFrom, Formlist ModsFormlist, ObjectReference ReferenceToSpawnIn, bool PlaceAtMeInstead = false, ReferenceAlias AliasToForceItemInto = none) global ObjectReference item = ReferenceToSpawnIn.PlaceAtMe(LeveledListToSpawnFrom, aiCount = 1, abForcePersist = false, abInitiallyDisabled = true, abDeleteWhenAble = false) debug.trace("SpawnCustomItem() creating item " + item) int i = 0 while (i < ModsFormlist.GetSize()) ObjectMod omod = ModsFormlist.GetAt(i) as ObjectMod bool success = item.AttachMod(omod) if success == false Game.Error("FAILED TO ATTACH " + omod + " to "+ item) else debug.trace("SpawnCustomItem() attaching " + omod + " to " + item) endif i += 1 endwhile item.enable() if AliasToForceItemInto AliasToForceItemInto.ForceRefTo(item) endif if PlaceAtMeInstead debug.trace("SpawnCustomItem() placed item: " + item + " at " + ReferenceToSpawnIn) else debug.trace("SpawnCustomItem() adding item: " + item + " to " + ReferenceToSpawnIn) ReferenceToSpawnIn.additem(item) endif item.setMotionType(Motion_Keyframed, TRUE) RETURN item EndFunction ?
  4. Hi, thanks for the reply. First off, I'm a complete noob with CK and Papyrus, so if I misunderstand anything anyone says that's why lol The weapon in question is spawned with the "CustomItemQuestScript" script, so I don't think it technically exists as an item until the script spawns it in? Do you know of another way I could get a custom legendary item in a way where I could directly place it as an object in the world? (and therefore be able to edit the motiontype) Thanks again!
  5. Hey y'all, quick CK question; I'm using an Xmarker to spawn in a weapon using placeatme, but I'd like to disable havok on the spawned weapon. I've tried using the "defaultdisablehavokonload" script on the Xmarker but that doesn't seem to work for the object it spawns. Does anyone know how to do this? Many thanks!
  6. I've been pulling my hair out trying to figure out how to Change the color of the NiPointLight in GlowingOneAO.nif using NifSkope No matter what I change the Diffuse Color to it refuses to make anything other than a green light. I honestly can't figure it out. Any ideas?
  7. Yeah, using the "long code simpler to understand" approach might be the best solution for you I guess. Not to re-use the same joke twice but... I think I'm still at this stage in my scripting career :laugh: Anyways, the mod is finished and uploaded, let me know if you're unhappy with anything, and thank you again!
  8. Ah, I see, yeah, that would definitely be a cleaner way of doing things. At the moment, I've got multiple component items coming from each c_grenade_scrap item, i.e. So I don't know how or if that could be made to work here. Anyway it works so the less I mess around with it the better lol :laugh:
  9. When you say "access elements individually", how would this relate to the script? Would I need to replace every instance of "c_grenade_frag_scrap" with "MiscObject c_grenade_frag_scrap = MyScrapList.GetAt(2) As MiscObject"? Edit: Tested the script out with a formlist and it seems to just work so I think I'm good, thanks again :smile:
  10. No, thank you! One quick question, the AddInventoryEventFilter(), do I need to list every item I want the script to filter for, for example Or do I need an event filter for each item, i.e. Or something else? Thanks again! Edit: the CK wiki says you can use a formlist? Would that be best?
  11. Sorry for the late reply, took me a while to figure out I needed to set the properties in the CK, but yes, its working! Thank you so much SKK50, LarannKiar and DiFeM, I will be crediting you all when the mod is fully complete and released! :laugh: Edit: Made a short video of the script in action
  12. Yeah this is to just test the script, the idea is to take the c_grenade_scrap and give a grenade back... I'm hoping to edit it with all the c_grenade_scrap items I've added and have them automatically swap out for the right components, the reason I need a script is because you can't have non-CMPO items tagged as components on a misc item or the game just crashes when it tries to read it or whatever, and some of the recipies for grenades require stuff like nuka cola and other grenades.
  13. Derp, sorry. Compiled successfully! I will now go see if it works, fingers crossed! And thank you everyone!
  14. Thanks so much for the reply! So I've got: And the following errors:
×
×
  • Create New...