Jump to content

Scripting Help


Happysparkles

Recommended Posts

Posted

Hey guys,

 

I am trying to set up a script for my new body to equip after unequiping items and I've used the exact same script from another mod, but for some reason  my script wont save, despite the settings being EXACTLY the same. I've even tested this on the original mod in which I modified the script from and got the same error.

 

This is my script

 

 

 

scriptname aaaHSMilfRaceUniqueBodyScriptaaa

short done
ref actorref


begin gamemode

set actorref to getself

if (actorref.getisrace HSMilfRace1 == 1)  
    if (actorref.getitemcount aaaupperbodyMilfRace1zzz <= 0)
       actorref.additemns aaaupperbodyMilfRace1zzz 1
    endif

    if (actorref.getitemcount aaalowerbodyMilfRace1zzz <=0)
    actorref.additemns aaalowerbodyMilfRace1zzz 1
    endif

 if (actorref.getitemcount aaahandMilfRace1zzz <=0)
    actorref.additemns aaahandMilfRace1zzz 1
     endif

 if (actorref.getitemcount aaafootMilfRace1zzz <= 0)
      actorref.additemns aaafootMilfRace1zzz 1
      endif

 if (actorref.getequippedobject 2 == 0 && actorref.getequippedobject 18 ==0 && actorref. getequippedobject 19 == 0 && actorref.getequippedobject 20 == 0)
    actorref.equipitemns aaaupperbodyMilfRace1zzz
    endif

 if (actorref.getequippedobject 18 == 0 && actorref.getequippedobject 3 == 0 && actorref.getequippedobject 19 == 0  && actorref.getequippedobject 20 == 0)
    actorref.equipitemns aaalowerbodyMilfRace1zzz
     endif

 if (actorref.getequippedobject 4 == 0 && actorref.getequippedobject 20 == 0)
    actorref.equipitemns aaahandMilfRace1zzz
     endif

if (actorref.getequippedobject 19 == 0 && actorref.getequippedobject 20 == 0 && actorref.getequippedobject 5 == 0)
    actorref.equipitemns aaafootMilfRace1zzz
    endif
    endif
end

 

 

 

These are my errors.

 

post-69966-0-74531200-1442484228_thumb.png

post-69966-0-59846100-1442484229_thumb.png

post-69966-0-59879800-1442484230_thumb.png

post-69966-0-59924000-1442484231_thumb.png
 

 

Is there possibly some special thing I need installed to save scripts or am I totally messing up something here. The script seems to be fine as I took it from another mod that already has what I want to accomplish. I only need Construction Set right?

 

Please let me know. Any help is greatly appreciated.

 

Thanks ><.

Posted

The script is normal.

 

How exactly you open the editor?

 

obse_loader -editor

=====================

Some time, my firewall blocked the OBSE.

Posted

Actually, on 2nd thought, I got it to work, I looked up what you said and I never knew about that so thank you. Now allow me to save, now I'm just not having luck with it changing my body to the desired body as planned. FYI: I just created the script and made it into a magic effect (like the original) but noting happens ><.

Posted

OK so now I just noticed the original mod had a quest script to go with the magic effect script above. I managed to get them both in but the only way as by taking out the last endif , which is in turn killing the script to begin with. So nothing happens in game.

 

 

 

scriptname aaaHSMilfRace1MenuModeQuestScriptzzz

Float fQuestDelayTime


begin menumode

Set fQuestDelayTime to 0.01

if (player.getisrace HSMilfRace1 == 1)  

 if (player.getequippedobject 2 == 0 && player.getequippedobject 18 ==0 && player. getequippedobject 19 == 0 && player.getequippedobject 20 == 0)
    player.equipitemns aaaupperbodyMilfRace1zzz
    endif

 if (player.getequippedobject 18 == 0 && player.getequippedobject 3 == 0 && player.getequippedobject 19 == 0  && player.getequippedobject 20 == 0)
    player.equipitemns aaalowerbodyMilfRace1zzz
     endif

 if (player.getequippedobject 4 == 0 && player.getequippedobject 20 == 0)
    player.equipitemns aaafootMilfRace1zzz
     endif

if (player.getequippedobject 19 == 0 && player.getequippedobject 20 == 0 && player.getequippedobject 5 == 0)
    player.equipitemns aaahandMilfRace1zzz
    endif
    endif

    endif
    End

 

 


 

So I am trying to get the above to save but there seems to be no way around it, anyone has suggestions or even can recommend a script that's easier to work with? I really want to start doing races and bodies that are only for those races when nude. But without me being able to save that one last endif because OBSE editor thingy is being very stubborn, I can't get it done :(.

 

Let me know if anyone has any more suggestions ><

Posted

1.  better

    if  fQuestDelayTime!=0.01

        Set fQuestDelayTime to 0.01

    endif

===================================

Why do you need all this, just equip the body!

 

(by new YOUR Spell)

begin scripteffectstart

  if player.Getitemcount aaaupperbodyMilfRace1zzz==0

       player.additem aaaupperbodyMilfRace1zzz 1

       player.equipitemns aaaupperbodyMilfRace1zzz

 endif

..............................etc

Posted

? If you are nude your Player should equip a Body mesh ?

Why don't you use Set Body Mod ? and in game the Set Body Self spell ?

 

Replace a Body you don't need/like with your Body meshes ( rename the meshes accordingly.)

I don't use Set Body reloaded , I use a "original/traditional" Set Body Mod.

I use the meshe\characters\Bombshell\AGHGEC Folder ( Bodies I don't like ) . Inside the AGHGEC Folder are 4 Sub Folders (A to D ) , in each Folder are all 4 Body meshes ( Hand, foot, upper , lower )

In these 4 Folders are my Body meshes for my female Player characters, some unique Body meshes (not included in Set Body) and some "Default" Body meshes ( like HGEC H Cup and E Cup) but with added nipple piercings, labia piercings and Hand meshes with fingernails. So If I am naked I must not equip piercing and nails ( and they block no equipment Slots) . I want my piercings and nails during sex because if sex starts one has no access to the inventory. ( Before normal sex I could undress and equip pierings and nails but not before rape. And I can not tell the rapist "Please wait I must equip my piecings and paint my nails" ) . That's why I added piersings and nails to the Body Meshes.

 

Also in SetBody reloaded are some Folders /bodies with all 4 Body meshes you can use.

And with Blockhead you can add bodies to races, Player ( and factions ? ), but I don't know how to do it.

If you use your HSMilfRace1 only for your Player character  Set Body is the easiest  solution. But If you have many HSMilfRace1 NPCs you should use Blockhead ( find out how it works)

 

In my game all NPCs use HGEC E Cup and I have a E Cup armor-clothes replacer. All my Player characters use unique bodies ( Set Body Self) and don't wear vanilla clothes , only Mod clothes with  corresponding cup-size/Body. ( Only one of my characters use E Cup but with piercings and claws )

And the Set Body target Spell I use sometimes for companions or slaves which I can give appropriate clothing.

Posted

Thanks for both of your responses. I'll try that when I get home but it might not work but I will try. I know nothing at all about scripting atm so that's why I wanted to start by modifying someone else's.

 

Regarding set body, while I like hat, I want to make it as easy as possible for my users to just have un invasive race with its own unique body and that is standalone. Also, since I eventually want to venture into scripting, I wanted to start with this experiement since I've gotten so many requests to make my FCPA TS body into its own race. Taking the longer route to make it easier for my users and so I can learn something.

 

 

Also, it's for a release and so I don't want to make them have to choose my body or another one hana. If they like they install without any loss besides just 1 check on an esp :).

Posted

Thanks for both of your responses. I'll try that when I get home but it might not work but I will try. I know nothing at all about scripting atm so that's why I wanted to start by modifying someone else's.

 

Regarding set body, while I like hat, I want to make it as easy as possible for my users to just have un invasive race with its own unique body and that is standalone. Also, since I eventually want to venture into scripting, I wanted to start with this experiement since I've gotten so many requests to make my FCPA TS body into its own race. Taking the longer route to make it easier for my users and so I can learn something.

 

 

Also, it's for a release and so I don't want to make them have to choose my body or another one hana. If they like they install without any loss besides just 1 check on an esp :).

 

Greetings HS!

Have you considered using Blockhead? It could be "invasive" of corse... but not that much, considering it is widely adopted by players and modders (OCO2, Setbody...). The readme contains a few examples if you wish to use Blockhead in OBSE scripts.

It's a far better option than treating body meshes as clothing.

Posted

Hey there QTT.

 

I am not. As nice as it is, I really need to learn something here as well. That and making my own body for my own race makes it feel more complete and like a real job. TBH, I'm working on something extra special and I was hoping to release it today, but with the lack of working code, I'm afraid it might not come to fruition, unless I take the barbarian race ESP and just replace the files there, but that's such an not learning way of accomplishing this :I

Posted

1.  better

    if  fQuestDelayTime!=0.01

        Set fQuestDelayTime to 0.01

    endif

===================================

Why do you need all this, just equip the body!

 

(by new YOUR Spell)

begin scripteffectstart

  if player.Getitemcount aaaupperbodyMilfRace1zzz==0

       player.additem aaaupperbodyMilfRace1zzz 1

       player.equipitemns aaaupperbodyMilfRace1zzz

 endif

..............................etc

 

BTW I tried this and it still did not work :(. I am not sure how to get this script to work.

 

 

By any chance anyone knows of any other race mods that use scripted custom nude bodies? Maybe I'll try one of their scripts ><. I am dying here ><.

 

Posted

 

1.  better

    if  fQuestDelayTime!=0.01

        Set fQuestDelayTime to 0.01

    endif

===================================

Why do you need all this, just equip the body!

 

(by new YOUR Spell)

begin scripteffectstart

  if player.Getitemcount aaaupperbodyMilfRace1zzz==0

       player.additem aaaupperbodyMilfRace1zzz 1

       player.equipitemns aaaupperbodyMilfRace1zzz

 endif

..............................etc

 

BTW I tried this and it still did not work :(. I am not sure how to get this script to work.

 

 

By any chance anyone knows of any other race mods that use scripted custom nude bodies? Maybe I'll try one of their scripts ><. I am dying here ><.

 

 

 

Maybe you already have these body parts? Therefore it is not running.

 

 

1. Make a new quest (ex. aaaAddMeBody)

f808da281284875e23c813fdc81f867a.jpg

 

2. Make new script (quest)

283b598c8202ef1b6e9934ce80bf5a78.jpg

 

scn aaaAddMeBodyQQQ

begin gamemode

 

if player.Getitemcount aaaupperbodyMilfRace1zzz==0

 

player.additem aaaupperbodyMilfRace1zzz 1

 

player.equipitemns aaaupperbodyMilfRace1zzz

 

endif

; Add All parts of body same way or leave only UpperBody to test script

end

 

Attach this script to your quest, save .

d6944cd20dc2a06817e883cf31355b7d.jpg

Attach this .esp, Run Game through obse_loader.exe

 

=======================================

Be sure that your body parts have the correct slots.

4b20400f84a2500a1eb71c77901482b3.jpg

 

And in general,  are  you able to do skinning (in 3DsMax)? Maybe you have something messed up in the 3D editor? Exporting issue or somthing...

Posted

HS,

Are you wanting the body to equip only when clothing is removed and then when clothing is equipped, the body parts removed from player?
Basically- your body parts are worn in place of there being bare/nude body parts?

You might check out event handling OnActorUnequip filtered for just the player.

Posted

 

 

1.  better

    if  fQuestDelayTime!=0.01

        Set fQuestDelayTime to 0.01

    endif

===================================

Why do you need all this, just equip the body!

 

(by new YOUR Spell)

begin scripteffectstart

  if player.Getitemcount aaaupperbodyMilfRace1zzz==0

       player.additem aaaupperbodyMilfRace1zzz 1

       player.equipitemns aaaupperbodyMilfRace1zzz

 endif

..............................etc

 

BTW I tried this and it still did not work :(. I am not sure how to get this script to work.

 

 

By any chance anyone knows of any other race mods that use scripted custom nude bodies? Maybe I'll try one of their scripts ><. I am dying here ><.

 

 

 

Maybe you already have these body parts? Therefore it is not running.

 

 

1. Make a new quest (ex. aaaAddMeBody)

f808da281284875e23c813fdc81f867a.jpg

 

2. Make new script (quest)

283b598c8202ef1b6e9934ce80bf5a78.jpg

 

scn aaaAddMeBodyQQQ

begin gamemode

 

if player.Getitemcount aaaupperbodyMilfRace1zzz==0

 

player.additem aaaupperbodyMilfRace1zzz 1

 

player.equipitemns aaaupperbodyMilfRace1zzz

 

endif

; Add All parts of body same way or leave only UpperBody to test script

end

 

Attach this script to your quest, save .

d6944cd20dc2a06817e883cf31355b7d.jpg

Attach this .esp, Run Game through obse_loader.exe

 

=======================================

Be sure that your body parts have the correct slots.

4b20400f84a2500a1eb71c77901482b3.jpg

 

And in general,  are  you able to do skinning (in 3DsMax)? Maybe you have something messed up in the 3D editor? Exporting issue or somthing...

 

 

TDA, Thank you this was very useful and it is the first thing that worked. What I am trying to accomplish, is to make it work ONLY for my Milf Race and for every time the race is nude in a specific item slot. So this is a really god start. Really thank you so much, TDA for taking the time to explain and make even something that works.

 

 

HS,

Are you wanting the body to equip only when clothing is removed and then when clothing is equipped, the body parts removed from player?

Basically- your body parts are worn in place of there being bare/nude body parts?

 

You might check out event handling OnActorUnequip filtered for just the player.

 

Hey there, Mem40b4! that's my next goal, how would I make the script work to occur 1, for only any characters that are my custom race, 2 every single time the equipped slots are empty? It is essentially for when nude and each time. This again is because I want the experience to make it work and I'd like it to be more or less a standalone mod.

 

Thanks to TDA I have this so far as my script

 

 

 

 

scn aaaAddMeBodyQQQ

 

begin gamemode

 

if player.Getitemcount aaaupperbodyMilfRace1zzz==0

 

player.additem aaaupperbodyMilfRace1zzz 1

 

player.equipitemns aaaupperbodyMilfRace1zzz

 

    endif

    

if player.Getitemcount aaalowerbodyMilfRace1zzz==0

 

player.additem aaalowerbodyMilfRace1zzz 1

 

player.equipitemns aaalowerbodyMilfRace1zzz

 

    endif

 

        

if player.Getitemcount aaafootMilfRace1zzz==0

 

player.additem aaafootMilfRace1zzz 1

 

player.equipitemns aaafootMilfRace1zzz

 

    endif

 

    if player.Getitemcount aaahandMilfRace1zzz==0

 

player.additem aaahandMilfRace1zzz 1

 

player.equipitemns aaahandMilfRace1zzz

 

    endif

    

; Add All parts of body same way or leave only UpperBody to test script

end

 

 

 

 

I was also playing around a bit, but so far broke it trying lol.

 

Let me know if you have any ideas if you're OK to share :)

Posted

 

 

 

1.  better

    if  fQuestDelayTime!=0.01

        Set fQuestDelayTime to 0.01

    endif

===================================

Why do you need all this, just equip the body!

 

(by new YOUR Spell)

begin scripteffectstart

  if player.Getitemcount aaaupperbodyMilfRace1zzz==0

       player.additem aaaupperbodyMilfRace1zzz 1

       player.equipitemns aaaupperbodyMilfRace1zzz

 endif

..............................etc

 

BTW I tried this and it still did not work :(. I am not sure how to get this script to work.

 

 

By any chance anyone knows of any other race mods that use scripted custom nude bodies? Maybe I'll try one of their scripts ><. I am dying here ><.

 

 

 

Maybe you already have these body parts? Therefore it is not running.

 

 

1. Make a new quest (ex. aaaAddMeBody)

f808da281284875e23c813fdc81f867a.jpg

 

2. Make new script (quest)

283b598c8202ef1b6e9934ce80bf5a78.jpg

 

scn aaaAddMeBodyQQQ

begin gamemode

 

if player.Getitemcount aaaupperbodyMilfRace1zzz==0

 

player.additem aaaupperbodyMilfRace1zzz 1

 

player.equipitemns aaaupperbodyMilfRace1zzz

 

endif

; Add All parts of body same way or leave only UpperBody to test script

end

 

Attach this script to your quest, save .

d6944cd20dc2a06817e883cf31355b7d.jpg

Attach this .esp, Run Game through obse_loader.exe

 

=======================================

Be sure that your body parts have the correct slots.

4b20400f84a2500a1eb71c77901482b3.jpg

 

And in general,  are  you able to do skinning (in 3DsMax)? Maybe you have something messed up in the 3D editor? Exporting issue or somthing...

 

 

TDA, Thank you this was very useful and it is the first thing that worked. What I am trying to accomplish, is to make it work ONLY for my Milf Race and for every time the race is nude in a specific item slot. So this is a really god start. Really thank you so much, TDA for taking the time to explain and make even something that works.

 

 

HS,

Are you wanting the body to equip only when clothing is removed and then when clothing is equipped, the body parts removed from player?

Basically- your body parts are worn in place of there being bare/nude body parts?

 

You might check out event handling OnActorUnequip filtered for just the player.

 

Hey there, Mem40b4! that's my next goal, how would I make the script work to occur 1, for only any characters that are my custom race, 2 every single time the equipped slots are empty? It is essentially for when nude and each time. This again is because I want the experience to make it work and I'd like it to be more or less a standalone mod.

 

Thanks to TDA I have this so far as my script

 

 

 

 

scn aaaAddMeBodyQQQ

 

begin gamemode

 

if player.Getitemcount aaaupperbodyMilfRace1zzz==0

 

player.additem aaaupperbodyMilfRace1zzz 1

 

player.equipitemns aaaupperbodyMilfRace1zzz

 

    endif

    

if player.Getitemcount aaalowerbodyMilfRace1zzz==0

 

player.additem aaalowerbodyMilfRace1zzz 1

 

player.equipitemns aaalowerbodyMilfRace1zzz

 

    endif

 

        

if player.Getitemcount aaafootMilfRace1zzz==0

 

player.additem aaafootMilfRace1zzz 1

 

player.equipitemns aaafootMilfRace1zzz

 

    endif

 

    if player.Getitemcount aaahandMilfRace1zzz==0

 

player.additem aaahandMilfRace1zzz 1

 

player.equipitemns aaahandMilfRace1zzz

 

    endif

    

; Add All parts of body same way or leave only UpperBody to test script

end

 

 

 

 

I was also playing around a bit, but so far broke it trying lol.

 

Let me know if you have any ideas if you're OK to share :)

 

For each NPC with your race?

 

I would not advise to do it, it's too load the CPU and actors THEMSELFS may try to unequip or equip  body parts, which will lead the system to crash. It is risky for the stability of the game.

Posted

Ahh. I see, so I won't for now :). I can save that to when I start really getting into scripting. One common complain is that I put too many polygons on my meshes as is haha,

 

BTW: i figured out the race thing :).

 

 

 

scn aaaAddMeBodyQQQ

begin gamemode

    If (player.GetIsRace HSMilfRace1 == 1)

if player.Getitemcount aaaupperbodyMilfRace1zzz==0

player.additem aaaupperbodyMilfRace1zzz 1

player.equipitemns aaaupperbodyMilfRace1zzz

    endif
    
if player.Getitemcount aaalowerbodyMilfRace1zzz==0

player.additem aaalowerbodyMilfRace1zzz 1

player.equipitemns aaalowerbodyMilfRace1zzz

    endif

        
if player.Getitemcount aaafootMilfRace1zzz==0

player.additem aaafootMilfRace1zzz 1

player.equipitemns aaafootMilfRace1zzz

    endif

    if player.Getitemcount aaahandMilfRace1zzz==0

player.additem aaahandMilfRace1zzz 1

player.equipitemns aaahandMilfRace1zzz

        endif
    endif
    
; Add All parts of body same way or leave only UpperBody to test script
end

 

 

 

Now I just need to figure out how to tweak it so it only happens when ever each one of these slots are unquiped. IE: If no nude top, then the custom nude body replaces that only under the condition that the upper body slot is unequiped, etc.

 

But so far, having only my custom race do it, is great! If this works out, I will also take a crack at another script I've been wanting to edit for sometime now. But we'll see haha,

 

Back to trying to get it to work when unequiped slots now ><.

Posted

Guys, I wanted to thank you all so very much! I think I got it. The final script is as follows

 

 

 

scn 0HSMilfRace1

Float fQuestDelayTime

Short Done



Begin MenuMode



Set fQuestDelayTime to 0.01



If (Done != 1)        

    player.AdditemNS 0aaaupperbodyMilfRace1zzz 1

    player.AdditemNS 0aaalowerbodyMilfRace1zzz 1

    player.AdditemNS 0aaahandMilfRace1zzz 1

    player.AdditemNS 0aaafootMilfRace1zzz 1

    Set Done to 1    

EndIf




If (player.GetIsRace HSMilfRace1 == 1)



    If  (Player.GetEquippedObject 2 == 0  &&  Player.GetEquippedObject 18 == 0  &&  Player.GetEquippedObject 19 == 0  &&  Player.GetEquippedObject 20 == 0)

        Player.EquipitemNS 0aaaupperbodyMilfRace1zzz

    EndIf



    If  (Player.GetEquippedObject 18 == 0  &&  Player.GetEquippedObject 3 == 0  &&  Player.GetEquippedObject 19 == 0  &&  Player.GetEquippedObject 20 == 0)        

        Player.EquipitemNS 0aaalowerbodyMilfRace1zzz

    Endif



    If  (Player.GetEquippedObject 4 == 0  &&  Player.GetEquippedObject 20 == 0)        

        Player.EquipitemNS 0aaahandMilfRace1zzz

    EndIf



    If  (Player.GetEquippedObject 19 == 0  &&  Player.GetEquippedObject 20 == 0  &&  Player.GetEquippedObject 5 == 0)

        Player.EquipitemNS 0aaafootMilfRace1zzz

    endif


endif



End

 

 

 

Thank you, especially TDA for your patience!

 

Archived

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

  • Recently Browsing   0 members

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