festering2 Posted January 16, 2015 Posted January 16, 2015 Hi all, As this is my first post to any forum I suppose I should say hi before asking for help from strangers. I have been reading this forum for a while and while enjoying reading the discussions about different mods and how they are made and/or tweaked I realised I would like to better understand the process and try and create my own. I have only been playing Fallout New Vegas for a short while but have recently become more interested in learning how to produce my own mods and scripts. I'm sure I will find lots of help and advice here for a complete modding beginner. The scripting 101 page advises against posting questions to that thread and points towards posting them either, to an existing scripting questions thread or creating one. After searching LL I couldn't see one for fnv so here we have it. Now on to the first question of this thread. I would like to create a script to enable the pc the fight of a rapist. I think I understand how to write the script for an action or message, but how do I identify when in the othe mod the rape action starts. For example, when using the sexout tryout mod the rape is initiated by a dialog sequence from an approaching npc. What should I be looking for in that code to enable me to interrupt this action with a check on my skills etc to determine if I fight them off? Also, on this point is it as simple as writing a new script to say when rape dialog starts if skills > x then fight off if < x the continue with original script? Many thanks in advance for the guidance. Festering2
prideslayer Posted January 16, 2015 Posted January 16, 2015 I hate to be the one to shit on someones dream, but what you're suggesting isn't possible in a 'generic' sense. Sexout provides no way (at present) to prevent an act from occurring, and if you use the notification hooks and abort the act (such as with the finishnow interface), the mod that started it is going to proceed as if it had occurred. If you were really able to prevent it from happening to start with, you'd likely break the calling mod, especially one as complicated as tryouts. You'll put that mod in a state where it thinks it started an act and is now waiting on it to finish -- which it never will, because it never started. Doing this will require cooperation between you and all the mods you want to support, and likely changes to sexout as well to add support to the engine. I'm willing to investigate this for sexout, but without other mods using it, it's pointless.
festering2 Posted January 16, 2015 Author Posted January 16, 2015 Thanks Prideslayer, Well it didn't take long to blow that idea out of the water. While your probably looking at this thread would you be able to point me in the direction of a list of the functions used by Sexout please.
prideslayer Posted January 16, 2015 Posted January 16, 2015 There are a ton of links in the first post of the sexout download thread. There's also a sticky about the sexout API in the sexout forum (not downloads, the one above that).
festering2 Posted January 16, 2015 Author Posted January 16, 2015 Cheers, I have looked through these, articles now trying to get my head around this. So for any script does it have to be linked to an object through the object window in GECK? or will it simply run on its own? So if I wanted to write a script to display a message on screen when a sex animation started would I add this as a stand alone script? If so would my script go something like this; ScriptName MyScriptBegin ScriptEfectStart if SexoutStart ShowMessage MyMessage endifEnd Should I alternatively set this to Begin GameMode so that the script rechecks. Cheers
prideslayer Posted January 16, 2015 Posted January 16, 2015 Scripts that aren't assigned to anything will not run on their own, no. They need to be assigned to a form, or called from another running script in the case of UDFs. The normal way to go about that for generic scripts is to create a quest in the geck and assign your script to it, and have the quest set to enabled on new games. "BeginEffectStart" is a block type for scripts assigned to spells (called actor effects). That script would run every frame (as in FPS), on every actor that the spell has been cast on. I suggest a trip to the GECK wiki to read up on the basics of GECK scripting, block types, etc.
festering2 Posted January 16, 2015 Author Posted January 16, 2015 Thats excellent thanks. I thought as much but couldn't be sure about the assignments. What function would I have to use to identify when Sexout started an act? Thanks again.
prideslayer Posted January 16, 2015 Posted January 16, 2015 Please read the Sexout API on the wiki, it's all explained there. You have to register a callback, and sexout will notify your script when it starts a new act.
Odessa Posted January 17, 2015 Posted January 17, 2015 As prideslayer mentioned, if you want to support sex in a particular mod you'd need cooperation with the author, because otherwise its likely to break the immersion/scripting the author intended. However, SexAssault has a fairly complex defense system similar to what you describe. You are welcome to take over that mod and expand on it, or spork some of the scripts for your own purposes- you could create an original approach mod inspired by Tryouts.
festering2 Posted January 19, 2015 Author Posted January 19, 2015 Thanks Odessa, I'll look at SexoutAssault, and see what I can figure out, but taking over the mod my be more than a little beyond me at the moment. I have read through the api page 3 times now along with numerous other guides. Is there somewhere a guide to how to structure the mod i.e. a sequence you have to go through, or do you work it out by trial and error? Another quick question, if I wanted to look at a mod in isolation, to understand how it works and to learn the interelationships and dependencies between functions etc, how can I load that mod without falloutnv.esm or indeed any other masters? Or is there another way to identify the component parts of a single mod? Thanks again
Odessa Posted January 19, 2015 Posted January 19, 2015 On structure: I'm not quite sure what you mean, but there are ~7 ways to run scripts, here's a very brief overview: - Quest: Script runs every X seconds delay. Can be start game enabled or affected with StartQuest / StopQuest functions. - Spell: Attach an effect script to a 'Base effect', attach that to an 'actor effect' (spell), then use 'Actor.CIOS MySpell' to run script. - Token: Attach an object script to a misc item, then use 'Actor.AddItem MyToken, 1, 1' - UDF: user defined function called by other scripts - Events: read doctasax's tutoral . - Other object scripts: you can also attach object scripts to NPCs, doors, etc. However, modifying vanilla records should be avoided where possible. - Scripts attached to dialog/stages of a quest- Avoid, if possible, they are unreliable. Usually you start with a quest, which stores your main variables. Then you might run spells or tokens on actors, but it really depends on what you're doing. -- On loading a mod in isolation: You can load it in TESSnip (bundled with FOMM). You can't really in GECK, because nearly every FNV mod relies on assets from FNV to be present. However, if you expand the second column in the object window of GECK, 'FormID' and order the entries by it, all the entries will be at top of list. Most mods use a prefix on their form names too, so you can search by that.
festering2 Posted January 19, 2015 Author Posted January 19, 2015 Wow, thanks that's an awesome response, thanks. I have been trying to think about how you start planning the mod in particular. What's the process you go through? Obviously, the first point is usually the finish point, i.e. what the mod is meant to do. But, do you say right these are the variables which need to be checked or derived first or am I way of the mark? Festering2
Odessa Posted January 20, 2015 Posted January 20, 2015 I think it's better not to really think about planning, just start creating content and figure it out as you go along, especially if you're starting out. You probably have loads of ideas, but its better to not worry about how it will fit together at the end, just concentrate on one or two small things, get them done and make a first release. Then you can get some feedback on what works, and add another small thing for next release and so on. Sure, eventually it will be a mess, but by that point you've already got a good mod, and it will be much easier to figure out how to tidy it up. I think all the big mods on this site started out very modest- ones that don't rarely get released at all.
festering2 Posted January 20, 2015 Author Posted January 20, 2015 Thanks, I take your point. I have been tinkering with a couple of ideas, and now realise, I need to get one thing working then move on to the next. I have got the first stage of my mod to work, but now need to play a random sexout solo animation at a given point. I have been trying to figure this out but seem to be missing sonething. The script for this section is as follow: int Anim Let Anim := NX_GetRandom 100 110 endIf This is similar to an example I found for a playidle, which used a GetRandomPercent to run a specific idle if the number generated was <10, <20 etc. Any advise? Festering2
Odessa Posted January 21, 2015 Posted January 21, 2015 Sexout has a random picker built in which it uses if you don't specify an anim, so all you need to do is: call fnSexoutActPrep call fnSexoutActSetRef "ActorA", SomeActorREF call fnSexoutActRun
festering2 Posted January 21, 2015 Author Posted January 21, 2015 Thanks Odessa, Another question now can I use a mathematical matrix to return a result? For example: A B C D E 1 y y n n y 2 n y y n y 3 y n y n y 4 n n y y n 5 y y n y n Is this at all doable or should I be using a sequence of it's or's or elseif's? Thanks again.
Odessa Posted January 21, 2015 Posted January 21, 2015 What is the context? You could use bitwise operations, arrays or strings.
festering2 Posted January 21, 2015 Author Posted January 21, 2015 The matrix, I had hoped would be a way of determining if an npc approved of a sex act being performed in front of them, based solely on their sexuality and the sex of those involved in the act. So if the npc were a straight man then sex between 2 men he would not approve while a n act between a man and a woman he would approve of. Do you see what I'm getting at? Thanks.
festering2 Posted January 22, 2015 Author Posted January 22, 2015 I figured I can do this by appending 2No. arrays with each key representative of a different combination of sexuality and sex act with the resultant value being either 1 or 0 for favourable or unfavourable responses. Thanks for pointing me in the right direction Odessa.
festering2 Posted January 22, 2015 Author Posted January 22, 2015 Yet another question. Is there a lust or arousal tracker within Sexout? If so, does this apply to all npcs or just named ones? Also, if so how would I call the value of an npcs lust or arousal? Would I use the NX_GetEVFL:=SO:AROUSAL? Thanks all
Odessa Posted January 23, 2015 Posted January 23, 2015 Sexout Spunk handles lust and arousal, if you check the first couple of posts in it's thread it explains how to use it .
festering2 Posted January 25, 2015 Author Posted January 25, 2015 Thanks Odessa, I have tracked down what I needed, however as always, 1 answer prompts at least 1 more question (usually 5 or 6). Do I have to add tokens to npcs to get them to do what I need them to do, then remove the tokens afterwards, or is there another way of doing this without using tokens? Also, if I need to use the tokens is there a good guide to scripting this? And finally, can I farm out the token adding to a UDF? Cheers again.
festering2 Posted January 26, 2015 Author Posted January 26, 2015 Hi all, how would I check an npc's morals? i.e. would they find any sexual act arousing or would they be disgusted or embarased. Thanks for the help in advance.
Odessa Posted January 27, 2015 Posted January 27, 2015 There's more than one way of doing it. I'd suggest your store opinions as NX variables, then cast a spell on sex start which uses a scanner to find any uninvolved actors that can see it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.