Jump to content

Upperbody/Lowerbody Companion


liyalai

Recommended Posts

There shouldn't be any conflict between the scripts... Did you search for "Set Body" as LFact suggested? It does exactly as Drake described, except they usually use the naked versions of the various body types. You would just need to delete the meshes that come with the mod and replace them with your own meshes.

 

Otherwise, to do it yourself, I would try something like this:

 

scn AANRealBodyBeginQuestScript

Begin GameMode

Player.AddItem ANRealF 1
Player.AddItem ANRealH 1
Player.AddItem ANRealL 1
Player.AddItem ANRealU 1
Player.AddItem ANRealToken 1

;	All the above should be checked as non-playable items

StopQuest AANRealBodyBeginQuest

End

 

And the script you put on the token would be what Drake gave you:

 

scn ANRealTokenScript

ref actor

Begin GameMode

let actor := GetContainer

if (actor == 0) || (actor.IsActor == 0)
	Return
endif

if (actor.GetEquipmentSlotMask 4 == 0)
	actor.EquipItemSilent ANRealU
endif

if (actor.GetEquipmentSlotMask 8 == 0)
	actor.EquipItemSilent ANRealL
endif

if (actor.GetEquipmentSlotMask 16 == 0)
	actor.EquipItemSilent ANRealH
endif

if (actor.GetEquipmentSlotMask 32 == 0)
	actor.EquipItemSilent ANRealF
endif

End

Link to comment
Share on other sites

As your script only contains regular ObScript functions but my script requires OBSE for the slot checks and the getContainer, did you start the CS through "obse_loader.exe -editor" to have it recognize OBSE functions?

And how did you get the tokens into actors' inventories so you could tell they weren't working?

 

edit: Of course, feel free to have a look at my scripts. The whole approach is meant to be a scripting resource later on (it's not really finished, yet), so saying "no" now would defeat the purpose.

But whether you check out my Scripted Argonian Feet or my Anthro-Dragons, the scripts you'll find will do far more than only that. It could be a little hard to find the respective lines which only equip bodyparts when nothing's worn in a slot. I lately added a parameter to my SAF v0.6b allowing you to make it do only that, but that's like disabling about 90% of SAF's functionality, so the scripts could be a little overwhelming at first.

Edited by DrakeTheDragon
Link to comment
Share on other sites

Hi Drake, Fg109,

well at the time I had no idea what a token was so suffice to say it wasn't added as an item.

I've added it now and when I run this script,

 

scn AANRealBodyBeginScript

Begin GameMode

       Player.AddItem ANRealF 1
       Player.AddItem ANRealH 1
       Player.AddItem ANRealL 1
       Player.AddItem ANRealU 1
       Player.AddItem ANRealToken 1
       
;       All the above should be checked as non-playable items

       StopQuest AANRealBodyBegin

End

 

I get this error when I try to save:

Script "AANRealBodyBeginScript", line 13

Invalid info "AANRealBodyBegin" for parameter Quest

 

And it refuses to save. I removed the last line i.e "stopQuest AANRealBodyBegin" and the items just kept on adding and equipping non stop.

I'm running the construction set using Wyre Bash. What changes do I make to the script?

 

Thank you for your time.

Edited by NikhilR
Link to comment
Share on other sites

Well, this particular script was not meant to be an object script on a token but a quest script attached to a quest of this name and with the option "start game enabled" ticked so it starts right away. For it then to only run once there's this StopQuest at the end.

This script is not meant to be used in conjunction with mine, so don't mix them up.

 

If you're using this set of scripts from fg, the first one is a quest script meant to simply add the equippable bodypart items and the token to your inventory once (it only does this to the player also).

The second is the actual token script handling the equipping whenever the respective slot is empty.

 

For this to also work for NPCs you'll need to find a way to add the tokens to other actors' inventories as well.

Edited by DrakeTheDragon
Link to comment
Share on other sites

Oh yeah, I forgot that the body parts are supposed to be for the companions, not for the player... Well you can just take that quest script and easily turn it into a magic effect script for a spell.

 

;...

Begin ScriptEffectStart

set self to GetSelf
self.AddItem ANRealF 1
;	and all the other body parts
self.AddItem ANRealToken 1

End

Link to comment
Share on other sites

...So in this script,

 

scn AANRealBodyBeginScript

Begin GameMode

       Player.AddItem ANRealF 1
       Player.AddItem ANRealH 1
       Player.AddItem ANRealL 1
       Player.AddItem ANRealU 1
       Player.AddItem ANRealToken 1
       
;       All the above should be checked as non-playable items

       StopQuest AANRealBodyBegin

End

 

why do I get this error when I try to save?

 

"Script "AANRealBodyBeginScript", line 13

Invalid info "AANRealBodyBegin" for parameter Quest"?

 

And I want the bodyparts to be for the companion and the player.

Edited by NikhilR
Link to comment
Share on other sites

The line "StopQuest AANRealBodyBegin" tells the game to stop (or disable or shut down or whatever you want to call it) the quest with the editor ID AANRealBodyBegin. If there isn't a quest with that editor ID, then that would be the error that the CS spits out.

 

Also, if you want to give the parts/token to a companion, you're better off using a spell to do it.

Link to comment
Share on other sites

I managed to get the ANRealBodybegin Script working, but the ANtokenscript isn't responding.

What happens in game is the items (all unplayable are added) and that's it. If I equip an item of clothing, and then unequip it, the corresponding item from the token script isn't equipped.

 

I did however modify the ANRealBodybegin Script to equip all the items (player.equipitem) at the start of the game

(the script you've provided only adds the items)

and the result was that the items were equipped as expected but no other item could be equipped at all.

 

Info about the token object.

its a dummy object added under clothing, unplayable and using the head slot,

(no mesh, no icon, no world object)

In the use info menu its shows that its using the ANRealBodyBegin script.

 

(hence I've no idea if the ANRealToken Script is even being used.)

 

Also the ANRealBodyBegin Script is a quest script

And the ANRealTokenScript is an object script.

Edited by NikhilR
Link to comment
Share on other sites

I can't see anything wrong with the script I gave you... The only thing I can think of is that either you forgot to assign the script to the token, or else you're equipping/unequipping in the inventory menu without getting out of menu mode at all when you check if it works.

 

As for your modification of the script, I don't know for sure what went wrong since you did not post it. But I suspect it's because you added a "1" after the EquipItem commands (eg "player.EquipItem ANRealF 1").

Link to comment
Share on other sites

  • Recently Browsing   0 members

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