ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
How can we create/spawn a radioactive field by script?

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  15:03:52  16 May 2014
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
Messages: 319
How can we create/spawn a radioactive field by script?

Hi guys,

I wonder if it's possible to spawn a radiocactive field (area) by script.

I already managed to spawn anomalies and make them deal damage to the player and NPCs, so I tried the same method with the radiation by using the section defined in "zone_radioactive.ltx", but no joy

Did someone manage to do this, or at least put me on the right track?

Thanks
  17:55:14  19 May 2014
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
Messages: 319
Little bump on this

I got nowhere with dexxx blowout mod.

Surely there must be a way to do this via script
  20:22:09  19 May 2014
profilee-mailreply Message URLTo the Top
xRatx
Senior Resident
 

 
On forum: 06/18/2008
 

Message edited by:
xRatx
05/19/2014 20:22:37
Messages: 1592
In Dexxx Blowout, the method used to "create a radiactive field" while outside of a shelter isn't a real anomaly but a scripted function to add or damage actor with a specific hit type (Radiation, Shock Damage, Burn Damage, etc, etc)

They use this (ogsm_surge.script) :

function hit_actor()

local psy_hit = hit()
psy_hit.direction = vector():set(0,0,0)
psy_hit.impulse = 0
psy_hit.draftsman = db.actor

if level.name() == "l01_escape" then
	psy_hit.power = 0.0005 -- How "strong" it is
	psy_hit.type = hit.radiation -- Radiation
	db.actor:hit(psy_hit) -- hit actor with psy_hit (see psy_hit.type above, in this case it is radiation)
end

...

end

  23:01:26  19 May 2014
profilee-mailreply Message URLTo the Top
exostalker
Novice fashion designer since 2008
(Resident)

 

 
On forum: 08/10/2009
Messages: 1267
You could use that, of course that isn't a real "anomaly", but rather some workaround for it, you could create space restrictors and call function once the restrictor is entered.
  00:13:53  20 May 2014
profilee-mailreply Message URLTo the Top
bamah
Senior Resident
 

 
On forum: 02/10/2008
Messages: 911
SacriPan,
Have you looked at Xiani's zone_mgr.script in FPS 1.21?
Link if don't have
http://www.mediafire.com/download/bvdzcj1eknj57gc/FreeplayStart_v1_21.7z
  15:37:38  20 May 2014
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
 

Message edited by:
SacriPan
05/20/2014 15:54:19
Messages: 319

---QUOTATION---
SacriPan,
Have you looked at Xiani's zone_mgr.script in FPS 1.21?
Link if don't have
http://www.mediafire.com/download/bvdzcj1eknj57gc/FreeplayStart_v1_21.7z
---END QUOTATION---



I will, thanks.

In the meantime, I managed to do what I wanted.

I heavily modified an existing anomaly (buzz) and now I have at my disposal a custom radiocative zone that can be spawned just like a normal anomaly

I did have to create multiple sections (9) for the "anomaly" so it can have different radiuses (small, medium, big) and damages (weak, average, stong).
I added the sections to the NPCs/mutants config files so that they don't enter the anomaly. I still have to test that part. The rest works fine.

The only downsides compared to a classic radioactive field is that the Geiger counter sound is emmited from the anomaly itself, and not from the detector. But as I play with no "post processing radiation screen effect", it's actually quite helpful to be able to determine where the center of the anomaly is
Also, if a npc or mutant enters the anomaly (they shouldn't be able to) and triggers it when in the meantime I'm in the detection "radius" of the same anomaly (geiger counter sound is on but no damage dealt to me), well, I have no sound because the anomaly is already emitting the sound of the radiation hit for the NPC (which I can't hear).

But like I said, I need to do some more tests with NPCs/mutants to see if it's a viable solution.


EDIT:
"Have you looked at Xiani's zone_mgr.script in FPS 1.21?"
--> I just did, briefly. If my solution doesn't satisfy me in the end, I will definitely take a more interested look in this. Thanks.
  17:09:59  21 May 2014
profilee-mailreply Message URLTo the Top
bamah
Senior Resident
 

 
On forum: 02/10/2008
 

Message edited by:
bamah
05/21/2014 17:10:58
Messages: 911
SacriPan

ThunderFreak did an anomaly spawning mod, it's like zone_manager mated with ogsm though.
Maybe it'll help.
https://www.mediafire.com/?bzphkpky77p3rzk
Could you post your spawn of a radioactive field if or when you finish. I'm interested.
Thanks
B
  21:41:10  21 May 2014
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
 

Message edited by:
SacriPan
05/21/2014 22:04:24
Messages: 319
Thanks again Bamah

I took a look at his script and noticed something I missed before.

Indeed, he uses the same function as me to make the anomalies real (deal damage). In this function, you can define the radius for anomalies.

It appears that this radius is also for the radiation anomaly (quite logical), but the way radiation field is slightly different than other anomalies.
The way I was testing my radiation fields is that I put a too small radius (3 to 5 meters), therefore the Geiger counter beeped a lot but the anomaly didn't do any damage. It was in fact because the anomaly didn't have a center (which deals damage) because it was too small for a radioactive field. At least, that's how I understand it.

I modified my script ans spawned a radiation anomaly with a radius of 30 and it worked like a charm



EDIT:
It wasn't what I explained that made it work, it was the "custom_data" flag. I had to pass an argument with "_on" instead of "nil" and that's what makes it work!



If you still want to take a look at the mod I made for nothing (...), here it is:

http://rghost.net/55522452

It's for the 1.6 patch. Start a new game, then press "T" in the main menu to spawn the test anomaly.
I left the buzz particles in the config file just so you can see where it is

It works well (didn't tested it with alife though...)
  02:59:05  22 May 2014
profilee-mailreply Message URLTo the Top
bamah
Senior Resident
 

 
On forum: 02/10/2008
Messages: 911
Cool...I'll check it out!
Thanks
B
 
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-2022 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.