Jump to content

Question about procedural scripting to position npcs and items randoml


rankoblitz

Recommended Posts

Hello, :smile:

 

 

I may be interested in creating several mods for Fallout 3, but before learning the programming langage and the skills to create mods, i want to know if it is possible to use scripts to position npcs and items randomly (but following certain rules) in the world of Fallout 3.

 

For example i want to be able to position new npcs in many interior cells, like in the metro tunnels or in the abandonned houses. Is it possible to do that ?

 

Is there a way (by script) to detect an empty space in a room, and to position a new furniture ?

 

Also from what i have read, Fallout 3 AI uses navmeshes so that npcs can avoid the furnitures and walls.

So if for example i create a script to position new furnitures in an interior cell, is there a way to recalculate the navmesh automatically, depending on the position of the furniture, his width, his depth ?

 

I am used to program simple video games from scratch so i have no idea if it is possible to do such things with fallout 3 scripting langage...

 

 

Thanks

Link to comment
Share on other sites

Placing NPCs in cells is basically possible. It is not possible to recognize "empty spaces" and put the NPC exactly to that position, but you could add the NPC to a marker in the cell and give the NPC a wander package which would make him wander around in the cell.

 

Readjusting the Navmesh via scripts is not possible from what I know. Placing new furniture ingame is very complicated, but possible. Check out the RealTimeSettlers mod. They use a system of placing objects ingame via scripting. But they have problems with the Navmesh, too.

 

You might just want to start slow. The things you mention are difficult to achieve even for the most experienced modders.

Start off slow and work through the plenty of modding tutorials and scripting guidelines. It won't take you that much time to get used to the GECK and get a feeling for what is possible and what not.

Link to comment
Share on other sites

Placing NPCs in cells is basically possible. It is not possible to recognize "empty spaces" and put the NPC exactly to that position, but you could add the NPC to a marker in the cell

 

Readjusting the Navmesh via scripts is not possible from what I know. Placing new furniture ingame is very complicated, but possible. Check out the RealTimeSettlers mod. They use a system of placing objects ingame via scripting. But they have problems with the Navmesh, too.

 

I see...

 

So the easiest way to place a new furniture or a new npc is to create a spawn point manually ? It can take a lot of time to do that for each abandonned house and metro tunnel...

 

But if it is not possible to recalculate the navmesh automatically then i guess it is the best solution...

 

If you have another idea please let me know.

 

Thanks,

Link to comment
Share on other sites

Yep, for the NPC's that'll do the trick. Put a xmarker to the middle of each cell that you want to place NPCs in and use .placeatme for spawning NPCs. You should then give the NPCs a script that uses .markfordelete after their death... otherwise your savegames may get very big in size.

 

A different option would be to create new LeveledCreatures and place them directly into the cells. But that's a different topic and from what I understood it's not quite what you want to do.

If some other solution comes to my mind, I'll tell you!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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