• Announcements

    • Ashal

      SITE MOVED - IN READ ONLY MODE   12/08/2015

      Please use http://www.loverslab.com moving forward. Site has been restored to a previous version, and this one placed into a read-only mode. This is available for a limited time so users may reference/copy content that has been lost in the transition. This will no longer be accessible by December 22nd, 2015.

Archived

This topic is now archived and is closed to further replies.

Oraclesoldier

Disguise Mod Advice

In my mind I think that making a nice disguise mod for Oblivion wouldn't be too complicated for someone of my limited skills (for now...). So I am here to ask for advice.


 


The advice I want is only on a nice place to start learning scripts for such a thing as:


 


---


 


Item A is the Shrouded Armor from the Dark Brotherhood faction.


 


Wearing Item A will cause a "setfactionrank ###" (Fill in ### with the id for Dark Brotherhood)


 


---


 


I'd think that would be enough to disguise right? So yet again I ask where do I start learning on how to actually do it. Because the ONLY Disguise mod that has personally worked for me is One of the Gang, the one that lets you disguise as an imperial legion / town guard.


0

Share this post


Link to post

Have you read the Construction Set wiki: http://cs.elderscrolls.com/index.php?title=Main_Page ? There are many useful tutorials/references there that can teach you how to do various things in the cs in order to make whatever mods you want. I know it's helped me in the past.


 


And I believe attaching a script to the armor/clothing should be enough to allow it to work when equipped, though I haven't modded in a while so I may be a tad rusty :P


0

Share this post


Link to post

The best way to see how a particular script is done is to open the esp it's in, and check it for yourself.


The basic code should look something like this:



scn YourScriptNameHere

int self

Begin onEquip
set self to GetContainer
self.setfactionrank YourDesiredFactionHere YourDesiredFactionRankHere
end

And with the unequip script, just set the faction rank to a negative value (such as -1).


 


Of course, the One of the Gang script is more complicated, with a chance for disguise failure if I remember correctly. This is, again, just an example for the basic script.


0

Share this post


Link to post

The best way to see how a particular script is done is to open the esp it's in, and check it for yourself.

The basic code should look something like this:

scn YourScriptNameHere

int self

Begin onEquip

set self to GetContainer

self.setfactionrank YourDesiredFactionHere YourDesiredFactionRankHere

end

And with the unequip script, just set the faction rank to a negative value (such as -1).

 

Of course, the One of the Gang script is more complicated, with a chance for disguise failure if I remember correctly. This is, again, just an example for the basic script.

 

I currently am learning what is on the wiki and what not about scripting and I've gotten the idea of the scripts. Thanks for this start by the way but I must ask what does the line "set self to GetContainer" do or mean? Is there a page on these terms or should I just mess around other esps to find out?

0

Share this post


Link to post

The "self" here refers to the variable that was declared at the second line. (This one is wrong by the way. Should be a reference variable to store the container reference, but it's an integer )


 


So "set self to GetContainer" does store "who is my container" in the variable named "self". You see, that script is supposed to be attached to an equipment item and what would be the container from the equipment's view? Probably NPC or you. In Oblivion, even NPC or creatures can be considered as a container, because they have inventory.


 


Building  a faction disguise system may be more complicated achievement than you now imagine.. however, this is a good start. Cheers!


0

Share this post


Link to post

The list of functions http://cs.elderscrolls.com/index.php?title=List_of_Functions


is the most valuable scripting resource on the web, outside of the CSE.


 


You must have the extended version - the Construction Set Extender - if you're serious about doing anything. I'm a big fan of the very latest version, 6.1.6, but it does require you use the latest OBSE, which is still officially a beta. Gregathit champions 5 point something, which is OK with OBSE 2.0.


 


Then, open some mods and read the scripts, see what people do. I learned a lot from PerfectionCat's mods; his style is very neat and clear.


 


0

Share this post


Link to post

This one is wrong by the way. Should be a reference variable to store the container reference, but it's an integer.

Yep, thanks for the correction.

I make plenty of obvious mistakes due to being tired and scripting at very late hours. :-/

0

Share this post


Link to post

I'd have thought Blockhead might have had some utility for 'real disguises'.


 


You don't need the CS extender BTW. I much prefer to use Wrye Bash to export the scripts as text files and then open them in an external text editor that has the Tes4 script syntax defined. Much more flexible.


 


Then just cut'n'paste your finished script into the CS script window.


0

Share this post


Link to post

With all due respect, Symon, that is not the simplest way of going about things for someone talking about learning to write any sort of script. Much more flexible, yes. Much easier, no. Much more newbie friendly, no. Would I do that, given more years of programming than I care to think about, and the big improvements recently in the CSE? Probably not.


 


 


0

Share this post


Link to post