id Tech Forums

id Tech 4 (Doom3/Prey/Q4) => id Tech 4 Level Editing => Topic started by: spamclark15 on June 14, 2017, 03:13:41 PM

Title: Adding entities in-game and then saving?
Post by: spamclark15 on June 14, 2017, 03:13:41 PM
Is it possible to spawn entities into a map in-game and then save the map like this? Let's say I spawn in weapon_machinegun. Could I then save the changes to the map?
Title: Re: Adding entities in-game and then saving?
Post by: The Happy Friar on June 14, 2017, 09:27:49 PM
Kind of.  Lights, sounds, & particles can all be saved via their respective editors.  You can modify ragdolls & there's a console save command for them (type "save" then hit tab to view them).

I tried spawning a monster in a test box, enabling g_dragentity 1 & clicked it, then typed "saveselected".  I then reloaded the map & the monster was there.  Turns out I used a Cherub and it's origin was under the floor so it wasn't in the room.  An issue arrouse when I killed all the monsters in the room ("killmonsters" in the console), spawned another cherub in & then saveselected that guy.  Reloading the map caused a "duplicated entities" error because it reused the name of the first cherub I removed via "killmonsters." 

So, yes, you can.  Just be careful.
Title: Re: Adding entities in-game and then saving?
Post by: spamclark15 on June 15, 2017, 05:31:55 AM
It doesn't seem to work for me. I spawned weapon_flashlight and then with dragentity enabled selected it and did a saveselected but it's not saving it. Do I need to click and hold so that the arrow shows up while saving? I bound p to saveselected so I could use it while holding fire and o toggles g_dragentity on and off and I made sure the map is not read-only.

Basically I just want to add the machinegun, hand grenades, machinegun ammo clips, and the flashlight to the start of hell1 with the other stuff in the cache you pick up after first spawning and then placing large machinegun ammo clips and additional grenades in some of the caches of supplies later in the map, basically doing what BFG Edition added to the map so you can get all weapons in the map and have the flashlight to see. Working with entities in the editor is proving to be more challenging than I expected.

EDIT: Ended up just going through with entity names enabled and went through and manually changed some.