Jump to content

Placing items with console commands and batch files


BirdMach

Recommended Posts

Hello everyone.

 

I've had this idea for a mod that would allow you to populate spots of the wasteland with items in your inventory quickly. It's a way to make the whole of the wasteland your home with cache rooms and just making things more homey as you travel about.

 

What the mod would do is take one piece of furniture, currently I'm experimenting with the shelving units around the back of the springvale school next to the coffee maker, and let you set up anchor points on that specific model. Then, whenever you encounter that model in the wasteland, you can quickly use those anchor points to populate the shelves with items.

 

Option A: What I have so far is just a .bat file that I can call that uses SetPos with the three coords for one spot on the racks. So I can open console command, select a nuka cola, type in bat PlaceItems.bat and it will send that nuka cola to the shelf. Technically works but I'd have to create hundreds of batch files to accommodate each anchor point for every single shelf in the game, and that wouldn't be easy to create or use on the fly.

 

Option B: If anyone knows of a way to pass parameters to the batch files from the console, I could try this method. By selecting the shelves and then sending that reference and somehow sending the reference to the item I want to place either using it's name and grabbing from inventory or some other way of sending a second reference to the batch file, perhaps I could set the next anchor point on that shelf and save the batch file with it.

 

The main problems I'm running into are:

1. Is it possible to pass parameters from console command to the batch files. I've tried and it gives me an error because it reads the batch file as a command and not something running in a prompt. Can you open a command prompt from a batch file and get the results?

2. I can't set variables in the batch file because console just pastes it into game console and it doesn't use variables to my knowledge.

 

Any help and suggestions with these two issues is greatly appreciated.

 

Thanks all.

Link to comment
Share on other sites

Wow o_O Sounds ambitious to say the least . The console can give returns with the right questions so to speak. But I don't see how you could have a pending IF statement based on one of those to issue a command . You the user would have to be the process link in that action.

 

When you say you are tying to make a mod of it ... do you mean just personal use ?

Because for an upload ... why wouldn't someone just use this mod for placing objects ?

https://www.nexusmods.com/fallout3/mods/11532

 

IDK really ... don't know much about Bat files , other than they exist .

Sounds like I would like to know more , so I could possibly use it to do stuff on the fly dynamically in game for a mod idea I'm slowly working on.

Which is to recreate an RTS gameplay of StarCraft re-imagined with this engine and assets.

 

One Idea that pops into my head for what could help you achieve your gameplay render vision.

Take these static shelve objects , and other such statics. Create some Activators with their models ... then use the "Search & Replace" feature .

Which then runs a script upon activation in game , that also uses batch files ?

IDK ... a bit out of my depth on how to use those though .

Hope something in there might have helped :huh:

Link to comment
Share on other sites

I've used Feng Shui before. It was ok but you're still having to move the items around using your character, and what I wanted to create would be more quick and easy. I can get the offsets of each of the items for each z coordinate. My end result would be you walk into something that could be considered a temporary player housing, like having a bed and some shelves and a fridge, and I just walk up to one of the shelves, pick an item from inventory, and it just fills one anchor, then moves to the next anchor for placing the next item.

 

I am seeing that I will have to go for making a mod with a UI, so the activator suggestion does point me in the right direction.

 

Thanks

Link to comment
Share on other sites

Well in my home mod and other collab mods ... we just place an invisible plane which is an activator , in front of what ever.

But of course doing that throught out the wasteland would be crazy ... hence I suggested the search and replace.

However ... maybe you could "PlaceAtMe" the invisible activator ? Use a special object equipped , that runs "GetCrosshairRef"

And executes with an "OnFire" block

 

~~~~~~~~~~~~~~

SCN MyFrickenScript

 

Ref rTarget

 

Begin OnFire

 

Set rTarget to GetCrosshairRef

rTarget.PlaceAtMe InvisTrig 0

 

End

~~~~~~~~~~~~~~

 

I doubt that would work ... just to show you what I mean

Link to comment
Share on other sites

  • Recently Browsing   0 members

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