Jump to content

Mad Science - Lobotomite Minions


Ruadhan2300

Recommended Posts

Basically, for expanding my Mad Science mod, I'm planning to add the ability to surgically alter and resurrect the corpses of your enemies as Lobotomite Minions for my Evil Plans :P

Theory is sound, but for some reason in practice its not working

 

My method is to have a perk similar to the Cannibal perk which allows players to interact with the corpse and runs a script when active.

the script currently looks like this:

ref Tempref

if GetIsSex Male
set Tempref to placeatme aaLoboRank1M
else
set Tempref to placeatme aaLoboRank1F
endif
removeallitems Tempref
disable
markfordelete

 

for some reason its not working properly.

When activated, the corpse spawns a lobotomite of the correct sex, but the lobotomite doesn't get the corpses' inventory and the corpse doesn't get deleted.

I really don't know why.

 

I should add that Perk Scripts clearly work differently from normal ones, they apparently run for a single cycle before stopping. but that shouldn't affect this script.

 

As an alternate plan, I might make the script add a spell to the corpse which performs the same task via a more conventional script. but it'd be a bit of a workaround and raises a few issues of its own.

 

Ideally, I'd like for someone to tell me what stupid mistake I'm making...

 

Thanks in advance

Ruadhan

 

UPDATE:

I figured out the specific section that was going wrong.

Basically the removeallitems part doesn't work with my Temprefs. it needs a permanent reference to move the stuff to and its not getting it because the tempref is just an internal name.

What I need is a way to transfer the entire inventory of the character to another character, without using the actual ref_id of the other char.

Alternately, I could make it auto-transfer to the player, or a container that the player can access by talking to the resultant lobotomite and tell the minion what to equip...that'd work well except that then the player has access to an enormously large storage area completely disassociated with the game world...bleh.

I'm inclined to make it transfer to the player...so then you have to give it all back to the minion. its a workaround for now, but if someone has a more elegant solution, I'd appreciate it.

Link to comment
Share on other sites

If you are still looking for a more elegant solution, it might be worth looking at how the Robotic Expert perk works. In functionality it seems more like what you are trying to do, plus you should be able to use GetSelf in the script body to get a reference for the other char to do your inventory transfer.
Link to comment
Share on other sites

on the Geck Wiki it says this:

GetSelf will return 0 if called on a reference that has been created dynamically 
(for example, created via PlaceAtMe, or dropped from an inventory into the game world). 

 

I'm not exactly sure what you mean by Robotics Expert...I'm already using the whole sneak up and activate method same as Robotics expert, same as Cannibal too.

what I'm having trouble with now is the AI packages, but I can make use of being able to get a Ref_ID for dynamic spawned entity in the inventory management too...

 

my problem is I need to have something for handling dynamic IDs.

Link to comment
Share on other sites

Sorry, I failed today's lesson on reading comprehension. As penance, I took some time and looked at your problem. A lot of lobotomites died during testing. The initial problem is that the perk script block does not seem to like local variables, in this case Tempref. As you said the placeme runs, but the code involving Tempref gums up the works and that is why disable and markfordelete don't run. I did find a roundabout method of handling dynamic IDs using a combination of a container, a quest script and an OnLoad script attached to the new creature being placed. It transferred the inventory but it was not immediate and the results did not feel right. Still, I attach my labwork for your perusal. The added objects with prefix Test are the relevant items.

 

http://www.mediafire.com/?8b73olte5ycllvy

Link to comment
Share on other sites

hm, well, as is, I've got the lobotomites spawning with patient gowns and nothing else, so you auto-loot the victim and then decide to give them back their gear...works well enough for my taste and fits...

my real problem remains that I need a way to do what GetSelf does, but for placeatme type entities....ones without permanent references...

I might be able to do something with a function which recalls which entity I interacted with to get the dialog....possibly, I remember seeing something like that in my browsing, but can't quite recall what function...

Link to comment
Share on other sites

I don't use FOSE so I can't say. The test plugin I attached above deals with the GetSelf issue. A quest exists which has a script with a reference variable defined. The new lobotomite that is placed has a script attached to it with an OnLoad block. During the OnLoad block it uses GetSelf and sets that to the quest script's reference variable. That does work and give a way to access a dynamically create object's reference ID. It is not elegant though.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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