Jump to content

Hi! Apparently I can't do-it-myself >.>


GSmog

Recommended Posts

Hope this is the right forum for this, said general mod talk and announcements and such. I don't plan to release it since I know it's not anywhere as good as some of the other stuff I've seen but I think it qualifies for "up and coming" at least. :)

 

Anyway, in the main quest [as well as a side quest involving the dream amulet] there's a point in the game where you wear "The Bands of the Chosen" or something like that and you can't take them off until later after you finish that part of the quest. Anyway I've never made a real mod before other than perhaps if ya count slightly modifying an item or making an enchantment or something. [Long story, couldn't find a normal restore magic spell anywhere in the game to use to make an enchantment for my armor so I made one that drains stamina briefly to restore a bit of magic, I thought it was clever and fair at least. :P] To be honest I've never tried scripting anything before now but I'm really intelligent and I catch on quickly so... anyway I digress.

 

I was wondering if anyone here might be able to point me in the right direction with some quick advice or a small example script for how I could make something you can find for a quest like that be unable to be removed until some factor had been completed. Say for example can't take off an amulet until you kill someone, or can't take off a robe until a quest was finished, or can't take off those jail shackles until you find a key. [personal idea of mine, anytime ya go to jail they put shackles on ya after all but you can just take em off anytime you want to]

 

Any help? Please? I've been googling stuff all day, since last night even and haven't found anything. My first thing I tried was finding those bands of the chosen and the dream amulet then looking up their script and studying them, but for some reason it doesn't work. I think there's a second part somewhere I don't yet know where to look at to fiddle with. The only thing I was able to do was put in a part that basically re-equips it anytime the player un-equips it I don't know if that would work for what I want to do... fairly sure it'd just cause bugs. But hey at least I'm on the right track, kinda >.>

 

Oh, and hello everyone! I'm new, and this is my first post.

Link to comment
Share on other sites

Well, to make an item non-uneqquipable... Or so you can't take it off do this:

 

Begin OnEquip
    player.EquipItem XXX 1
End

 

The one at the end flags the item us permanent or whatever you want to call it, thus when the user tries to unequip it, it simply pops up a message in the top left corner saying you can't.

 

To remove the item and that flag simply use the - player.UnequipItem XXX - command somewhwere in your script.

 

This of course means that next time you equip it it will be permanent until the point that a script enquips it again. To fix this you'll want the object to be controlled by a quest, like this:

 

Begin OnEquip

If GetStage XXXQuest < 10
    player.EquipItem XXX 1
Else
    player.EquipItem XXX
EndIf

End

 

Then you would have course have to create a quest but that's a different ball of wax (but not terribly hard just folow the tutorial on the Construction Set Wiki).

 

And gratz to you on your first post! Hiya! Good luck modding.

 

And gratz to me for my first time to ever get those Codeboxes to work. Haha

 

Btw, here's a site that has useful information about equipitem: http://cs.elderscrolls.com/constwiki/index.php/EquipItem

Especially the part about adding items and equipping them together in the same script.

Link to comment
Share on other sites

Anyway to make it impossible to unequip an item unless you have a special key? I've been trying to make a generic "shackle key" that would allow a character to take off those shackles you get when you get busted for doing something naughty if they had the key in their inventory instead of just being able to take them off any'ole time. Say for example you might have to sneak around the jail first to find such a key, perhaps randomly placed in different containers or perhaps just sitting on a table or a hanging on a wall somewhere to get them off.

 

Actually it'd be kinda complicated but I have ambition! Basically my idea is when you go to jail and they give ya the potato sack to wear along with the new bracelets that I add a script of some kind to the generic bracelets and make them impossible to take off normally. If you serve out your time they take the bracelets off, IE the bracelets are automatically unequipped and taken out of your inventory. If you successfully bust yourself out you then have to make sure to get that key to take off your bracelets else if a guard see's you with them on they'll bust you again. On top of that you wouldn't be able to wear gauntlets and such until ya got them off anyway, so it'd also serve as a minor annoyance. Minor because gloves don't actually give all that much armor to begin with but a constant reminder of needing to hide out from the guards and not being able to move as easily through town.

 

And yea I know there's a lot of variables to deal with... I'd probably never be able to figure all that out on my own but if I could even get the key thing to work then I could at least pretend :P

Link to comment
Share on other sites

hmm. A couple options:

 

You could make a quest that's start game enabled, with a script that once you pick up the key it advances the quest to the next stage, thus my above code example would still apply.

 

Another option is I believe there's a code to check if an item exists in the players inventory, though I don't remember what it's called and I'm working oin my own mod atm. I'll pretend like the command would be player.HasItem just for the sake of arguments (even though it's not), the code would look like this (attached the the shackles still:

 

Begin OnEquip

If (player.HasItem ShackleKey* == 1)
    player.EquipItem Shackle*
Else
    player.EquipItem Shackle* 1
EndIF

End

 

This would check if you have the key when the item is equipped, if you do the item is equipped like normal, however if you don't it is permanently equipped. The astericks are were you would put the FormId of the specific item you want equipped (for instance the standard starting shackles are called WristIrons), or the specific key you want related to the item.

 

It would be a good idea to attach something along the lines of the following to the keys:

 

Begin OnAdd Player
    player.UnequipItem Shackle*
End

 

This would prevent the case where you had the item equipped then picked up the key afterwards, but the item would still be permanent.

 

As a note, these examples are extremely unpolished and made up off the top of my head, I can already think of a few better ways to impliment them, but I think it'd be good for you to experiment. At the worst I've given you something that will work, albiet half-hazardly. Good luck sir :)

Link to comment
Share on other sites

Also, it might be a good idea to remove the WristIrons from the players starting inverntory if wearing it'll make guards hostile... It would kinda ruin the whole tutorial quest as the moment Baurius saw you he'd simply stab you. Though it might be rather funny it doesn't help you get very far in the game haha

 

I don't think you can equip regular gauntlets with them on to begin with so that's not an issue.

 

I'm also not sure offhand how to make people hostile to you on site while they're equipped, but you could probably check the Grey Cowl (or whatever it's called) script for some hints there.

Link to comment
Share on other sites

I'm actually not sure if Baurius and them count as guards. Weren't they actually blades? It could be circumvented though by giving the player "fake" shackles at the tutorial, or simply not giving the shackles to them at all during the beginning.

 

Speaking of which, anyone every figure out what you were doing in prison or is it for us to fill in the blanks on our own? :P

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...