Creating new stashes - is it possible? -1 reply

Please wait...

MattyDienhoff

Addicted to GF

50 XP

30th June 2006

0 Uploads

252 Posts

0 Threads

#1 9 years ago

I ask because that locked, ladder-accessible room by the road that leads up to the Brain Scorcher complex in Red Forest would make a perfect hideout/base of operations if only it had a chest to store stuff in, because it already has the other two prerequisites, NPCs can't find their way in, and it shelters from blowouts. (For those who don't know, the code to the door is 1287975).




O.M.O.N.

Full Metal Jacket

50 XP

23rd August 2008

0 Uploads

103 Posts

0 Threads

#2 9 years ago

Hmm... I'm intereste in making some levels, altough i am not sure is it possible.... I will check it out right now.




Abandonator

Darth Taxi

50 XP

15th April 2008

0 Uploads

9,500 Posts

0 Threads

#3 9 years ago

it's possible, but it requires editing all.spawn




Supernatur4L

Resident Stalker

50 XP

23rd July 2008

0 Uploads

615 Posts

0 Threads

#4 9 years ago
abandonator;4531269it's possible, but it requires editing all.spawn

Which requires a new game for the changes to work :)




MattyDienhoff

Addicted to GF

50 XP

30th June 2006

0 Uploads

252 Posts

0 Threads

#5 9 years ago
abandonator;4531269it's possible, but it requires editing all.spawn

And how would I go about doing that? :uhm: Nevermind, I looked it up on the mod wiki.




Atrocious

Oblivion Lost supplier

50 XP

25th March 2008

0 Uploads

1,448 Posts

0 Threads

#6 9 years ago
MattyDienhoff;4532424 Nevermind, I looked it up on the mod wiki.

Finally someone does it.

I looked into all.spawn and found this: [4260] ; cse_abstract properties section_name = inventory_box name = level_prefix_inventory_box_0000 position = 225.79035949707,-4.3380184173584,132.850723266602 direction = 4.26457427238347e-006,-0.239400088787079,8.27698386274278e-006

; cse_alife_object properties game_vertex_id = 1168 distance = 0 level_vertex_id = 76465 object_flags = 0xffffff3f story_id = 2020

; cse_visual properties visual_name = physics\equipment_cache\equipment_box_02_case I think it is one of the blue boxes but I'm not sure. I see no special setting that says make-me-usable, so I thought it might be possible to spawn such a box by script as well (which would make it compatible to a running game). But I don't know if it will be automatically usable and if the box will stay and if the items in it will stay. But I'm relatively sure it all will.

To spawn by script you would have to create a new section in some ltx file - let's say [spawnable_inventory_box] (because [inventory_box] is already used) and define the visual appearance of the object. - Then you search some coordinates and run the script on_game_load or something.

Related articles: Spawning through script - Mod Wiki Creating unique NPCs - Mod Wiki (the top for ltx config example) Code execution by button - Mod Wiki

PS: It might also help to see how AMK did it with the rucksack, which can be dropped from the inventory and is basically the same thing, with another appearance.




O.M.O.N.

Full Metal Jacket

50 XP

23rd August 2008

0 Uploads

103 Posts

0 Threads

#7 9 years ago

There is a script file for every level, it should handle a spawn script. However, this would require you to unpack the level "gamedata.db9" and edit the script file. That should make it much easier... or, of course, you can figure how the the AMK mod did it.




MattyDienhoff

Addicted to GF

50 XP

30th June 2006

0 Uploads

252 Posts

0 Threads

#8 9 years ago

Thanks for the helpful responses guys, (and especially you, Atrocious) but I think this is way over my head. I can edit existing code to a small extent, but I'm completely lost beyond that. :(