Jump to content

Hospital Pillows Expanded


Abramul

Recommended Posts

I decided that quoting all the relevant posts was excessively long

Original (hijacked) thread:

http://forum.gamingsource.net/index.php?sh...c=28014&hl=

Perhaps you could give the NPCs "pillow seeds" instead of full-grown pillows?

And how would I go about doing that? It will have to be a scripted item, which was the reason the game crashed in the first place. It won't make a difference I think.

 

Again, new thread?

 

What I meant was to have the NPC sell you unscripted items, which, upon use of the wand, would turn into normal pillows.

Link to comment
Share on other sites

It would solve the stacking problem when buying stuff... Activate an item, it checks whether you have seeds in your inventory, and it replaces the seed with a pillow. So you can walk around with a lot of seeds which don't weigh much and stack, and can turn them into pillows whenever you want. (This script is made using my Oblivion scripting knowledge, and I think these things are the same as with Morrowind.)

 

scriptname PillowGrowerObject

begin onequip

if player.getitemcount pillowseed >= 1
player.removeitem pillowseed 1
player.additem hospitalpillow 1
endif
end

Link to comment
Share on other sites

It would solve the stacking problem when buying stuff... Activate an item, it checks whether you have seeds in your inventory, and it replaces the seed with a pillow. So you can walk around with a lot of seeds which don't weigh much and stack, and can turn them into pillows whenever you want. (This script is made using my Oblivion scripting knowledge, and I think these things are the same as with Morrowind.)

 

scriptname PillowGrowerObject

begin onequip

if player.getitemcount pillowseed >= 1
player.removeitem pillowseed 1
player.additem hospitalpillow 1
endif
end

Actually, I'd use

scriptname PillowGrowerObject
short NumSeeds
begin onequip

if player.getitemcount pillowseed >= 1
 set NumSeeds to player.getitemcount pillowseed
 player.removeitem pillowseed NumSeeds 
 player.additem hospitalpillow NumSeeds
endif
end

Or, instead, have a "How many seeds do you want to use?" message, with 1, 5, 10, 25 as the options.

Link to comment
Share on other sites

I also thought about the 'how many seeds do you want to use' thing but I thought 1 at a time would be safer. You can always try to see if that or your script above works. I think that if you are carrying 100 seeds and all of them are switched for pillows Morrowind crashes though. Or maybe it doesn't, we'll have to try it and see. I'll try this tomorrow if you don't mind.

 

Edit: Alright I've tried some things. But the CS crashes all the time. Every time I save the script.

 begin pillowgrowerscript
short NumSeeds
short onpcequip
short pcskipequip

set pcskipequip to 1

if ( onpcequip )
if player.getitemcount pillowseed >= 1
 set NumSeeds to player.getitemcount pillowseed
 player.removeitem pillowseed NumSeeds 
 player.additem pillow_hospital NumSeeds
endif
endif
end

All the ID's I used here are correct.

Alright, after MANY crashes I found out what line is causing the crash: set NumSeeds to player.getitemcount pillowseed. Removing that line still crashes it, so I guess that the CS can't handle 'NumSeeds' as a number, even when it's told what it should be. Now what? :wacko:

Link to comment
Share on other sites

Just realized that Morrowind expects

ActorID->function

rather than Oblivion's

ActorID.function

 

All the below pillows are as-dropped-from-inventory.

 

 

I should have included something for scale...the pillow on the left is half normal size.

 

 

Scale 10x.

 

 

Scale 100x. I think I smothered Seyda Neen...

 

 

The two on the left were simply dropped from different angles.

 

 

 

What remains:

I need to test whether these revert to a different scale. Under what circumstances do console-scaled items revert?

I need to figure out how to add collision.

A) How does the game decide what should have collision, and what shouldn't?

B) What was the book that can be used to bridge lava?

Link to comment
Share on other sites

Just realized that Morrowind expects

ActorID->function

rather than Oblivion's

ActorID.function

Argh!

I need to figure out how to add collision.

Can't you just use the Hospital Pillows mod as a base? Those were given collision... Sort of.

Link to comment
Share on other sites

The cost, however, is that every single pillow has to have a script running. Granted, it can be set up to stop once it has checked whether it should run, but that still requires a check every frame.

 

I would prefer to:

A) Add collision to the mesh, or

B) Set a script up so that if the player has object 'x' equipped, any pillow activated turns to a pillow-meshed activator, and said activators turn back to a pillow.

 

Personally, I think A would be easiest. If there's a command that returns the position of an activated object, B would do quite nicely, though.

 

If I just knew how to use the CollisionData field, this would be a lot easier.

Link to comment
Share on other sites

The cost, however, is that every single pillow has to have a script running. Granted, it can be set up to stop once it has checked whether it should run, but that still requires a check every frame.

It's sort of ass-backwards to worry about six floating-point compares when they're against the backdrop of the absolute monstrosity that is the NetImmerse engine.

Link to comment
Share on other sites

The cost, however, is that every single pillow has to have a script running. Granted, it can be set up to stop once it has checked whether it should run, but that still requires a check every frame.

It's sort of ass-backwards to worry about six floating-point compares when they're against the backdrop of the absolute monstrosity that is the NetImmerse engine.

Eh, you have a point. I suppose I just have old-fashioned sensibilities...

 

All the more reason for things such as this.

 

EDIT: Stupidly, I forgot the main part of my post. Do you want me to duplicate the script and activator for each new object, upload the meshes and let you integrate them, or simply describe in full the procedure I used?

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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