[REQ] Spawn Item Into Inventory - Unlimited

Discussions and Support on S.T.A.L.K.E.R. Mods

[REQ] Spawn Item Into Inventory - Unlimited

Postby shift3r on 25 Oct 2009 21:05

i would like to add a 'permanent' item, a GPS transmitter, to my inventory in CoP.

the reason is for dropping one at the location of each stash in the game. using AMK's beacon would be a start and the snippet below would make it permanent. how to make it work in CoP?

-----

the following function is in the file: bind_stalker.script (in the gamedata\scripts directory)

i can't recall where i got this from. i have searched both CS and ShOC forums and not found any references to it function. i used this in ShOC and haven't had it work in CS yet. (i did test with the original script from CS as a base) May 2009.

function actor_binder:update(delta)
object_binder.update(self, delta)

add the following code (but not at the beginning of the function)

if not db.actor:object("item name here") then
alife():create("item name here", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id())
end

-----

this would also be a good for cheating a particular ammo or meds without resorting to God mode.
User avatar
shift3r
New Member
 
Posts: 25
Joined: 24 May 2009 20:45

Re: [REQ] Spawn Item Into Inventory - Unlimited

Postby shift3r on 03 Nov 2009 15:34

this has been solved, so it works in CoP (perhaps CS). thanks to Decane.

sample for keeping a box of PAB9 in the inventory is here:

http://code.google.com/p/s3r/downloads/list

(the link is a place where i planned to collect really mini mini mods or tweaks)
User avatar
shift3r
New Member
 
Posts: 25
Joined: 24 May 2009 20:45

Re: [REQ] Spawn Item Into Inventory - Unlimited

Postby VINTAR on 04 Nov 2009 11:35

On a similar vein to your little mods youve collected.

If you want to add one of all the weapons, suits and addons in one go, just add this line to a script :

weap.main()
Core2Quad Q8300 2.5 @ 3.6ghz
Cooler Master Hyper TX 2 CPU cooler
Gigabyte EP45 UD3R mobo
Nvidia GTS450
2 GIGS Transcend DDR2 800 pc6400 @ 960
Thermaltake Tough Power 650w PSU
Samsung Syncmaster P2350
-----------------------------------
Apartheid veteran
User avatar
VINTAR
Senior Resident
 
Posts: 441
Joined: 18 Sep 2008 15:07
Location: Durban, South Africa

Re: [REQ] Spawn Item Into Inventory - Unlimited

Postby shift3r on 25 Nov 2009 13:20

that is interesting indeed. so will that add everything that is in the current gamedatas weapon section?

the so called 'collection' is at a bit of a standstill. at first i was just putting up things that i wanted, like a way to start with one of everything and how to have a single box of ammo that was replaced once it was used. then i wanted to add things that people wanted when i saw their comment in a thread, easy stuff, like having more RPG's for sale.

let me know if you have any stuff to add that doesn't constitute a proper mod. the good thing about that site is that the file can be replaced without having to maintain a revisions. let me know if we can do better with what is there too and it can be replaced.
User avatar
shift3r
New Member
 
Posts: 25
Joined: 24 May 2009 20:45

Re: [REQ] Spawn Item Into Inventory - Unlimited

Postby VINTAR on 26 Nov 2009 09:48

Edit gamedata\scripts\weap.script() and you will see what it adds. I think it is one of all the vanilla sections, and you could always add to it :-)
Core2Quad Q8300 2.5 @ 3.6ghz
Cooler Master Hyper TX 2 CPU cooler
Gigabyte EP45 UD3R mobo
Nvidia GTS450
2 GIGS Transcend DDR2 800 pc6400 @ 960
Thermaltake Tough Power 650w PSU
Samsung Syncmaster P2350
-----------------------------------
Apartheid veteran
User avatar
VINTAR
Senior Resident
 
Posts: 441
Joined: 18 Sep 2008 15:07
Location: Durban, South Africa


Return to Mods & Discussions

Who is online

Users browsing this forum: No registered users and 27 guests