Jump to content

Recommended Posts

Hi!

 

I wanted a mod that removed my character's shirt when doing character generation at the beginning of the game. This will help in the creation of OCOv2 Seamless characters who have matching head and body texture colors.

 

I've written a script that will probably do the trick. It's very simple. You can see it below.

 

My question is: now what? I've gotten the impression that I need to attach it to an Object or something. But... which one? The real point of this is just to do this one thing at character generation, so.....????

 

I'm sorry I'm so newbs and helpless. The CSWIKI isn't helping me understand what I need to do here as there isn't really a tutorial on "Do this when a menu is open."

 

--------------------------------------

 

ScriptName bdsscgRemoveSackClothShirt
; This script removes the Sack Cloth Shirt from the PC in the racesex menu (character
; generation menu). This is done to aid the player in creating a character whose head
; and body textures have matching colors. This is especially useful when the player
; has installed the OCOv2 and Seamless OCO mods.

; Variable to make sure the script runs but once.
Short bDoOnce

; Start when the racesex menu comes up.
Begin MenuMode 1036
; Only do this once
If ( bDoOnce == 0 )
; Check to see if the PC is even wearing the shirt.
If ( Player.GetEquipped LowerShirt05 )
; Unequip it if we found it.
Player.UnequipItemSilent LowerShirt05 1
EndIf
; Prevent the script from running again
Set bDoOnce to 1
EndIf
End

 

------------------------------------------------

Link to comment
Share on other sites

One of the guys in the know on all things scripting like DrakeTheDragon or QQuix may correct me on this, but is it possible to use Begin MenuMode in a quest script? Not sure how you would get that quest script to run before the CharGen one though ...

Link to comment
Share on other sites

Yes, a Quest script would likely be ideal for this purpose here, and MenuMode can definitely be used. Also it doesn't really matter which quest runs first. The MenuMode block will be executed every fQuestDelayTime seconds while in the CharGen screen. Even if it runs a little later than the screen pops up, so there's a little delay, so what? It will be seconds at most, and can be configured to be even split-seconds only, if needed.

 

It would just need a new quest to be created, with start game enabled, so it starts right away, and the quest script from above selected as its script. Maybe one could even use StopQuest to stop the quest once the shirt was unequipped, as it might be unnecessary to have the quest script still running continuously even after a hundred days into the game.

 

But maybe QQuix can tell more.

Link to comment
Share on other sites

Maybe something can be scripted to re-equip the shirt at some point. Would I be right in assuming that the script currently would check for the shirt each time the menu is opened (thinking of people who may open the CharGen menu more than one time)? If so then if a StopQuest is used as Drake has suggested then some way of knowing that the player has finished their character creation would be needed (been a long time since the vanilla game CharGen got more than a cursory glance from me ... normally the only way to reaccess it is via the console showracemenu command right??).

Link to comment
Share on other sites

The quest showing up in the quest log? Can't say I ever had that happen to mine... or did I just never check? Definitely need to check now the next possible occasion... But I think it takes more than just a quest with a script for it to show up in there, actual stages maybe? Yep, need to check.

 

Oh, and thanks to the "do once" condition, the script will of course never again do its thing after it already did it once. It's not doing it "all the time" while inside CharGen and it won't do it again, if people enter CharGen again. It can be coded with the help of other blocks to "reset" back to 0 though, so it can be used repeatedly and still won't be running all the time. But of course stopping the quest like I suggested will be a hindrance to that.

Link to comment
Share on other sites

  • 5 weeks later...
  • Recently Browsing   0 members

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