ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Hidding items in mutants corpses

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  13:04:59  6 February 2019
profilee-mailreply Message URLTo the Top
insanelazarez
Yeah, Good Luck With That...
(Resident)

 

 
On forum: 01/31/2009
Messages: 1071
Hidding items in mutants corpses

Can't believe i am asking this, but what do i need to change to be able to hide some items on a mutant corpse?

Thanks in advance.
  01:07:27  10 February 2019
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4263

---QUOTATION---
what do i need to change to be able to hide some items on a mutant corpse?
---END QUOTATION---


Assuming that by "hide" you mean "store", insanelazarez, you would need to change the engine code.

There may be ways to work around the limitations of what can be on a mutant by trickery, but those would need you to change yourself: improve your knowledge of scripting and modding. Examples: make an NPC with a mutant model, or create new mutant parts to represent what it is you want to store, then use a table to convert the mutant part (which can look like the item you want to store) back into the actual item when you retrieve it from the mutant.

There's probably a limitation of one item per mutant, but that item can represent several other items. Maybe there's a way to make a storage container into a mutant part using multiple inheritance (look it up; object definitions in the game are identified with square brackets but you can follow that object declaration with a colon, then the object classes whose attributes you want to inherit, separated by commas).

But that's a lot of work for something with a low chance of success, as the engine may not support it.

Let me let you in on a little secret: Those storage items you see are not the items that you "use". Essentially, the chests and pipes and backpacks on the ground are visual wrappers on the same basic item used to store the items. You could just drop such an item when the mutant dies and then put stuff in it, just the way the discovery of a secret puts items in a stash. Remove the normal usability of the mutant to keep that from masking the storage item, and think about what you want to do when the mutant is removed from the game.

If you want help, there are quite a few mods out there that allow the player to drop a backpack with items. Study them for ideas.
  01:53:37  10 February 2019
profilee-mailreply Message URLTo the Top
insanelazarez
Yeah, Good Luck With That...
(Resident)

 

 
On forum: 01/31/2009
Messages: 1071


Hey Natvac

I recall playing the game with other mods and i know i could "store" some stuff multiple times. But it's not important. About what you said about the "visual wrappers", i know that one time i created a new "secret" in cordon close to the petruha dude, in the old van. I gave the info portion for the secret to be unlocked in map and my test was perfect. Except the stash was invisible... literally. But the content was there (a mp5 and some ammo).

See, the deployable backpack (from freeplay mod maybe?) is a great idea.

Or maybe those breakable boxes like the one in tolik spot (its a silent pistol pb i think). But that has several issues...I don't need a breakable box because ... it breaks (duh), and if it breaks, well... it's kinda broken, LOLOLOL.

 However spawning those specific boxes by script i already know how to do it, but filling those boxes with a loot table... that would be uggly.

Well, Natvac thanks for the help again.

Cya.

(Y)


  09:13:25  1 March 2019
profilee-mailreply Message URLTo the Top
NatVac
Senior Resident
 

 
On forum: 06/15/2007
Messages: 4263
I'm not talking about multiple items, but multiple inheritance. It's an object-oriented programming concept. Here are a couple of examples:

[explosive_barrel]:identity_immunities,delayed_action_fuse

[kurtka_mask_damage]:body_kurtka_damage,head_mask_damage

The first one shows that an exploding barrel needs to have vulnerabilities to various damage types, as well as have a delay when damaged so that it takes a moment to explode. The second one shows that the kurtka_mask_damage class inherits attributes from body_kurtka_damage and head_mask_damage.

>> filling those boxes with a loot table... that would be uggly.

No, it's actually relatively easy. You just need the ID of the container as the last parameter for the alife():create() function for each item. See the function spawn_item_in_level_box() in ZRP's _custom_ext.script. It uses the name of the inventory box (and the level) to find the ID and other parameters used by the alife():create() function.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2019 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.