Jump to content

tunaisafish

Premium Member
  • Posts

    544
  • Joined

  • Last visited

Everything posted by tunaisafish

  1. Briefly, and so reading what is happening is easier :) The States names aren't important, you call them pretty much what you want. The states alter which part of the code is run only when a *new* event comes in. (They're not like a GOTO in other languages that jump to a different part of the code straight away.) I've used them here so multiple versions of your code don't end up running concurrently if the use Activates it several times. As the script engine is threaded, this could easily happen, especially with latent functions like wait. States are just a convenient way to switch to another behaviour.
  2. In answer to 1. You're saying that "if (Game.GetPlayer()).GetItemCount(ADZChainKey001) == 0" is always returning false? ie. *always* says that the player has the key. Oh, make sure the chain doesn't have the default script in it if so. Make a copy object if you've not done so already. For 2, it sounds like PlayAnimationAndWait() is what you mean.
  3. Add this line somewhere... Form Property Gold001 auto (and then set it in the CK) This tut by Cipscis explains why the FormID names no longer work.
  4. Look at the icons above the reply box. On the right you'll see one that looks like '<>' (and mouseover says code snippet). That's the 'code' tags that keeps the script indentation, so paste code within those. You won't get the same colours as N++ though, but it's correct indentation that is likely to get you more helpful replies.
  5. There's a fix for games with running quests... I think :) In a fragment just before the Objective is displayed, give the Alias a kick, so that this time it honors the newly added Text option. (that's the theory anyway) Location tempLoc = Alias_Dungeon.GetLocation() Alias_Dungeon.Clear() ; Might get away without this line Alias_Dungeon.ForceLocationTo(tempLoc) You can do something similar for AliasRef's too, but that might have side effects if it's an Actor. You've probably already got this pinned above your PC for this task, but I'll add the link for those searching this thread later.
  6. OK, I've looked at DA10, and also some that use an Alias name in the Objectives. Eg. CWFortSiegeCapital has several Alias's that store text (look for the D flag). and yeah, your syntax above looks fine, but the string appears to be empty. So I think you're right, and the mod will work... ...but only if the player has not yet started the quest. The quest starts via the story manager as soon as you enter Markarth (so long as your player has done the intro). As I understand it, that is the time when the 'Stores Text' function actually saves the text. Even though the quest is running, it doesn't enter the journal until you've spoken to the nosy neighbour. In the story manager 'Change Location' event, search for DA10 and you'll see the start conditions. So to test this theory, we'll need a save game where DA10.IsRunning = 0, and also not completed (obviously). I'm hoping that if you load the savegame where you tested and got the blank text, that it was already running. Use the GetQuestRunning Console Command to check. (I don't have one here prior to that quest)
  7. That problem has been studied a lot here. A solution was found early, but the problem was making it compatible with other mods that wanted to do the same. Probably easier to start at the end and read back. There's at least 1 mod on the nexus already using the 'mod friendly' method.
  8. It will depend on the quest mod. If it just gives you standard items from the main game, you'll still have them. If it comes with unique items, spells, perks, etc. They'll go too when you de-install. Most mod authors provide de-installation notes. It never hurts to read them, but sometimes does when you don't.
  9. Thanks, I'll grab that :) When I get access to my games machine again I'll take a browse through DA10.
  10. @SM, I wish they'd made the '*' column sortable in the CK too. That's very handy. I didn't know it did that :) @meh, Can you let me know if this CK wiki page is any help?
  11. Because you'll no longer be able to see the dozen errors that you got the first time you tried to compile it :) The compiler can be very verbose, but you'll easily know when it works.
  12. Click 'Stores Text' on the Aliases tab. Great mod idea :) I felt I spent far too much game time just following arrows.
  13. There's some ingame 'remnants' of an attempt to make a potion rack. Whoever started it didn't get much further than copying chunks of the bookshelf code. So don't feel bad about trying to figure it out to work for potions. Bethesda gave up on the idea, for some reason or other. The reason you're getting your potions returned is as that's by design of the script. There's a condition check within the OnItemAdd() event that casts the object to Book. If it fails to cast to book then you get it back. So you'll have to edit that condition for the objects you wish to display. One thing you won't be able to display using the same method as the bookshelf, is user-created-potions. These will lose all their properties and return to the dummy base object. Just the same as happens with the bookshelf if you store all your Bounty notes in. There's another minor annoyance with the bookshelf code too. ie. if somebody added 20 potions of minor health, I'd just display the one and the others could stay in a container. The logic on the bookshelf fills the shelves with identical items. It's a cool idea, which is why I'm working on porting a 1-click Sortomatic for Sklrim :) Don't hold your breath on that though, as the scripting is a totally different animal it's more like a rewrite than a port.
  14. You don't show the other script, or describe what objects and how many of each type you have. I'll assume you have several potions with the above script, and 1 object where SpawnGhostControllerScript is attached. If I've got it backwards then you should be able to figure it out from this... Scriptname SpawnGhostControllerScript extends ObjectReference {I live on the controller object} Int Property PotionTakenInteger Auto ; My potion slaves may dump values here Function PotionTakenHandler(ObjectReference slaveRef, Int TookPotionArg) ; My potion slaves may also contact me here Debug.Notification("SlaveRef=" + slaveRef as string + " TookPotionArg=" + TookPotionArg + " PotionTakenInteger=" + PotionTakenInteger) ;do stuff EndFunction ============== NEW FILE ================ Scriptname SpawnGhostPotion extends ObjectReference {I live on a potion} ActorBase Property UndeadGhost Auto ObjectReference Property bornpoint Auto ObjectReference Property ControllerObject Auto ; Remember to point this where you controller script lives Int Property TookPotion Auto ; Set this to the value we will pass to the controller. eg. 5 for this potion type. Int PotionCurse = 0 Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if !PotionCurse if akNewContainer == Game.GetPlayer() bornpoint.PlaceAtMe (UndeadGhost, 2) Debug.Notification("Undead!!") PotionCurse = 1 ;You probably only need the function call to the controller (ControllerObject As SpawnGhostControllerScript).PotionTakenInteger = TookPotion ; Set a property value in the controller (ControllerObject As SpawnGhostControllerScript).PotionTakenHandler(self, TookPotion) ; run a function on the controller. EndIf EndIf EndEvent I didn't try to compile those, so there may be some syntax bugs
  15. Another way without having to use other software. Note the path and name of the NIF. Add the folders and a BLANK file in that position. (renaming an empty untitled.txt to modelname.nif will do) In CK, navigate so you have the Statics listed. Then EITHER create a New static and select the nif path as normal OR Drag-n-drop the empty nif file(s) into the statics pane. [EditorID will default to the nif filename] Before you test your mod ingame, delete the empty nif files, so the game will use the real file in the BSA archive. It's annoying, I don't know why you can't just type the model path directly into the box :/
  16. This worked with the GECK, so probably still works with CK. If you drag a heap of nif files from Windows Explorer, you can drop them into the pane where you want the new items. Depending on what you are doing this may save a bit of time. (if it still works)
  17. Have you tried the translate functions? They're probably going to be much more efficient than running an infinite while block. http://www.creationkit.com/TranslateTo_-_ObjectReference
  18. Thanks scriver :thumbsup: David, yeah that's a good idea. I'm getting sick of having to press 'Yes To All' after returning with a fresh coffee.
  19. OnRead takes no arguments. so it's just 'Event OnRead()'. I don't think it passes the reader Actor, as NPC's don't trigger that event.
  20. Not tested, but an idea :) I think the drinking the potion from inventory run the OnActivate event. So maybe if you block the 'drink' action with BlockActivation(), that means that your event code could handle the logic. If it is actually ok to drink then run "Activate(Game.GetPlayer(), True)" in your logic. You won't need to reimburse the potion then, but there's GetBaseObject() if you need it.
  21. From my EditorWarnings.txt file... That was actually from loading my wip.esp, with both skyrim & update esm's. They look pretty much the same to me at a glance... well there are 9, and 8 of them are doors.
  22. NPC's have AI packages. The movement part you're not seeing will be because that has not been added. (PlayerFollowerPackage I think) As you're new to modding then going over the Tutorials will give you a better idea of the game anatomy. http://www.creationkit.com/Bethesda_Tutorial_Packages BTW, this is an optimistic project for your first mod ;)
  23. The first 2 characters of the ID depend on the load order of your mod. So count the numbers (in HEX) down to yours. 00 - Skyrim.esm 01 - Update.esm 02 - SomeCool.esm 03 - BugfixGalore.esp 04 - PepperTastic.esp
  24. @fg, you are gonna kick yourself :)
×
×
  • Create New...