Jump to content

Persistant Radiation?


ThothTheScribe

Recommended Posts

I've been playing around with explosions and projectiles in the GECK, specifically to make the radiation from the fatman and new nuclear based weapons I'm working on more severe and lasting. While doing this, I discovered that the game doesn't keep track of the radiation from such explosions (regardless of duration) if you leave the cell and then return. It occured to me that I could make the explosion create an object and that I could make an object that emits radiation for this purpose. My problem lies in how exactly to do this, as the game uses RadiationMarkers to keep track of persistant radiation and each of those is an individual reference.

 

I'll admit I'm a novice at scripting, so it's probably real simple. I need to know how I can either use a script to create an object with specific reference values (placing an item w/explosion that scripts in a radiation marker) or create a new object in the GECK that has radiation by default for placement by the explosion. Any help would be appreciated and who knows, maybe we'll see Thoth's Nuclear Arsenal hit the Nexus at some point. :thumbsup:

Link to comment
Share on other sites

That could work, but it would limit the number of such markers. I'd ideally like to have the level of radiation (and probably a soft green glow) build up and become more intense as more nuclear weapons are used in an area. I want the Capitol building's trenches to be a glowing hellscape after bombarding it with the MIRV. :D
Link to comment
Share on other sites

That could work, but it would limit the number of such markers. I'd ideally like to have the level of radiation (and probably a soft green glow) build up and become more intense as more nuclear weapons are used in an area. I want the Capitol building's trenches to be a glowing hellscape after bombarding it with the MIRV. :D
I think you'd have to do what GSManners described. Radiation markers have their radius and intensity defined in their Extra tab which, as far as I'm aware, can't be modified via script.
Link to comment
Share on other sites

This is an interesting concept and I like this. Will you be trying to make it as mod friendly as possible?

 

The finished product, assuming I can get over this hurdle, should only conflict with something that modifies the fatman explosion and projectile. Other than that it would all be new materials being brought in, so no real issues there.

 

I think you'd have to do what GSManners described. Radiation markers have their radius and intensity defined in their Extra tab which, as far as I'm aware, can't be modified via script.

 

I don't like the idea of making it limited in numbers, though it's certainly possible to have a limited number of special nuclear weapons that have the permenant radiation. Maybe I could set up a cycling system that takes the first markers placed and moves them to the new location when new markers are unavailable.

Link to comment
Share on other sites

For numbers, you may be limited to the number of markers you create in some cell somewhere in GECK (due to transient nature of placeatme and markers). Having too many objects is bad modding form and would eventually cause the engine to crash. It's really not surprising that the game cleans those up automatically. I think I would use a set number of radiation markers with scripts that have functions that are aware of global or quest variables that trigger their appearance (which would act as a kind of message port for the markers). That way you don't need to track the markers at all or worry about how many there are.

 

As for the area of effect, IIRC that is radius which means that the effect is a sphere. Since the effect is not visible, it seems to me that you could simply have the marker rise to where you want it using something like setpos Z value in a time-tracking function.

Link to comment
Share on other sites

Maybe I could set up a cycling system that takes the first markers placed and moves them to the new location when new markers are unavailable.
I think that'd be the best way to go about it. If you use FOSE, you could throw all of the markers into a formlist and simply use a global or quest variable as an index to keep track of how many are in use. When you hit the last one, you'd just reset the index.

 

So, you'd edit the explosion of whatever weapon you were modifying, remove its radiation parameters, and set its Placed Impact Object to a scripted activator. The script on that activator would be something like:

 

;Assuming AARadIndex is a global variable
;Assuming AARadList is a formlist containing all of the stocked RadiationMarkers
;Assuming AARadBankMarker is an XMarker in the cell where you're storing the stocked RadiationMarkers
;Assuming AARadLight is the base form of the green glow effect

scn AARadPlacer

short DoOnce
float Timer
ref Me
ref RadMarker
ref RadGlow

begin Gamemode
if (DoOnce == 0)
	;Initialization
	set DoOnce to 1
	set Me to getSelf
	Me.disable  ;Prevents the placer from being visible, scripts still run on disable references
	set Timer to 30  ;Duration in seconds that the radiation will persist
	set RadGlow to placeAtMe AARadLight  ;Place the glow effect
	set RadMarker to ListGetNthForm AARadList AARadIndex  ;Get the RadiationMarker reference to use
	RadMarker.moveto Me  ;Move the RadiationMarker to the explosion
	
	;Changing the index for the next explosion
	set AARadIndex to AARadIndex + 1
	if (AARadIndex == ListGetCount AARadList)
		set AARadIndex to 0
	endif
	
else
	if (Timer > 0)
		set Timer to Timer - getSecondsPassed

	else
		;Cleanup
		RadMarker.moveto AARadBankMarker  ;Move the RadiationMarker back to the bank
		
		;Disable and dispose of the glow effect
		RadGlow.disable
		RadGlow.markForDelete
		
		;Dispose of the RadPlacer
		Me.markForDelete

	endif
endif
end

...which looks a lot less like gibberish when you have Cipscis' syntax highlighting on. I wouldn't claim that this is perfect or the absolute best way of going about it, since I haven't tested it or anything, but something like that should accomplish what you're going for. If you wanted the radiation to diminish gradually, though, that'd be a real pain in the ass.

Link to comment
Share on other sites

Wow. I suddenly feel way out of my league. I'm not familiar with FOSE's uses in scripting myself, though I've played with many mods that do use it. It'll take a bit of doing, but I'll probably be able to puzzle it out.
It really does look a lot less intimidating with syntax highlighting. Just read the comments and look up any of the functions you don't understand on the wiki.

 

I don't know how much you've learned about scripting, so forgive me if I'm underestimating what you already know, but if you're still learning it, I personally found it very helpful to just find things that happen in the game and take a look at the scripts that make them tick. That will probably help you as much or more than most tutorials, although there are some very good tutorials, such as the ones Cipscis put together.

 

There's not really a lot to learning to use FOSE that goes beyond basic scripting knowledge itself. The GECK wiki has a bit of information about its functions (although that page doesn't list all of the information the wiki has to offer on FOSE; you sort of have to dig it up with the search function), and there's a full list of them on the official site. I think the only component of the script I posted that really involves FOSE is the use of its formlist functions, which are explained pretty thoroughly here.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...